repo_name
stringlengths
1
52
repo_creator
stringclasses
6 values
programming_language
stringclasses
4 values
code
stringlengths
0
9.68M
num_lines
int64
1
234k
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Gets information on the settings of query suggestions for an index. This is // used to check the current settings applied to query suggestions. // DescribeQuerySuggestionsConfig is currently not supported in the Amazon Web // Services GovCloud (US-West) region. func (c *Client) DescribeQuerySuggestionsConfig(ctx context.Context, params *DescribeQuerySuggestionsConfigInput, optFns ...func(*Options)) (*DescribeQuerySuggestionsConfigOutput, error) { if params == nil { params = &DescribeQuerySuggestionsConfigInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeQuerySuggestionsConfig", params, optFns, c.addOperationDescribeQuerySuggestionsConfigMiddlewares) if err != nil { return nil, err } out := result.(*DescribeQuerySuggestionsConfigOutput) out.ResultMetadata = metadata return out, nil } type DescribeQuerySuggestionsConfigInput struct { // The identifier of the index with query suggestions that you want to get // information on. // // This member is required. IndexId *string noSmithyDocumentSerde } type DescribeQuerySuggestionsConfigOutput struct { // Configuration information for the document fields/attributes that you want to // base query suggestions on. AttributeSuggestionsConfig *types.AttributeSuggestionsDescribeConfig // TRUE to use all queries, otherwise use only queries that include user // information to generate the query suggestions. IncludeQueriesWithoutUserInformation *bool // The Unix timestamp when query suggestions for an index was last cleared. After // you clear suggestions, Amazon Kendra learns new suggestions based on new queries // added to the query log from the time you cleared suggestions. Amazon Kendra only // considers re-occurences of a query from the time you cleared suggestions. LastClearTime *time.Time // The Unix timestamp when query suggestions for an index was last updated. Amazon // Kendra automatically updates suggestions every 24 hours, after you change a // setting or after you apply a block list (https://docs.aws.amazon.com/kendra/latest/dg/query-suggestions.html#query-suggestions-blocklist) // . LastSuggestionsBuildTime *time.Time // The minimum number of unique users who must search a query in order for the // query to be eligible to suggest to your users. MinimumNumberOfQueryingUsers *int32 // The minimum number of times a query must be searched in order for the query to // be eligible to suggest to your users. MinimumQueryCount *int32 // Whether query suggestions are currently in ENABLED mode or LEARN_ONLY mode. By // default, Amazon Kendra enables query suggestions. LEARN_ONLY turns off query // suggestions for your users. You can change the mode using the // UpdateQuerySuggestionsConfig (https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateQuerySuggestionsConfig.html) // API. Mode types.Mode // How recent your queries are in your query log time window (in days). QueryLogLookBackWindowInDays *int32 // Whether the status of query suggestions settings is currently ACTIVE or UPDATING // . Active means the current settings apply and Updating means your changed // settings are in the process of applying. Status types.QuerySuggestionsStatus // The current total count of query suggestions for an index. This count can // change when you update your query suggestions settings, if you filter out // certain queries from suggestions using a block list, and as the query log // accumulates more queries for Amazon Kendra to learn from. If the count is much // lower than you expected, it could be because Amazon Kendra needs more queries in // the query history to learn from or your current query suggestions settings are // too strict. TotalSuggestionsCount *int32 // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeQuerySuggestionsConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeQuerySuggestionsConfig{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeQuerySuggestionsConfig{}, 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 = addOpDescribeQuerySuggestionsConfigValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeQuerySuggestionsConfig(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribeQuerySuggestionsConfig(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "DescribeQuerySuggestionsConfig", } }
179
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Gets information about an existing Amazon Kendra thesaurus. func (c *Client) DescribeThesaurus(ctx context.Context, params *DescribeThesaurusInput, optFns ...func(*Options)) (*DescribeThesaurusOutput, error) { if params == nil { params = &DescribeThesaurusInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeThesaurus", params, optFns, c.addOperationDescribeThesaurusMiddlewares) if err != nil { return nil, err } out := result.(*DescribeThesaurusOutput) out.ResultMetadata = metadata return out, nil } type DescribeThesaurusInput struct { // The identifier of the thesaurus you want to get information on. // // This member is required. Id *string // The identifier of the index for the thesaurus. // // This member is required. IndexId *string noSmithyDocumentSerde } type DescribeThesaurusOutput struct { // The Unix timestamp when the thesaurus was created. CreatedAt *time.Time // The thesaurus description. Description *string // When the Status field value is FAILED , the ErrorMessage field provides more // information. ErrorMessage *string // The size of the thesaurus file in bytes. FileSizeBytes *int64 // The identifier of the thesaurus. Id *string // The identifier of the index for the thesaurus. IndexId *string // The thesaurus name. Name *string // An IAM role that gives Amazon Kendra permissions to access thesaurus file // specified in SourceS3Path . RoleArn *string // Information required to find a specific file in an Amazon S3 bucket. SourceS3Path *types.S3Path // The current status of the thesaurus. When the value is ACTIVE , queries are able // to use the thesaurus. If the Status field value is FAILED , the ErrorMessage // field provides more information. If the status is ACTIVE_BUT_UPDATE_FAILED , it // means that Amazon Kendra could not ingest the new thesaurus file. The old // thesaurus file is still active. Status types.ThesaurusStatus // The number of synonym rules in the thesaurus file. SynonymRuleCount *int64 // The number of unique terms in the thesaurus file. For example, the synonyms // a,b,c and a=>d , the term count would be 4. TermCount *int64 // The Unix timestamp when the thesaurus was last updated. UpdatedAt *time.Time // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeThesaurusMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeThesaurus{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeThesaurus{}, 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 = addOpDescribeThesaurusValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeThesaurus(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribeThesaurus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "DescribeThesaurus", } }
174
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Prevents users or groups in your IAM Identity Center identity source from // accessing your Amazon Kendra experience. You can create an Amazon Kendra // experience such as a search application. For more information on creating a // search application experience, see Building a search experience with no code (https://docs.aws.amazon.com/kendra/latest/dg/deploying-search-experience-no-code.html) // . func (c *Client) DisassociateEntitiesFromExperience(ctx context.Context, params *DisassociateEntitiesFromExperienceInput, optFns ...func(*Options)) (*DisassociateEntitiesFromExperienceOutput, error) { if params == nil { params = &DisassociateEntitiesFromExperienceInput{} } result, metadata, err := c.invokeOperation(ctx, "DisassociateEntitiesFromExperience", params, optFns, c.addOperationDisassociateEntitiesFromExperienceMiddlewares) if err != nil { return nil, err } out := result.(*DisassociateEntitiesFromExperienceOutput) out.ResultMetadata = metadata return out, nil } type DisassociateEntitiesFromExperienceInput struct { // Lists users or groups in your IAM Identity Center identity source. // // This member is required. EntityList []types.EntityConfiguration // The identifier of your Amazon Kendra experience. // // This member is required. Id *string // The identifier of the index for your Amazon Kendra experience. // // This member is required. IndexId *string noSmithyDocumentSerde } type DisassociateEntitiesFromExperienceOutput struct { // Lists the users or groups in your IAM Identity Center identity source that // failed to properly remove access to your Amazon Kendra experience. FailedEntityList []types.FailedEntity // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDisassociateEntitiesFromExperienceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisassociateEntitiesFromExperience{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisassociateEntitiesFromExperience{}, 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 = addOpDisassociateEntitiesFromExperienceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateEntitiesFromExperience(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDisassociateEntitiesFromExperience(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "DisassociateEntitiesFromExperience", } }
140
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes the specific permissions of users or groups in your IAM Identity Center // identity source with access to your Amazon Kendra experience. You can create an // Amazon Kendra experience such as a search application. For more information on // creating a search application experience, see Building a search experience with // no code (https://docs.aws.amazon.com/kendra/latest/dg/deploying-search-experience-no-code.html) // . func (c *Client) DisassociatePersonasFromEntities(ctx context.Context, params *DisassociatePersonasFromEntitiesInput, optFns ...func(*Options)) (*DisassociatePersonasFromEntitiesOutput, error) { if params == nil { params = &DisassociatePersonasFromEntitiesInput{} } result, metadata, err := c.invokeOperation(ctx, "DisassociatePersonasFromEntities", params, optFns, c.addOperationDisassociatePersonasFromEntitiesMiddlewares) if err != nil { return nil, err } out := result.(*DisassociatePersonasFromEntitiesOutput) out.ResultMetadata = metadata return out, nil } type DisassociatePersonasFromEntitiesInput struct { // The identifiers of users or groups in your IAM Identity Center identity source. // For example, user IDs could be user emails. // // This member is required. EntityIds []string // The identifier of your Amazon Kendra experience. // // This member is required. Id *string // The identifier of the index for your Amazon Kendra experience. // // This member is required. IndexId *string noSmithyDocumentSerde } type DisassociatePersonasFromEntitiesOutput struct { // Lists the users or groups in your IAM Identity Center identity source that // failed to properly remove access to your Amazon Kendra experience. FailedEntityList []types.FailedEntity // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDisassociatePersonasFromEntitiesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisassociatePersonasFromEntities{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisassociatePersonasFromEntities{}, 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 = addOpDisassociatePersonasFromEntitiesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociatePersonasFromEntities(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDisassociatePersonasFromEntities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "DisassociatePersonasFromEntities", } }
142
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Fetches the queries that are suggested to your users. GetQuerySuggestions is // currently not supported in the Amazon Web Services GovCloud (US-West) region. func (c *Client) GetQuerySuggestions(ctx context.Context, params *GetQuerySuggestionsInput, optFns ...func(*Options)) (*GetQuerySuggestionsOutput, error) { if params == nil { params = &GetQuerySuggestionsInput{} } result, metadata, err := c.invokeOperation(ctx, "GetQuerySuggestions", params, optFns, c.addOperationGetQuerySuggestionsMiddlewares) if err != nil { return nil, err } out := result.(*GetQuerySuggestionsOutput) out.ResultMetadata = metadata return out, nil } type GetQuerySuggestionsInput struct { // The identifier of the index you want to get query suggestions from. // // This member is required. IndexId *string // The text of a user's query to generate query suggestions. A query is suggested // if the query prefix matches what a user starts to type as their query. Amazon // Kendra does not show any suggestions if a user types fewer than two characters // or more than 60 characters. A query must also have at least one search result // and contain at least one word of more than four characters. // // This member is required. QueryText *string // Configuration information for the document fields/attributes that you want to // base query suggestions on. AttributeSuggestionsConfig *types.AttributeSuggestionsGetConfig // The maximum number of query suggestions you want to show to your users. MaxSuggestionsCount *int32 // The suggestions type to base query suggestions on. The suggestion types are // query history or document fields/attributes. You can set one type or the other. // If you set query history as your suggestions type, Amazon Kendra suggests // queries relevant to your users based on popular queries in the query history. If // you set document fields/attributes as your suggestions type, Amazon Kendra // suggests queries relevant to your users based on the contents of document // fields. SuggestionTypes []types.SuggestionType noSmithyDocumentSerde } type GetQuerySuggestionsOutput struct { // The identifier for a list of query suggestions for an index. QuerySuggestionsId *string // A list of query suggestions for an index. Suggestions []types.Suggestion // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetQuerySuggestionsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetQuerySuggestions{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetQuerySuggestions{}, 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 = addOpGetQuerySuggestionsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetQuerySuggestions(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetQuerySuggestions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "GetQuerySuggestions", } }
154
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra 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/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves search metrics data. The data provides a snapshot of how your users // interact with your search application and how effective the application is. func (c *Client) GetSnapshots(ctx context.Context, params *GetSnapshotsInput, optFns ...func(*Options)) (*GetSnapshotsOutput, error) { if params == nil { params = &GetSnapshotsInput{} } result, metadata, err := c.invokeOperation(ctx, "GetSnapshots", params, optFns, c.addOperationGetSnapshotsMiddlewares) if err != nil { return nil, err } out := result.(*GetSnapshotsOutput) out.ResultMetadata = metadata return out, nil } type GetSnapshotsInput struct { // The identifier of the index to get search metrics data. // // This member is required. IndexId *string // The time interval or time window to get search metrics data. The time interval // uses the time zone of your index. You can view data in the following time // windows: // - THIS_WEEK : The current week, starting on the Sunday and ending on the day // before the current date. // - ONE_WEEK_AGO : The previous week, starting on the Sunday and ending on the // following Saturday. // - TWO_WEEKS_AGO : The week before the previous week, starting on the Sunday // and ending on the following Saturday. // - THIS_MONTH : The current month, starting on the first day of the month and // ending on the day before the current date. // - ONE_MONTH_AGO : The previous month, starting on the first day of the month // and ending on the last day of the month. // - TWO_MONTHS_AGO : The month before the previous month, starting on the first // day of the month and ending on last day of the month. // // This member is required. Interval types.Interval // The metric you want to retrieve. You can specify only one metric per call. For // more information about the metrics you can view, see Gaining insights with // search analytics (https://docs.aws.amazon.com/kendra/latest/dg/search-analytics.html) // . // // This member is required. MetricType types.MetricType // The maximum number of returned data for the metric. MaxResults *int32 // If the previous response was incomplete (because there is more data to // retrieve), Amazon Kendra returns a pagination token in the response. You can use // this pagination token to retrieve the next set of search metrics data. NextToken *string noSmithyDocumentSerde } type GetSnapshotsOutput struct { // If the response is truncated, Amazon Kendra returns this token, which you can // use in a later request to retrieve the next set of search metrics data. NextToken *string // The Unix timestamp for the beginning and end of the time window for the search // metrics data. SnapShotTimeFilter *types.TimeRange // The search metrics data. The data returned depends on the metric type you // requested. SnapshotsData [][]string // The column headers for the search metrics data. SnapshotsDataHeader []string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetSnapshotsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetSnapshots{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetSnapshots{}, 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 = addOpGetSnapshotsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSnapshots(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 } // GetSnapshotsAPIClient is a client that implements the GetSnapshots operation. type GetSnapshotsAPIClient interface { GetSnapshots(context.Context, *GetSnapshotsInput, ...func(*Options)) (*GetSnapshotsOutput, error) } var _ GetSnapshotsAPIClient = (*Client)(nil) // GetSnapshotsPaginatorOptions is the paginator options for GetSnapshots type GetSnapshotsPaginatorOptions struct { // The maximum number of returned data for the metric. 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 } // GetSnapshotsPaginator is a paginator for GetSnapshots type GetSnapshotsPaginator struct { options GetSnapshotsPaginatorOptions client GetSnapshotsAPIClient params *GetSnapshotsInput nextToken *string firstPage bool } // NewGetSnapshotsPaginator returns a new GetSnapshotsPaginator func NewGetSnapshotsPaginator(client GetSnapshotsAPIClient, params *GetSnapshotsInput, optFns ...func(*GetSnapshotsPaginatorOptions)) *GetSnapshotsPaginator { if params == nil { params = &GetSnapshotsInput{} } options := GetSnapshotsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &GetSnapshotsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *GetSnapshotsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next GetSnapshots page. func (p *GetSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetSnapshotsOutput, 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.GetSnapshots(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opGetSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "GetSnapshots", } }
263
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra 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/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists one or more access control configurations for an index. This includes // user and group access information for your documents. This is useful for user // context filtering, where search results are filtered based on the user or their // group access to documents. func (c *Client) ListAccessControlConfigurations(ctx context.Context, params *ListAccessControlConfigurationsInput, optFns ...func(*Options)) (*ListAccessControlConfigurationsOutput, error) { if params == nil { params = &ListAccessControlConfigurationsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListAccessControlConfigurations", params, optFns, c.addOperationListAccessControlConfigurationsMiddlewares) if err != nil { return nil, err } out := result.(*ListAccessControlConfigurationsOutput) out.ResultMetadata = metadata return out, nil } type ListAccessControlConfigurationsInput struct { // The identifier of the index for the access control configuration. // // This member is required. IndexId *string // The maximum number of access control configurations to return. MaxResults *int32 // If the previous response was incomplete (because there's more data to // retrieve), Amazon Kendra returns a pagination token in the response. You can use // this pagination token to retrieve the next set of access control configurations. NextToken *string noSmithyDocumentSerde } type ListAccessControlConfigurationsOutput struct { // The details of your access control configurations. // // This member is required. AccessControlConfigurations []types.AccessControlConfigurationSummary // If the response is truncated, Amazon Kendra returns this token, which you can // use in the subsequent request to retrieve the next set of access control // configurations. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListAccessControlConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListAccessControlConfigurations{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListAccessControlConfigurations{}, 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 = addOpListAccessControlConfigurationsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccessControlConfigurations(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 } // ListAccessControlConfigurationsAPIClient is a client that implements the // ListAccessControlConfigurations operation. type ListAccessControlConfigurationsAPIClient interface { ListAccessControlConfigurations(context.Context, *ListAccessControlConfigurationsInput, ...func(*Options)) (*ListAccessControlConfigurationsOutput, error) } var _ ListAccessControlConfigurationsAPIClient = (*Client)(nil) // ListAccessControlConfigurationsPaginatorOptions is the paginator options for // ListAccessControlConfigurations type ListAccessControlConfigurationsPaginatorOptions struct { // The maximum number of access control configurations to return. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListAccessControlConfigurationsPaginator is a paginator for // ListAccessControlConfigurations type ListAccessControlConfigurationsPaginator struct { options ListAccessControlConfigurationsPaginatorOptions client ListAccessControlConfigurationsAPIClient params *ListAccessControlConfigurationsInput nextToken *string firstPage bool } // NewListAccessControlConfigurationsPaginator returns a new // ListAccessControlConfigurationsPaginator func NewListAccessControlConfigurationsPaginator(client ListAccessControlConfigurationsAPIClient, params *ListAccessControlConfigurationsInput, optFns ...func(*ListAccessControlConfigurationsPaginatorOptions)) *ListAccessControlConfigurationsPaginator { if params == nil { params = &ListAccessControlConfigurationsInput{} } options := ListAccessControlConfigurationsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListAccessControlConfigurationsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListAccessControlConfigurationsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListAccessControlConfigurations page. func (p *ListAccessControlConfigurationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAccessControlConfigurationsOutput, 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.ListAccessControlConfigurations(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListAccessControlConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "ListAccessControlConfigurations", } }
237
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra 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/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the data source connectors that you have created. func (c *Client) ListDataSources(ctx context.Context, params *ListDataSourcesInput, optFns ...func(*Options)) (*ListDataSourcesOutput, error) { if params == nil { params = &ListDataSourcesInput{} } result, metadata, err := c.invokeOperation(ctx, "ListDataSources", params, optFns, c.addOperationListDataSourcesMiddlewares) if err != nil { return nil, err } out := result.(*ListDataSourcesOutput) out.ResultMetadata = metadata return out, nil } type ListDataSourcesInput struct { // The identifier of the index used with one or more data source connectors. // // This member is required. IndexId *string // The maximum number of data source connectors to return. MaxResults *int32 // If the previous response was incomplete (because there is more data to // retrieve), Amazon Kendra returns a pagination token in the response. You can use // this pagination token to retrieve the next set of data source connectors. NextToken *string noSmithyDocumentSerde } type ListDataSourcesOutput struct { // If the response is truncated, Amazon Kendra returns this token that you can use // in the subsequent request to retrieve the next set of data source connectors. NextToken *string // An array of summary information for one or more data source connector. SummaryItems []types.DataSourceSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListDataSourcesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListDataSources{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListDataSources{}, 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 = addOpListDataSourcesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDataSources(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 } // ListDataSourcesAPIClient is a client that implements the ListDataSources // operation. type ListDataSourcesAPIClient interface { ListDataSources(context.Context, *ListDataSourcesInput, ...func(*Options)) (*ListDataSourcesOutput, error) } var _ ListDataSourcesAPIClient = (*Client)(nil) // ListDataSourcesPaginatorOptions is the paginator options for ListDataSources type ListDataSourcesPaginatorOptions struct { // The maximum number of data source connectors to return. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListDataSourcesPaginator is a paginator for ListDataSources type ListDataSourcesPaginator struct { options ListDataSourcesPaginatorOptions client ListDataSourcesAPIClient params *ListDataSourcesInput nextToken *string firstPage bool } // NewListDataSourcesPaginator returns a new ListDataSourcesPaginator func NewListDataSourcesPaginator(client ListDataSourcesAPIClient, params *ListDataSourcesInput, optFns ...func(*ListDataSourcesPaginatorOptions)) *ListDataSourcesPaginator { if params == nil { params = &ListDataSourcesInput{} } options := ListDataSourcesPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListDataSourcesPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDataSourcesPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDataSources page. func (p *ListDataSourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDataSourcesOutput, 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.ListDataSources(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListDataSources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "ListDataSources", } }
228
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra 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/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets statistics about synchronizing a data source connector. func (c *Client) ListDataSourceSyncJobs(ctx context.Context, params *ListDataSourceSyncJobsInput, optFns ...func(*Options)) (*ListDataSourceSyncJobsOutput, error) { if params == nil { params = &ListDataSourceSyncJobsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListDataSourceSyncJobs", params, optFns, c.addOperationListDataSourceSyncJobsMiddlewares) if err != nil { return nil, err } out := result.(*ListDataSourceSyncJobsOutput) out.ResultMetadata = metadata return out, nil } type ListDataSourceSyncJobsInput struct { // The identifier of the data source connector. // // This member is required. Id *string // The identifier of the index used with the data source connector. // // This member is required. IndexId *string // The maximum number of synchronization jobs to return in the response. If there // are fewer results in the list, this response contains only the actual results. MaxResults *int32 // If the previous response was incomplete (because there is more data to // retrieve), Amazon Kendra returns a pagination token in the response. You can use // this pagination token to retrieve the next set of jobs. NextToken *string // When specified, the synchronization jobs returned in the list are limited to // jobs between the specified dates. StartTimeFilter *types.TimeRange // Only returns synchronization jobs with the Status field equal to the specified // status. StatusFilter types.DataSourceSyncJobStatus noSmithyDocumentSerde } type ListDataSourceSyncJobsOutput struct { // A history of synchronization jobs for the data source connector. History []types.DataSourceSyncJob // If the response is truncated, Amazon Kendra returns this token that you can use // in the subsequent request to retrieve the next set of jobs. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListDataSourceSyncJobsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListDataSourceSyncJobs{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListDataSourceSyncJobs{}, 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 = addOpListDataSourceSyncJobsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDataSourceSyncJobs(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 } // ListDataSourceSyncJobsAPIClient is a client that implements the // ListDataSourceSyncJobs operation. type ListDataSourceSyncJobsAPIClient interface { ListDataSourceSyncJobs(context.Context, *ListDataSourceSyncJobsInput, ...func(*Options)) (*ListDataSourceSyncJobsOutput, error) } var _ ListDataSourceSyncJobsAPIClient = (*Client)(nil) // ListDataSourceSyncJobsPaginatorOptions is the paginator options for // ListDataSourceSyncJobs type ListDataSourceSyncJobsPaginatorOptions struct { // The maximum number of synchronization jobs to return in the response. If there // are fewer results in the list, this response contains only the actual results. 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 } // ListDataSourceSyncJobsPaginator is a paginator for ListDataSourceSyncJobs type ListDataSourceSyncJobsPaginator struct { options ListDataSourceSyncJobsPaginatorOptions client ListDataSourceSyncJobsAPIClient params *ListDataSourceSyncJobsInput nextToken *string firstPage bool } // NewListDataSourceSyncJobsPaginator returns a new ListDataSourceSyncJobsPaginator func NewListDataSourceSyncJobsPaginator(client ListDataSourceSyncJobsAPIClient, params *ListDataSourceSyncJobsInput, optFns ...func(*ListDataSourceSyncJobsPaginatorOptions)) *ListDataSourceSyncJobsPaginator { if params == nil { params = &ListDataSourceSyncJobsInput{} } options := ListDataSourceSyncJobsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListDataSourceSyncJobsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListDataSourceSyncJobsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListDataSourceSyncJobs page. func (p *ListDataSourceSyncJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDataSourceSyncJobsOutput, 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.ListDataSourceSyncJobs(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListDataSourceSyncJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "ListDataSourceSyncJobs", } }
244
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra 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/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists specific permissions of users and groups with access to your Amazon // Kendra experience. func (c *Client) ListEntityPersonas(ctx context.Context, params *ListEntityPersonasInput, optFns ...func(*Options)) (*ListEntityPersonasOutput, error) { if params == nil { params = &ListEntityPersonasInput{} } result, metadata, err := c.invokeOperation(ctx, "ListEntityPersonas", params, optFns, c.addOperationListEntityPersonasMiddlewares) if err != nil { return nil, err } out := result.(*ListEntityPersonasOutput) out.ResultMetadata = metadata return out, nil } type ListEntityPersonasInput struct { // The identifier of your Amazon Kendra experience. // // This member is required. Id *string // The identifier of the index for your Amazon Kendra experience. // // This member is required. IndexId *string // The maximum number of returned users or groups. MaxResults *int32 // If the previous response was incomplete (because there is more data to // retrieve), Amazon Kendra returns a pagination token in the response. You can use // this pagination token to retrieve the next set of users or groups. NextToken *string noSmithyDocumentSerde } type ListEntityPersonasOutput struct { // If the response is truncated, Amazon Kendra returns this token, which you can // use in a later request to retrieve the next set of users or groups. NextToken *string // An array of summary information for one or more users or groups. SummaryItems []types.PersonasSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListEntityPersonasMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListEntityPersonas{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListEntityPersonas{}, 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 = addOpListEntityPersonasValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEntityPersonas(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 } // ListEntityPersonasAPIClient is a client that implements the ListEntityPersonas // operation. type ListEntityPersonasAPIClient interface { ListEntityPersonas(context.Context, *ListEntityPersonasInput, ...func(*Options)) (*ListEntityPersonasOutput, error) } var _ ListEntityPersonasAPIClient = (*Client)(nil) // ListEntityPersonasPaginatorOptions is the paginator options for // ListEntityPersonas type ListEntityPersonasPaginatorOptions struct { // The maximum number of returned users or groups. 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 } // ListEntityPersonasPaginator is a paginator for ListEntityPersonas type ListEntityPersonasPaginator struct { options ListEntityPersonasPaginatorOptions client ListEntityPersonasAPIClient params *ListEntityPersonasInput nextToken *string firstPage bool } // NewListEntityPersonasPaginator returns a new ListEntityPersonasPaginator func NewListEntityPersonasPaginator(client ListEntityPersonasAPIClient, params *ListEntityPersonasInput, optFns ...func(*ListEntityPersonasPaginatorOptions)) *ListEntityPersonasPaginator { if params == nil { params = &ListEntityPersonasInput{} } options := ListEntityPersonasPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListEntityPersonasPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEntityPersonasPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEntityPersonas page. func (p *ListEntityPersonasPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEntityPersonasOutput, 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.ListEntityPersonas(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListEntityPersonas(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "ListEntityPersonas", } }
235
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra 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/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists users or groups in your IAM Identity Center identity source that are // granted access to your Amazon Kendra experience. You can create an Amazon Kendra // experience such as a search application. For more information on creating a // search application experience, see Building a search experience with no code (https://docs.aws.amazon.com/kendra/latest/dg/deploying-search-experience-no-code.html) // . func (c *Client) ListExperienceEntities(ctx context.Context, params *ListExperienceEntitiesInput, optFns ...func(*Options)) (*ListExperienceEntitiesOutput, error) { if params == nil { params = &ListExperienceEntitiesInput{} } result, metadata, err := c.invokeOperation(ctx, "ListExperienceEntities", params, optFns, c.addOperationListExperienceEntitiesMiddlewares) if err != nil { return nil, err } out := result.(*ListExperienceEntitiesOutput) out.ResultMetadata = metadata return out, nil } type ListExperienceEntitiesInput struct { // The identifier of your Amazon Kendra experience. // // This member is required. Id *string // The identifier of the index for your Amazon Kendra experience. // // This member is required. IndexId *string // If the previous response was incomplete (because there is more data to // retrieve), Amazon Kendra returns a pagination token in the response. You can use // this pagination token to retrieve the next set of users or groups. NextToken *string noSmithyDocumentSerde } type ListExperienceEntitiesOutput struct { // If the response is truncated, Amazon Kendra returns this token, which you can // use in a later request to retrieve the next set of users or groups. NextToken *string // An array of summary information for one or more users or groups. SummaryItems []types.ExperienceEntitiesSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListExperienceEntitiesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListExperienceEntities{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListExperienceEntities{}, 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 = addOpListExperienceEntitiesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListExperienceEntities(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 } // ListExperienceEntitiesAPIClient is a client that implements the // ListExperienceEntities operation. type ListExperienceEntitiesAPIClient interface { ListExperienceEntities(context.Context, *ListExperienceEntitiesInput, ...func(*Options)) (*ListExperienceEntitiesOutput, error) } var _ ListExperienceEntitiesAPIClient = (*Client)(nil) // ListExperienceEntitiesPaginatorOptions is the paginator options for // ListExperienceEntities type ListExperienceEntitiesPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListExperienceEntitiesPaginator is a paginator for ListExperienceEntities type ListExperienceEntitiesPaginator struct { options ListExperienceEntitiesPaginatorOptions client ListExperienceEntitiesAPIClient params *ListExperienceEntitiesInput nextToken *string firstPage bool } // NewListExperienceEntitiesPaginator returns a new ListExperienceEntitiesPaginator func NewListExperienceEntitiesPaginator(client ListExperienceEntitiesAPIClient, params *ListExperienceEntitiesInput, optFns ...func(*ListExperienceEntitiesPaginatorOptions)) *ListExperienceEntitiesPaginator { if params == nil { params = &ListExperienceEntitiesInput{} } options := ListExperienceEntitiesPaginatorOptions{} for _, fn := range optFns { fn(&options) } return &ListExperienceEntitiesPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListExperienceEntitiesPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListExperienceEntities page. func (p *ListExperienceEntitiesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListExperienceEntitiesOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken result, err := p.client.ListExperienceEntities(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListExperienceEntities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "ListExperienceEntities", } }
223
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra 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/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists one or more Amazon Kendra experiences. You can create an Amazon Kendra // experience such as a search application. For more information on creating a // search application experience, see Building a search experience with no code (https://docs.aws.amazon.com/kendra/latest/dg/deploying-search-experience-no-code.html) // . func (c *Client) ListExperiences(ctx context.Context, params *ListExperiencesInput, optFns ...func(*Options)) (*ListExperiencesOutput, error) { if params == nil { params = &ListExperiencesInput{} } result, metadata, err := c.invokeOperation(ctx, "ListExperiences", params, optFns, c.addOperationListExperiencesMiddlewares) if err != nil { return nil, err } out := result.(*ListExperiencesOutput) out.ResultMetadata = metadata return out, nil } type ListExperiencesInput struct { // The identifier of the index for your Amazon Kendra experience. // // This member is required. IndexId *string // The maximum number of returned Amazon Kendra experiences. MaxResults *int32 // If the previous response was incomplete (because there is more data to // retrieve), Amazon Kendra returns a pagination token in the response. You can use // this pagination token to retrieve the next set of Amazon Kendra experiences. NextToken *string noSmithyDocumentSerde } type ListExperiencesOutput struct { // If the response is truncated, Amazon Kendra returns this token, which you can // use in a later request to retrieve the next set of Amazon Kendra experiences. NextToken *string // An array of summary information for one or more Amazon Kendra experiences. SummaryItems []types.ExperiencesSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListExperiencesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListExperiences{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListExperiences{}, 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 = addOpListExperiencesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListExperiences(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 } // ListExperiencesAPIClient is a client that implements the ListExperiences // operation. type ListExperiencesAPIClient interface { ListExperiences(context.Context, *ListExperiencesInput, ...func(*Options)) (*ListExperiencesOutput, error) } var _ ListExperiencesAPIClient = (*Client)(nil) // ListExperiencesPaginatorOptions is the paginator options for ListExperiences type ListExperiencesPaginatorOptions struct { // The maximum number of returned Amazon Kendra experiences. 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 } // ListExperiencesPaginator is a paginator for ListExperiences type ListExperiencesPaginator struct { options ListExperiencesPaginatorOptions client ListExperiencesAPIClient params *ListExperiencesInput nextToken *string firstPage bool } // NewListExperiencesPaginator returns a new ListExperiencesPaginator func NewListExperiencesPaginator(client ListExperiencesAPIClient, params *ListExperiencesInput, optFns ...func(*ListExperiencesPaginatorOptions)) *ListExperiencesPaginator { if params == nil { params = &ListExperiencesInput{} } options := ListExperiencesPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListExperiencesPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListExperiencesPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListExperiences page. func (p *ListExperiencesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListExperiencesOutput, 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.ListExperiences(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListExperiences(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "ListExperiences", } }
231
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra 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/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets a list of FAQ lists associated with an index. func (c *Client) ListFaqs(ctx context.Context, params *ListFaqsInput, optFns ...func(*Options)) (*ListFaqsOutput, error) { if params == nil { params = &ListFaqsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListFaqs", params, optFns, c.addOperationListFaqsMiddlewares) if err != nil { return nil, err } out := result.(*ListFaqsOutput) out.ResultMetadata = metadata return out, nil } type ListFaqsInput struct { // The index that contains the FAQ lists. // // This member is required. IndexId *string // The maximum number of FAQs to return in the response. If there are fewer // results in the list, this response contains only the actual results. MaxResults *int32 // If the previous response was incomplete (because there is more data to // retrieve), Amazon Kendra returns a pagination token in the response. You can use // this pagination token to retrieve the next set of FAQs. NextToken *string noSmithyDocumentSerde } type ListFaqsOutput struct { // information about the FAQs associated with the specified index. FaqSummaryItems []types.FaqSummary // If the response is truncated, Amazon Kendra returns this token that you can use // in the subsequent request to retrieve the next set of FAQs. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListFaqsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListFaqs{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListFaqs{}, 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 = addOpListFaqsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFaqs(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 } // ListFaqsAPIClient is a client that implements the ListFaqs operation. type ListFaqsAPIClient interface { ListFaqs(context.Context, *ListFaqsInput, ...func(*Options)) (*ListFaqsOutput, error) } var _ ListFaqsAPIClient = (*Client)(nil) // ListFaqsPaginatorOptions is the paginator options for ListFaqs type ListFaqsPaginatorOptions struct { // The maximum number of FAQs to return in the response. If there are fewer // results in the list, this response contains only the actual results. 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 } // ListFaqsPaginator is a paginator for ListFaqs type ListFaqsPaginator struct { options ListFaqsPaginatorOptions client ListFaqsAPIClient params *ListFaqsInput nextToken *string firstPage bool } // NewListFaqsPaginator returns a new ListFaqsPaginator func NewListFaqsPaginator(client ListFaqsAPIClient, params *ListFaqsInput, optFns ...func(*ListFaqsPaginatorOptions)) *ListFaqsPaginator { if params == nil { params = &ListFaqsInput{} } options := ListFaqsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListFaqsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFaqsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFaqs page. func (p *ListFaqsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFaqsOutput, 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.ListFaqs(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListFaqs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "ListFaqs", } }
229
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists all your sets of featured results for a given index. Features results are // placed above all other results for certain queries. If there's an exact match of // a query, then one or more specific documents are featured in the search results. func (c *Client) ListFeaturedResultsSets(ctx context.Context, params *ListFeaturedResultsSetsInput, optFns ...func(*Options)) (*ListFeaturedResultsSetsOutput, error) { if params == nil { params = &ListFeaturedResultsSetsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListFeaturedResultsSets", params, optFns, c.addOperationListFeaturedResultsSetsMiddlewares) if err != nil { return nil, err } out := result.(*ListFeaturedResultsSetsOutput) out.ResultMetadata = metadata return out, nil } type ListFeaturedResultsSetsInput struct { // The identifier of the index used for featuring results. // // This member is required. IndexId *string // The maximum number of featured results sets to return. MaxResults *int32 // If the response is truncated, Amazon Kendra returns a pagination token in the // response. You can use this pagination token to retrieve the next set of featured // results sets. NextToken *string noSmithyDocumentSerde } type ListFeaturedResultsSetsOutput struct { // An array of summary information for one or more featured results sets. FeaturedResultsSetSummaryItems []types.FeaturedResultsSetSummary // If the response is truncated, Amazon Kendra returns a pagination token in the // response. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListFeaturedResultsSetsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListFeaturedResultsSets{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListFeaturedResultsSets{}, 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 = addOpListFeaturedResultsSetsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFeaturedResultsSets(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListFeaturedResultsSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "ListFeaturedResultsSets", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra 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/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Provides a list of groups that are mapped to users before a given ordering or // timestamp identifier. ListGroupsOlderThanOrderingId is currently not supported // in the Amazon Web Services GovCloud (US-West) region. func (c *Client) ListGroupsOlderThanOrderingId(ctx context.Context, params *ListGroupsOlderThanOrderingIdInput, optFns ...func(*Options)) (*ListGroupsOlderThanOrderingIdOutput, error) { if params == nil { params = &ListGroupsOlderThanOrderingIdInput{} } result, metadata, err := c.invokeOperation(ctx, "ListGroupsOlderThanOrderingId", params, optFns, c.addOperationListGroupsOlderThanOrderingIdMiddlewares) if err != nil { return nil, err } out := result.(*ListGroupsOlderThanOrderingIdOutput) out.ResultMetadata = metadata return out, nil } type ListGroupsOlderThanOrderingIdInput struct { // The identifier of the index for getting a list of groups mapped to users before // a given ordering or timestamp identifier. // // This member is required. IndexId *string // The timestamp identifier used for the latest PUT or DELETE action for mapping // users to their groups. // // This member is required. OrderingId *int64 // The identifier of the data source for getting a list of groups mapped to users // before a given ordering timestamp identifier. DataSourceId *string // The maximum number of returned groups that are mapped to users before a given // ordering or timestamp identifier. MaxResults *int32 // If the previous response was incomplete (because there is more data to // retrieve), Amazon Kendra returns a pagination token in the response. You can use // this pagination token to retrieve the next set of groups that are mapped to // users before a given ordering or timestamp identifier. NextToken *string noSmithyDocumentSerde } type ListGroupsOlderThanOrderingIdOutput struct { // Summary information for list of groups that are mapped to users before a given // ordering or timestamp identifier. GroupsSummaries []types.GroupSummary // If the response is truncated, Amazon Kendra returns this token that you can use // in the subsequent request to retrieve the next set of groups that are mapped to // users before a given ordering or timestamp identifier. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListGroupsOlderThanOrderingIdMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListGroupsOlderThanOrderingId{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListGroupsOlderThanOrderingId{}, 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 = addOpListGroupsOlderThanOrderingIdValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroupsOlderThanOrderingId(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 } // ListGroupsOlderThanOrderingIdAPIClient is a client that implements the // ListGroupsOlderThanOrderingId operation. type ListGroupsOlderThanOrderingIdAPIClient interface { ListGroupsOlderThanOrderingId(context.Context, *ListGroupsOlderThanOrderingIdInput, ...func(*Options)) (*ListGroupsOlderThanOrderingIdOutput, error) } var _ ListGroupsOlderThanOrderingIdAPIClient = (*Client)(nil) // ListGroupsOlderThanOrderingIdPaginatorOptions is the paginator options for // ListGroupsOlderThanOrderingId type ListGroupsOlderThanOrderingIdPaginatorOptions struct { // The maximum number of returned groups that are mapped to users before a given // ordering or timestamp identifier. 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 } // ListGroupsOlderThanOrderingIdPaginator is a paginator for // ListGroupsOlderThanOrderingId type ListGroupsOlderThanOrderingIdPaginator struct { options ListGroupsOlderThanOrderingIdPaginatorOptions client ListGroupsOlderThanOrderingIdAPIClient params *ListGroupsOlderThanOrderingIdInput nextToken *string firstPage bool } // NewListGroupsOlderThanOrderingIdPaginator returns a new // ListGroupsOlderThanOrderingIdPaginator func NewListGroupsOlderThanOrderingIdPaginator(client ListGroupsOlderThanOrderingIdAPIClient, params *ListGroupsOlderThanOrderingIdInput, optFns ...func(*ListGroupsOlderThanOrderingIdPaginatorOptions)) *ListGroupsOlderThanOrderingIdPaginator { if params == nil { params = &ListGroupsOlderThanOrderingIdInput{} } options := ListGroupsOlderThanOrderingIdPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListGroupsOlderThanOrderingIdPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListGroupsOlderThanOrderingIdPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListGroupsOlderThanOrderingId page. func (p *ListGroupsOlderThanOrderingIdPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListGroupsOlderThanOrderingIdOutput, 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.ListGroupsOlderThanOrderingId(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListGroupsOlderThanOrderingId(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "ListGroupsOlderThanOrderingId", } }
249
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra 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/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the Amazon Kendra indexes that you created. func (c *Client) ListIndices(ctx context.Context, params *ListIndicesInput, optFns ...func(*Options)) (*ListIndicesOutput, error) { if params == nil { params = &ListIndicesInput{} } result, metadata, err := c.invokeOperation(ctx, "ListIndices", params, optFns, c.addOperationListIndicesMiddlewares) if err != nil { return nil, err } out := result.(*ListIndicesOutput) out.ResultMetadata = metadata return out, nil } type ListIndicesInput struct { // The maximum number of indices to return. MaxResults *int32 // If the previous response was incomplete (because there is more data to // retrieve), Amazon Kendra returns a pagination token in the response. You can use // this pagination token to retrieve the next set of indexes. NextToken *string noSmithyDocumentSerde } type ListIndicesOutput struct { // An array of summary information on the configuration of one or more indexes. IndexConfigurationSummaryItems []types.IndexConfigurationSummary // If the response is truncated, Amazon Kendra returns this token that you can use // in the subsequent request to retrieve the next set of indexes. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListIndicesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListIndices{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListIndices{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIndices(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 } // ListIndicesAPIClient is a client that implements the ListIndices operation. type ListIndicesAPIClient interface { ListIndices(context.Context, *ListIndicesInput, ...func(*Options)) (*ListIndicesOutput, error) } var _ ListIndicesAPIClient = (*Client)(nil) // ListIndicesPaginatorOptions is the paginator options for ListIndices type ListIndicesPaginatorOptions struct { // The maximum number of indices to return. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListIndicesPaginator is a paginator for ListIndices type ListIndicesPaginator struct { options ListIndicesPaginatorOptions client ListIndicesAPIClient params *ListIndicesInput nextToken *string firstPage bool } // NewListIndicesPaginator returns a new ListIndicesPaginator func NewListIndicesPaginator(client ListIndicesAPIClient, params *ListIndicesInput, optFns ...func(*ListIndicesPaginatorOptions)) *ListIndicesPaginator { if params == nil { params = &ListIndicesInput{} } options := ListIndicesPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListIndicesPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListIndicesPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListIndices page. func (p *ListIndicesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListIndicesOutput, 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.ListIndices(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListIndices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "ListIndices", } }
219
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra 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/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the block lists used for query suggestions for an index. For information // on the current quota limits for block lists, see Quotas for Amazon Kendra (https://docs.aws.amazon.com/kendra/latest/dg/quotas.html) // . ListQuerySuggestionsBlockLists is currently not supported in the Amazon Web // Services GovCloud (US-West) region. func (c *Client) ListQuerySuggestionsBlockLists(ctx context.Context, params *ListQuerySuggestionsBlockListsInput, optFns ...func(*Options)) (*ListQuerySuggestionsBlockListsOutput, error) { if params == nil { params = &ListQuerySuggestionsBlockListsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListQuerySuggestionsBlockLists", params, optFns, c.addOperationListQuerySuggestionsBlockListsMiddlewares) if err != nil { return nil, err } out := result.(*ListQuerySuggestionsBlockListsOutput) out.ResultMetadata = metadata return out, nil } type ListQuerySuggestionsBlockListsInput struct { // The identifier of the index for a list of all block lists that exist for that // index. For information on the current quota limits for block lists, see Quotas // for Amazon Kendra (https://docs.aws.amazon.com/kendra/latest/dg/quotas.html) . // // This member is required. IndexId *string // The maximum number of block lists to return. MaxResults *int32 // If the previous response was incomplete (because there is more data to // retrieve), Amazon Kendra returns a pagination token in the response. You can use // this pagination token to retrieve the next set of block lists ( // BlockListSummaryItems ). NextToken *string noSmithyDocumentSerde } type ListQuerySuggestionsBlockListsOutput struct { // Summary items for a block list. This includes summary items on the block list // ID, block list name, when the block list was created, when the block list was // last updated, and the count of block words/phrases in the block list. For // information on the current quota limits for block lists, see Quotas for Amazon // Kendra (https://docs.aws.amazon.com/kendra/latest/dg/quotas.html) . BlockListSummaryItems []types.QuerySuggestionsBlockListSummary // If the response is truncated, Amazon Kendra returns this token that you can use // in the subsequent request to retrieve the next set of block lists. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListQuerySuggestionsBlockListsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListQuerySuggestionsBlockLists{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListQuerySuggestionsBlockLists{}, 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 = addOpListQuerySuggestionsBlockListsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListQuerySuggestionsBlockLists(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 } // ListQuerySuggestionsBlockListsAPIClient is a client that implements the // ListQuerySuggestionsBlockLists operation. type ListQuerySuggestionsBlockListsAPIClient interface { ListQuerySuggestionsBlockLists(context.Context, *ListQuerySuggestionsBlockListsInput, ...func(*Options)) (*ListQuerySuggestionsBlockListsOutput, error) } var _ ListQuerySuggestionsBlockListsAPIClient = (*Client)(nil) // ListQuerySuggestionsBlockListsPaginatorOptions is the paginator options for // ListQuerySuggestionsBlockLists type ListQuerySuggestionsBlockListsPaginatorOptions struct { // The maximum number of block lists to return. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListQuerySuggestionsBlockListsPaginator is a paginator for // ListQuerySuggestionsBlockLists type ListQuerySuggestionsBlockListsPaginator struct { options ListQuerySuggestionsBlockListsPaginatorOptions client ListQuerySuggestionsBlockListsAPIClient params *ListQuerySuggestionsBlockListsInput nextToken *string firstPage bool } // NewListQuerySuggestionsBlockListsPaginator returns a new // ListQuerySuggestionsBlockListsPaginator func NewListQuerySuggestionsBlockListsPaginator(client ListQuerySuggestionsBlockListsAPIClient, params *ListQuerySuggestionsBlockListsInput, optFns ...func(*ListQuerySuggestionsBlockListsPaginatorOptions)) *ListQuerySuggestionsBlockListsPaginator { if params == nil { params = &ListQuerySuggestionsBlockListsInput{} } options := ListQuerySuggestionsBlockListsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListQuerySuggestionsBlockListsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListQuerySuggestionsBlockListsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListQuerySuggestionsBlockLists page. func (p *ListQuerySuggestionsBlockListsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListQuerySuggestionsBlockListsOutput, 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.ListQuerySuggestionsBlockLists(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListQuerySuggestionsBlockLists(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "ListQuerySuggestionsBlockLists", } }
241
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets a list of tags associated with a specified resource. Indexes, FAQs, and // data sources can have tags associated with them. func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) if err != nil { return nil, err } out := result.(*ListTagsForResourceOutput) out.ResultMetadata = metadata return out, nil } type ListTagsForResourceInput struct { // The Amazon Resource Name (ARN) of the index, FAQ, or data source to get a list // of tags for. // // This member is required. ResourceARN *string noSmithyDocumentSerde } type ListTagsForResourceOutput struct { // A list of tags associated with the index, FAQ, or data source. Tags []types.Tag // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListTagsForResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListTagsForResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "ListTagsForResource", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra 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/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists the thesauri for an index. func (c *Client) ListThesauri(ctx context.Context, params *ListThesauriInput, optFns ...func(*Options)) (*ListThesauriOutput, error) { if params == nil { params = &ListThesauriInput{} } result, metadata, err := c.invokeOperation(ctx, "ListThesauri", params, optFns, c.addOperationListThesauriMiddlewares) if err != nil { return nil, err } out := result.(*ListThesauriOutput) out.ResultMetadata = metadata return out, nil } type ListThesauriInput struct { // The identifier of the index with one or more thesauri. // // This member is required. IndexId *string // The maximum number of thesauri to return. MaxResults *int32 // If the previous response was incomplete (because there is more data to // retrieve), Amazon Kendra returns a pagination token in the response. You can use // this pagination token to retrieve the next set of thesauri ( // ThesaurusSummaryItems ). NextToken *string noSmithyDocumentSerde } type ListThesauriOutput struct { // If the response is truncated, Amazon Kendra returns this token that you can use // in the subsequent request to retrieve the next set of thesauri. NextToken *string // An array of summary information for a thesaurus or multiple thesauri. ThesaurusSummaryItems []types.ThesaurusSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListThesauriMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListThesauri{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListThesauri{}, 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 = addOpListThesauriValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListThesauri(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 } // ListThesauriAPIClient is a client that implements the ListThesauri operation. type ListThesauriAPIClient interface { ListThesauri(context.Context, *ListThesauriInput, ...func(*Options)) (*ListThesauriOutput, error) } var _ ListThesauriAPIClient = (*Client)(nil) // ListThesauriPaginatorOptions is the paginator options for ListThesauri type ListThesauriPaginatorOptions struct { // The maximum number of thesauri to return. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListThesauriPaginator is a paginator for ListThesauri type ListThesauriPaginator struct { options ListThesauriPaginatorOptions client ListThesauriAPIClient params *ListThesauriInput nextToken *string firstPage bool } // NewListThesauriPaginator returns a new ListThesauriPaginator func NewListThesauriPaginator(client ListThesauriAPIClient, params *ListThesauriInput, optFns ...func(*ListThesauriPaginatorOptions)) *ListThesauriPaginator { if params == nil { params = &ListThesauriInput{} } options := ListThesauriPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListThesauriPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListThesauriPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListThesauri page. func (p *ListThesauriPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListThesauriOutput, 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.ListThesauri(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListThesauri(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "ListThesauri", } }
228
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Maps users to their groups so that you only need to provide the user ID when // you issue the query. You can also map sub groups to groups. For example, the // group "Company Intellectual Property Teams" includes sub groups "Research" and // "Engineering". These sub groups include their own list of users or people who // work in these teams. Only users who work in research and engineering, and // therefore belong in the intellectual property group, can see top-secret company // documents in their search results. This is useful for user context filtering, // where search results are filtered based on the user or their group access to // documents. For more information, see Filtering on user context (https://docs.aws.amazon.com/kendra/latest/dg/user-context-filter.html) // . If more than five PUT actions for a group are currently processing, a // validation exception is thrown. func (c *Client) PutPrincipalMapping(ctx context.Context, params *PutPrincipalMappingInput, optFns ...func(*Options)) (*PutPrincipalMappingOutput, error) { if params == nil { params = &PutPrincipalMappingInput{} } result, metadata, err := c.invokeOperation(ctx, "PutPrincipalMapping", params, optFns, c.addOperationPutPrincipalMappingMiddlewares) if err != nil { return nil, err } out := result.(*PutPrincipalMappingOutput) out.ResultMetadata = metadata return out, nil } type PutPrincipalMappingInput struct { // The identifier of the group you want to map its users to. // // This member is required. GroupId *string // The list that contains your users or sub groups that belong the same group. For // example, the group "Company" includes the user "CEO" and the sub groups // "Research", "Engineering", and "Sales and Marketing". If you have more than 1000 // users and/or sub groups for a single group, you need to provide the path to the // S3 file that lists your users and sub groups for a group. Your sub groups can // contain more than 1000 users, but the list of sub groups that belong to a group // (and/or users) must be no more than 1000. // // This member is required. GroupMembers *types.GroupMembers // The identifier of the index you want to map users to their groups. // // This member is required. IndexId *string // The identifier of the data source you want to map users to their groups. This // is useful if a group is tied to multiple data sources, but you only want the // group to access documents of a certain data source. For example, the groups // "Research", "Engineering", and "Sales and Marketing" are all tied to the // company's documents stored in the data sources Confluence and Salesforce. // However, "Sales and Marketing" team only needs access to customer-related // documents stored in Salesforce. DataSourceId *string // The timestamp identifier you specify to ensure Amazon Kendra does not override // the latest PUT action with previous actions. The highest number ID, which is // the ordering ID, is the latest action you want to process and apply on top of // other actions with lower number IDs. This prevents previous actions with lower // number IDs from possibly overriding the latest action. The ordering ID can be // the Unix time of the last update you made to a group members list. You would // then provide this list when calling PutPrincipalMapping . This ensures your PUT // action for that updated group with the latest members list doesn't get // overwritten by earlier PUT actions for the same group which are yet to be // processed. The default ordering ID is the current Unix time in milliseconds that // the action was received by Amazon Kendra. OrderingId *int64 // The Amazon Resource Name (ARN) of a role that has access to the S3 file that // contains your list of users or sub groups that belong to a group. For more // information, see IAM roles for Amazon Kendra (https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html#iam-roles-ds) // . RoleArn *string noSmithyDocumentSerde } type PutPrincipalMappingOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationPutPrincipalMappingMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutPrincipalMapping{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutPrincipalMapping{}, 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 = addOpPutPrincipalMappingValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutPrincipalMapping(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opPutPrincipalMapping(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "PutPrincipalMapping", } }
175
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Searches an index given an input query. You can configure boosting or relevance // tuning at the query level to override boosting at the index level, filter based // on document fields/attributes and faceted search, and filter based on the user // or their group access to documents. You can also include certain fields in the // response that might provide useful additional information. A query response // contains three types of results. // - Relevant suggested answers. The answers can be either a text excerpt or // table excerpt. The answer can be highlighted in the excerpt. // - Matching FAQs or questions-answer from your FAQ file. // - Relevant documents. This result type includes an excerpt of the document // with the document title. The searched terms can be highlighted in the excerpt. // // You can specify that the query return only one type of result using the // QueryResultTypeFilter parameter. Each query returns the 100 most relevant // results. If you filter result type to only question-answers, a maximum of four // results are returned. If you filter result type to only answers, a maximum of // three results are returned. func (c *Client) Query(ctx context.Context, params *QueryInput, optFns ...func(*Options)) (*QueryOutput, error) { if params == nil { params = &QueryInput{} } result, metadata, err := c.invokeOperation(ctx, "Query", params, optFns, c.addOperationQueryMiddlewares) if err != nil { return nil, err } out := result.(*QueryOutput) out.ResultMetadata = metadata return out, nil } type QueryInput struct { // The identifier of the index for the search. // // This member is required. IndexId *string // Filters search results by document fields/attributes. You can only provide one // attribute filter; however, the AndAllFilters , NotFilter , and OrAllFilters // parameters contain a list of other filters. The AttributeFilter parameter means // you can create a set of filtering rules that a document must satisfy to be // included in the query results. AttributeFilter *types.AttributeFilter // Overrides relevance tuning configurations of fields/attributes set at the index // level. If you use this API to override the relevance tuning configured at the // index level, but there is no relevance tuning configured at the index level, // then Amazon Kendra does not apply any relevance tuning. If there is relevance // tuning configured for fields at the index level, and you use this API to // override only some of these fields, then for the fields you did not override, // the importance is set to 1. DocumentRelevanceOverrideConfigurations []types.DocumentRelevanceConfiguration // An array of documents fields/attributes for faceted search. Amazon Kendra // returns a count for each field key specified. This helps your users narrow their // search. Facets []types.Facet // Query results are returned in pages the size of the PageSize parameter. By // default, Amazon Kendra returns the first page of results. Use this parameter to // get result pages after the first one. PageNumber *int32 // Sets the number of results that are returned in each page of results. The // default page size is 10. The maximum number of results returned is 100. If you // ask for more than 100 results, only 100 are returned. PageSize *int32 // Sets the type of query result or response. Only results for the specified type // are returned. QueryResultTypeFilter types.QueryResultType // The input query text for the search. Amazon Kendra truncates queries at 30 // token words, which excludes punctuation and stop words. Truncation still applies // if you use Boolean or more advanced, complex queries. QueryText *string // An array of document fields/attributes to include in the response. You can // limit the response to include certain document fields. By default, all document // attributes are included in the response. RequestedDocumentAttributes []string // Provides information that determines how the results of the query are sorted. // You can set the field that Amazon Kendra should sort the results on, and specify // whether the results should be sorted in ascending or descending order. In the // case of ties in sorting the results, the results are sorted by relevance. If you // don't provide sorting configuration, the results are sorted by the relevance // that Amazon Kendra determines for the result. SortingConfiguration *types.SortingConfiguration // Enables suggested spell corrections for queries. SpellCorrectionConfiguration *types.SpellCorrectionConfiguration // The user context token or user and group information. UserContext *types.UserContext // Provides an identifier for a specific user. The VisitorId should be a unique // identifier, such as a GUID. Don't use personally identifiable information, such // as the user's email address, as the VisitorId . VisitorId *string noSmithyDocumentSerde } type QueryOutput struct { // Contains the facet results. A FacetResult contains the counts for each // field/attribute key that was specified in the Facets input parameter. FacetResults []types.FacetResult // The list of featured result items. Featured results are displayed at the top of // the search results page, placed above all other results for certain queries. If // there's an exact match of a query, then certain documents are featured in the // search results. FeaturedResultsItems []types.FeaturedResultsItem // The identifier for the search. You also use QueryId to identify the search when // using the SubmitFeedback (https://docs.aws.amazon.com/kendra/latest/APIReference/API_SubmitFeedback.html) // API. QueryId *string // The results of the search. ResultItems []types.QueryResultItem // A list of information related to suggested spell corrections for a query. SpellCorrectedQueries []types.SpellCorrectedQuery // The total number of items found by the search. However, you can only retrieve // up to 100 items. For example, if the search found 192 items, you can only // retrieve the first 100 of the items. TotalNumberOfResults *int32 // A list of warning codes and their messages on problems with your query. Amazon // Kendra currently only supports one type of warning, which is a warning on // invalid syntax used in the query. For examples of invalid query syntax, see // Searching with advanced query syntax (https://docs.aws.amazon.com/kendra/latest/dg/searching-example.html#searching-index-query-syntax) // . Warnings []types.Warning // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationQueryMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpQuery{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpQuery{}, 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 = addOpQueryValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opQuery(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opQuery(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "Query", } }
235
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves relevant passages or text excerpts given an input query. This API is // similar to the Query (https://docs.aws.amazon.com/kendra/latest/APIReference/API_Query.html) // API. However, by default, the Query API only returns excerpt passages of up to // 100 token words. With the Retrieve API, you can retrieve longer passages of up // to 200 token words and up to 100 semantically relevant passages. This doesn't // include question-answer or FAQ type responses from your index. The passages are // text excerpts that can be semantically extracted from multiple documents and // multiple parts of the same document. If in extreme cases your documents produce // no relevant passages using the Retrieve API, you can alternatively use the Query // API. You can also do the following: // - Override boosting at the index level // - Filter based on document fields or attributes // - Filter based on the user or their group access to documents // // You can also include certain fields in the response that might provide useful // additional information. func (c *Client) Retrieve(ctx context.Context, params *RetrieveInput, optFns ...func(*Options)) (*RetrieveOutput, error) { if params == nil { params = &RetrieveInput{} } result, metadata, err := c.invokeOperation(ctx, "Retrieve", params, optFns, c.addOperationRetrieveMiddlewares) if err != nil { return nil, err } out := result.(*RetrieveOutput) out.ResultMetadata = metadata return out, nil } type RetrieveInput struct { // The identifier of the index to retrieve relevant passages for the search. // // This member is required. IndexId *string // The input query text to retrieve relevant passages for the search. Amazon // Kendra truncates queries at 30 token words, which excludes punctuation and stop // words. Truncation still applies if you use Boolean or more advanced, complex // queries. // // This member is required. QueryText *string // Filters search results by document fields/attributes. You can only provide one // attribute filter; however, the AndAllFilters , NotFilter , and OrAllFilters // parameters contain a list of other filters. The AttributeFilter parameter means // you can create a set of filtering rules that a document must satisfy to be // included in the query results. AttributeFilter *types.AttributeFilter // Overrides relevance tuning configurations of fields/attributes set at the index // level. If you use this API to override the relevance tuning configured at the // index level, but there is no relevance tuning configured at the index level, // then Amazon Kendra does not apply any relevance tuning. If there is relevance // tuning configured for fields at the index level, and you use this API to // override only some of these fields, then for the fields you did not override, // the importance is set to 1. DocumentRelevanceOverrideConfigurations []types.DocumentRelevanceConfiguration // Retrieved relevant passages are returned in pages the size of the PageSize // parameter. By default, Amazon Kendra returns the first page of results. Use this // parameter to get result pages after the first one. PageNumber *int32 // Sets the number of retrieved relevant passages that are returned in each page // of results. The default page size is 10. The maximum number of results returned // is 100. If you ask for more than 100 results, only 100 are returned. PageSize *int32 // A list of document fields/attributes to include in the response. You can limit // the response to include certain document fields. By default, all document fields // are included in the response. RequestedDocumentAttributes []string // The user context token or user and group information. UserContext *types.UserContext noSmithyDocumentSerde } type RetrieveOutput struct { // The identifier of query used for the search. You also use QueryId to identify // the search when using the Submitfeedback (https://docs.aws.amazon.com/kendra/latest/APIReference/API_SubmitFeedback.html) // API. QueryId *string // The results of the retrieved relevant passages for the search. ResultItems []types.RetrieveResultItem // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRetrieveMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpRetrieve{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRetrieve{}, 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 = addOpRetrieveValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRetrieve(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opRetrieve(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "Retrieve", } }
187
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Starts a synchronization job for a data source connector. If a synchronization // job is already in progress, Amazon Kendra returns a ResourceInUseException // exception. func (c *Client) StartDataSourceSyncJob(ctx context.Context, params *StartDataSourceSyncJobInput, optFns ...func(*Options)) (*StartDataSourceSyncJobOutput, error) { if params == nil { params = &StartDataSourceSyncJobInput{} } result, metadata, err := c.invokeOperation(ctx, "StartDataSourceSyncJob", params, optFns, c.addOperationStartDataSourceSyncJobMiddlewares) if err != nil { return nil, err } out := result.(*StartDataSourceSyncJobOutput) out.ResultMetadata = metadata return out, nil } type StartDataSourceSyncJobInput struct { // The identifier of the data source connector to synchronize. // // This member is required. Id *string // The identifier of the index used with the data source connector. // // This member is required. IndexId *string noSmithyDocumentSerde } type StartDataSourceSyncJobOutput struct { // Identifies a particular synchronization job. ExecutionId *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationStartDataSourceSyncJobMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartDataSourceSyncJob{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartDataSourceSyncJob{}, 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 = addOpStartDataSourceSyncJobValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartDataSourceSyncJob(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opStartDataSourceSyncJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "StartDataSourceSyncJob", } }
131
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Stops a synchronization job that is currently running. You can't stop a // scheduled synchronization job. func (c *Client) StopDataSourceSyncJob(ctx context.Context, params *StopDataSourceSyncJobInput, optFns ...func(*Options)) (*StopDataSourceSyncJobOutput, error) { if params == nil { params = &StopDataSourceSyncJobInput{} } result, metadata, err := c.invokeOperation(ctx, "StopDataSourceSyncJob", params, optFns, c.addOperationStopDataSourceSyncJobMiddlewares) if err != nil { return nil, err } out := result.(*StopDataSourceSyncJobOutput) out.ResultMetadata = metadata return out, nil } type StopDataSourceSyncJobInput struct { // The identifier of the data source connector for which to stop the // synchronization jobs. // // This member is required. Id *string // The identifier of the index used with the data source connector. // // This member is required. IndexId *string noSmithyDocumentSerde } type StopDataSourceSyncJobOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationStopDataSourceSyncJobMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpStopDataSourceSyncJob{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStopDataSourceSyncJob{}, 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 = addOpStopDataSourceSyncJobValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopDataSourceSyncJob(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opStopDataSourceSyncJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "StopDataSourceSyncJob", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Enables you to provide feedback to Amazon Kendra to improve the performance of // your index. SubmitFeedback is currently not supported in the Amazon Web // Services GovCloud (US-West) region. func (c *Client) SubmitFeedback(ctx context.Context, params *SubmitFeedbackInput, optFns ...func(*Options)) (*SubmitFeedbackOutput, error) { if params == nil { params = &SubmitFeedbackInput{} } result, metadata, err := c.invokeOperation(ctx, "SubmitFeedback", params, optFns, c.addOperationSubmitFeedbackMiddlewares) if err != nil { return nil, err } out := result.(*SubmitFeedbackOutput) out.ResultMetadata = metadata return out, nil } type SubmitFeedbackInput struct { // The identifier of the index that was queried. // // This member is required. IndexId *string // The identifier of the specific query for which you are submitting feedback. The // query ID is returned in the response to the Query API. // // This member is required. QueryId *string // Tells Amazon Kendra that a particular search result link was chosen by the user. ClickFeedbackItems []types.ClickFeedback // Provides Amazon Kendra with relevant or not relevant feedback for whether a // particular item was relevant to the search. RelevanceFeedbackItems []types.RelevanceFeedback noSmithyDocumentSerde } type SubmitFeedbackOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationSubmitFeedbackMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpSubmitFeedback{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpSubmitFeedback{}, 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 = addOpSubmitFeedbackValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSubmitFeedback(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opSubmitFeedback(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "SubmitFeedback", } }
136
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Adds the specified tag to the specified index, FAQ, or data source resource. If // the tag already exists, the existing value is replaced with the new value. func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) if err != nil { return nil, err } out := result.(*TagResourceOutput) out.ResultMetadata = metadata return out, nil } type TagResourceInput struct { // The Amazon Resource Name (ARN) of the index, FAQ, or data source to tag. // // This member is required. ResourceARN *string // A list of tag keys to add to the index, FAQ, or data source. If a tag already // exists, the existing value is replaced with the new value. // // This member is required. Tags []types.Tag noSmithyDocumentSerde } type TagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpTagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "TagResource", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes a tag from an index, FAQ, or a data source. func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) if err != nil { return nil, err } out := result.(*UntagResourceOutput) out.ResultMetadata = metadata return out, nil } type UntagResourceInput struct { // The Amazon Resource Name (ARN) of the index, FAQ, or data source to remove the // tag from. // // This member is required. ResourceARN *string // A list of tag keys to remove from the index, FAQ, or data source. If a tag key // does not exist on the resource, it is ignored. // // This member is required. TagKeys []string noSmithyDocumentSerde } type UntagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUntagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUntagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "UntagResource", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates an access control configuration for your documents in an index. This // includes user and group access information for your documents. This is useful // for user context filtering, where search results are filtered based on the user // or their group access to documents. You can update an access control // configuration you created without indexing all of your documents again. For // example, your index contains top-secret company documents that only certain // employees or users should access. You created an 'allow' access control // configuration for one user who recently joined the 'top-secret' team, switching // from a team with 'deny' access to top-secret documents. However, the user // suddenly returns to their previous team and should no longer have access to top // secret documents. You can update the access control configuration to // re-configure access control for your documents as circumstances change. You call // the BatchPutDocument (https://docs.aws.amazon.com/kendra/latest/dg/API_BatchPutDocument.html) // API to apply the updated access control configuration, with the // AccessControlConfigurationId included in the Document (https://docs.aws.amazon.com/kendra/latest/dg/API_Document.html) // object. If you use an S3 bucket as a data source, you synchronize your data // source to apply the AccessControlConfigurationId in the .metadata.json file. // Amazon Kendra currently only supports access control configuration for S3 data // sources and documents indexed using the BatchPutDocument API. func (c *Client) UpdateAccessControlConfiguration(ctx context.Context, params *UpdateAccessControlConfigurationInput, optFns ...func(*Options)) (*UpdateAccessControlConfigurationOutput, error) { if params == nil { params = &UpdateAccessControlConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateAccessControlConfiguration", params, optFns, c.addOperationUpdateAccessControlConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*UpdateAccessControlConfigurationOutput) out.ResultMetadata = metadata return out, nil } type UpdateAccessControlConfigurationInput struct { // The identifier of the access control configuration you want to update. // // This member is required. Id *string // The identifier of the index for an access control configuration. // // This member is required. IndexId *string // Information you want to update on principals (users and/or groups) and which // documents they should have access to. This is useful for user context filtering, // where search results are filtered based on the user or their group access to // documents. AccessControlList []types.Principal // A new description for the access control configuration. Description *string // The updated list of principal (https://docs.aws.amazon.com/kendra/latest/dg/API_Principal.html) // lists that define the hierarchy for which documents users should have access to. HierarchicalAccessControlList []types.HierarchicalPrincipal // A new name for the access control configuration. Name *string noSmithyDocumentSerde } type UpdateAccessControlConfigurationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateAccessControlConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateAccessControlConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateAccessControlConfiguration{}, 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 = addOpUpdateAccessControlConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccessControlConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateAccessControlConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "UpdateAccessControlConfiguration", } }
160
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates an existing Amazon Kendra data source connector. func (c *Client) UpdateDataSource(ctx context.Context, params *UpdateDataSourceInput, optFns ...func(*Options)) (*UpdateDataSourceOutput, error) { if params == nil { params = &UpdateDataSourceInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateDataSource", params, optFns, c.addOperationUpdateDataSourceMiddlewares) if err != nil { return nil, err } out := result.(*UpdateDataSourceOutput) out.ResultMetadata = metadata return out, nil } type UpdateDataSourceInput struct { // The identifier of the data source connector you want to update. // // This member is required. Id *string // The identifier of the index used with the data source connector. // // This member is required. IndexId *string // Configuration information you want to update for the data source connector. Configuration *types.DataSourceConfiguration // Configuration information you want to update for altering document metadata and // content during the document ingestion process. For more information on how to // create, modify and delete document metadata, or make other content alterations // when you ingest documents into Amazon Kendra, see Customizing document metadata // during the ingestion process (https://docs.aws.amazon.com/kendra/latest/dg/custom-document-enrichment.html) // . CustomDocumentEnrichmentConfiguration *types.CustomDocumentEnrichmentConfiguration // A new description for the data source connector. Description *string // The code for a language you want to update for the data source connector. This // allows you to support a language for all documents when updating the data // source. English is supported by default. For more information on supported // languages, including their codes, see Adding documents in languages other than // English (https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html) . LanguageCode *string // A new name for the data source connector. Name *string // The Amazon Resource Name (ARN) of a role with permission to access the data // source and required resources. For more information, see IAM roles for Amazon // Kendra (https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html) . RoleArn *string // The sync schedule you want to update for the data source connector. Schedule *string // Configuration information for an Amazon Virtual Private Cloud to connect to // your data source. For more information, see Configuring a VPC (https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html) // . VpcConfiguration *types.DataSourceVpcConfiguration noSmithyDocumentSerde } type UpdateDataSourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateDataSourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateDataSource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateDataSource{}, 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 = addOpUpdateDataSourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDataSource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateDataSource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "UpdateDataSource", } }
163
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates your Amazon Kendra experience such as a search application. For more // information on creating a search application experience, see Building a search // experience with no code (https://docs.aws.amazon.com/kendra/latest/dg/deploying-search-experience-no-code.html) // . func (c *Client) UpdateExperience(ctx context.Context, params *UpdateExperienceInput, optFns ...func(*Options)) (*UpdateExperienceOutput, error) { if params == nil { params = &UpdateExperienceInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateExperience", params, optFns, c.addOperationUpdateExperienceMiddlewares) if err != nil { return nil, err } out := result.(*UpdateExperienceOutput) out.ResultMetadata = metadata return out, nil } type UpdateExperienceInput struct { // The identifier of your Amazon Kendra experience you want to update. // // This member is required. Id *string // The identifier of the index for your Amazon Kendra experience. // // This member is required. IndexId *string // Configuration information you want to update for your Amazon Kendra experience. Configuration *types.ExperienceConfiguration // A new description for your Amazon Kendra experience. Description *string // A new name for your Amazon Kendra experience. Name *string // The Amazon Resource Name (ARN) of a role with permission to access Query API, // QuerySuggestions API, SubmitFeedback API, and IAM Identity Center that stores // your user and group information. For more information, see IAM roles for Amazon // Kendra (https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html) . RoleArn *string noSmithyDocumentSerde } type UpdateExperienceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateExperienceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateExperience{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateExperience{}, 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 = addOpUpdateExperienceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateExperience(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateExperience(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "UpdateExperience", } }
144
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates a set of featured results. Features results are placed above all other // results for certain queries. You map specific queries to specific documents for // featuring in the results. If a query contains an exact match of a query, then // one or more specific documents are featured in the search results. func (c *Client) UpdateFeaturedResultsSet(ctx context.Context, params *UpdateFeaturedResultsSetInput, optFns ...func(*Options)) (*UpdateFeaturedResultsSetOutput, error) { if params == nil { params = &UpdateFeaturedResultsSetInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateFeaturedResultsSet", params, optFns, c.addOperationUpdateFeaturedResultsSetMiddlewares) if err != nil { return nil, err } out := result.(*UpdateFeaturedResultsSetOutput) out.ResultMetadata = metadata return out, nil } type UpdateFeaturedResultsSetInput struct { // The identifier of the set of featured results that you want to update. // // This member is required. FeaturedResultsSetId *string // The identifier of the index used for featuring results. // // This member is required. IndexId *string // A new description for the set of featured results. Description *string // A list of document IDs for the documents you want to feature at the top of the // search results page. For more information on the list of featured documents, see // FeaturedResultsSet (https://docs.aws.amazon.com/kendra/latest/dg/API_FeaturedResultsSet.html) // . FeaturedDocuments []types.FeaturedDocument // A new name for the set of featured results. FeaturedResultsSetName *string // A list of queries for featuring results. For more information on the list of // queries, see FeaturedResultsSet (https://docs.aws.amazon.com/kendra/latest/dg/API_FeaturedResultsSet.html) // . QueryTexts []string // You can set the status to ACTIVE or INACTIVE . When the value is ACTIVE , // featured results are ready for use. You can still configure your settings before // setting the status to ACTIVE . The queries you specify for featured results must // be unique per featured results set for each index, whether the status is ACTIVE // or INACTIVE . Status types.FeaturedResultsSetStatus noSmithyDocumentSerde } type UpdateFeaturedResultsSetOutput struct { // Information on the set of featured results. This includes the identifier of the // featured results set, whether the featured results set is active or inactive, // when the featured results set was last updated, and more. FeaturedResultsSet *types.FeaturedResultsSet // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateFeaturedResultsSetMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateFeaturedResultsSet{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateFeaturedResultsSet{}, 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 = addOpUpdateFeaturedResultsSetValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFeaturedResultsSet(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateFeaturedResultsSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "UpdateFeaturedResultsSet", } }
159
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates an existing Amazon Kendra index. func (c *Client) UpdateIndex(ctx context.Context, params *UpdateIndexInput, optFns ...func(*Options)) (*UpdateIndexOutput, error) { if params == nil { params = &UpdateIndexInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateIndex", params, optFns, c.addOperationUpdateIndexMiddlewares) if err != nil { return nil, err } out := result.(*UpdateIndexOutput) out.ResultMetadata = metadata return out, nil } type UpdateIndexInput struct { // The identifier of the index you want to update. // // This member is required. Id *string // Sets the number of additional document storage and query capacity units that // should be used by the index. You can change the capacity of the index up to 5 // times per day, or make 5 API calls. If you are using extra storage units, you // can't reduce the storage capacity below what is required to meet the storage // needs for your index. CapacityUnits *types.CapacityUnitsConfiguration // A new description for the index. Description *string // The document metadata configuration you want to update for the index. Document // metadata are fields or attributes associated with your documents. For example, // the company department name associated with each document. DocumentMetadataConfigurationUpdates []types.DocumentMetadataConfiguration // The name of the index you want to update. Name *string // An Identity and Access Management (IAM) role that gives Amazon Kendra // permission to access Amazon CloudWatch logs and metrics. RoleArn *string // The user context policy. UserContextPolicy types.UserContextPolicy // Enables fetching access levels of groups and users from an IAM Identity Center // (successor to Single Sign-On) identity source. To configure this, see // UserGroupResolutionConfiguration (https://docs.aws.amazon.com/kendra/latest/dg/API_UserGroupResolutionConfiguration.html) // . UserGroupResolutionConfiguration *types.UserGroupResolutionConfiguration // The user token configuration. UserTokenConfigurations []types.UserTokenConfiguration noSmithyDocumentSerde } type UpdateIndexOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateIndexMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateIndex{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateIndex{}, 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 = addOpUpdateIndexValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateIndex(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateIndex(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "UpdateIndex", } }
155
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates a block list used for query suggestions for an index. Updates to a // block list might not take effect right away. Amazon Kendra needs to refresh the // entire suggestions list to apply any updates to the block list. Other changes // not related to the block list apply immediately. If a block list is updating, // then you need to wait for the first update to finish before submitting another // update. Amazon Kendra supports partial updates, so you only need to provide the // fields you want to update. UpdateQuerySuggestionsBlockList is currently not // supported in the Amazon Web Services GovCloud (US-West) region. func (c *Client) UpdateQuerySuggestionsBlockList(ctx context.Context, params *UpdateQuerySuggestionsBlockListInput, optFns ...func(*Options)) (*UpdateQuerySuggestionsBlockListOutput, error) { if params == nil { params = &UpdateQuerySuggestionsBlockListInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateQuerySuggestionsBlockList", params, optFns, c.addOperationUpdateQuerySuggestionsBlockListMiddlewares) if err != nil { return nil, err } out := result.(*UpdateQuerySuggestionsBlockListOutput) out.ResultMetadata = metadata return out, nil } type UpdateQuerySuggestionsBlockListInput struct { // The identifier of the block list you want to update. // // This member is required. Id *string // The identifier of the index for the block list. // // This member is required. IndexId *string // A new description for the block list. Description *string // A new name for the block list. Name *string // The IAM (Identity and Access Management) role used to access the block list // text file in S3. RoleArn *string // The S3 path where your block list text file sits in S3. If you update your // block list and provide the same path to the block list text file in S3, then // Amazon Kendra reloads the file to refresh the block list. Amazon Kendra does not // automatically refresh your block list. You need to call the // UpdateQuerySuggestionsBlockList API to refresh you block list. If you update // your block list, then Amazon Kendra asynchronously refreshes all query // suggestions with the latest content in the S3 file. This means changes might not // take effect immediately. SourceS3Path *types.S3Path noSmithyDocumentSerde } type UpdateQuerySuggestionsBlockListOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateQuerySuggestionsBlockListMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateQuerySuggestionsBlockList{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateQuerySuggestionsBlockList{}, 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 = addOpUpdateQuerySuggestionsBlockListValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateQuerySuggestionsBlockList(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateQuerySuggestionsBlockList(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "UpdateQuerySuggestionsBlockList", } }
153
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates the settings of query suggestions for an index. Amazon Kendra supports // partial updates, so you only need to provide the fields you want to update. If // an update is currently processing, you need to wait for the update to finish // before making another update. Updates to query suggestions settings might not // take effect right away. The time for your updated settings to take effect // depends on the updates made and the number of search queries in your index. You // can still enable/disable query suggestions at any time. // UpdateQuerySuggestionsConfig is currently not supported in the Amazon Web // Services GovCloud (US-West) region. func (c *Client) UpdateQuerySuggestionsConfig(ctx context.Context, params *UpdateQuerySuggestionsConfigInput, optFns ...func(*Options)) (*UpdateQuerySuggestionsConfigOutput, error) { if params == nil { params = &UpdateQuerySuggestionsConfigInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateQuerySuggestionsConfig", params, optFns, c.addOperationUpdateQuerySuggestionsConfigMiddlewares) if err != nil { return nil, err } out := result.(*UpdateQuerySuggestionsConfigOutput) out.ResultMetadata = metadata return out, nil } type UpdateQuerySuggestionsConfigInput struct { // The identifier of the index with query suggestions you want to update. // // This member is required. IndexId *string // Configuration information for the document fields/attributes that you want to // base query suggestions on. AttributeSuggestionsConfig *types.AttributeSuggestionsUpdateConfig // TRUE to include queries without user information (i.e. all queries, // irrespective of the user), otherwise FALSE to only include queries with user // information. If you pass user information to Amazon Kendra along with the // queries, you can set this flag to FALSE and instruct Amazon Kendra to only // consider queries with user information. If you set to FALSE , Amazon Kendra only // considers queries searched at least MinimumQueryCount times across // MinimumNumberOfQueryingUsers unique users for suggestions. If you set to TRUE , // Amazon Kendra ignores all user information and learns from all queries. IncludeQueriesWithoutUserInformation *bool // The minimum number of unique users who must search a query in order for the // query to be eligible to suggest to your users. Increasing this number might // decrease the number of suggestions. However, this ensures a query is searched by // many users and is truly popular to suggest to users. How you tune this setting // depends on your specific needs. MinimumNumberOfQueryingUsers *int32 // The the minimum number of times a query must be searched in order to be // eligible to suggest to your users. Decreasing this number increases the number // of suggestions. However, this affects the quality of suggestions as it sets a // low bar for a query to be considered popular to suggest to users. How you tune // this setting depends on your specific needs. MinimumQueryCount *int32 // Set the mode to ENABLED or LEARN_ONLY . By default, Amazon Kendra enables query // suggestions. LEARN_ONLY mode allows you to turn off query suggestions. You can // to update this at any time. In LEARN_ONLY mode, Amazon Kendra continues to // learn from new queries to keep suggestions up to date for when you are ready to // switch to ENABLED mode again. Mode types.Mode // How recent your queries are in your query log time window. The time window is // the number of days from current day to past days. By default, Amazon Kendra sets // this to 180. QueryLogLookBackWindowInDays *int32 noSmithyDocumentSerde } type UpdateQuerySuggestionsConfigOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateQuerySuggestionsConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateQuerySuggestionsConfig{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateQuerySuggestionsConfig{}, 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 = addOpUpdateQuerySuggestionsConfigValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateQuerySuggestionsConfig(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateQuerySuggestionsConfig(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "UpdateQuerySuggestionsConfig", } }
169
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendra/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates a thesaurus for an index. func (c *Client) UpdateThesaurus(ctx context.Context, params *UpdateThesaurusInput, optFns ...func(*Options)) (*UpdateThesaurusOutput, error) { if params == nil { params = &UpdateThesaurusInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateThesaurus", params, optFns, c.addOperationUpdateThesaurusMiddlewares) if err != nil { return nil, err } out := result.(*UpdateThesaurusOutput) out.ResultMetadata = metadata return out, nil } type UpdateThesaurusInput struct { // The identifier of the thesaurus you want to update. // // This member is required. Id *string // The identifier of the index for the thesaurus. // // This member is required. IndexId *string // A new description for the thesaurus. Description *string // A new name for the thesaurus. Name *string // An IAM role that gives Amazon Kendra permissions to access thesaurus file // specified in SourceS3Path . RoleArn *string // Information required to find a specific file in an Amazon S3 bucket. SourceS3Path *types.S3Path noSmithyDocumentSerde } type UpdateThesaurusOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateThesaurusMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateThesaurus{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateThesaurus{}, 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 = addOpUpdateThesaurusValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateThesaurus(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateThesaurus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra", OperationName: "UpdateThesaurus", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package kendra provides the API client, operations, and parameter types for // AWSKendraFrontendService. // // Amazon Kendra is a service for indexing large document sets. package kendra
8
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" internalendpoints "github.com/aws/aws-sdk-go-v2/service/kendra/internal/endpoints" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net/url" "strings" ) // EndpointResolverOptions is the service endpoint resolver options type EndpointResolverOptions = internalendpoints.Options // EndpointResolver interface for resolving service endpoints. type EndpointResolver interface { ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) } var _ EndpointResolver = &internalendpoints.Resolver{} // NewDefaultEndpointResolver constructs a new service endpoint resolver func NewDefaultEndpointResolver() *internalendpoints.Resolver { return internalendpoints.New() } // EndpointResolverFunc is a helper utility that wraps a function so it satisfies // the EndpointResolver interface. This is useful when you want to add additional // endpoint resolving logic, or stub out specific endpoints with custom values. type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { return fn(region, options) } func resolveDefaultEndpointConfiguration(o *Options) { if o.EndpointResolver != nil { return } o.EndpointResolver = NewDefaultEndpointResolver() } // EndpointResolverFromURL returns an EndpointResolver configured using the // provided endpoint url. By default, the resolved endpoint resolver uses the // client region as signing region, and the endpoint source is set to // EndpointSourceCustom.You can provide functional options to configure endpoint // values for the resolved endpoint. func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} for _, fn := range optFns { fn(&e) } return EndpointResolverFunc( func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { if len(e.SigningRegion) == 0 { e.SigningRegion = region } return e, nil }, ) } type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions } func (*ResolveEndpoint) ID() string { return "ResolveEndpoint" } func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) } if m.Resolver == nil { return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } eo := m.Options eo.Logger = middleware.GetLogger(ctx) var endpoint aws.Endpoint endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } req.URL, err = url.Parse(endpoint.URL) if err != nil { return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) } if len(awsmiddleware.GetSigningName(ctx)) == 0 { signingName := endpoint.SigningName if len(signingName) == 0 { signingName = "kendra" } ctx = awsmiddleware.SetSigningName(ctx, signingName) } ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) return next.HandleSerialize(ctx, in) } func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { return stack.Serialize.Insert(&ResolveEndpoint{ Resolver: o.EndpointResolver, Options: o.EndpointOptions, }, "OperationSerializer", middleware.Before) } func removeResolveEndpointMiddleware(stack *middleware.Stack) error { _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) return err } type wrappedEndpointResolver struct { awsResolver aws.EndpointResolverWithOptions resolver EndpointResolver } func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { if w.awsResolver == nil { goto fallback } endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) if err == nil { return endpoint, nil } if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { return endpoint, err } fallback: if w.resolver == nil { return endpoint, fmt.Errorf("default endpoint resolver provided was nil") } return w.resolver.ResolveEndpoint(region, options) } type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { return a(service, region) } var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) // withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. // If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided // fallbackResolver for resolution. // // fallbackResolver must not be nil func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { var resolver aws.EndpointResolverWithOptions if awsResolverWithOptions != nil { resolver = awsResolverWithOptions } else if awsResolver != nil { resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) } return &wrappedEndpointResolver{ awsResolver: resolver, resolver: fallbackResolver, } } func finalizeClientEndpointResolverOptions(options *Options) { options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() if len(options.EndpointOptions.ResolvedRegion) == 0 { const fipsInfix = "-fips-" const fipsPrefix = "fips-" const fipsSuffix = "-fips" if strings.Contains(options.Region, fipsInfix) || strings.Contains(options.Region, fipsPrefix) || strings.Contains(options.Region, fipsSuffix) { options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled } } }
201
aws-sdk-go-v2
aws
Go
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. package kendra // goModuleVersion is the tagged release for this module const goModuleVersion = "1.41.0"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/kendra/document" internaldocument "github.com/aws/aws-sdk-go-v2/service/kendra/internal/document" "github.com/aws/aws-sdk-go-v2/service/kendra/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" "path" ) type awsAwsjson11_serializeOpAssociateEntitiesToExperience struct { } func (*awsAwsjson11_serializeOpAssociateEntitiesToExperience) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAssociateEntitiesToExperience) 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.(*AssociateEntitiesToExperienceInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.AssociateEntitiesToExperience") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAssociateEntitiesToExperienceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpAssociatePersonasToEntities struct { } func (*awsAwsjson11_serializeOpAssociatePersonasToEntities) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAssociatePersonasToEntities) 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.(*AssociatePersonasToEntitiesInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.AssociatePersonasToEntities") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAssociatePersonasToEntitiesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpBatchDeleteDocument struct { } func (*awsAwsjson11_serializeOpBatchDeleteDocument) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpBatchDeleteDocument) 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.(*BatchDeleteDocumentInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.BatchDeleteDocument") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentBatchDeleteDocumentInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpBatchDeleteFeaturedResultsSet struct { } func (*awsAwsjson11_serializeOpBatchDeleteFeaturedResultsSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpBatchDeleteFeaturedResultsSet) 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.(*BatchDeleteFeaturedResultsSetInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.BatchDeleteFeaturedResultsSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentBatchDeleteFeaturedResultsSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpBatchGetDocumentStatus struct { } func (*awsAwsjson11_serializeOpBatchGetDocumentStatus) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpBatchGetDocumentStatus) 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.(*BatchGetDocumentStatusInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.BatchGetDocumentStatus") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentBatchGetDocumentStatusInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpBatchPutDocument struct { } func (*awsAwsjson11_serializeOpBatchPutDocument) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpBatchPutDocument) 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.(*BatchPutDocumentInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.BatchPutDocument") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentBatchPutDocumentInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpClearQuerySuggestions struct { } func (*awsAwsjson11_serializeOpClearQuerySuggestions) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpClearQuerySuggestions) 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.(*ClearQuerySuggestionsInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.ClearQuerySuggestions") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentClearQuerySuggestionsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateAccessControlConfiguration struct { } func (*awsAwsjson11_serializeOpCreateAccessControlConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateAccessControlConfiguration) 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.(*CreateAccessControlConfigurationInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.CreateAccessControlConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateAccessControlConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateDataSource struct { } func (*awsAwsjson11_serializeOpCreateDataSource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateDataSource) 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.(*CreateDataSourceInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.CreateDataSource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateDataSourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateExperience struct { } func (*awsAwsjson11_serializeOpCreateExperience) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateExperience) 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.(*CreateExperienceInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.CreateExperience") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateExperienceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateFaq struct { } func (*awsAwsjson11_serializeOpCreateFaq) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateFaq) 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.(*CreateFaqInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.CreateFaq") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateFaqInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateFeaturedResultsSet struct { } func (*awsAwsjson11_serializeOpCreateFeaturedResultsSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateFeaturedResultsSet) 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.(*CreateFeaturedResultsSetInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.CreateFeaturedResultsSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateFeaturedResultsSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateIndex struct { } func (*awsAwsjson11_serializeOpCreateIndex) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateIndex) 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.(*CreateIndexInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.CreateIndex") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateIndexInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateQuerySuggestionsBlockList struct { } func (*awsAwsjson11_serializeOpCreateQuerySuggestionsBlockList) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateQuerySuggestionsBlockList) 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.(*CreateQuerySuggestionsBlockListInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.CreateQuerySuggestionsBlockList") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateQuerySuggestionsBlockListInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateThesaurus struct { } func (*awsAwsjson11_serializeOpCreateThesaurus) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateThesaurus) 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.(*CreateThesaurusInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.CreateThesaurus") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateThesaurusInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteAccessControlConfiguration struct { } func (*awsAwsjson11_serializeOpDeleteAccessControlConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteAccessControlConfiguration) 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.(*DeleteAccessControlConfigurationInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DeleteAccessControlConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteAccessControlConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteDataSource struct { } func (*awsAwsjson11_serializeOpDeleteDataSource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteDataSource) 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.(*DeleteDataSourceInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DeleteDataSource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteDataSourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteExperience struct { } func (*awsAwsjson11_serializeOpDeleteExperience) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteExperience) 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.(*DeleteExperienceInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DeleteExperience") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteExperienceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteFaq struct { } func (*awsAwsjson11_serializeOpDeleteFaq) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteFaq) 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.(*DeleteFaqInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DeleteFaq") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteFaqInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteIndex struct { } func (*awsAwsjson11_serializeOpDeleteIndex) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteIndex) 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.(*DeleteIndexInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DeleteIndex") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteIndexInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeletePrincipalMapping struct { } func (*awsAwsjson11_serializeOpDeletePrincipalMapping) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeletePrincipalMapping) 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.(*DeletePrincipalMappingInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DeletePrincipalMapping") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeletePrincipalMappingInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteQuerySuggestionsBlockList struct { } func (*awsAwsjson11_serializeOpDeleteQuerySuggestionsBlockList) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteQuerySuggestionsBlockList) 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.(*DeleteQuerySuggestionsBlockListInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DeleteQuerySuggestionsBlockList") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteQuerySuggestionsBlockListInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteThesaurus struct { } func (*awsAwsjson11_serializeOpDeleteThesaurus) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteThesaurus) 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.(*DeleteThesaurusInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DeleteThesaurus") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteThesaurusInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeAccessControlConfiguration struct { } func (*awsAwsjson11_serializeOpDescribeAccessControlConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeAccessControlConfiguration) 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.(*DescribeAccessControlConfigurationInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DescribeAccessControlConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeAccessControlConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeDataSource struct { } func (*awsAwsjson11_serializeOpDescribeDataSource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeDataSource) 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.(*DescribeDataSourceInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DescribeDataSource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeDataSourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeExperience struct { } func (*awsAwsjson11_serializeOpDescribeExperience) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeExperience) 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.(*DescribeExperienceInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DescribeExperience") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeExperienceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeFaq struct { } func (*awsAwsjson11_serializeOpDescribeFaq) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeFaq) 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.(*DescribeFaqInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DescribeFaq") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeFaqInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeFeaturedResultsSet struct { } func (*awsAwsjson11_serializeOpDescribeFeaturedResultsSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeFeaturedResultsSet) 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.(*DescribeFeaturedResultsSetInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DescribeFeaturedResultsSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeFeaturedResultsSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeIndex struct { } func (*awsAwsjson11_serializeOpDescribeIndex) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeIndex) 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.(*DescribeIndexInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DescribeIndex") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeIndexInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribePrincipalMapping struct { } func (*awsAwsjson11_serializeOpDescribePrincipalMapping) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribePrincipalMapping) 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.(*DescribePrincipalMappingInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DescribePrincipalMapping") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribePrincipalMappingInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeQuerySuggestionsBlockList struct { } func (*awsAwsjson11_serializeOpDescribeQuerySuggestionsBlockList) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeQuerySuggestionsBlockList) 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.(*DescribeQuerySuggestionsBlockListInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DescribeQuerySuggestionsBlockList") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeQuerySuggestionsBlockListInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeQuerySuggestionsConfig struct { } func (*awsAwsjson11_serializeOpDescribeQuerySuggestionsConfig) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeQuerySuggestionsConfig) 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.(*DescribeQuerySuggestionsConfigInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DescribeQuerySuggestionsConfig") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeQuerySuggestionsConfigInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeThesaurus struct { } func (*awsAwsjson11_serializeOpDescribeThesaurus) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeThesaurus) 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.(*DescribeThesaurusInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DescribeThesaurus") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeThesaurusInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDisassociateEntitiesFromExperience struct { } func (*awsAwsjson11_serializeOpDisassociateEntitiesFromExperience) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDisassociateEntitiesFromExperience) 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.(*DisassociateEntitiesFromExperienceInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DisassociateEntitiesFromExperience") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDisassociateEntitiesFromExperienceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDisassociatePersonasFromEntities struct { } func (*awsAwsjson11_serializeOpDisassociatePersonasFromEntities) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDisassociatePersonasFromEntities) 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.(*DisassociatePersonasFromEntitiesInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.DisassociatePersonasFromEntities") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDisassociatePersonasFromEntitiesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetQuerySuggestions struct { } func (*awsAwsjson11_serializeOpGetQuerySuggestions) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetQuerySuggestions) 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.(*GetQuerySuggestionsInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.GetQuerySuggestions") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetQuerySuggestionsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpGetSnapshots struct { } func (*awsAwsjson11_serializeOpGetSnapshots) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpGetSnapshots) 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.(*GetSnapshotsInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.GetSnapshots") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentGetSnapshotsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListAccessControlConfigurations struct { } func (*awsAwsjson11_serializeOpListAccessControlConfigurations) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListAccessControlConfigurations) 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.(*ListAccessControlConfigurationsInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.ListAccessControlConfigurations") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListAccessControlConfigurationsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListDataSources struct { } func (*awsAwsjson11_serializeOpListDataSources) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListDataSources) 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.(*ListDataSourcesInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.ListDataSources") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListDataSourcesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListDataSourceSyncJobs struct { } func (*awsAwsjson11_serializeOpListDataSourceSyncJobs) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListDataSourceSyncJobs) 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.(*ListDataSourceSyncJobsInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.ListDataSourceSyncJobs") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListDataSourceSyncJobsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListEntityPersonas struct { } func (*awsAwsjson11_serializeOpListEntityPersonas) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListEntityPersonas) 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.(*ListEntityPersonasInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.ListEntityPersonas") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListEntityPersonasInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListExperienceEntities struct { } func (*awsAwsjson11_serializeOpListExperienceEntities) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListExperienceEntities) 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.(*ListExperienceEntitiesInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.ListExperienceEntities") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListExperienceEntitiesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListExperiences struct { } func (*awsAwsjson11_serializeOpListExperiences) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListExperiences) 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.(*ListExperiencesInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.ListExperiences") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListExperiencesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListFaqs struct { } func (*awsAwsjson11_serializeOpListFaqs) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListFaqs) 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.(*ListFaqsInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.ListFaqs") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListFaqsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListFeaturedResultsSets struct { } func (*awsAwsjson11_serializeOpListFeaturedResultsSets) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListFeaturedResultsSets) 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.(*ListFeaturedResultsSetsInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.ListFeaturedResultsSets") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListFeaturedResultsSetsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListGroupsOlderThanOrderingId struct { } func (*awsAwsjson11_serializeOpListGroupsOlderThanOrderingId) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListGroupsOlderThanOrderingId) 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.(*ListGroupsOlderThanOrderingIdInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.ListGroupsOlderThanOrderingId") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListGroupsOlderThanOrderingIdInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListIndices struct { } func (*awsAwsjson11_serializeOpListIndices) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListIndices) 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.(*ListIndicesInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.ListIndices") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListIndicesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListQuerySuggestionsBlockLists struct { } func (*awsAwsjson11_serializeOpListQuerySuggestionsBlockLists) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListQuerySuggestionsBlockLists) 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.(*ListQuerySuggestionsBlockListsInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.ListQuerySuggestionsBlockLists") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListQuerySuggestionsBlockListsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListTagsForResource struct { } func (*awsAwsjson11_serializeOpListTagsForResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListTagsForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.ListTagsForResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListThesauri struct { } func (*awsAwsjson11_serializeOpListThesauri) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListThesauri) 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.(*ListThesauriInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.ListThesauri") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListThesauriInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpPutPrincipalMapping struct { } func (*awsAwsjson11_serializeOpPutPrincipalMapping) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpPutPrincipalMapping) 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.(*PutPrincipalMappingInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.PutPrincipalMapping") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentPutPrincipalMappingInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpQuery struct { } func (*awsAwsjson11_serializeOpQuery) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpQuery) 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.(*QueryInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.Query") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentQueryInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpRetrieve struct { } func (*awsAwsjson11_serializeOpRetrieve) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpRetrieve) 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.(*RetrieveInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.Retrieve") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentRetrieveInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpStartDataSourceSyncJob struct { } func (*awsAwsjson11_serializeOpStartDataSourceSyncJob) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpStartDataSourceSyncJob) 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.(*StartDataSourceSyncJobInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.StartDataSourceSyncJob") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentStartDataSourceSyncJobInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpStopDataSourceSyncJob struct { } func (*awsAwsjson11_serializeOpStopDataSourceSyncJob) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpStopDataSourceSyncJob) 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.(*StopDataSourceSyncJobInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.StopDataSourceSyncJob") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentStopDataSourceSyncJobInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpSubmitFeedback struct { } func (*awsAwsjson11_serializeOpSubmitFeedback) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpSubmitFeedback) 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.(*SubmitFeedbackInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.SubmitFeedback") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentSubmitFeedbackInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpTagResource struct { } func (*awsAwsjson11_serializeOpTagResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.TagResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUntagResource struct { } func (*awsAwsjson11_serializeOpUntagResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.UntagResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateAccessControlConfiguration struct { } func (*awsAwsjson11_serializeOpUpdateAccessControlConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateAccessControlConfiguration) 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.(*UpdateAccessControlConfigurationInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.UpdateAccessControlConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateAccessControlConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateDataSource struct { } func (*awsAwsjson11_serializeOpUpdateDataSource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateDataSource) 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.(*UpdateDataSourceInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.UpdateDataSource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateDataSourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateExperience struct { } func (*awsAwsjson11_serializeOpUpdateExperience) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateExperience) 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.(*UpdateExperienceInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.UpdateExperience") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateExperienceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateFeaturedResultsSet struct { } func (*awsAwsjson11_serializeOpUpdateFeaturedResultsSet) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateFeaturedResultsSet) 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.(*UpdateFeaturedResultsSetInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.UpdateFeaturedResultsSet") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateFeaturedResultsSetInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateIndex struct { } func (*awsAwsjson11_serializeOpUpdateIndex) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateIndex) 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.(*UpdateIndexInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.UpdateIndex") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateIndexInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateQuerySuggestionsBlockList struct { } func (*awsAwsjson11_serializeOpUpdateQuerySuggestionsBlockList) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateQuerySuggestionsBlockList) 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.(*UpdateQuerySuggestionsBlockListInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.UpdateQuerySuggestionsBlockList") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateQuerySuggestionsBlockListInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateQuerySuggestionsConfig struct { } func (*awsAwsjson11_serializeOpUpdateQuerySuggestionsConfig) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateQuerySuggestionsConfig) 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.(*UpdateQuerySuggestionsConfigInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.UpdateQuerySuggestionsConfig") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateQuerySuggestionsConfigInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateThesaurus struct { } func (*awsAwsjson11_serializeOpUpdateThesaurus) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateThesaurus) 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.(*UpdateThesaurusInput) _ = 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.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraFrontendService.UpdateThesaurus") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateThesaurusInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsAwsjson11_serializeDocumentAccessControlListConfiguration(v *types.AccessControlListConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.KeyPath != nil { ok := object.Key("KeyPath") ok.String(*v.KeyPath) } return nil } func awsAwsjson11_serializeDocumentAclConfiguration(v *types.AclConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AllowedGroupsColumnName != nil { ok := object.Key("AllowedGroupsColumnName") ok.String(*v.AllowedGroupsColumnName) } return nil } func awsAwsjson11_serializeDocumentAlfrescoConfiguration(v *types.AlfrescoConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BlogFieldMappings != nil { ok := object.Key("BlogFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.BlogFieldMappings, ok); err != nil { return err } } if v.CrawlComments { ok := object.Key("CrawlComments") ok.Boolean(v.CrawlComments) } if v.CrawlSystemFolders { ok := object.Key("CrawlSystemFolders") ok.Boolean(v.CrawlSystemFolders) } if v.DocumentLibraryFieldMappings != nil { ok := object.Key("DocumentLibraryFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.DocumentLibraryFieldMappings, ok); err != nil { return err } } if v.EntityFilter != nil { ok := object.Key("EntityFilter") if err := awsAwsjson11_serializeDocumentEntityFilter(v.EntityFilter, ok); err != nil { return err } } if v.ExclusionPatterns != nil { ok := object.Key("ExclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil { return err } } if v.InclusionPatterns != nil { ok := object.Key("InclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil { return err } } if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) } if v.SiteId != nil { ok := object.Key("SiteId") ok.String(*v.SiteId) } if v.SiteUrl != nil { ok := object.Key("SiteUrl") ok.String(*v.SiteUrl) } if v.SslCertificateS3Path != nil { ok := object.Key("SslCertificateS3Path") if err := awsAwsjson11_serializeDocumentS3Path(v.SslCertificateS3Path, ok); err != nil { return err } } if v.VpcConfiguration != nil { ok := object.Key("VpcConfiguration") if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil { return err } } if v.WikiFieldMappings != nil { ok := object.Key("WikiFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.WikiFieldMappings, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentAssociateEntityList(v []types.EntityConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentEntityConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentAttributeFilter(v *types.AttributeFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AndAllFilters != nil { ok := object.Key("AndAllFilters") if err := awsAwsjson11_serializeDocumentAttributeFilterList(v.AndAllFilters, ok); err != nil { return err } } if v.ContainsAll != nil { ok := object.Key("ContainsAll") if err := awsAwsjson11_serializeDocumentDocumentAttribute(v.ContainsAll, ok); err != nil { return err } } if v.ContainsAny != nil { ok := object.Key("ContainsAny") if err := awsAwsjson11_serializeDocumentDocumentAttribute(v.ContainsAny, ok); err != nil { return err } } if v.EqualsTo != nil { ok := object.Key("EqualsTo") if err := awsAwsjson11_serializeDocumentDocumentAttribute(v.EqualsTo, ok); err != nil { return err } } if v.GreaterThan != nil { ok := object.Key("GreaterThan") if err := awsAwsjson11_serializeDocumentDocumentAttribute(v.GreaterThan, ok); err != nil { return err } } if v.GreaterThanOrEquals != nil { ok := object.Key("GreaterThanOrEquals") if err := awsAwsjson11_serializeDocumentDocumentAttribute(v.GreaterThanOrEquals, ok); err != nil { return err } } if v.LessThan != nil { ok := object.Key("LessThan") if err := awsAwsjson11_serializeDocumentDocumentAttribute(v.LessThan, ok); err != nil { return err } } if v.LessThanOrEquals != nil { ok := object.Key("LessThanOrEquals") if err := awsAwsjson11_serializeDocumentDocumentAttribute(v.LessThanOrEquals, ok); err != nil { return err } } if v.NotFilter != nil { ok := object.Key("NotFilter") if err := awsAwsjson11_serializeDocumentAttributeFilter(v.NotFilter, ok); err != nil { return err } } if v.OrAllFilters != nil { ok := object.Key("OrAllFilters") if err := awsAwsjson11_serializeDocumentAttributeFilterList(v.OrAllFilters, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentAttributeFilterList(v []types.AttributeFilter, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentAttributeFilter(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentAttributeSuggestionsGetConfig(v *types.AttributeSuggestionsGetConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AdditionalResponseAttributes != nil { ok := object.Key("AdditionalResponseAttributes") if err := awsAwsjson11_serializeDocumentDocumentAttributeKeyList(v.AdditionalResponseAttributes, ok); err != nil { return err } } if v.AttributeFilter != nil { ok := object.Key("AttributeFilter") if err := awsAwsjson11_serializeDocumentAttributeFilter(v.AttributeFilter, ok); err != nil { return err } } if v.SuggestionAttributes != nil { ok := object.Key("SuggestionAttributes") if err := awsAwsjson11_serializeDocumentDocumentAttributeKeyList(v.SuggestionAttributes, ok); err != nil { return err } } if v.UserContext != nil { ok := object.Key("UserContext") if err := awsAwsjson11_serializeDocumentUserContext(v.UserContext, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentAttributeSuggestionsUpdateConfig(v *types.AttributeSuggestionsUpdateConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.AttributeSuggestionsMode) > 0 { ok := object.Key("AttributeSuggestionsMode") ok.String(string(v.AttributeSuggestionsMode)) } if v.SuggestableConfigList != nil { ok := object.Key("SuggestableConfigList") if err := awsAwsjson11_serializeDocumentSuggestableConfigList(v.SuggestableConfigList, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentAuthenticationConfiguration(v *types.AuthenticationConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BasicAuthentication != nil { ok := object.Key("BasicAuthentication") if err := awsAwsjson11_serializeDocumentBasicAuthenticationConfigurationList(v.BasicAuthentication, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentBasicAuthenticationConfiguration(v *types.BasicAuthenticationConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Credentials != nil { ok := object.Key("Credentials") ok.String(*v.Credentials) } if v.Host != nil { ok := object.Key("Host") ok.String(*v.Host) } if v.Port != nil { ok := object.Key("Port") ok.Integer(*v.Port) } return nil } func awsAwsjson11_serializeDocumentBasicAuthenticationConfigurationList(v []types.BasicAuthenticationConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentBasicAuthenticationConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentBoxConfiguration(v *types.BoxConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CommentFieldMappings != nil { ok := object.Key("CommentFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.CommentFieldMappings, ok); err != nil { return err } } if v.CrawlComments { ok := object.Key("CrawlComments") ok.Boolean(v.CrawlComments) } if v.CrawlTasks { ok := object.Key("CrawlTasks") ok.Boolean(v.CrawlTasks) } if v.CrawlWebLinks { ok := object.Key("CrawlWebLinks") ok.Boolean(v.CrawlWebLinks) } if v.EnterpriseId != nil { ok := object.Key("EnterpriseId") ok.String(*v.EnterpriseId) } if v.ExclusionPatterns != nil { ok := object.Key("ExclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil { return err } } if v.FileFieldMappings != nil { ok := object.Key("FileFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FileFieldMappings, ok); err != nil { return err } } if v.InclusionPatterns != nil { ok := object.Key("InclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil { return err } } if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) } if v.TaskFieldMappings != nil { ok := object.Key("TaskFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.TaskFieldMappings, ok); err != nil { return err } } if v.UseChangeLog { ok := object.Key("UseChangeLog") ok.Boolean(v.UseChangeLog) } if v.VpcConfiguration != nil { ok := object.Key("VpcConfiguration") if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil { return err } } if v.WebLinkFieldMappings != nil { ok := object.Key("WebLinkFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.WebLinkFieldMappings, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentCapacityUnitsConfiguration(v *types.CapacityUnitsConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.QueryCapacityUnits != nil { ok := object.Key("QueryCapacityUnits") ok.Integer(*v.QueryCapacityUnits) } if v.StorageCapacityUnits != nil { ok := object.Key("StorageCapacityUnits") ok.Integer(*v.StorageCapacityUnits) } return nil } func awsAwsjson11_serializeDocumentChangeDetectingColumns(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 awsAwsjson11_serializeDocumentClickFeedback(v *types.ClickFeedback, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClickTime != nil { ok := object.Key("ClickTime") ok.Double(smithytime.FormatEpochSeconds(*v.ClickTime)) } if v.ResultId != nil { ok := object.Key("ResultId") ok.String(*v.ResultId) } return nil } func awsAwsjson11_serializeDocumentClickFeedbackList(v []types.ClickFeedback, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentClickFeedback(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentColumnConfiguration(v *types.ColumnConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChangeDetectingColumns != nil { ok := object.Key("ChangeDetectingColumns") if err := awsAwsjson11_serializeDocumentChangeDetectingColumns(v.ChangeDetectingColumns, ok); err != nil { return err } } if v.DocumentDataColumnName != nil { ok := object.Key("DocumentDataColumnName") ok.String(*v.DocumentDataColumnName) } if v.DocumentIdColumnName != nil { ok := object.Key("DocumentIdColumnName") ok.String(*v.DocumentIdColumnName) } if v.DocumentTitleColumnName != nil { ok := object.Key("DocumentTitleColumnName") ok.String(*v.DocumentTitleColumnName) } if v.FieldMappings != nil { ok := object.Key("FieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentConfluenceAttachmentConfiguration(v *types.ConfluenceAttachmentConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AttachmentFieldMappings != nil { ok := object.Key("AttachmentFieldMappings") if err := awsAwsjson11_serializeDocumentConfluenceAttachmentFieldMappingsList(v.AttachmentFieldMappings, ok); err != nil { return err } } if v.CrawlAttachments { ok := object.Key("CrawlAttachments") ok.Boolean(v.CrawlAttachments) } return nil } func awsAwsjson11_serializeDocumentConfluenceAttachmentFieldMappingsList(v []types.ConfluenceAttachmentToIndexFieldMapping, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentConfluenceAttachmentToIndexFieldMapping(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentConfluenceAttachmentToIndexFieldMapping(v *types.ConfluenceAttachmentToIndexFieldMapping, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.DataSourceFieldName) > 0 { ok := object.Key("DataSourceFieldName") ok.String(string(v.DataSourceFieldName)) } if v.DateFieldFormat != nil { ok := object.Key("DateFieldFormat") ok.String(*v.DateFieldFormat) } if v.IndexFieldName != nil { ok := object.Key("IndexFieldName") ok.String(*v.IndexFieldName) } return nil } func awsAwsjson11_serializeDocumentConfluenceBlogConfiguration(v *types.ConfluenceBlogConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BlogFieldMappings != nil { ok := object.Key("BlogFieldMappings") if err := awsAwsjson11_serializeDocumentConfluenceBlogFieldMappingsList(v.BlogFieldMappings, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentConfluenceBlogFieldMappingsList(v []types.ConfluenceBlogToIndexFieldMapping, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentConfluenceBlogToIndexFieldMapping(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentConfluenceBlogToIndexFieldMapping(v *types.ConfluenceBlogToIndexFieldMapping, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.DataSourceFieldName) > 0 { ok := object.Key("DataSourceFieldName") ok.String(string(v.DataSourceFieldName)) } if v.DateFieldFormat != nil { ok := object.Key("DateFieldFormat") ok.String(*v.DateFieldFormat) } if v.IndexFieldName != nil { ok := object.Key("IndexFieldName") ok.String(*v.IndexFieldName) } return nil } func awsAwsjson11_serializeDocumentConfluenceConfiguration(v *types.ConfluenceConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AttachmentConfiguration != nil { ok := object.Key("AttachmentConfiguration") if err := awsAwsjson11_serializeDocumentConfluenceAttachmentConfiguration(v.AttachmentConfiguration, ok); err != nil { return err } } if len(v.AuthenticationType) > 0 { ok := object.Key("AuthenticationType") ok.String(string(v.AuthenticationType)) } if v.BlogConfiguration != nil { ok := object.Key("BlogConfiguration") if err := awsAwsjson11_serializeDocumentConfluenceBlogConfiguration(v.BlogConfiguration, ok); err != nil { return err } } if v.ExclusionPatterns != nil { ok := object.Key("ExclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil { return err } } if v.InclusionPatterns != nil { ok := object.Key("InclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil { return err } } if v.PageConfiguration != nil { ok := object.Key("PageConfiguration") if err := awsAwsjson11_serializeDocumentConfluencePageConfiguration(v.PageConfiguration, ok); err != nil { return err } } if v.ProxyConfiguration != nil { ok := object.Key("ProxyConfiguration") if err := awsAwsjson11_serializeDocumentProxyConfiguration(v.ProxyConfiguration, ok); err != nil { return err } } if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) } if v.ServerUrl != nil { ok := object.Key("ServerUrl") ok.String(*v.ServerUrl) } if v.SpaceConfiguration != nil { ok := object.Key("SpaceConfiguration") if err := awsAwsjson11_serializeDocumentConfluenceSpaceConfiguration(v.SpaceConfiguration, ok); err != nil { return err } } if len(v.Version) > 0 { ok := object.Key("Version") ok.String(string(v.Version)) } if v.VpcConfiguration != nil { ok := object.Key("VpcConfiguration") if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentConfluencePageConfiguration(v *types.ConfluencePageConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PageFieldMappings != nil { ok := object.Key("PageFieldMappings") if err := awsAwsjson11_serializeDocumentConfluencePageFieldMappingsList(v.PageFieldMappings, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentConfluencePageFieldMappingsList(v []types.ConfluencePageToIndexFieldMapping, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentConfluencePageToIndexFieldMapping(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentConfluencePageToIndexFieldMapping(v *types.ConfluencePageToIndexFieldMapping, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.DataSourceFieldName) > 0 { ok := object.Key("DataSourceFieldName") ok.String(string(v.DataSourceFieldName)) } if v.DateFieldFormat != nil { ok := object.Key("DateFieldFormat") ok.String(*v.DateFieldFormat) } if v.IndexFieldName != nil { ok := object.Key("IndexFieldName") ok.String(*v.IndexFieldName) } return nil } func awsAwsjson11_serializeDocumentConfluenceSpaceConfiguration(v *types.ConfluenceSpaceConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CrawlArchivedSpaces { ok := object.Key("CrawlArchivedSpaces") ok.Boolean(v.CrawlArchivedSpaces) } if v.CrawlPersonalSpaces { ok := object.Key("CrawlPersonalSpaces") ok.Boolean(v.CrawlPersonalSpaces) } if v.ExcludeSpaces != nil { ok := object.Key("ExcludeSpaces") if err := awsAwsjson11_serializeDocumentConfluenceSpaceList(v.ExcludeSpaces, ok); err != nil { return err } } if v.IncludeSpaces != nil { ok := object.Key("IncludeSpaces") if err := awsAwsjson11_serializeDocumentConfluenceSpaceList(v.IncludeSpaces, ok); err != nil { return err } } if v.SpaceFieldMappings != nil { ok := object.Key("SpaceFieldMappings") if err := awsAwsjson11_serializeDocumentConfluenceSpaceFieldMappingsList(v.SpaceFieldMappings, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentConfluenceSpaceFieldMappingsList(v []types.ConfluenceSpaceToIndexFieldMapping, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentConfluenceSpaceToIndexFieldMapping(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentConfluenceSpaceList(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 awsAwsjson11_serializeDocumentConfluenceSpaceToIndexFieldMapping(v *types.ConfluenceSpaceToIndexFieldMapping, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.DataSourceFieldName) > 0 { ok := object.Key("DataSourceFieldName") ok.String(string(v.DataSourceFieldName)) } if v.DateFieldFormat != nil { ok := object.Key("DateFieldFormat") ok.String(*v.DateFieldFormat) } if v.IndexFieldName != nil { ok := object.Key("IndexFieldName") ok.String(*v.IndexFieldName) } return nil } func awsAwsjson11_serializeDocumentConnectionConfiguration(v *types.ConnectionConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DatabaseHost != nil { ok := object.Key("DatabaseHost") ok.String(*v.DatabaseHost) } if v.DatabaseName != nil { ok := object.Key("DatabaseName") ok.String(*v.DatabaseName) } if v.DatabasePort != nil { ok := object.Key("DatabasePort") ok.Integer(*v.DatabasePort) } if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) } if v.TableName != nil { ok := object.Key("TableName") ok.String(*v.TableName) } return nil } func awsAwsjson11_serializeDocumentContentSourceConfiguration(v *types.ContentSourceConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DataSourceIds != nil { ok := object.Key("DataSourceIds") if err := awsAwsjson11_serializeDocumentDataSourceIdList(v.DataSourceIds, ok); err != nil { return err } } if v.DirectPutContent { ok := object.Key("DirectPutContent") ok.Boolean(v.DirectPutContent) } if v.FaqIds != nil { ok := object.Key("FaqIds") if err := awsAwsjson11_serializeDocumentFaqIdsList(v.FaqIds, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentCustomDocumentEnrichmentConfiguration(v *types.CustomDocumentEnrichmentConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.InlineConfigurations != nil { ok := object.Key("InlineConfigurations") if err := awsAwsjson11_serializeDocumentInlineCustomDocumentEnrichmentConfigurationList(v.InlineConfigurations, ok); err != nil { return err } } if v.PostExtractionHookConfiguration != nil { ok := object.Key("PostExtractionHookConfiguration") if err := awsAwsjson11_serializeDocumentHookConfiguration(v.PostExtractionHookConfiguration, ok); err != nil { return err } } if v.PreExtractionHookConfiguration != nil { ok := object.Key("PreExtractionHookConfiguration") if err := awsAwsjson11_serializeDocumentHookConfiguration(v.PreExtractionHookConfiguration, ok); err != nil { return err } } if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) } return nil } func awsAwsjson11_serializeDocumentDatabaseConfiguration(v *types.DatabaseConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AclConfiguration != nil { ok := object.Key("AclConfiguration") if err := awsAwsjson11_serializeDocumentAclConfiguration(v.AclConfiguration, ok); err != nil { return err } } if v.ColumnConfiguration != nil { ok := object.Key("ColumnConfiguration") if err := awsAwsjson11_serializeDocumentColumnConfiguration(v.ColumnConfiguration, ok); err != nil { return err } } if v.ConnectionConfiguration != nil { ok := object.Key("ConnectionConfiguration") if err := awsAwsjson11_serializeDocumentConnectionConfiguration(v.ConnectionConfiguration, ok); err != nil { return err } } if len(v.DatabaseEngineType) > 0 { ok := object.Key("DatabaseEngineType") ok.String(string(v.DatabaseEngineType)) } if v.SqlConfiguration != nil { ok := object.Key("SqlConfiguration") if err := awsAwsjson11_serializeDocumentSqlConfiguration(v.SqlConfiguration, ok); err != nil { return err } } if v.VpcConfiguration != nil { ok := object.Key("VpcConfiguration") if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentDataSourceConfiguration(v *types.DataSourceConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AlfrescoConfiguration != nil { ok := object.Key("AlfrescoConfiguration") if err := awsAwsjson11_serializeDocumentAlfrescoConfiguration(v.AlfrescoConfiguration, ok); err != nil { return err } } if v.BoxConfiguration != nil { ok := object.Key("BoxConfiguration") if err := awsAwsjson11_serializeDocumentBoxConfiguration(v.BoxConfiguration, ok); err != nil { return err } } if v.ConfluenceConfiguration != nil { ok := object.Key("ConfluenceConfiguration") if err := awsAwsjson11_serializeDocumentConfluenceConfiguration(v.ConfluenceConfiguration, ok); err != nil { return err } } if v.DatabaseConfiguration != nil { ok := object.Key("DatabaseConfiguration") if err := awsAwsjson11_serializeDocumentDatabaseConfiguration(v.DatabaseConfiguration, ok); err != nil { return err } } if v.FsxConfiguration != nil { ok := object.Key("FsxConfiguration") if err := awsAwsjson11_serializeDocumentFsxConfiguration(v.FsxConfiguration, ok); err != nil { return err } } if v.GitHubConfiguration != nil { ok := object.Key("GitHubConfiguration") if err := awsAwsjson11_serializeDocumentGitHubConfiguration(v.GitHubConfiguration, ok); err != nil { return err } } if v.GoogleDriveConfiguration != nil { ok := object.Key("GoogleDriveConfiguration") if err := awsAwsjson11_serializeDocumentGoogleDriveConfiguration(v.GoogleDriveConfiguration, ok); err != nil { return err } } if v.JiraConfiguration != nil { ok := object.Key("JiraConfiguration") if err := awsAwsjson11_serializeDocumentJiraConfiguration(v.JiraConfiguration, ok); err != nil { return err } } if v.OneDriveConfiguration != nil { ok := object.Key("OneDriveConfiguration") if err := awsAwsjson11_serializeDocumentOneDriveConfiguration(v.OneDriveConfiguration, ok); err != nil { return err } } if v.QuipConfiguration != nil { ok := object.Key("QuipConfiguration") if err := awsAwsjson11_serializeDocumentQuipConfiguration(v.QuipConfiguration, ok); err != nil { return err } } if v.S3Configuration != nil { ok := object.Key("S3Configuration") if err := awsAwsjson11_serializeDocumentS3DataSourceConfiguration(v.S3Configuration, ok); err != nil { return err } } if v.SalesforceConfiguration != nil { ok := object.Key("SalesforceConfiguration") if err := awsAwsjson11_serializeDocumentSalesforceConfiguration(v.SalesforceConfiguration, ok); err != nil { return err } } if v.ServiceNowConfiguration != nil { ok := object.Key("ServiceNowConfiguration") if err := awsAwsjson11_serializeDocumentServiceNowConfiguration(v.ServiceNowConfiguration, ok); err != nil { return err } } if v.SharePointConfiguration != nil { ok := object.Key("SharePointConfiguration") if err := awsAwsjson11_serializeDocumentSharePointConfiguration(v.SharePointConfiguration, ok); err != nil { return err } } if v.SlackConfiguration != nil { ok := object.Key("SlackConfiguration") if err := awsAwsjson11_serializeDocumentSlackConfiguration(v.SlackConfiguration, ok); err != nil { return err } } if v.TemplateConfiguration != nil { ok := object.Key("TemplateConfiguration") if err := awsAwsjson11_serializeDocumentTemplateConfiguration(v.TemplateConfiguration, ok); err != nil { return err } } if v.WebCrawlerConfiguration != nil { ok := object.Key("WebCrawlerConfiguration") if err := awsAwsjson11_serializeDocumentWebCrawlerConfiguration(v.WebCrawlerConfiguration, ok); err != nil { return err } } if v.WorkDocsConfiguration != nil { ok := object.Key("WorkDocsConfiguration") if err := awsAwsjson11_serializeDocumentWorkDocsConfiguration(v.WorkDocsConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentDataSourceGroup(v *types.DataSourceGroup, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DataSourceId != nil { ok := object.Key("DataSourceId") ok.String(*v.DataSourceId) } if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } return nil } func awsAwsjson11_serializeDocumentDataSourceGroups(v []types.DataSourceGroup, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentDataSourceGroup(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentDataSourceIdList(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 awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(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 awsAwsjson11_serializeDocumentDataSourceSyncJobMetricTarget(v *types.DataSourceSyncJobMetricTarget, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DataSourceId != nil { ok := object.Key("DataSourceId") ok.String(*v.DataSourceId) } if v.DataSourceSyncJobId != nil { ok := object.Key("DataSourceSyncJobId") ok.String(*v.DataSourceSyncJobId) } return nil } func awsAwsjson11_serializeDocumentDataSourceToIndexFieldMapping(v *types.DataSourceToIndexFieldMapping, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DataSourceFieldName != nil { ok := object.Key("DataSourceFieldName") ok.String(*v.DataSourceFieldName) } if v.DateFieldFormat != nil { ok := object.Key("DateFieldFormat") ok.String(*v.DateFieldFormat) } if v.IndexFieldName != nil { ok := object.Key("IndexFieldName") ok.String(*v.IndexFieldName) } return nil } func awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v []types.DataSourceToIndexFieldMapping, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMapping(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v *types.DataSourceVpcConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.SecurityGroupIds != nil { ok := object.Key("SecurityGroupIds") if err := awsAwsjson11_serializeDocumentSecurityGroupIdList(v.SecurityGroupIds, ok); err != nil { return err } } if v.SubnetIds != nil { ok := object.Key("SubnetIds") if err := awsAwsjson11_serializeDocumentSubnetIdList(v.SubnetIds, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentDisassociateEntityList(v []types.EntityConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentEntityConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentDocument(v *types.Document, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AccessControlConfigurationId != nil { ok := object.Key("AccessControlConfigurationId") ok.String(*v.AccessControlConfigurationId) } if v.AccessControlList != nil { ok := object.Key("AccessControlList") if err := awsAwsjson11_serializeDocumentPrincipalList(v.AccessControlList, ok); err != nil { return err } } if v.Attributes != nil { ok := object.Key("Attributes") if err := awsAwsjson11_serializeDocumentDocumentAttributeList(v.Attributes, ok); err != nil { return err } } if v.Blob != nil { ok := object.Key("Blob") ok.Base64EncodeBytes(v.Blob) } if len(v.ContentType) > 0 { ok := object.Key("ContentType") ok.String(string(v.ContentType)) } if v.HierarchicalAccessControlList != nil { ok := object.Key("HierarchicalAccessControlList") if err := awsAwsjson11_serializeDocumentHierarchicalPrincipalList(v.HierarchicalAccessControlList, ok); err != nil { return err } } if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.S3Path != nil { ok := object.Key("S3Path") if err := awsAwsjson11_serializeDocumentS3Path(v.S3Path, ok); err != nil { return err } } if v.Title != nil { ok := object.Key("Title") ok.String(*v.Title) } return nil } func awsAwsjson11_serializeDocumentDocumentAttribute(v *types.DocumentAttribute, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Key != nil { ok := object.Key("Key") ok.String(*v.Key) } if v.Value != nil { ok := object.Key("Value") if err := awsAwsjson11_serializeDocumentDocumentAttributeValue(v.Value, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentDocumentAttributeCondition(v *types.DocumentAttributeCondition, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ConditionDocumentAttributeKey != nil { ok := object.Key("ConditionDocumentAttributeKey") ok.String(*v.ConditionDocumentAttributeKey) } if v.ConditionOnValue != nil { ok := object.Key("ConditionOnValue") if err := awsAwsjson11_serializeDocumentDocumentAttributeValue(v.ConditionOnValue, ok); err != nil { return err } } if len(v.Operator) > 0 { ok := object.Key("Operator") ok.String(string(v.Operator)) } return nil } func awsAwsjson11_serializeDocumentDocumentAttributeKeyList(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 awsAwsjson11_serializeDocumentDocumentAttributeList(v []types.DocumentAttribute, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentDocumentAttribute(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentDocumentAttributeStringListValue(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 awsAwsjson11_serializeDocumentDocumentAttributeTarget(v *types.DocumentAttributeTarget, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.TargetDocumentAttributeKey != nil { ok := object.Key("TargetDocumentAttributeKey") ok.String(*v.TargetDocumentAttributeKey) } if v.TargetDocumentAttributeValue != nil { ok := object.Key("TargetDocumentAttributeValue") if err := awsAwsjson11_serializeDocumentDocumentAttributeValue(v.TargetDocumentAttributeValue, ok); err != nil { return err } } if v.TargetDocumentAttributeValueDeletion { ok := object.Key("TargetDocumentAttributeValueDeletion") ok.Boolean(v.TargetDocumentAttributeValueDeletion) } return nil } func awsAwsjson11_serializeDocumentDocumentAttributeValue(v *types.DocumentAttributeValue, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DateValue != nil { ok := object.Key("DateValue") ok.Double(smithytime.FormatEpochSeconds(*v.DateValue)) } if v.LongValue != nil { ok := object.Key("LongValue") ok.Long(*v.LongValue) } if v.StringListValue != nil { ok := object.Key("StringListValue") if err := awsAwsjson11_serializeDocumentDocumentAttributeStringListValue(v.StringListValue, ok); err != nil { return err } } if v.StringValue != nil { ok := object.Key("StringValue") ok.String(*v.StringValue) } return nil } func awsAwsjson11_serializeDocumentDocumentIdList(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 awsAwsjson11_serializeDocumentDocumentInfo(v *types.DocumentInfo, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Attributes != nil { ok := object.Key("Attributes") if err := awsAwsjson11_serializeDocumentDocumentAttributeList(v.Attributes, ok); err != nil { return err } } if v.DocumentId != nil { ok := object.Key("DocumentId") ok.String(*v.DocumentId) } return nil } func awsAwsjson11_serializeDocumentDocumentInfoList(v []types.DocumentInfo, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentDocumentInfo(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentDocumentList(v []types.Document, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentDocument(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentDocumentMetadataConfiguration(v *types.DocumentMetadataConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.Relevance != nil { ok := object.Key("Relevance") if err := awsAwsjson11_serializeDocumentRelevance(v.Relevance, ok); err != nil { return err } } if v.Search != nil { ok := object.Key("Search") if err := awsAwsjson11_serializeDocumentSearch(v.Search, ok); err != nil { return err } } if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } return nil } func awsAwsjson11_serializeDocumentDocumentMetadataConfigurationList(v []types.DocumentMetadataConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentDocumentMetadataConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentDocumentRelevanceConfiguration(v *types.DocumentRelevanceConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.Relevance != nil { ok := object.Key("Relevance") if err := awsAwsjson11_serializeDocumentRelevance(v.Relevance, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentDocumentRelevanceOverrideConfigurationList(v []types.DocumentRelevanceConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentDocumentRelevanceConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentDocumentsMetadataConfiguration(v *types.DocumentsMetadataConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.S3Prefix != nil { ok := object.Key("S3Prefix") ok.String(*v.S3Prefix) } return nil } func awsAwsjson11_serializeDocumentEntityConfiguration(v *types.EntityConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EntityId != nil { ok := object.Key("EntityId") ok.String(*v.EntityId) } if len(v.EntityType) > 0 { ok := object.Key("EntityType") ok.String(string(v.EntityType)) } return nil } func awsAwsjson11_serializeDocumentEntityFilter(v []types.AlfrescoEntity, 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 awsAwsjson11_serializeDocumentEntityIdsList(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 awsAwsjson11_serializeDocumentEntityPersonaConfiguration(v *types.EntityPersonaConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EntityId != nil { ok := object.Key("EntityId") ok.String(*v.EntityId) } if len(v.Persona) > 0 { ok := object.Key("Persona") ok.String(string(v.Persona)) } return nil } func awsAwsjson11_serializeDocumentEntityPersonaConfigurationList(v []types.EntityPersonaConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentEntityPersonaConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentExcludeMimeTypesList(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 awsAwsjson11_serializeDocumentExcludeSharedDrivesList(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 awsAwsjson11_serializeDocumentExcludeUserAccountsList(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 awsAwsjson11_serializeDocumentExperienceConfiguration(v *types.ExperienceConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ContentSourceConfiguration != nil { ok := object.Key("ContentSourceConfiguration") if err := awsAwsjson11_serializeDocumentContentSourceConfiguration(v.ContentSourceConfiguration, ok); err != nil { return err } } if v.UserIdentityConfiguration != nil { ok := object.Key("UserIdentityConfiguration") if err := awsAwsjson11_serializeDocumentUserIdentityConfiguration(v.UserIdentityConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentFacet(v *types.Facet, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DocumentAttributeKey != nil { ok := object.Key("DocumentAttributeKey") ok.String(*v.DocumentAttributeKey) } if v.Facets != nil { ok := object.Key("Facets") if err := awsAwsjson11_serializeDocumentFacetList(v.Facets, ok); err != nil { return err } } if v.MaxResults != 0 { ok := object.Key("MaxResults") ok.Integer(v.MaxResults) } return nil } func awsAwsjson11_serializeDocumentFacetList(v []types.Facet, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentFacet(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentFaqIdsList(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 awsAwsjson11_serializeDocumentFeaturedDocument(v *types.FeaturedDocument, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } return nil } func awsAwsjson11_serializeDocumentFeaturedDocumentList(v []types.FeaturedDocument, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentFeaturedDocument(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentFeaturedResultsSetIdList(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 awsAwsjson11_serializeDocumentFolderIdList(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 awsAwsjson11_serializeDocumentFsxConfiguration(v *types.FsxConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ExclusionPatterns != nil { ok := object.Key("ExclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil { return err } } if v.FieldMappings != nil { ok := object.Key("FieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil { return err } } if v.FileSystemId != nil { ok := object.Key("FileSystemId") ok.String(*v.FileSystemId) } if len(v.FileSystemType) > 0 { ok := object.Key("FileSystemType") ok.String(string(v.FileSystemType)) } if v.InclusionPatterns != nil { ok := object.Key("InclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil { return err } } if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) } if v.VpcConfiguration != nil { ok := object.Key("VpcConfiguration") if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentGitHubConfiguration(v *types.GitHubConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ExclusionFileNamePatterns != nil { ok := object.Key("ExclusionFileNamePatterns") if err := awsAwsjson11_serializeDocumentStringList(v.ExclusionFileNamePatterns, ok); err != nil { return err } } if v.ExclusionFileTypePatterns != nil { ok := object.Key("ExclusionFileTypePatterns") if err := awsAwsjson11_serializeDocumentStringList(v.ExclusionFileTypePatterns, ok); err != nil { return err } } if v.ExclusionFolderNamePatterns != nil { ok := object.Key("ExclusionFolderNamePatterns") if err := awsAwsjson11_serializeDocumentStringList(v.ExclusionFolderNamePatterns, ok); err != nil { return err } } if v.GitHubCommitConfigurationFieldMappings != nil { ok := object.Key("GitHubCommitConfigurationFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.GitHubCommitConfigurationFieldMappings, ok); err != nil { return err } } if v.GitHubDocumentCrawlProperties != nil { ok := object.Key("GitHubDocumentCrawlProperties") if err := awsAwsjson11_serializeDocumentGitHubDocumentCrawlProperties(v.GitHubDocumentCrawlProperties, ok); err != nil { return err } } if v.GitHubIssueAttachmentConfigurationFieldMappings != nil { ok := object.Key("GitHubIssueAttachmentConfigurationFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.GitHubIssueAttachmentConfigurationFieldMappings, ok); err != nil { return err } } if v.GitHubIssueCommentConfigurationFieldMappings != nil { ok := object.Key("GitHubIssueCommentConfigurationFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.GitHubIssueCommentConfigurationFieldMappings, ok); err != nil { return err } } if v.GitHubIssueDocumentConfigurationFieldMappings != nil { ok := object.Key("GitHubIssueDocumentConfigurationFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.GitHubIssueDocumentConfigurationFieldMappings, ok); err != nil { return err } } if v.GitHubPullRequestCommentConfigurationFieldMappings != nil { ok := object.Key("GitHubPullRequestCommentConfigurationFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.GitHubPullRequestCommentConfigurationFieldMappings, ok); err != nil { return err } } if v.GitHubPullRequestDocumentAttachmentConfigurationFieldMappings != nil { ok := object.Key("GitHubPullRequestDocumentAttachmentConfigurationFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.GitHubPullRequestDocumentAttachmentConfigurationFieldMappings, ok); err != nil { return err } } if v.GitHubPullRequestDocumentConfigurationFieldMappings != nil { ok := object.Key("GitHubPullRequestDocumentConfigurationFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.GitHubPullRequestDocumentConfigurationFieldMappings, ok); err != nil { return err } } if v.GitHubRepositoryConfigurationFieldMappings != nil { ok := object.Key("GitHubRepositoryConfigurationFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.GitHubRepositoryConfigurationFieldMappings, ok); err != nil { return err } } if v.InclusionFileNamePatterns != nil { ok := object.Key("InclusionFileNamePatterns") if err := awsAwsjson11_serializeDocumentStringList(v.InclusionFileNamePatterns, ok); err != nil { return err } } if v.InclusionFileTypePatterns != nil { ok := object.Key("InclusionFileTypePatterns") if err := awsAwsjson11_serializeDocumentStringList(v.InclusionFileTypePatterns, ok); err != nil { return err } } if v.InclusionFolderNamePatterns != nil { ok := object.Key("InclusionFolderNamePatterns") if err := awsAwsjson11_serializeDocumentStringList(v.InclusionFolderNamePatterns, ok); err != nil { return err } } if v.OnPremiseConfiguration != nil { ok := object.Key("OnPremiseConfiguration") if err := awsAwsjson11_serializeDocumentOnPremiseConfiguration(v.OnPremiseConfiguration, ok); err != nil { return err } } if v.RepositoryFilter != nil { ok := object.Key("RepositoryFilter") if err := awsAwsjson11_serializeDocumentRepositoryNames(v.RepositoryFilter, ok); err != nil { return err } } if v.SaaSConfiguration != nil { ok := object.Key("SaaSConfiguration") if err := awsAwsjson11_serializeDocumentSaaSConfiguration(v.SaaSConfiguration, ok); err != nil { return err } } if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) } if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } if v.UseChangeLog { ok := object.Key("UseChangeLog") ok.Boolean(v.UseChangeLog) } if v.VpcConfiguration != nil { ok := object.Key("VpcConfiguration") if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentGitHubDocumentCrawlProperties(v *types.GitHubDocumentCrawlProperties, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CrawlIssue { ok := object.Key("CrawlIssue") ok.Boolean(v.CrawlIssue) } if v.CrawlIssueComment { ok := object.Key("CrawlIssueComment") ok.Boolean(v.CrawlIssueComment) } if v.CrawlIssueCommentAttachment { ok := object.Key("CrawlIssueCommentAttachment") ok.Boolean(v.CrawlIssueCommentAttachment) } if v.CrawlPullRequest { ok := object.Key("CrawlPullRequest") ok.Boolean(v.CrawlPullRequest) } if v.CrawlPullRequestComment { ok := object.Key("CrawlPullRequestComment") ok.Boolean(v.CrawlPullRequestComment) } if v.CrawlPullRequestCommentAttachment { ok := object.Key("CrawlPullRequestCommentAttachment") ok.Boolean(v.CrawlPullRequestCommentAttachment) } if v.CrawlRepositoryDocuments { ok := object.Key("CrawlRepositoryDocuments") ok.Boolean(v.CrawlRepositoryDocuments) } return nil } func awsAwsjson11_serializeDocumentGoogleDriveConfiguration(v *types.GoogleDriveConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ExcludeMimeTypes != nil { ok := object.Key("ExcludeMimeTypes") if err := awsAwsjson11_serializeDocumentExcludeMimeTypesList(v.ExcludeMimeTypes, ok); err != nil { return err } } if v.ExcludeSharedDrives != nil { ok := object.Key("ExcludeSharedDrives") if err := awsAwsjson11_serializeDocumentExcludeSharedDrivesList(v.ExcludeSharedDrives, ok); err != nil { return err } } if v.ExcludeUserAccounts != nil { ok := object.Key("ExcludeUserAccounts") if err := awsAwsjson11_serializeDocumentExcludeUserAccountsList(v.ExcludeUserAccounts, ok); err != nil { return err } } if v.ExclusionPatterns != nil { ok := object.Key("ExclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil { return err } } if v.FieldMappings != nil { ok := object.Key("FieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil { return err } } if v.InclusionPatterns != nil { ok := object.Key("InclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil { return err } } if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) } return nil } func awsAwsjson11_serializeDocumentGroupMembers(v *types.GroupMembers, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MemberGroups != nil { ok := object.Key("MemberGroups") if err := awsAwsjson11_serializeDocumentMemberGroups(v.MemberGroups, ok); err != nil { return err } } if v.MemberUsers != nil { ok := object.Key("MemberUsers") if err := awsAwsjson11_serializeDocumentMemberUsers(v.MemberUsers, ok); err != nil { return err } } if v.S3PathforGroupMembers != nil { ok := object.Key("S3PathforGroupMembers") if err := awsAwsjson11_serializeDocumentS3Path(v.S3PathforGroupMembers, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentGroups(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 awsAwsjson11_serializeDocumentHierarchicalPrincipal(v *types.HierarchicalPrincipal, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PrincipalList != nil { ok := object.Key("PrincipalList") if err := awsAwsjson11_serializeDocumentPrincipalList(v.PrincipalList, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentHierarchicalPrincipalList(v []types.HierarchicalPrincipal, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentHierarchicalPrincipal(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentHookConfiguration(v *types.HookConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.InvocationCondition != nil { ok := object.Key("InvocationCondition") if err := awsAwsjson11_serializeDocumentDocumentAttributeCondition(v.InvocationCondition, ok); err != nil { return err } } if v.LambdaArn != nil { ok := object.Key("LambdaArn") ok.String(*v.LambdaArn) } if v.S3Bucket != nil { ok := object.Key("S3Bucket") ok.String(*v.S3Bucket) } return nil } func awsAwsjson11_serializeDocumentInlineCustomDocumentEnrichmentConfiguration(v *types.InlineCustomDocumentEnrichmentConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Condition != nil { ok := object.Key("Condition") if err := awsAwsjson11_serializeDocumentDocumentAttributeCondition(v.Condition, ok); err != nil { return err } } if v.DocumentContentDeletion { ok := object.Key("DocumentContentDeletion") ok.Boolean(v.DocumentContentDeletion) } if v.Target != nil { ok := object.Key("Target") if err := awsAwsjson11_serializeDocumentDocumentAttributeTarget(v.Target, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentInlineCustomDocumentEnrichmentConfigurationList(v []types.InlineCustomDocumentEnrichmentConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentInlineCustomDocumentEnrichmentConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentIssueSubEntityFilter(v []types.IssueSubEntity, 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 awsAwsjson11_serializeDocumentIssueType(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 awsAwsjson11_serializeDocumentJiraConfiguration(v *types.JiraConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AttachmentFieldMappings != nil { ok := object.Key("AttachmentFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.AttachmentFieldMappings, ok); err != nil { return err } } if v.CommentFieldMappings != nil { ok := object.Key("CommentFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.CommentFieldMappings, ok); err != nil { return err } } if v.ExclusionPatterns != nil { ok := object.Key("ExclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil { return err } } if v.InclusionPatterns != nil { ok := object.Key("InclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil { return err } } if v.IssueFieldMappings != nil { ok := object.Key("IssueFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.IssueFieldMappings, ok); err != nil { return err } } if v.IssueSubEntityFilter != nil { ok := object.Key("IssueSubEntityFilter") if err := awsAwsjson11_serializeDocumentIssueSubEntityFilter(v.IssueSubEntityFilter, ok); err != nil { return err } } if v.IssueType != nil { ok := object.Key("IssueType") if err := awsAwsjson11_serializeDocumentIssueType(v.IssueType, ok); err != nil { return err } } if v.JiraAccountUrl != nil { ok := object.Key("JiraAccountUrl") ok.String(*v.JiraAccountUrl) } if v.Project != nil { ok := object.Key("Project") if err := awsAwsjson11_serializeDocumentProject(v.Project, ok); err != nil { return err } } if v.ProjectFieldMappings != nil { ok := object.Key("ProjectFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.ProjectFieldMappings, ok); err != nil { return err } } if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) } if v.Status != nil { ok := object.Key("Status") if err := awsAwsjson11_serializeDocumentJiraStatus(v.Status, ok); err != nil { return err } } if v.UseChangeLog { ok := object.Key("UseChangeLog") ok.Boolean(v.UseChangeLog) } if v.VpcConfiguration != nil { ok := object.Key("VpcConfiguration") if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil { return err } } if v.WorkLogFieldMappings != nil { ok := object.Key("WorkLogFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.WorkLogFieldMappings, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentJiraStatus(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 awsAwsjson11_serializeDocumentJsonTokenTypeConfiguration(v *types.JsonTokenTypeConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GroupAttributeField != nil { ok := object.Key("GroupAttributeField") ok.String(*v.GroupAttributeField) } if v.UserNameAttributeField != nil { ok := object.Key("UserNameAttributeField") ok.String(*v.UserNameAttributeField) } return nil } func awsAwsjson11_serializeDocumentJwtTokenTypeConfiguration(v *types.JwtTokenTypeConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClaimRegex != nil { ok := object.Key("ClaimRegex") ok.String(*v.ClaimRegex) } if v.GroupAttributeField != nil { ok := object.Key("GroupAttributeField") ok.String(*v.GroupAttributeField) } if v.Issuer != nil { ok := object.Key("Issuer") ok.String(*v.Issuer) } if len(v.KeyLocation) > 0 { ok := object.Key("KeyLocation") ok.String(string(v.KeyLocation)) } if v.SecretManagerArn != nil { ok := object.Key("SecretManagerArn") ok.String(*v.SecretManagerArn) } if v.URL != nil { ok := object.Key("URL") ok.String(*v.URL) } if v.UserNameAttributeField != nil { ok := object.Key("UserNameAttributeField") ok.String(*v.UserNameAttributeField) } return nil } func awsAwsjson11_serializeDocumentMemberGroup(v *types.MemberGroup, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DataSourceId != nil { ok := object.Key("DataSourceId") ok.String(*v.DataSourceId) } if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } return nil } func awsAwsjson11_serializeDocumentMemberGroups(v []types.MemberGroup, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentMemberGroup(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentMemberUser(v *types.MemberUser, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.UserId != nil { ok := object.Key("UserId") ok.String(*v.UserId) } return nil } func awsAwsjson11_serializeDocumentMemberUsers(v []types.MemberUser, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentMemberUser(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentOneDriveConfiguration(v *types.OneDriveConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DisableLocalGroups { ok := object.Key("DisableLocalGroups") ok.Boolean(v.DisableLocalGroups) } if v.ExclusionPatterns != nil { ok := object.Key("ExclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil { return err } } if v.FieldMappings != nil { ok := object.Key("FieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil { return err } } if v.InclusionPatterns != nil { ok := object.Key("InclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil { return err } } if v.OneDriveUsers != nil { ok := object.Key("OneDriveUsers") if err := awsAwsjson11_serializeDocumentOneDriveUsers(v.OneDriveUsers, ok); err != nil { return err } } if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) } if v.TenantDomain != nil { ok := object.Key("TenantDomain") ok.String(*v.TenantDomain) } return nil } func awsAwsjson11_serializeDocumentOneDriveUserList(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 awsAwsjson11_serializeDocumentOneDriveUsers(v *types.OneDriveUsers, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.OneDriveUserList != nil { ok := object.Key("OneDriveUserList") if err := awsAwsjson11_serializeDocumentOneDriveUserList(v.OneDriveUserList, ok); err != nil { return err } } if v.OneDriveUserS3Path != nil { ok := object.Key("OneDriveUserS3Path") if err := awsAwsjson11_serializeDocumentS3Path(v.OneDriveUserS3Path, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentOnPremiseConfiguration(v *types.OnPremiseConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.HostUrl != nil { ok := object.Key("HostUrl") ok.String(*v.HostUrl) } if v.OrganizationName != nil { ok := object.Key("OrganizationName") ok.String(*v.OrganizationName) } if v.SslCertificateS3Path != nil { ok := object.Key("SslCertificateS3Path") if err := awsAwsjson11_serializeDocumentS3Path(v.SslCertificateS3Path, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentPrincipal(v *types.Principal, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Access) > 0 { ok := object.Key("Access") ok.String(string(v.Access)) } if v.DataSourceId != nil { ok := object.Key("DataSourceId") ok.String(*v.DataSourceId) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } return nil } func awsAwsjson11_serializeDocumentPrincipalList(v []types.Principal, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentPrincipal(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentPrivateChannelFilter(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 awsAwsjson11_serializeDocumentProject(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 awsAwsjson11_serializeDocumentProxyConfiguration(v *types.ProxyConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Credentials != nil { ok := object.Key("Credentials") ok.String(*v.Credentials) } if v.Host != nil { ok := object.Key("Host") ok.String(*v.Host) } if v.Port != nil { ok := object.Key("Port") ok.Integer(*v.Port) } return nil } func awsAwsjson11_serializeDocumentPublicChannelFilter(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 awsAwsjson11_serializeDocumentQueryTextList(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 awsAwsjson11_serializeDocumentQuipConfiguration(v *types.QuipConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AttachmentFieldMappings != nil { ok := object.Key("AttachmentFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.AttachmentFieldMappings, ok); err != nil { return err } } if v.CrawlAttachments { ok := object.Key("CrawlAttachments") ok.Boolean(v.CrawlAttachments) } if v.CrawlChatRooms { ok := object.Key("CrawlChatRooms") ok.Boolean(v.CrawlChatRooms) } if v.CrawlFileComments { ok := object.Key("CrawlFileComments") ok.Boolean(v.CrawlFileComments) } if v.Domain != nil { ok := object.Key("Domain") ok.String(*v.Domain) } if v.ExclusionPatterns != nil { ok := object.Key("ExclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil { return err } } if v.FolderIds != nil { ok := object.Key("FolderIds") if err := awsAwsjson11_serializeDocumentFolderIdList(v.FolderIds, ok); err != nil { return err } } if v.InclusionPatterns != nil { ok := object.Key("InclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil { return err } } if v.MessageFieldMappings != nil { ok := object.Key("MessageFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.MessageFieldMappings, ok); err != nil { return err } } if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) } if v.ThreadFieldMappings != nil { ok := object.Key("ThreadFieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.ThreadFieldMappings, ok); err != nil { return err } } if v.VpcConfiguration != nil { ok := object.Key("VpcConfiguration") if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentRelevance(v *types.Relevance, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Duration != nil { ok := object.Key("Duration") ok.String(*v.Duration) } if v.Freshness != nil { ok := object.Key("Freshness") ok.Boolean(*v.Freshness) } if v.Importance != nil { ok := object.Key("Importance") ok.Integer(*v.Importance) } if len(v.RankOrder) > 0 { ok := object.Key("RankOrder") ok.String(string(v.RankOrder)) } if v.ValueImportanceMap != nil { ok := object.Key("ValueImportanceMap") if err := awsAwsjson11_serializeDocumentValueImportanceMap(v.ValueImportanceMap, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentRelevanceFeedback(v *types.RelevanceFeedback, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.RelevanceValue) > 0 { ok := object.Key("RelevanceValue") ok.String(string(v.RelevanceValue)) } if v.ResultId != nil { ok := object.Key("ResultId") ok.String(*v.ResultId) } return nil } func awsAwsjson11_serializeDocumentRelevanceFeedbackList(v []types.RelevanceFeedback, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentRelevanceFeedback(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentRepositoryNames(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 awsAwsjson11_serializeDocumentS3DataSourceConfiguration(v *types.S3DataSourceConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AccessControlListConfiguration != nil { ok := object.Key("AccessControlListConfiguration") if err := awsAwsjson11_serializeDocumentAccessControlListConfiguration(v.AccessControlListConfiguration, ok); err != nil { return err } } if v.BucketName != nil { ok := object.Key("BucketName") ok.String(*v.BucketName) } if v.DocumentsMetadataConfiguration != nil { ok := object.Key("DocumentsMetadataConfiguration") if err := awsAwsjson11_serializeDocumentDocumentsMetadataConfiguration(v.DocumentsMetadataConfiguration, ok); err != nil { return err } } if v.ExclusionPatterns != nil { ok := object.Key("ExclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil { return err } } if v.InclusionPatterns != nil { ok := object.Key("InclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil { return err } } if v.InclusionPrefixes != nil { ok := object.Key("InclusionPrefixes") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPrefixes, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentS3Path(v *types.S3Path, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Bucket != nil { ok := object.Key("Bucket") ok.String(*v.Bucket) } if v.Key != nil { ok := object.Key("Key") ok.String(*v.Key) } return nil } func awsAwsjson11_serializeDocumentSaaSConfiguration(v *types.SaaSConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.HostUrl != nil { ok := object.Key("HostUrl") ok.String(*v.HostUrl) } if v.OrganizationName != nil { ok := object.Key("OrganizationName") ok.String(*v.OrganizationName) } return nil } func awsAwsjson11_serializeDocumentSalesforceChatterFeedConfiguration(v *types.SalesforceChatterFeedConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DocumentDataFieldName != nil { ok := object.Key("DocumentDataFieldName") ok.String(*v.DocumentDataFieldName) } if v.DocumentTitleFieldName != nil { ok := object.Key("DocumentTitleFieldName") ok.String(*v.DocumentTitleFieldName) } if v.FieldMappings != nil { ok := object.Key("FieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil { return err } } if v.IncludeFilterTypes != nil { ok := object.Key("IncludeFilterTypes") if err := awsAwsjson11_serializeDocumentSalesforceChatterFeedIncludeFilterTypes(v.IncludeFilterTypes, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSalesforceChatterFeedIncludeFilterTypes(v []types.SalesforceChatterFeedIncludeFilterType, 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 awsAwsjson11_serializeDocumentSalesforceConfiguration(v *types.SalesforceConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChatterFeedConfiguration != nil { ok := object.Key("ChatterFeedConfiguration") if err := awsAwsjson11_serializeDocumentSalesforceChatterFeedConfiguration(v.ChatterFeedConfiguration, ok); err != nil { return err } } if v.CrawlAttachments { ok := object.Key("CrawlAttachments") ok.Boolean(v.CrawlAttachments) } if v.ExcludeAttachmentFilePatterns != nil { ok := object.Key("ExcludeAttachmentFilePatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExcludeAttachmentFilePatterns, ok); err != nil { return err } } if v.IncludeAttachmentFilePatterns != nil { ok := object.Key("IncludeAttachmentFilePatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.IncludeAttachmentFilePatterns, ok); err != nil { return err } } if v.KnowledgeArticleConfiguration != nil { ok := object.Key("KnowledgeArticleConfiguration") if err := awsAwsjson11_serializeDocumentSalesforceKnowledgeArticleConfiguration(v.KnowledgeArticleConfiguration, ok); err != nil { return err } } if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) } if v.ServerUrl != nil { ok := object.Key("ServerUrl") ok.String(*v.ServerUrl) } if v.StandardObjectAttachmentConfiguration != nil { ok := object.Key("StandardObjectAttachmentConfiguration") if err := awsAwsjson11_serializeDocumentSalesforceStandardObjectAttachmentConfiguration(v.StandardObjectAttachmentConfiguration, ok); err != nil { return err } } if v.StandardObjectConfigurations != nil { ok := object.Key("StandardObjectConfigurations") if err := awsAwsjson11_serializeDocumentSalesforceStandardObjectConfigurationList(v.StandardObjectConfigurations, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSalesforceCustomKnowledgeArticleTypeConfiguration(v *types.SalesforceCustomKnowledgeArticleTypeConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DocumentDataFieldName != nil { ok := object.Key("DocumentDataFieldName") ok.String(*v.DocumentDataFieldName) } if v.DocumentTitleFieldName != nil { ok := object.Key("DocumentTitleFieldName") ok.String(*v.DocumentTitleFieldName) } if v.FieldMappings != nil { ok := object.Key("FieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil { return err } } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } return nil } func awsAwsjson11_serializeDocumentSalesforceCustomKnowledgeArticleTypeConfigurationList(v []types.SalesforceCustomKnowledgeArticleTypeConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentSalesforceCustomKnowledgeArticleTypeConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSalesforceKnowledgeArticleConfiguration(v *types.SalesforceKnowledgeArticleConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CustomKnowledgeArticleTypeConfigurations != nil { ok := object.Key("CustomKnowledgeArticleTypeConfigurations") if err := awsAwsjson11_serializeDocumentSalesforceCustomKnowledgeArticleTypeConfigurationList(v.CustomKnowledgeArticleTypeConfigurations, ok); err != nil { return err } } if v.IncludedStates != nil { ok := object.Key("IncludedStates") if err := awsAwsjson11_serializeDocumentSalesforceKnowledgeArticleStateList(v.IncludedStates, ok); err != nil { return err } } if v.StandardKnowledgeArticleTypeConfiguration != nil { ok := object.Key("StandardKnowledgeArticleTypeConfiguration") if err := awsAwsjson11_serializeDocumentSalesforceStandardKnowledgeArticleTypeConfiguration(v.StandardKnowledgeArticleTypeConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSalesforceKnowledgeArticleStateList(v []types.SalesforceKnowledgeArticleState, 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 awsAwsjson11_serializeDocumentSalesforceStandardKnowledgeArticleTypeConfiguration(v *types.SalesforceStandardKnowledgeArticleTypeConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DocumentDataFieldName != nil { ok := object.Key("DocumentDataFieldName") ok.String(*v.DocumentDataFieldName) } if v.DocumentTitleFieldName != nil { ok := object.Key("DocumentTitleFieldName") ok.String(*v.DocumentTitleFieldName) } if v.FieldMappings != nil { ok := object.Key("FieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSalesforceStandardObjectAttachmentConfiguration(v *types.SalesforceStandardObjectAttachmentConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DocumentTitleFieldName != nil { ok := object.Key("DocumentTitleFieldName") ok.String(*v.DocumentTitleFieldName) } if v.FieldMappings != nil { ok := object.Key("FieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSalesforceStandardObjectConfiguration(v *types.SalesforceStandardObjectConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DocumentDataFieldName != nil { ok := object.Key("DocumentDataFieldName") ok.String(*v.DocumentDataFieldName) } if v.DocumentTitleFieldName != nil { ok := object.Key("DocumentTitleFieldName") ok.String(*v.DocumentTitleFieldName) } if v.FieldMappings != nil { ok := object.Key("FieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil { return err } } if len(v.Name) > 0 { ok := object.Key("Name") ok.String(string(v.Name)) } return nil } func awsAwsjson11_serializeDocumentSalesforceStandardObjectConfigurationList(v []types.SalesforceStandardObjectConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentSalesforceStandardObjectConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSearch(v *types.Search, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Displayable { ok := object.Key("Displayable") ok.Boolean(v.Displayable) } if v.Facetable { ok := object.Key("Facetable") ok.Boolean(v.Facetable) } if v.Searchable { ok := object.Key("Searchable") ok.Boolean(v.Searchable) } if v.Sortable { ok := object.Key("Sortable") ok.Boolean(v.Sortable) } return nil } func awsAwsjson11_serializeDocumentSecurityGroupIdList(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 awsAwsjson11_serializeDocumentSeedUrlConfiguration(v *types.SeedUrlConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.SeedUrls != nil { ok := object.Key("SeedUrls") if err := awsAwsjson11_serializeDocumentSeedUrlList(v.SeedUrls, ok); err != nil { return err } } if len(v.WebCrawlerMode) > 0 { ok := object.Key("WebCrawlerMode") ok.String(string(v.WebCrawlerMode)) } return nil } func awsAwsjson11_serializeDocumentSeedUrlList(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 awsAwsjson11_serializeDocumentServerSideEncryptionConfiguration(v *types.ServerSideEncryptionConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.KmsKeyId != nil { ok := object.Key("KmsKeyId") ok.String(*v.KmsKeyId) } return nil } func awsAwsjson11_serializeDocumentServiceNowConfiguration(v *types.ServiceNowConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.AuthenticationType) > 0 { ok := object.Key("AuthenticationType") ok.String(string(v.AuthenticationType)) } if v.HostUrl != nil { ok := object.Key("HostUrl") ok.String(*v.HostUrl) } if v.KnowledgeArticleConfiguration != nil { ok := object.Key("KnowledgeArticleConfiguration") if err := awsAwsjson11_serializeDocumentServiceNowKnowledgeArticleConfiguration(v.KnowledgeArticleConfiguration, ok); err != nil { return err } } if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) } if v.ServiceCatalogConfiguration != nil { ok := object.Key("ServiceCatalogConfiguration") if err := awsAwsjson11_serializeDocumentServiceNowServiceCatalogConfiguration(v.ServiceCatalogConfiguration, ok); err != nil { return err } } if len(v.ServiceNowBuildVersion) > 0 { ok := object.Key("ServiceNowBuildVersion") ok.String(string(v.ServiceNowBuildVersion)) } return nil } func awsAwsjson11_serializeDocumentServiceNowKnowledgeArticleConfiguration(v *types.ServiceNowKnowledgeArticleConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CrawlAttachments { ok := object.Key("CrawlAttachments") ok.Boolean(v.CrawlAttachments) } if v.DocumentDataFieldName != nil { ok := object.Key("DocumentDataFieldName") ok.String(*v.DocumentDataFieldName) } if v.DocumentTitleFieldName != nil { ok := object.Key("DocumentTitleFieldName") ok.String(*v.DocumentTitleFieldName) } if v.ExcludeAttachmentFilePatterns != nil { ok := object.Key("ExcludeAttachmentFilePatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExcludeAttachmentFilePatterns, ok); err != nil { return err } } if v.FieldMappings != nil { ok := object.Key("FieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil { return err } } if v.FilterQuery != nil { ok := object.Key("FilterQuery") ok.String(*v.FilterQuery) } if v.IncludeAttachmentFilePatterns != nil { ok := object.Key("IncludeAttachmentFilePatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.IncludeAttachmentFilePatterns, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentServiceNowServiceCatalogConfiguration(v *types.ServiceNowServiceCatalogConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CrawlAttachments { ok := object.Key("CrawlAttachments") ok.Boolean(v.CrawlAttachments) } if v.DocumentDataFieldName != nil { ok := object.Key("DocumentDataFieldName") ok.String(*v.DocumentDataFieldName) } if v.DocumentTitleFieldName != nil { ok := object.Key("DocumentTitleFieldName") ok.String(*v.DocumentTitleFieldName) } if v.ExcludeAttachmentFilePatterns != nil { ok := object.Key("ExcludeAttachmentFilePatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExcludeAttachmentFilePatterns, ok); err != nil { return err } } if v.FieldMappings != nil { ok := object.Key("FieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil { return err } } if v.IncludeAttachmentFilePatterns != nil { ok := object.Key("IncludeAttachmentFilePatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.IncludeAttachmentFilePatterns, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSharePointConfiguration(v *types.SharePointConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.AuthenticationType) > 0 { ok := object.Key("AuthenticationType") ok.String(string(v.AuthenticationType)) } if v.CrawlAttachments { ok := object.Key("CrawlAttachments") ok.Boolean(v.CrawlAttachments) } if v.DisableLocalGroups { ok := object.Key("DisableLocalGroups") ok.Boolean(v.DisableLocalGroups) } if v.DocumentTitleFieldName != nil { ok := object.Key("DocumentTitleFieldName") ok.String(*v.DocumentTitleFieldName) } if v.ExclusionPatterns != nil { ok := object.Key("ExclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil { return err } } if v.FieldMappings != nil { ok := object.Key("FieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil { return err } } if v.InclusionPatterns != nil { ok := object.Key("InclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil { return err } } if v.ProxyConfiguration != nil { ok := object.Key("ProxyConfiguration") if err := awsAwsjson11_serializeDocumentProxyConfiguration(v.ProxyConfiguration, ok); err != nil { return err } } if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) } if len(v.SharePointVersion) > 0 { ok := object.Key("SharePointVersion") ok.String(string(v.SharePointVersion)) } if v.SslCertificateS3Path != nil { ok := object.Key("SslCertificateS3Path") if err := awsAwsjson11_serializeDocumentS3Path(v.SslCertificateS3Path, ok); err != nil { return err } } if v.Urls != nil { ok := object.Key("Urls") if err := awsAwsjson11_serializeDocumentSharePointUrlList(v.Urls, ok); err != nil { return err } } if v.UseChangeLog { ok := object.Key("UseChangeLog") ok.Boolean(v.UseChangeLog) } if v.VpcConfiguration != nil { ok := object.Key("VpcConfiguration") if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSharePointUrlList(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 awsAwsjson11_serializeDocumentSiteMapsConfiguration(v *types.SiteMapsConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.SiteMaps != nil { ok := object.Key("SiteMaps") if err := awsAwsjson11_serializeDocumentSiteMapsList(v.SiteMaps, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSiteMapsList(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 awsAwsjson11_serializeDocumentSlackConfiguration(v *types.SlackConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CrawlBotMessage { ok := object.Key("CrawlBotMessage") ok.Boolean(v.CrawlBotMessage) } if v.ExcludeArchived { ok := object.Key("ExcludeArchived") ok.Boolean(v.ExcludeArchived) } if v.ExclusionPatterns != nil { ok := object.Key("ExclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil { return err } } if v.FieldMappings != nil { ok := object.Key("FieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil { return err } } if v.InclusionPatterns != nil { ok := object.Key("InclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil { return err } } if v.LookBackPeriod != nil { ok := object.Key("LookBackPeriod") ok.Integer(*v.LookBackPeriod) } if v.PrivateChannelFilter != nil { ok := object.Key("PrivateChannelFilter") if err := awsAwsjson11_serializeDocumentPrivateChannelFilter(v.PrivateChannelFilter, ok); err != nil { return err } } if v.PublicChannelFilter != nil { ok := object.Key("PublicChannelFilter") if err := awsAwsjson11_serializeDocumentPublicChannelFilter(v.PublicChannelFilter, ok); err != nil { return err } } if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) } if v.SinceCrawlDate != nil { ok := object.Key("SinceCrawlDate") ok.String(*v.SinceCrawlDate) } if v.SlackEntityList != nil { ok := object.Key("SlackEntityList") if err := awsAwsjson11_serializeDocumentSlackEntityList(v.SlackEntityList, ok); err != nil { return err } } if v.TeamId != nil { ok := object.Key("TeamId") ok.String(*v.TeamId) } if v.UseChangeLog { ok := object.Key("UseChangeLog") ok.Boolean(v.UseChangeLog) } if v.VpcConfiguration != nil { ok := object.Key("VpcConfiguration") if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSlackEntityList(v []types.SlackEntity, 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 awsAwsjson11_serializeDocumentSortingConfiguration(v *types.SortingConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DocumentAttributeKey != nil { ok := object.Key("DocumentAttributeKey") ok.String(*v.DocumentAttributeKey) } if len(v.SortOrder) > 0 { ok := object.Key("SortOrder") ok.String(string(v.SortOrder)) } return nil } func awsAwsjson11_serializeDocumentSpellCorrectionConfiguration(v *types.SpellCorrectionConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() { ok := object.Key("IncludeQuerySpellCheckSuggestions") ok.Boolean(v.IncludeQuerySpellCheckSuggestions) } return nil } func awsAwsjson11_serializeDocumentSqlConfiguration(v *types.SqlConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.QueryIdentifiersEnclosingOption) > 0 { ok := object.Key("QueryIdentifiersEnclosingOption") ok.String(string(v.QueryIdentifiersEnclosingOption)) } return nil } func awsAwsjson11_serializeDocumentStringList(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 awsAwsjson11_serializeDocumentSubnetIdList(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 awsAwsjson11_serializeDocumentSuggestableConfig(v *types.SuggestableConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AttributeName != nil { ok := object.Key("AttributeName") ok.String(*v.AttributeName) } if v.Suggestable != nil { ok := object.Key("Suggestable") ok.Boolean(*v.Suggestable) } return nil } func awsAwsjson11_serializeDocumentSuggestableConfigList(v []types.SuggestableConfig, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentSuggestableConfig(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSuggestionTypes(v []types.SuggestionType, 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 awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Key != nil { ok := object.Key("Key") ok.String(*v.Key) } if v.Value != nil { ok := object.Key("Value") ok.String(*v.Value) } return nil } func awsAwsjson11_serializeDocumentTagKeyList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentTag(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentTemplate(v document.Interface, value smithyjson.Value) error { if v == nil { return nil } if !internaldocument.IsInterface(v) { return fmt.Errorf("%T is not a compatible document type", v) } db, err := v.MarshalSmithyDocument() if err != nil { return err } value.Write(db) return nil } func awsAwsjson11_serializeDocumentTemplateConfiguration(v *types.TemplateConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Template != nil { ok := object.Key("Template") if err := awsAwsjson11_serializeDocumentTemplate(v.Template, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentTimeRange(v *types.TimeRange, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndTime != nil { ok := object.Key("EndTime") ok.Double(smithytime.FormatEpochSeconds(*v.EndTime)) } if v.StartTime != nil { ok := object.Key("StartTime") ok.Double(smithytime.FormatEpochSeconds(*v.StartTime)) } return nil } func awsAwsjson11_serializeDocumentUrls(v *types.Urls, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.SeedUrlConfiguration != nil { ok := object.Key("SeedUrlConfiguration") if err := awsAwsjson11_serializeDocumentSeedUrlConfiguration(v.SeedUrlConfiguration, ok); err != nil { return err } } if v.SiteMapsConfiguration != nil { ok := object.Key("SiteMapsConfiguration") if err := awsAwsjson11_serializeDocumentSiteMapsConfiguration(v.SiteMapsConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentUserContext(v *types.UserContext, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DataSourceGroups != nil { ok := object.Key("DataSourceGroups") if err := awsAwsjson11_serializeDocumentDataSourceGroups(v.DataSourceGroups, ok); err != nil { return err } } if v.Groups != nil { ok := object.Key("Groups") if err := awsAwsjson11_serializeDocumentGroups(v.Groups, ok); err != nil { return err } } if v.Token != nil { ok := object.Key("Token") ok.String(*v.Token) } if v.UserId != nil { ok := object.Key("UserId") ok.String(*v.UserId) } return nil } func awsAwsjson11_serializeDocumentUserGroupResolutionConfiguration(v *types.UserGroupResolutionConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.UserGroupResolutionMode) > 0 { ok := object.Key("UserGroupResolutionMode") ok.String(string(v.UserGroupResolutionMode)) } return nil } func awsAwsjson11_serializeDocumentUserIdentityConfiguration(v *types.UserIdentityConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IdentityAttributeName != nil { ok := object.Key("IdentityAttributeName") ok.String(*v.IdentityAttributeName) } return nil } func awsAwsjson11_serializeDocumentUserTokenConfiguration(v *types.UserTokenConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.JsonTokenTypeConfiguration != nil { ok := object.Key("JsonTokenTypeConfiguration") if err := awsAwsjson11_serializeDocumentJsonTokenTypeConfiguration(v.JsonTokenTypeConfiguration, ok); err != nil { return err } } if v.JwtTokenTypeConfiguration != nil { ok := object.Key("JwtTokenTypeConfiguration") if err := awsAwsjson11_serializeDocumentJwtTokenTypeConfiguration(v.JwtTokenTypeConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentUserTokenConfigurationList(v []types.UserTokenConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentUserTokenConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentValueImportanceMap(v map[string]int32, value smithyjson.Value) error { object := value.Object() defer object.Close() for key := range v { om := object.Key(key) om.Integer(v[key]) } return nil } func awsAwsjson11_serializeDocumentWebCrawlerConfiguration(v *types.WebCrawlerConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AuthenticationConfiguration != nil { ok := object.Key("AuthenticationConfiguration") if err := awsAwsjson11_serializeDocumentAuthenticationConfiguration(v.AuthenticationConfiguration, ok); err != nil { return err } } if v.CrawlDepth != nil { ok := object.Key("CrawlDepth") ok.Integer(*v.CrawlDepth) } if v.MaxContentSizePerPageInMegaBytes != nil { ok := object.Key("MaxContentSizePerPageInMegaBytes") switch { case math.IsNaN(float64(*v.MaxContentSizePerPageInMegaBytes)): ok.String("NaN") case math.IsInf(float64(*v.MaxContentSizePerPageInMegaBytes), 1): ok.String("Infinity") case math.IsInf(float64(*v.MaxContentSizePerPageInMegaBytes), -1): ok.String("-Infinity") default: ok.Float(*v.MaxContentSizePerPageInMegaBytes) } } if v.MaxLinksPerPage != nil { ok := object.Key("MaxLinksPerPage") ok.Integer(*v.MaxLinksPerPage) } if v.MaxUrlsPerMinuteCrawlRate != nil { ok := object.Key("MaxUrlsPerMinuteCrawlRate") ok.Integer(*v.MaxUrlsPerMinuteCrawlRate) } if v.ProxyConfiguration != nil { ok := object.Key("ProxyConfiguration") if err := awsAwsjson11_serializeDocumentProxyConfiguration(v.ProxyConfiguration, ok); err != nil { return err } } if v.UrlExclusionPatterns != nil { ok := object.Key("UrlExclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.UrlExclusionPatterns, ok); err != nil { return err } } if v.UrlInclusionPatterns != nil { ok := object.Key("UrlInclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.UrlInclusionPatterns, ok); err != nil { return err } } if v.Urls != nil { ok := object.Key("Urls") if err := awsAwsjson11_serializeDocumentUrls(v.Urls, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentWorkDocsConfiguration(v *types.WorkDocsConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CrawlComments { ok := object.Key("CrawlComments") ok.Boolean(v.CrawlComments) } if v.ExclusionPatterns != nil { ok := object.Key("ExclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.ExclusionPatterns, ok); err != nil { return err } } if v.FieldMappings != nil { ok := object.Key("FieldMappings") if err := awsAwsjson11_serializeDocumentDataSourceToIndexFieldMappingList(v.FieldMappings, ok); err != nil { return err } } if v.InclusionPatterns != nil { ok := object.Key("InclusionPatterns") if err := awsAwsjson11_serializeDocumentDataSourceInclusionsExclusionsStrings(v.InclusionPatterns, ok); err != nil { return err } } if v.OrganizationId != nil { ok := object.Key("OrganizationId") ok.String(*v.OrganizationId) } if v.UseChangeLog { ok := object.Key("UseChangeLog") ok.Boolean(v.UseChangeLog) } return nil } func awsAwsjson11_serializeOpDocumentAssociateEntitiesToExperienceInput(v *AssociateEntitiesToExperienceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EntityList != nil { ok := object.Key("EntityList") if err := awsAwsjson11_serializeDocumentAssociateEntityList(v.EntityList, ok); err != nil { return err } } if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentAssociatePersonasToEntitiesInput(v *AssociatePersonasToEntitiesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.Personas != nil { ok := object.Key("Personas") if err := awsAwsjson11_serializeDocumentEntityPersonaConfigurationList(v.Personas, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentBatchDeleteDocumentInput(v *BatchDeleteDocumentInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DataSourceSyncJobMetricTarget != nil { ok := object.Key("DataSourceSyncJobMetricTarget") if err := awsAwsjson11_serializeDocumentDataSourceSyncJobMetricTarget(v.DataSourceSyncJobMetricTarget, ok); err != nil { return err } } if v.DocumentIdList != nil { ok := object.Key("DocumentIdList") if err := awsAwsjson11_serializeDocumentDocumentIdList(v.DocumentIdList, ok); err != nil { return err } } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentBatchDeleteFeaturedResultsSetInput(v *BatchDeleteFeaturedResultsSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FeaturedResultsSetIds != nil { ok := object.Key("FeaturedResultsSetIds") if err := awsAwsjson11_serializeDocumentFeaturedResultsSetIdList(v.FeaturedResultsSetIds, ok); err != nil { return err } } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentBatchGetDocumentStatusInput(v *BatchGetDocumentStatusInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DocumentInfoList != nil { ok := object.Key("DocumentInfoList") if err := awsAwsjson11_serializeDocumentDocumentInfoList(v.DocumentInfoList, ok); err != nil { return err } } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentBatchPutDocumentInput(v *BatchPutDocumentInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CustomDocumentEnrichmentConfiguration != nil { ok := object.Key("CustomDocumentEnrichmentConfiguration") if err := awsAwsjson11_serializeDocumentCustomDocumentEnrichmentConfiguration(v.CustomDocumentEnrichmentConfiguration, ok); err != nil { return err } } if v.Documents != nil { ok := object.Key("Documents") if err := awsAwsjson11_serializeDocumentDocumentList(v.Documents, ok); err != nil { return err } } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) } return nil } func awsAwsjson11_serializeOpDocumentClearQuerySuggestionsInput(v *ClearQuerySuggestionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentCreateAccessControlConfigurationInput(v *CreateAccessControlConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AccessControlList != nil { ok := object.Key("AccessControlList") if err := awsAwsjson11_serializeDocumentPrincipalList(v.AccessControlList, ok); err != nil { return err } } if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.HierarchicalAccessControlList != nil { ok := object.Key("HierarchicalAccessControlList") if err := awsAwsjson11_serializeDocumentHierarchicalPrincipalList(v.HierarchicalAccessControlList, ok); err != nil { return err } } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } return nil } func awsAwsjson11_serializeOpDocumentCreateDataSourceInput(v *CreateDataSourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } if v.Configuration != nil { ok := object.Key("Configuration") if err := awsAwsjson11_serializeDocumentDataSourceConfiguration(v.Configuration, ok); err != nil { return err } } if v.CustomDocumentEnrichmentConfiguration != nil { ok := object.Key("CustomDocumentEnrichmentConfiguration") if err := awsAwsjson11_serializeDocumentCustomDocumentEnrichmentConfiguration(v.CustomDocumentEnrichmentConfiguration, ok); err != nil { return err } } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.LanguageCode != nil { ok := object.Key("LanguageCode") ok.String(*v.LanguageCode) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) } if v.Schedule != nil { ok := object.Key("Schedule") ok.String(*v.Schedule) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } if v.VpcConfiguration != nil { ok := object.Key("VpcConfiguration") if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateExperienceInput(v *CreateExperienceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } if v.Configuration != nil { ok := object.Key("Configuration") if err := awsAwsjson11_serializeDocumentExperienceConfiguration(v.Configuration, ok); err != nil { return err } } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) } return nil } func awsAwsjson11_serializeOpDocumentCreateFaqInput(v *CreateFaqInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if len(v.FileFormat) > 0 { ok := object.Key("FileFormat") ok.String(string(v.FileFormat)) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.LanguageCode != nil { ok := object.Key("LanguageCode") ok.String(*v.LanguageCode) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) } if v.S3Path != nil { ok := object.Key("S3Path") if err := awsAwsjson11_serializeDocumentS3Path(v.S3Path, ok); err != nil { return err } } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateFeaturedResultsSetInput(v *CreateFeaturedResultsSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.FeaturedDocuments != nil { ok := object.Key("FeaturedDocuments") if err := awsAwsjson11_serializeDocumentFeaturedDocumentList(v.FeaturedDocuments, ok); err != nil { return err } } if v.FeaturedResultsSetName != nil { ok := object.Key("FeaturedResultsSetName") ok.String(*v.FeaturedResultsSetName) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.QueryTexts != nil { ok := object.Key("QueryTexts") if err := awsAwsjson11_serializeDocumentQueryTextList(v.QueryTexts, ok); err != nil { return err } } if len(v.Status) > 0 { ok := object.Key("Status") ok.String(string(v.Status)) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateIndexInput(v *CreateIndexInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if len(v.Edition) > 0 { ok := object.Key("Edition") ok.String(string(v.Edition)) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) } if v.ServerSideEncryptionConfiguration != nil { ok := object.Key("ServerSideEncryptionConfiguration") if err := awsAwsjson11_serializeDocumentServerSideEncryptionConfiguration(v.ServerSideEncryptionConfiguration, ok); err != nil { return err } } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } if len(v.UserContextPolicy) > 0 { ok := object.Key("UserContextPolicy") ok.String(string(v.UserContextPolicy)) } if v.UserGroupResolutionConfiguration != nil { ok := object.Key("UserGroupResolutionConfiguration") if err := awsAwsjson11_serializeDocumentUserGroupResolutionConfiguration(v.UserGroupResolutionConfiguration, ok); err != nil { return err } } if v.UserTokenConfigurations != nil { ok := object.Key("UserTokenConfigurations") if err := awsAwsjson11_serializeDocumentUserTokenConfigurationList(v.UserTokenConfigurations, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateQuerySuggestionsBlockListInput(v *CreateQuerySuggestionsBlockListInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) } if v.SourceS3Path != nil { ok := object.Key("SourceS3Path") if err := awsAwsjson11_serializeDocumentS3Path(v.SourceS3Path, ok); err != nil { return err } } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateThesaurusInput(v *CreateThesaurusInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) } if v.SourceS3Path != nil { ok := object.Key("SourceS3Path") if err := awsAwsjson11_serializeDocumentS3Path(v.SourceS3Path, ok); err != nil { return err } } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentDeleteAccessControlConfigurationInput(v *DeleteAccessControlConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteDataSourceInput(v *DeleteDataSourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteExperienceInput(v *DeleteExperienceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteFaqInput(v *DeleteFaqInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteIndexInput(v *DeleteIndexInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } return nil } func awsAwsjson11_serializeOpDocumentDeletePrincipalMappingInput(v *DeletePrincipalMappingInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DataSourceId != nil { ok := object.Key("DataSourceId") ok.String(*v.DataSourceId) } if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.OrderingId != nil { ok := object.Key("OrderingId") ok.Long(*v.OrderingId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteQuerySuggestionsBlockListInput(v *DeleteQuerySuggestionsBlockListInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteThesaurusInput(v *DeleteThesaurusInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeAccessControlConfigurationInput(v *DescribeAccessControlConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeDataSourceInput(v *DescribeDataSourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeExperienceInput(v *DescribeExperienceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeFaqInput(v *DescribeFaqInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeFeaturedResultsSetInput(v *DescribeFeaturedResultsSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FeaturedResultsSetId != nil { ok := object.Key("FeaturedResultsSetId") ok.String(*v.FeaturedResultsSetId) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeIndexInput(v *DescribeIndexInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } return nil } func awsAwsjson11_serializeOpDocumentDescribePrincipalMappingInput(v *DescribePrincipalMappingInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DataSourceId != nil { ok := object.Key("DataSourceId") ok.String(*v.DataSourceId) } if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeQuerySuggestionsBlockListInput(v *DescribeQuerySuggestionsBlockListInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeQuerySuggestionsConfigInput(v *DescribeQuerySuggestionsConfigInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeThesaurusInput(v *DescribeThesaurusInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentDisassociateEntitiesFromExperienceInput(v *DisassociateEntitiesFromExperienceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EntityList != nil { ok := object.Key("EntityList") if err := awsAwsjson11_serializeDocumentDisassociateEntityList(v.EntityList, ok); err != nil { return err } } if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentDisassociatePersonasFromEntitiesInput(v *DisassociatePersonasFromEntitiesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EntityIds != nil { ok := object.Key("EntityIds") if err := awsAwsjson11_serializeDocumentEntityIdsList(v.EntityIds, ok); err != nil { return err } } if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentGetQuerySuggestionsInput(v *GetQuerySuggestionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AttributeSuggestionsConfig != nil { ok := object.Key("AttributeSuggestionsConfig") if err := awsAwsjson11_serializeDocumentAttributeSuggestionsGetConfig(v.AttributeSuggestionsConfig, ok); err != nil { return err } } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.MaxSuggestionsCount != nil { ok := object.Key("MaxSuggestionsCount") ok.Integer(*v.MaxSuggestionsCount) } if v.QueryText != nil { ok := object.Key("QueryText") ok.String(*v.QueryText) } if v.SuggestionTypes != nil { ok := object.Key("SuggestionTypes") if err := awsAwsjson11_serializeDocumentSuggestionTypes(v.SuggestionTypes, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentGetSnapshotsInput(v *GetSnapshotsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if len(v.Interval) > 0 { ok := object.Key("Interval") ok.String(string(v.Interval)) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if len(v.MetricType) > 0 { ok := object.Key("MetricType") ok.String(string(v.MetricType)) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListAccessControlConfigurationsInput(v *ListAccessControlConfigurationsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } 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 awsAwsjson11_serializeOpDocumentListDataSourcesInput(v *ListDataSourcesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } 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 awsAwsjson11_serializeOpDocumentListDataSourceSyncJobsInput(v *ListDataSourceSyncJobsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } 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.StartTimeFilter != nil { ok := object.Key("StartTimeFilter") if err := awsAwsjson11_serializeDocumentTimeRange(v.StartTimeFilter, ok); err != nil { return err } } if len(v.StatusFilter) > 0 { ok := object.Key("StatusFilter") ok.String(string(v.StatusFilter)) } return nil } func awsAwsjson11_serializeOpDocumentListEntityPersonasInput(v *ListEntityPersonasInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } 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 awsAwsjson11_serializeOpDocumentListExperienceEntitiesInput(v *ListExperienceEntitiesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListExperiencesInput(v *ListExperiencesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } 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 awsAwsjson11_serializeOpDocumentListFaqsInput(v *ListFaqsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } 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 awsAwsjson11_serializeOpDocumentListFeaturedResultsSetsInput(v *ListFeaturedResultsSetsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } 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 awsAwsjson11_serializeOpDocumentListGroupsOlderThanOrderingIdInput(v *ListGroupsOlderThanOrderingIdInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DataSourceId != nil { ok := object.Key("DataSourceId") ok.String(*v.DataSourceId) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } 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.OrderingId != nil { ok := object.Key("OrderingId") ok.Long(*v.OrderingId) } return nil } func awsAwsjson11_serializeOpDocumentListIndicesInput(v *ListIndicesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListQuerySuggestionsBlockListsInput(v *ListQuerySuggestionsBlockListsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } 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 awsAwsjson11_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } return nil } func awsAwsjson11_serializeOpDocumentListThesauriInput(v *ListThesauriInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } 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 awsAwsjson11_serializeOpDocumentPutPrincipalMappingInput(v *PutPrincipalMappingInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DataSourceId != nil { ok := object.Key("DataSourceId") ok.String(*v.DataSourceId) } if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.GroupMembers != nil { ok := object.Key("GroupMembers") if err := awsAwsjson11_serializeDocumentGroupMembers(v.GroupMembers, ok); err != nil { return err } } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.OrderingId != nil { ok := object.Key("OrderingId") ok.Long(*v.OrderingId) } if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) } return nil } func awsAwsjson11_serializeOpDocumentQueryInput(v *QueryInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AttributeFilter != nil { ok := object.Key("AttributeFilter") if err := awsAwsjson11_serializeDocumentAttributeFilter(v.AttributeFilter, ok); err != nil { return err } } if v.DocumentRelevanceOverrideConfigurations != nil { ok := object.Key("DocumentRelevanceOverrideConfigurations") if err := awsAwsjson11_serializeDocumentDocumentRelevanceOverrideConfigurationList(v.DocumentRelevanceOverrideConfigurations, ok); err != nil { return err } } if v.Facets != nil { ok := object.Key("Facets") if err := awsAwsjson11_serializeDocumentFacetList(v.Facets, ok); err != nil { return err } } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.PageNumber != nil { ok := object.Key("PageNumber") ok.Integer(*v.PageNumber) } if v.PageSize != nil { ok := object.Key("PageSize") ok.Integer(*v.PageSize) } if len(v.QueryResultTypeFilter) > 0 { ok := object.Key("QueryResultTypeFilter") ok.String(string(v.QueryResultTypeFilter)) } if v.QueryText != nil { ok := object.Key("QueryText") ok.String(*v.QueryText) } if v.RequestedDocumentAttributes != nil { ok := object.Key("RequestedDocumentAttributes") if err := awsAwsjson11_serializeDocumentDocumentAttributeKeyList(v.RequestedDocumentAttributes, ok); err != nil { return err } } if v.SortingConfiguration != nil { ok := object.Key("SortingConfiguration") if err := awsAwsjson11_serializeDocumentSortingConfiguration(v.SortingConfiguration, ok); err != nil { return err } } if v.SpellCorrectionConfiguration != nil { ok := object.Key("SpellCorrectionConfiguration") if err := awsAwsjson11_serializeDocumentSpellCorrectionConfiguration(v.SpellCorrectionConfiguration, ok); err != nil { return err } } if v.UserContext != nil { ok := object.Key("UserContext") if err := awsAwsjson11_serializeDocumentUserContext(v.UserContext, ok); err != nil { return err } } if v.VisitorId != nil { ok := object.Key("VisitorId") ok.String(*v.VisitorId) } return nil } func awsAwsjson11_serializeOpDocumentRetrieveInput(v *RetrieveInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AttributeFilter != nil { ok := object.Key("AttributeFilter") if err := awsAwsjson11_serializeDocumentAttributeFilter(v.AttributeFilter, ok); err != nil { return err } } if v.DocumentRelevanceOverrideConfigurations != nil { ok := object.Key("DocumentRelevanceOverrideConfigurations") if err := awsAwsjson11_serializeDocumentDocumentRelevanceOverrideConfigurationList(v.DocumentRelevanceOverrideConfigurations, ok); err != nil { return err } } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.PageNumber != nil { ok := object.Key("PageNumber") ok.Integer(*v.PageNumber) } if v.PageSize != nil { ok := object.Key("PageSize") ok.Integer(*v.PageSize) } if v.QueryText != nil { ok := object.Key("QueryText") ok.String(*v.QueryText) } if v.RequestedDocumentAttributes != nil { ok := object.Key("RequestedDocumentAttributes") if err := awsAwsjson11_serializeDocumentDocumentAttributeKeyList(v.RequestedDocumentAttributes, ok); err != nil { return err } } if v.UserContext != nil { ok := object.Key("UserContext") if err := awsAwsjson11_serializeDocumentUserContext(v.UserContext, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentStartDataSourceSyncJobInput(v *StartDataSourceSyncJobInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentStopDataSourceSyncJobInput(v *StopDataSourceSyncJobInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } return nil } func awsAwsjson11_serializeOpDocumentSubmitFeedbackInput(v *SubmitFeedbackInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClickFeedbackItems != nil { ok := object.Key("ClickFeedbackItems") if err := awsAwsjson11_serializeDocumentClickFeedbackList(v.ClickFeedbackItems, ok); err != nil { return err } } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.QueryId != nil { ok := object.Key("QueryId") ok.String(*v.QueryId) } if v.RelevanceFeedbackItems != nil { ok := object.Key("RelevanceFeedbackItems") if err := awsAwsjson11_serializeDocumentRelevanceFeedbackList(v.RelevanceFeedbackItems, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } if v.TagKeys != nil { ok := object.Key("TagKeys") if err := awsAwsjson11_serializeDocumentTagKeyList(v.TagKeys, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateAccessControlConfigurationInput(v *UpdateAccessControlConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AccessControlList != nil { ok := object.Key("AccessControlList") if err := awsAwsjson11_serializeDocumentPrincipalList(v.AccessControlList, ok); err != nil { return err } } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.HierarchicalAccessControlList != nil { ok := object.Key("HierarchicalAccessControlList") if err := awsAwsjson11_serializeDocumentHierarchicalPrincipalList(v.HierarchicalAccessControlList, ok); err != nil { return err } } if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } return nil } func awsAwsjson11_serializeOpDocumentUpdateDataSourceInput(v *UpdateDataSourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Configuration != nil { ok := object.Key("Configuration") if err := awsAwsjson11_serializeDocumentDataSourceConfiguration(v.Configuration, ok); err != nil { return err } } if v.CustomDocumentEnrichmentConfiguration != nil { ok := object.Key("CustomDocumentEnrichmentConfiguration") if err := awsAwsjson11_serializeDocumentCustomDocumentEnrichmentConfiguration(v.CustomDocumentEnrichmentConfiguration, ok); err != nil { return err } } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.LanguageCode != nil { ok := object.Key("LanguageCode") ok.String(*v.LanguageCode) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) } if v.Schedule != nil { ok := object.Key("Schedule") ok.String(*v.Schedule) } if v.VpcConfiguration != nil { ok := object.Key("VpcConfiguration") if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateExperienceInput(v *UpdateExperienceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Configuration != nil { ok := object.Key("Configuration") if err := awsAwsjson11_serializeDocumentExperienceConfiguration(v.Configuration, ok); err != nil { return err } } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) } return nil } func awsAwsjson11_serializeOpDocumentUpdateFeaturedResultsSetInput(v *UpdateFeaturedResultsSetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.FeaturedDocuments != nil { ok := object.Key("FeaturedDocuments") if err := awsAwsjson11_serializeDocumentFeaturedDocumentList(v.FeaturedDocuments, ok); err != nil { return err } } if v.FeaturedResultsSetId != nil { ok := object.Key("FeaturedResultsSetId") ok.String(*v.FeaturedResultsSetId) } if v.FeaturedResultsSetName != nil { ok := object.Key("FeaturedResultsSetName") ok.String(*v.FeaturedResultsSetName) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.QueryTexts != nil { ok := object.Key("QueryTexts") if err := awsAwsjson11_serializeDocumentQueryTextList(v.QueryTexts, ok); err != nil { return err } } if len(v.Status) > 0 { ok := object.Key("Status") ok.String(string(v.Status)) } return nil } func awsAwsjson11_serializeOpDocumentUpdateIndexInput(v *UpdateIndexInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CapacityUnits != nil { ok := object.Key("CapacityUnits") if err := awsAwsjson11_serializeDocumentCapacityUnitsConfiguration(v.CapacityUnits, ok); err != nil { return err } } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.DocumentMetadataConfigurationUpdates != nil { ok := object.Key("DocumentMetadataConfigurationUpdates") if err := awsAwsjson11_serializeDocumentDocumentMetadataConfigurationList(v.DocumentMetadataConfigurationUpdates, ok); err != nil { return err } } if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) } if len(v.UserContextPolicy) > 0 { ok := object.Key("UserContextPolicy") ok.String(string(v.UserContextPolicy)) } if v.UserGroupResolutionConfiguration != nil { ok := object.Key("UserGroupResolutionConfiguration") if err := awsAwsjson11_serializeDocumentUserGroupResolutionConfiguration(v.UserGroupResolutionConfiguration, ok); err != nil { return err } } if v.UserTokenConfigurations != nil { ok := object.Key("UserTokenConfigurations") if err := awsAwsjson11_serializeDocumentUserTokenConfigurationList(v.UserTokenConfigurations, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateQuerySuggestionsBlockListInput(v *UpdateQuerySuggestionsBlockListInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) } if v.SourceS3Path != nil { ok := object.Key("SourceS3Path") if err := awsAwsjson11_serializeDocumentS3Path(v.SourceS3Path, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateQuerySuggestionsConfigInput(v *UpdateQuerySuggestionsConfigInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AttributeSuggestionsConfig != nil { ok := object.Key("AttributeSuggestionsConfig") if err := awsAwsjson11_serializeDocumentAttributeSuggestionsUpdateConfig(v.AttributeSuggestionsConfig, ok); err != nil { return err } } if v.IncludeQueriesWithoutUserInformation != nil { ok := object.Key("IncludeQueriesWithoutUserInformation") ok.Boolean(*v.IncludeQueriesWithoutUserInformation) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.MinimumNumberOfQueryingUsers != nil { ok := object.Key("MinimumNumberOfQueryingUsers") ok.Integer(*v.MinimumNumberOfQueryingUsers) } if v.MinimumQueryCount != nil { ok := object.Key("MinimumQueryCount") ok.Integer(*v.MinimumQueryCount) } if len(v.Mode) > 0 { ok := object.Key("Mode") ok.String(string(v.Mode)) } if v.QueryLogLookBackWindowInDays != nil { ok := object.Key("QueryLogLookBackWindowInDays") ok.Integer(*v.QueryLogLookBackWindowInDays) } return nil } func awsAwsjson11_serializeOpDocumentUpdateThesaurusInput(v *UpdateThesaurusInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.IndexId != nil { ok := object.Key("IndexId") ok.String(*v.IndexId) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) } if v.SourceS3Path != nil { ok := object.Key("SourceS3Path") if err := awsAwsjson11_serializeDocumentS3Path(v.SourceS3Path, ok); err != nil { return err } } return nil }
9,659
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendra import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/kendra/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpAssociateEntitiesToExperience struct { } func (*validateOpAssociateEntitiesToExperience) ID() string { return "OperationInputValidation" } func (m *validateOpAssociateEntitiesToExperience) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AssociateEntitiesToExperienceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAssociateEntitiesToExperienceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAssociatePersonasToEntities struct { } func (*validateOpAssociatePersonasToEntities) ID() string { return "OperationInputValidation" } func (m *validateOpAssociatePersonasToEntities) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AssociatePersonasToEntitiesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAssociatePersonasToEntitiesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpBatchDeleteDocument struct { } func (*validateOpBatchDeleteDocument) ID() string { return "OperationInputValidation" } func (m *validateOpBatchDeleteDocument) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*BatchDeleteDocumentInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpBatchDeleteDocumentInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpBatchDeleteFeaturedResultsSet struct { } func (*validateOpBatchDeleteFeaturedResultsSet) ID() string { return "OperationInputValidation" } func (m *validateOpBatchDeleteFeaturedResultsSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*BatchDeleteFeaturedResultsSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpBatchDeleteFeaturedResultsSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpBatchGetDocumentStatus struct { } func (*validateOpBatchGetDocumentStatus) ID() string { return "OperationInputValidation" } func (m *validateOpBatchGetDocumentStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*BatchGetDocumentStatusInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpBatchGetDocumentStatusInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpBatchPutDocument struct { } func (*validateOpBatchPutDocument) ID() string { return "OperationInputValidation" } func (m *validateOpBatchPutDocument) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*BatchPutDocumentInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpBatchPutDocumentInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpClearQuerySuggestions struct { } func (*validateOpClearQuerySuggestions) ID() string { return "OperationInputValidation" } func (m *validateOpClearQuerySuggestions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ClearQuerySuggestionsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpClearQuerySuggestionsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateAccessControlConfiguration struct { } func (*validateOpCreateAccessControlConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpCreateAccessControlConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateAccessControlConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateAccessControlConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateDataSource struct { } func (*validateOpCreateDataSource) ID() string { return "OperationInputValidation" } func (m *validateOpCreateDataSource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateDataSourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateDataSourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateExperience struct { } func (*validateOpCreateExperience) ID() string { return "OperationInputValidation" } func (m *validateOpCreateExperience) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateExperienceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateExperienceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateFaq struct { } func (*validateOpCreateFaq) ID() string { return "OperationInputValidation" } func (m *validateOpCreateFaq) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateFaqInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateFaqInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateFeaturedResultsSet struct { } func (*validateOpCreateFeaturedResultsSet) ID() string { return "OperationInputValidation" } func (m *validateOpCreateFeaturedResultsSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateFeaturedResultsSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateFeaturedResultsSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateIndex struct { } func (*validateOpCreateIndex) ID() string { return "OperationInputValidation" } func (m *validateOpCreateIndex) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateIndexInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateIndexInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateQuerySuggestionsBlockList struct { } func (*validateOpCreateQuerySuggestionsBlockList) ID() string { return "OperationInputValidation" } func (m *validateOpCreateQuerySuggestionsBlockList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateQuerySuggestionsBlockListInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateQuerySuggestionsBlockListInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateThesaurus struct { } func (*validateOpCreateThesaurus) ID() string { return "OperationInputValidation" } func (m *validateOpCreateThesaurus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateThesaurusInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateThesaurusInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteAccessControlConfiguration struct { } func (*validateOpDeleteAccessControlConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteAccessControlConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteAccessControlConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteAccessControlConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteDataSource struct { } func (*validateOpDeleteDataSource) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteDataSource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteDataSourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteDataSourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteExperience struct { } func (*validateOpDeleteExperience) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteExperience) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteExperienceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteExperienceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteFaq struct { } func (*validateOpDeleteFaq) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteFaq) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteFaqInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteFaqInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteIndex struct { } func (*validateOpDeleteIndex) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteIndex) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteIndexInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteIndexInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeletePrincipalMapping struct { } func (*validateOpDeletePrincipalMapping) ID() string { return "OperationInputValidation" } func (m *validateOpDeletePrincipalMapping) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeletePrincipalMappingInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeletePrincipalMappingInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteQuerySuggestionsBlockList struct { } func (*validateOpDeleteQuerySuggestionsBlockList) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteQuerySuggestionsBlockList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteQuerySuggestionsBlockListInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteQuerySuggestionsBlockListInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteThesaurus struct { } func (*validateOpDeleteThesaurus) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteThesaurus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteThesaurusInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteThesaurusInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeAccessControlConfiguration struct { } func (*validateOpDescribeAccessControlConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeAccessControlConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeAccessControlConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeAccessControlConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeDataSource struct { } func (*validateOpDescribeDataSource) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeDataSource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeDataSourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeDataSourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeExperience struct { } func (*validateOpDescribeExperience) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeExperience) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeExperienceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeExperienceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeFaq struct { } func (*validateOpDescribeFaq) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeFaq) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeFaqInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeFaqInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeFeaturedResultsSet struct { } func (*validateOpDescribeFeaturedResultsSet) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeFeaturedResultsSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeFeaturedResultsSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeFeaturedResultsSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeIndex struct { } func (*validateOpDescribeIndex) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeIndex) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeIndexInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeIndexInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribePrincipalMapping struct { } func (*validateOpDescribePrincipalMapping) ID() string { return "OperationInputValidation" } func (m *validateOpDescribePrincipalMapping) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribePrincipalMappingInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribePrincipalMappingInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeQuerySuggestionsBlockList struct { } func (*validateOpDescribeQuerySuggestionsBlockList) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeQuerySuggestionsBlockList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeQuerySuggestionsBlockListInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeQuerySuggestionsBlockListInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeQuerySuggestionsConfig struct { } func (*validateOpDescribeQuerySuggestionsConfig) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeQuerySuggestionsConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeQuerySuggestionsConfigInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeQuerySuggestionsConfigInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeThesaurus struct { } func (*validateOpDescribeThesaurus) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeThesaurus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeThesaurusInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeThesaurusInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDisassociateEntitiesFromExperience struct { } func (*validateOpDisassociateEntitiesFromExperience) ID() string { return "OperationInputValidation" } func (m *validateOpDisassociateEntitiesFromExperience) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DisassociateEntitiesFromExperienceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDisassociateEntitiesFromExperienceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDisassociatePersonasFromEntities struct { } func (*validateOpDisassociatePersonasFromEntities) ID() string { return "OperationInputValidation" } func (m *validateOpDisassociatePersonasFromEntities) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DisassociatePersonasFromEntitiesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDisassociatePersonasFromEntitiesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetQuerySuggestions struct { } func (*validateOpGetQuerySuggestions) ID() string { return "OperationInputValidation" } func (m *validateOpGetQuerySuggestions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetQuerySuggestionsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetQuerySuggestionsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetSnapshots struct { } func (*validateOpGetSnapshots) ID() string { return "OperationInputValidation" } func (m *validateOpGetSnapshots) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetSnapshotsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetSnapshotsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListAccessControlConfigurations struct { } func (*validateOpListAccessControlConfigurations) ID() string { return "OperationInputValidation" } func (m *validateOpListAccessControlConfigurations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListAccessControlConfigurationsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListAccessControlConfigurationsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListDataSources struct { } func (*validateOpListDataSources) ID() string { return "OperationInputValidation" } func (m *validateOpListDataSources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListDataSourcesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListDataSourcesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListDataSourceSyncJobs struct { } func (*validateOpListDataSourceSyncJobs) ID() string { return "OperationInputValidation" } func (m *validateOpListDataSourceSyncJobs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListDataSourceSyncJobsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListDataSourceSyncJobsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListEntityPersonas struct { } func (*validateOpListEntityPersonas) ID() string { return "OperationInputValidation" } func (m *validateOpListEntityPersonas) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListEntityPersonasInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListEntityPersonasInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListExperienceEntities struct { } func (*validateOpListExperienceEntities) ID() string { return "OperationInputValidation" } func (m *validateOpListExperienceEntities) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListExperienceEntitiesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListExperienceEntitiesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListExperiences struct { } func (*validateOpListExperiences) ID() string { return "OperationInputValidation" } func (m *validateOpListExperiences) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListExperiencesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListExperiencesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListFaqs struct { } func (*validateOpListFaqs) ID() string { return "OperationInputValidation" } func (m *validateOpListFaqs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListFaqsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListFaqsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListFeaturedResultsSets struct { } func (*validateOpListFeaturedResultsSets) ID() string { return "OperationInputValidation" } func (m *validateOpListFeaturedResultsSets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListFeaturedResultsSetsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListFeaturedResultsSetsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListGroupsOlderThanOrderingId struct { } func (*validateOpListGroupsOlderThanOrderingId) ID() string { return "OperationInputValidation" } func (m *validateOpListGroupsOlderThanOrderingId) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListGroupsOlderThanOrderingIdInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListGroupsOlderThanOrderingIdInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListQuerySuggestionsBlockLists struct { } func (*validateOpListQuerySuggestionsBlockLists) ID() string { return "OperationInputValidation" } func (m *validateOpListQuerySuggestionsBlockLists) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListQuerySuggestionsBlockListsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListQuerySuggestionsBlockListsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListTagsForResource struct { } func (*validateOpListTagsForResource) ID() string { return "OperationInputValidation" } func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListTagsForResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListTagsForResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListThesauri struct { } func (*validateOpListThesauri) ID() string { return "OperationInputValidation" } func (m *validateOpListThesauri) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListThesauriInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListThesauriInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPutPrincipalMapping struct { } func (*validateOpPutPrincipalMapping) ID() string { return "OperationInputValidation" } func (m *validateOpPutPrincipalMapping) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutPrincipalMappingInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutPrincipalMappingInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpQuery struct { } func (*validateOpQuery) ID() string { return "OperationInputValidation" } func (m *validateOpQuery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*QueryInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpQueryInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRetrieve struct { } func (*validateOpRetrieve) ID() string { return "OperationInputValidation" } func (m *validateOpRetrieve) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RetrieveInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRetrieveInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpStartDataSourceSyncJob struct { } func (*validateOpStartDataSourceSyncJob) ID() string { return "OperationInputValidation" } func (m *validateOpStartDataSourceSyncJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*StartDataSourceSyncJobInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpStartDataSourceSyncJobInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpStopDataSourceSyncJob struct { } func (*validateOpStopDataSourceSyncJob) ID() string { return "OperationInputValidation" } func (m *validateOpStopDataSourceSyncJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*StopDataSourceSyncJobInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpStopDataSourceSyncJobInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpSubmitFeedback struct { } func (*validateOpSubmitFeedback) ID() string { return "OperationInputValidation" } func (m *validateOpSubmitFeedback) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*SubmitFeedbackInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpSubmitFeedbackInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagResource struct { } func (*validateOpTagResource) ID() string { return "OperationInputValidation" } func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagResource struct { } func (*validateOpUntagResource) ID() string { return "OperationInputValidation" } func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateAccessControlConfiguration struct { } func (*validateOpUpdateAccessControlConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateAccessControlConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateAccessControlConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateAccessControlConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateDataSource struct { } func (*validateOpUpdateDataSource) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateDataSource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateDataSourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateDataSourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateExperience struct { } func (*validateOpUpdateExperience) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateExperience) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateExperienceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateExperienceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateFeaturedResultsSet struct { } func (*validateOpUpdateFeaturedResultsSet) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateFeaturedResultsSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateFeaturedResultsSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateFeaturedResultsSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateIndex struct { } func (*validateOpUpdateIndex) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateIndex) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateIndexInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateIndexInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateQuerySuggestionsBlockList struct { } func (*validateOpUpdateQuerySuggestionsBlockList) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateQuerySuggestionsBlockList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateQuerySuggestionsBlockListInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateQuerySuggestionsBlockListInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateQuerySuggestionsConfig struct { } func (*validateOpUpdateQuerySuggestionsConfig) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateQuerySuggestionsConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateQuerySuggestionsConfigInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateQuerySuggestionsConfigInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateThesaurus struct { } func (*validateOpUpdateThesaurus) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateThesaurus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateThesaurusInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateThesaurusInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpAssociateEntitiesToExperienceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociateEntitiesToExperience{}, middleware.After) } func addOpAssociatePersonasToEntitiesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociatePersonasToEntities{}, middleware.After) } func addOpBatchDeleteDocumentValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpBatchDeleteDocument{}, middleware.After) } func addOpBatchDeleteFeaturedResultsSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpBatchDeleteFeaturedResultsSet{}, middleware.After) } func addOpBatchGetDocumentStatusValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpBatchGetDocumentStatus{}, middleware.After) } func addOpBatchPutDocumentValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpBatchPutDocument{}, middleware.After) } func addOpClearQuerySuggestionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpClearQuerySuggestions{}, middleware.After) } func addOpCreateAccessControlConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateAccessControlConfiguration{}, middleware.After) } func addOpCreateDataSourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateDataSource{}, middleware.After) } func addOpCreateExperienceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateExperience{}, middleware.After) } func addOpCreateFaqValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateFaq{}, middleware.After) } func addOpCreateFeaturedResultsSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateFeaturedResultsSet{}, middleware.After) } func addOpCreateIndexValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateIndex{}, middleware.After) } func addOpCreateQuerySuggestionsBlockListValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateQuerySuggestionsBlockList{}, middleware.After) } func addOpCreateThesaurusValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateThesaurus{}, middleware.After) } func addOpDeleteAccessControlConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteAccessControlConfiguration{}, middleware.After) } func addOpDeleteDataSourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteDataSource{}, middleware.After) } func addOpDeleteExperienceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteExperience{}, middleware.After) } func addOpDeleteFaqValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteFaq{}, middleware.After) } func addOpDeleteIndexValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteIndex{}, middleware.After) } func addOpDeletePrincipalMappingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeletePrincipalMapping{}, middleware.After) } func addOpDeleteQuerySuggestionsBlockListValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteQuerySuggestionsBlockList{}, middleware.After) } func addOpDeleteThesaurusValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteThesaurus{}, middleware.After) } func addOpDescribeAccessControlConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeAccessControlConfiguration{}, middleware.After) } func addOpDescribeDataSourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeDataSource{}, middleware.After) } func addOpDescribeExperienceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeExperience{}, middleware.After) } func addOpDescribeFaqValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeFaq{}, middleware.After) } func addOpDescribeFeaturedResultsSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeFeaturedResultsSet{}, middleware.After) } func addOpDescribeIndexValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeIndex{}, middleware.After) } func addOpDescribePrincipalMappingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribePrincipalMapping{}, middleware.After) } func addOpDescribeQuerySuggestionsBlockListValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeQuerySuggestionsBlockList{}, middleware.After) } func addOpDescribeQuerySuggestionsConfigValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeQuerySuggestionsConfig{}, middleware.After) } func addOpDescribeThesaurusValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeThesaurus{}, middleware.After) } func addOpDisassociateEntitiesFromExperienceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDisassociateEntitiesFromExperience{}, middleware.After) } func addOpDisassociatePersonasFromEntitiesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDisassociatePersonasFromEntities{}, middleware.After) } func addOpGetQuerySuggestionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetQuerySuggestions{}, middleware.After) } func addOpGetSnapshotsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSnapshots{}, middleware.After) } func addOpListAccessControlConfigurationsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListAccessControlConfigurations{}, middleware.After) } func addOpListDataSourcesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListDataSources{}, middleware.After) } func addOpListDataSourceSyncJobsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListDataSourceSyncJobs{}, middleware.After) } func addOpListEntityPersonasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListEntityPersonas{}, middleware.After) } func addOpListExperienceEntitiesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListExperienceEntities{}, middleware.After) } func addOpListExperiencesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListExperiences{}, middleware.After) } func addOpListFaqsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListFaqs{}, middleware.After) } func addOpListFeaturedResultsSetsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListFeaturedResultsSets{}, middleware.After) } func addOpListGroupsOlderThanOrderingIdValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListGroupsOlderThanOrderingId{}, middleware.After) } func addOpListQuerySuggestionsBlockListsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListQuerySuggestionsBlockLists{}, middleware.After) } func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } func addOpListThesauriValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListThesauri{}, middleware.After) } func addOpPutPrincipalMappingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutPrincipalMapping{}, middleware.After) } func addOpQueryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpQuery{}, middleware.After) } func addOpRetrieveValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRetrieve{}, middleware.After) } func addOpStartDataSourceSyncJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartDataSourceSyncJob{}, middleware.After) } func addOpStopDataSourceSyncJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStopDataSourceSyncJob{}, middleware.After) } func addOpSubmitFeedbackValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSubmitFeedback{}, middleware.After) } func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } func addOpUpdateAccessControlConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateAccessControlConfiguration{}, middleware.After) } func addOpUpdateDataSourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateDataSource{}, middleware.After) } func addOpUpdateExperienceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateExperience{}, middleware.After) } func addOpUpdateFeaturedResultsSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateFeaturedResultsSet{}, middleware.After) } func addOpUpdateIndexValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateIndex{}, middleware.After) } func addOpUpdateQuerySuggestionsBlockListValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateQuerySuggestionsBlockList{}, middleware.After) } func addOpUpdateQuerySuggestionsConfigValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateQuerySuggestionsConfig{}, middleware.After) } func addOpUpdateThesaurusValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateThesaurus{}, middleware.After) } func validateAclConfiguration(v *types.AclConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AclConfiguration"} if v.AllowedGroupsColumnName == nil { invalidParams.Add(smithy.NewErrParamRequired("AllowedGroupsColumnName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAlfrescoConfiguration(v *types.AlfrescoConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AlfrescoConfiguration"} if v.SiteUrl == nil { invalidParams.Add(smithy.NewErrParamRequired("SiteUrl")) } if v.SiteId == nil { invalidParams.Add(smithy.NewErrParamRequired("SiteId")) } if v.SecretArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SecretArn")) } if v.SslCertificateS3Path == nil { invalidParams.Add(smithy.NewErrParamRequired("SslCertificateS3Path")) } else if v.SslCertificateS3Path != nil { if err := validateS3Path(v.SslCertificateS3Path); err != nil { invalidParams.AddNested("SslCertificateS3Path", err.(smithy.InvalidParamsError)) } } if v.DocumentLibraryFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.DocumentLibraryFieldMappings); err != nil { invalidParams.AddNested("DocumentLibraryFieldMappings", err.(smithy.InvalidParamsError)) } } if v.BlogFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.BlogFieldMappings); err != nil { invalidParams.AddNested("BlogFieldMappings", err.(smithy.InvalidParamsError)) } } if v.WikiFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.WikiFieldMappings); err != nil { invalidParams.AddNested("WikiFieldMappings", err.(smithy.InvalidParamsError)) } } if v.VpcConfiguration != nil { if err := validateDataSourceVpcConfiguration(v.VpcConfiguration); err != nil { invalidParams.AddNested("VpcConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAssociateEntityList(v []types.EntityConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AssociateEntityList"} for i := range v { if err := validateEntityConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAttributeFilter(v *types.AttributeFilter) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AttributeFilter"} if v.AndAllFilters != nil { if err := validateAttributeFilterList(v.AndAllFilters); err != nil { invalidParams.AddNested("AndAllFilters", err.(smithy.InvalidParamsError)) } } if v.OrAllFilters != nil { if err := validateAttributeFilterList(v.OrAllFilters); err != nil { invalidParams.AddNested("OrAllFilters", err.(smithy.InvalidParamsError)) } } if v.NotFilter != nil { if err := validateAttributeFilter(v.NotFilter); err != nil { invalidParams.AddNested("NotFilter", err.(smithy.InvalidParamsError)) } } if v.EqualsTo != nil { if err := validateDocumentAttribute(v.EqualsTo); err != nil { invalidParams.AddNested("EqualsTo", err.(smithy.InvalidParamsError)) } } if v.ContainsAll != nil { if err := validateDocumentAttribute(v.ContainsAll); err != nil { invalidParams.AddNested("ContainsAll", err.(smithy.InvalidParamsError)) } } if v.ContainsAny != nil { if err := validateDocumentAttribute(v.ContainsAny); err != nil { invalidParams.AddNested("ContainsAny", err.(smithy.InvalidParamsError)) } } if v.GreaterThan != nil { if err := validateDocumentAttribute(v.GreaterThan); err != nil { invalidParams.AddNested("GreaterThan", err.(smithy.InvalidParamsError)) } } if v.GreaterThanOrEquals != nil { if err := validateDocumentAttribute(v.GreaterThanOrEquals); err != nil { invalidParams.AddNested("GreaterThanOrEquals", err.(smithy.InvalidParamsError)) } } if v.LessThan != nil { if err := validateDocumentAttribute(v.LessThan); err != nil { invalidParams.AddNested("LessThan", err.(smithy.InvalidParamsError)) } } if v.LessThanOrEquals != nil { if err := validateDocumentAttribute(v.LessThanOrEquals); err != nil { invalidParams.AddNested("LessThanOrEquals", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAttributeFilterList(v []types.AttributeFilter) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AttributeFilterList"} for i := range v { if err := validateAttributeFilter(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAttributeSuggestionsGetConfig(v *types.AttributeSuggestionsGetConfig) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AttributeSuggestionsGetConfig"} if v.AttributeFilter != nil { if err := validateAttributeFilter(v.AttributeFilter); err != nil { invalidParams.AddNested("AttributeFilter", err.(smithy.InvalidParamsError)) } } if v.UserContext != nil { if err := validateUserContext(v.UserContext); err != nil { invalidParams.AddNested("UserContext", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAuthenticationConfiguration(v *types.AuthenticationConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AuthenticationConfiguration"} if v.BasicAuthentication != nil { if err := validateBasicAuthenticationConfigurationList(v.BasicAuthentication); err != nil { invalidParams.AddNested("BasicAuthentication", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateBasicAuthenticationConfiguration(v *types.BasicAuthenticationConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "BasicAuthenticationConfiguration"} if v.Host == nil { invalidParams.Add(smithy.NewErrParamRequired("Host")) } if v.Port == nil { invalidParams.Add(smithy.NewErrParamRequired("Port")) } if v.Credentials == nil { invalidParams.Add(smithy.NewErrParamRequired("Credentials")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateBasicAuthenticationConfigurationList(v []types.BasicAuthenticationConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "BasicAuthenticationConfigurationList"} for i := range v { if err := validateBasicAuthenticationConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateBoxConfiguration(v *types.BoxConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "BoxConfiguration"} if v.EnterpriseId == nil { invalidParams.Add(smithy.NewErrParamRequired("EnterpriseId")) } if v.SecretArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SecretArn")) } if v.FileFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.FileFieldMappings); err != nil { invalidParams.AddNested("FileFieldMappings", err.(smithy.InvalidParamsError)) } } if v.TaskFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.TaskFieldMappings); err != nil { invalidParams.AddNested("TaskFieldMappings", err.(smithy.InvalidParamsError)) } } if v.CommentFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.CommentFieldMappings); err != nil { invalidParams.AddNested("CommentFieldMappings", err.(smithy.InvalidParamsError)) } } if v.WebLinkFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.WebLinkFieldMappings); err != nil { invalidParams.AddNested("WebLinkFieldMappings", err.(smithy.InvalidParamsError)) } } if v.VpcConfiguration != nil { if err := validateDataSourceVpcConfiguration(v.VpcConfiguration); err != nil { invalidParams.AddNested("VpcConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCapacityUnitsConfiguration(v *types.CapacityUnitsConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CapacityUnitsConfiguration"} if v.StorageCapacityUnits == nil { invalidParams.Add(smithy.NewErrParamRequired("StorageCapacityUnits")) } if v.QueryCapacityUnits == nil { invalidParams.Add(smithy.NewErrParamRequired("QueryCapacityUnits")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateClickFeedback(v *types.ClickFeedback) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ClickFeedback"} if v.ResultId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResultId")) } if v.ClickTime == nil { invalidParams.Add(smithy.NewErrParamRequired("ClickTime")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateClickFeedbackList(v []types.ClickFeedback) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ClickFeedbackList"} for i := range v { if err := validateClickFeedback(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateColumnConfiguration(v *types.ColumnConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ColumnConfiguration"} if v.DocumentIdColumnName == nil { invalidParams.Add(smithy.NewErrParamRequired("DocumentIdColumnName")) } if v.DocumentDataColumnName == nil { invalidParams.Add(smithy.NewErrParamRequired("DocumentDataColumnName")) } if v.FieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.FieldMappings); err != nil { invalidParams.AddNested("FieldMappings", err.(smithy.InvalidParamsError)) } } if v.ChangeDetectingColumns == nil { invalidParams.Add(smithy.NewErrParamRequired("ChangeDetectingColumns")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateConfluenceConfiguration(v *types.ConfluenceConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ConfluenceConfiguration"} if v.ServerUrl == nil { invalidParams.Add(smithy.NewErrParamRequired("ServerUrl")) } if v.SecretArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SecretArn")) } if len(v.Version) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Version")) } if v.VpcConfiguration != nil { if err := validateDataSourceVpcConfiguration(v.VpcConfiguration); err != nil { invalidParams.AddNested("VpcConfiguration", err.(smithy.InvalidParamsError)) } } if v.ProxyConfiguration != nil { if err := validateProxyConfiguration(v.ProxyConfiguration); err != nil { invalidParams.AddNested("ProxyConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateConnectionConfiguration(v *types.ConnectionConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ConnectionConfiguration"} if v.DatabaseHost == nil { invalidParams.Add(smithy.NewErrParamRequired("DatabaseHost")) } if v.DatabasePort == nil { invalidParams.Add(smithy.NewErrParamRequired("DatabasePort")) } if v.DatabaseName == nil { invalidParams.Add(smithy.NewErrParamRequired("DatabaseName")) } if v.TableName == nil { invalidParams.Add(smithy.NewErrParamRequired("TableName")) } if v.SecretArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SecretArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCustomDocumentEnrichmentConfiguration(v *types.CustomDocumentEnrichmentConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CustomDocumentEnrichmentConfiguration"} if v.InlineConfigurations != nil { if err := validateInlineCustomDocumentEnrichmentConfigurationList(v.InlineConfigurations); err != nil { invalidParams.AddNested("InlineConfigurations", err.(smithy.InvalidParamsError)) } } if v.PreExtractionHookConfiguration != nil { if err := validateHookConfiguration(v.PreExtractionHookConfiguration); err != nil { invalidParams.AddNested("PreExtractionHookConfiguration", err.(smithy.InvalidParamsError)) } } if v.PostExtractionHookConfiguration != nil { if err := validateHookConfiguration(v.PostExtractionHookConfiguration); err != nil { invalidParams.AddNested("PostExtractionHookConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDatabaseConfiguration(v *types.DatabaseConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DatabaseConfiguration"} if len(v.DatabaseEngineType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("DatabaseEngineType")) } if v.ConnectionConfiguration == nil { invalidParams.Add(smithy.NewErrParamRequired("ConnectionConfiguration")) } else if v.ConnectionConfiguration != nil { if err := validateConnectionConfiguration(v.ConnectionConfiguration); err != nil { invalidParams.AddNested("ConnectionConfiguration", err.(smithy.InvalidParamsError)) } } if v.VpcConfiguration != nil { if err := validateDataSourceVpcConfiguration(v.VpcConfiguration); err != nil { invalidParams.AddNested("VpcConfiguration", err.(smithy.InvalidParamsError)) } } if v.ColumnConfiguration == nil { invalidParams.Add(smithy.NewErrParamRequired("ColumnConfiguration")) } else if v.ColumnConfiguration != nil { if err := validateColumnConfiguration(v.ColumnConfiguration); err != nil { invalidParams.AddNested("ColumnConfiguration", err.(smithy.InvalidParamsError)) } } if v.AclConfiguration != nil { if err := validateAclConfiguration(v.AclConfiguration); err != nil { invalidParams.AddNested("AclConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDataSourceConfiguration(v *types.DataSourceConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DataSourceConfiguration"} if v.S3Configuration != nil { if err := validateS3DataSourceConfiguration(v.S3Configuration); err != nil { invalidParams.AddNested("S3Configuration", err.(smithy.InvalidParamsError)) } } if v.SharePointConfiguration != nil { if err := validateSharePointConfiguration(v.SharePointConfiguration); err != nil { invalidParams.AddNested("SharePointConfiguration", err.(smithy.InvalidParamsError)) } } if v.DatabaseConfiguration != nil { if err := validateDatabaseConfiguration(v.DatabaseConfiguration); err != nil { invalidParams.AddNested("DatabaseConfiguration", err.(smithy.InvalidParamsError)) } } if v.SalesforceConfiguration != nil { if err := validateSalesforceConfiguration(v.SalesforceConfiguration); err != nil { invalidParams.AddNested("SalesforceConfiguration", err.(smithy.InvalidParamsError)) } } if v.OneDriveConfiguration != nil { if err := validateOneDriveConfiguration(v.OneDriveConfiguration); err != nil { invalidParams.AddNested("OneDriveConfiguration", err.(smithy.InvalidParamsError)) } } if v.ServiceNowConfiguration != nil { if err := validateServiceNowConfiguration(v.ServiceNowConfiguration); err != nil { invalidParams.AddNested("ServiceNowConfiguration", err.(smithy.InvalidParamsError)) } } if v.ConfluenceConfiguration != nil { if err := validateConfluenceConfiguration(v.ConfluenceConfiguration); err != nil { invalidParams.AddNested("ConfluenceConfiguration", err.(smithy.InvalidParamsError)) } } if v.GoogleDriveConfiguration != nil { if err := validateGoogleDriveConfiguration(v.GoogleDriveConfiguration); err != nil { invalidParams.AddNested("GoogleDriveConfiguration", err.(smithy.InvalidParamsError)) } } if v.WebCrawlerConfiguration != nil { if err := validateWebCrawlerConfiguration(v.WebCrawlerConfiguration); err != nil { invalidParams.AddNested("WebCrawlerConfiguration", err.(smithy.InvalidParamsError)) } } if v.WorkDocsConfiguration != nil { if err := validateWorkDocsConfiguration(v.WorkDocsConfiguration); err != nil { invalidParams.AddNested("WorkDocsConfiguration", err.(smithy.InvalidParamsError)) } } if v.FsxConfiguration != nil { if err := validateFsxConfiguration(v.FsxConfiguration); err != nil { invalidParams.AddNested("FsxConfiguration", err.(smithy.InvalidParamsError)) } } if v.SlackConfiguration != nil { if err := validateSlackConfiguration(v.SlackConfiguration); err != nil { invalidParams.AddNested("SlackConfiguration", err.(smithy.InvalidParamsError)) } } if v.BoxConfiguration != nil { if err := validateBoxConfiguration(v.BoxConfiguration); err != nil { invalidParams.AddNested("BoxConfiguration", err.(smithy.InvalidParamsError)) } } if v.QuipConfiguration != nil { if err := validateQuipConfiguration(v.QuipConfiguration); err != nil { invalidParams.AddNested("QuipConfiguration", err.(smithy.InvalidParamsError)) } } if v.JiraConfiguration != nil { if err := validateJiraConfiguration(v.JiraConfiguration); err != nil { invalidParams.AddNested("JiraConfiguration", err.(smithy.InvalidParamsError)) } } if v.GitHubConfiguration != nil { if err := validateGitHubConfiguration(v.GitHubConfiguration); err != nil { invalidParams.AddNested("GitHubConfiguration", err.(smithy.InvalidParamsError)) } } if v.AlfrescoConfiguration != nil { if err := validateAlfrescoConfiguration(v.AlfrescoConfiguration); err != nil { invalidParams.AddNested("AlfrescoConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDataSourceGroup(v *types.DataSourceGroup) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DataSourceGroup"} if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if v.DataSourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("DataSourceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDataSourceGroups(v []types.DataSourceGroup) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DataSourceGroups"} for i := range v { if err := validateDataSourceGroup(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDataSourceSyncJobMetricTarget(v *types.DataSourceSyncJobMetricTarget) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DataSourceSyncJobMetricTarget"} if v.DataSourceId == nil { invalidParams.Add(smithy.NewErrParamRequired("DataSourceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDataSourceToIndexFieldMapping(v *types.DataSourceToIndexFieldMapping) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DataSourceToIndexFieldMapping"} if v.DataSourceFieldName == nil { invalidParams.Add(smithy.NewErrParamRequired("DataSourceFieldName")) } if v.IndexFieldName == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexFieldName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDataSourceToIndexFieldMappingList(v []types.DataSourceToIndexFieldMapping) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DataSourceToIndexFieldMappingList"} for i := range v { if err := validateDataSourceToIndexFieldMapping(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDataSourceVpcConfiguration(v *types.DataSourceVpcConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DataSourceVpcConfiguration"} if v.SubnetIds == nil { invalidParams.Add(smithy.NewErrParamRequired("SubnetIds")) } if v.SecurityGroupIds == nil { invalidParams.Add(smithy.NewErrParamRequired("SecurityGroupIds")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDisassociateEntityList(v []types.EntityConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DisassociateEntityList"} for i := range v { if err := validateEntityConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDocument(v *types.Document) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Document"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.S3Path != nil { if err := validateS3Path(v.S3Path); err != nil { invalidParams.AddNested("S3Path", err.(smithy.InvalidParamsError)) } } if v.Attributes != nil { if err := validateDocumentAttributeList(v.Attributes); err != nil { invalidParams.AddNested("Attributes", err.(smithy.InvalidParamsError)) } } if v.AccessControlList != nil { if err := validatePrincipalList(v.AccessControlList); err != nil { invalidParams.AddNested("AccessControlList", err.(smithy.InvalidParamsError)) } } if v.HierarchicalAccessControlList != nil { if err := validateHierarchicalPrincipalList(v.HierarchicalAccessControlList); err != nil { invalidParams.AddNested("HierarchicalAccessControlList", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDocumentAttribute(v *types.DocumentAttribute) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DocumentAttribute"} if v.Key == nil { invalidParams.Add(smithy.NewErrParamRequired("Key")) } if v.Value == nil { invalidParams.Add(smithy.NewErrParamRequired("Value")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDocumentAttributeCondition(v *types.DocumentAttributeCondition) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DocumentAttributeCondition"} if v.ConditionDocumentAttributeKey == nil { invalidParams.Add(smithy.NewErrParamRequired("ConditionDocumentAttributeKey")) } if len(v.Operator) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Operator")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDocumentAttributeList(v []types.DocumentAttribute) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DocumentAttributeList"} for i := range v { if err := validateDocumentAttribute(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDocumentInfo(v *types.DocumentInfo) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DocumentInfo"} if v.DocumentId == nil { invalidParams.Add(smithy.NewErrParamRequired("DocumentId")) } if v.Attributes != nil { if err := validateDocumentAttributeList(v.Attributes); err != nil { invalidParams.AddNested("Attributes", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDocumentInfoList(v []types.DocumentInfo) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DocumentInfoList"} for i := range v { if err := validateDocumentInfo(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDocumentList(v []types.Document) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DocumentList"} for i := range v { if err := validateDocument(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDocumentMetadataConfiguration(v *types.DocumentMetadataConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DocumentMetadataConfiguration"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDocumentMetadataConfigurationList(v []types.DocumentMetadataConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DocumentMetadataConfigurationList"} for i := range v { if err := validateDocumentMetadataConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDocumentRelevanceConfiguration(v *types.DocumentRelevanceConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DocumentRelevanceConfiguration"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.Relevance == nil { invalidParams.Add(smithy.NewErrParamRequired("Relevance")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDocumentRelevanceOverrideConfigurationList(v []types.DocumentRelevanceConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DocumentRelevanceOverrideConfigurationList"} for i := range v { if err := validateDocumentRelevanceConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateEntityConfiguration(v *types.EntityConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "EntityConfiguration"} if v.EntityId == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityId")) } if len(v.EntityType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("EntityType")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateEntityPersonaConfiguration(v *types.EntityPersonaConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "EntityPersonaConfiguration"} if v.EntityId == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityId")) } if len(v.Persona) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Persona")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateEntityPersonaConfigurationList(v []types.EntityPersonaConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "EntityPersonaConfigurationList"} for i := range v { if err := validateEntityPersonaConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateFsxConfiguration(v *types.FsxConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "FsxConfiguration"} if v.FileSystemId == nil { invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) } if len(v.FileSystemType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("FileSystemType")) } if v.VpcConfiguration == nil { invalidParams.Add(smithy.NewErrParamRequired("VpcConfiguration")) } else if v.VpcConfiguration != nil { if err := validateDataSourceVpcConfiguration(v.VpcConfiguration); err != nil { invalidParams.AddNested("VpcConfiguration", err.(smithy.InvalidParamsError)) } } if v.FieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.FieldMappings); err != nil { invalidParams.AddNested("FieldMappings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateGitHubConfiguration(v *types.GitHubConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GitHubConfiguration"} if v.SaaSConfiguration != nil { if err := validateSaaSConfiguration(v.SaaSConfiguration); err != nil { invalidParams.AddNested("SaaSConfiguration", err.(smithy.InvalidParamsError)) } } if v.OnPremiseConfiguration != nil { if err := validateOnPremiseConfiguration(v.OnPremiseConfiguration); err != nil { invalidParams.AddNested("OnPremiseConfiguration", err.(smithy.InvalidParamsError)) } } if v.SecretArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SecretArn")) } if v.VpcConfiguration != nil { if err := validateDataSourceVpcConfiguration(v.VpcConfiguration); err != nil { invalidParams.AddNested("VpcConfiguration", err.(smithy.InvalidParamsError)) } } if v.GitHubRepositoryConfigurationFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.GitHubRepositoryConfigurationFieldMappings); err != nil { invalidParams.AddNested("GitHubRepositoryConfigurationFieldMappings", err.(smithy.InvalidParamsError)) } } if v.GitHubCommitConfigurationFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.GitHubCommitConfigurationFieldMappings); err != nil { invalidParams.AddNested("GitHubCommitConfigurationFieldMappings", err.(smithy.InvalidParamsError)) } } if v.GitHubIssueDocumentConfigurationFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.GitHubIssueDocumentConfigurationFieldMappings); err != nil { invalidParams.AddNested("GitHubIssueDocumentConfigurationFieldMappings", err.(smithy.InvalidParamsError)) } } if v.GitHubIssueCommentConfigurationFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.GitHubIssueCommentConfigurationFieldMappings); err != nil { invalidParams.AddNested("GitHubIssueCommentConfigurationFieldMappings", err.(smithy.InvalidParamsError)) } } if v.GitHubIssueAttachmentConfigurationFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.GitHubIssueAttachmentConfigurationFieldMappings); err != nil { invalidParams.AddNested("GitHubIssueAttachmentConfigurationFieldMappings", err.(smithy.InvalidParamsError)) } } if v.GitHubPullRequestCommentConfigurationFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.GitHubPullRequestCommentConfigurationFieldMappings); err != nil { invalidParams.AddNested("GitHubPullRequestCommentConfigurationFieldMappings", err.(smithy.InvalidParamsError)) } } if v.GitHubPullRequestDocumentConfigurationFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.GitHubPullRequestDocumentConfigurationFieldMappings); err != nil { invalidParams.AddNested("GitHubPullRequestDocumentConfigurationFieldMappings", err.(smithy.InvalidParamsError)) } } if v.GitHubPullRequestDocumentAttachmentConfigurationFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.GitHubPullRequestDocumentAttachmentConfigurationFieldMappings); err != nil { invalidParams.AddNested("GitHubPullRequestDocumentAttachmentConfigurationFieldMappings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateGoogleDriveConfiguration(v *types.GoogleDriveConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GoogleDriveConfiguration"} if v.SecretArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SecretArn")) } if v.FieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.FieldMappings); err != nil { invalidParams.AddNested("FieldMappings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateGroupMembers(v *types.GroupMembers) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GroupMembers"} if v.MemberGroups != nil { if err := validateMemberGroups(v.MemberGroups); err != nil { invalidParams.AddNested("MemberGroups", err.(smithy.InvalidParamsError)) } } if v.MemberUsers != nil { if err := validateMemberUsers(v.MemberUsers); err != nil { invalidParams.AddNested("MemberUsers", err.(smithy.InvalidParamsError)) } } if v.S3PathforGroupMembers != nil { if err := validateS3Path(v.S3PathforGroupMembers); err != nil { invalidParams.AddNested("S3PathforGroupMembers", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateHierarchicalPrincipal(v *types.HierarchicalPrincipal) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "HierarchicalPrincipal"} if v.PrincipalList == nil { invalidParams.Add(smithy.NewErrParamRequired("PrincipalList")) } else if v.PrincipalList != nil { if err := validatePrincipalList(v.PrincipalList); err != nil { invalidParams.AddNested("PrincipalList", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateHierarchicalPrincipalList(v []types.HierarchicalPrincipal) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "HierarchicalPrincipalList"} for i := range v { if err := validateHierarchicalPrincipal(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateHookConfiguration(v *types.HookConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "HookConfiguration"} if v.InvocationCondition != nil { if err := validateDocumentAttributeCondition(v.InvocationCondition); err != nil { invalidParams.AddNested("InvocationCondition", err.(smithy.InvalidParamsError)) } } if v.LambdaArn == nil { invalidParams.Add(smithy.NewErrParamRequired("LambdaArn")) } if v.S3Bucket == nil { invalidParams.Add(smithy.NewErrParamRequired("S3Bucket")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInlineCustomDocumentEnrichmentConfiguration(v *types.InlineCustomDocumentEnrichmentConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InlineCustomDocumentEnrichmentConfiguration"} if v.Condition != nil { if err := validateDocumentAttributeCondition(v.Condition); err != nil { invalidParams.AddNested("Condition", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInlineCustomDocumentEnrichmentConfigurationList(v []types.InlineCustomDocumentEnrichmentConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InlineCustomDocumentEnrichmentConfigurationList"} for i := range v { if err := validateInlineCustomDocumentEnrichmentConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateJiraConfiguration(v *types.JiraConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "JiraConfiguration"} if v.JiraAccountUrl == nil { invalidParams.Add(smithy.NewErrParamRequired("JiraAccountUrl")) } if v.SecretArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SecretArn")) } if v.AttachmentFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.AttachmentFieldMappings); err != nil { invalidParams.AddNested("AttachmentFieldMappings", err.(smithy.InvalidParamsError)) } } if v.CommentFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.CommentFieldMappings); err != nil { invalidParams.AddNested("CommentFieldMappings", err.(smithy.InvalidParamsError)) } } if v.IssueFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.IssueFieldMappings); err != nil { invalidParams.AddNested("IssueFieldMappings", err.(smithy.InvalidParamsError)) } } if v.ProjectFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.ProjectFieldMappings); err != nil { invalidParams.AddNested("ProjectFieldMappings", err.(smithy.InvalidParamsError)) } } if v.WorkLogFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.WorkLogFieldMappings); err != nil { invalidParams.AddNested("WorkLogFieldMappings", err.(smithy.InvalidParamsError)) } } if v.VpcConfiguration != nil { if err := validateDataSourceVpcConfiguration(v.VpcConfiguration); err != nil { invalidParams.AddNested("VpcConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateJsonTokenTypeConfiguration(v *types.JsonTokenTypeConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "JsonTokenTypeConfiguration"} if v.UserNameAttributeField == nil { invalidParams.Add(smithy.NewErrParamRequired("UserNameAttributeField")) } if v.GroupAttributeField == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupAttributeField")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateJwtTokenTypeConfiguration(v *types.JwtTokenTypeConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "JwtTokenTypeConfiguration"} if len(v.KeyLocation) == 0 { invalidParams.Add(smithy.NewErrParamRequired("KeyLocation")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMemberGroup(v *types.MemberGroup) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MemberGroup"} if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMemberGroups(v []types.MemberGroup) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MemberGroups"} for i := range v { if err := validateMemberGroup(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMemberUser(v *types.MemberUser) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MemberUser"} if v.UserId == nil { invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMemberUsers(v []types.MemberUser) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MemberUsers"} for i := range v { if err := validateMemberUser(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOneDriveConfiguration(v *types.OneDriveConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "OneDriveConfiguration"} if v.TenantDomain == nil { invalidParams.Add(smithy.NewErrParamRequired("TenantDomain")) } if v.SecretArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SecretArn")) } if v.OneDriveUsers == nil { invalidParams.Add(smithy.NewErrParamRequired("OneDriveUsers")) } else if v.OneDriveUsers != nil { if err := validateOneDriveUsers(v.OneDriveUsers); err != nil { invalidParams.AddNested("OneDriveUsers", err.(smithy.InvalidParamsError)) } } if v.FieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.FieldMappings); err != nil { invalidParams.AddNested("FieldMappings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOneDriveUsers(v *types.OneDriveUsers) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "OneDriveUsers"} if v.OneDriveUserS3Path != nil { if err := validateS3Path(v.OneDriveUserS3Path); err != nil { invalidParams.AddNested("OneDriveUserS3Path", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOnPremiseConfiguration(v *types.OnPremiseConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "OnPremiseConfiguration"} if v.HostUrl == nil { invalidParams.Add(smithy.NewErrParamRequired("HostUrl")) } if v.OrganizationName == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationName")) } if v.SslCertificateS3Path == nil { invalidParams.Add(smithy.NewErrParamRequired("SslCertificateS3Path")) } else if v.SslCertificateS3Path != nil { if err := validateS3Path(v.SslCertificateS3Path); err != nil { invalidParams.AddNested("SslCertificateS3Path", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validatePrincipal(v *types.Principal) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Principal"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } if len(v.Access) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Access")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validatePrincipalList(v []types.Principal) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PrincipalList"} for i := range v { if err := validatePrincipal(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateProxyConfiguration(v *types.ProxyConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ProxyConfiguration"} if v.Host == nil { invalidParams.Add(smithy.NewErrParamRequired("Host")) } if v.Port == nil { invalidParams.Add(smithy.NewErrParamRequired("Port")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateQuipConfiguration(v *types.QuipConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "QuipConfiguration"} if v.Domain == nil { invalidParams.Add(smithy.NewErrParamRequired("Domain")) } if v.SecretArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SecretArn")) } if v.ThreadFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.ThreadFieldMappings); err != nil { invalidParams.AddNested("ThreadFieldMappings", err.(smithy.InvalidParamsError)) } } if v.MessageFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.MessageFieldMappings); err != nil { invalidParams.AddNested("MessageFieldMappings", err.(smithy.InvalidParamsError)) } } if v.AttachmentFieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.AttachmentFieldMappings); err != nil { invalidParams.AddNested("AttachmentFieldMappings", err.(smithy.InvalidParamsError)) } } if v.VpcConfiguration != nil { if err := validateDataSourceVpcConfiguration(v.VpcConfiguration); err != nil { invalidParams.AddNested("VpcConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRelevanceFeedback(v *types.RelevanceFeedback) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RelevanceFeedback"} if v.ResultId == nil { invalidParams.Add(smithy.NewErrParamRequired("ResultId")) } if len(v.RelevanceValue) == 0 { invalidParams.Add(smithy.NewErrParamRequired("RelevanceValue")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRelevanceFeedbackList(v []types.RelevanceFeedback) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RelevanceFeedbackList"} for i := range v { if err := validateRelevanceFeedback(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateS3DataSourceConfiguration(v *types.S3DataSourceConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "S3DataSourceConfiguration"} if v.BucketName == nil { invalidParams.Add(smithy.NewErrParamRequired("BucketName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateS3Path(v *types.S3Path) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "S3Path"} if v.Bucket == nil { invalidParams.Add(smithy.NewErrParamRequired("Bucket")) } if v.Key == nil { invalidParams.Add(smithy.NewErrParamRequired("Key")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSaaSConfiguration(v *types.SaaSConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SaaSConfiguration"} if v.OrganizationName == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationName")) } if v.HostUrl == nil { invalidParams.Add(smithy.NewErrParamRequired("HostUrl")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSalesforceChatterFeedConfiguration(v *types.SalesforceChatterFeedConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SalesforceChatterFeedConfiguration"} if v.DocumentDataFieldName == nil { invalidParams.Add(smithy.NewErrParamRequired("DocumentDataFieldName")) } if v.FieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.FieldMappings); err != nil { invalidParams.AddNested("FieldMappings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSalesforceConfiguration(v *types.SalesforceConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SalesforceConfiguration"} if v.ServerUrl == nil { invalidParams.Add(smithy.NewErrParamRequired("ServerUrl")) } if v.SecretArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SecretArn")) } if v.StandardObjectConfigurations != nil { if err := validateSalesforceStandardObjectConfigurationList(v.StandardObjectConfigurations); err != nil { invalidParams.AddNested("StandardObjectConfigurations", err.(smithy.InvalidParamsError)) } } if v.KnowledgeArticleConfiguration != nil { if err := validateSalesforceKnowledgeArticleConfiguration(v.KnowledgeArticleConfiguration); err != nil { invalidParams.AddNested("KnowledgeArticleConfiguration", err.(smithy.InvalidParamsError)) } } if v.ChatterFeedConfiguration != nil { if err := validateSalesforceChatterFeedConfiguration(v.ChatterFeedConfiguration); err != nil { invalidParams.AddNested("ChatterFeedConfiguration", err.(smithy.InvalidParamsError)) } } if v.StandardObjectAttachmentConfiguration != nil { if err := validateSalesforceStandardObjectAttachmentConfiguration(v.StandardObjectAttachmentConfiguration); err != nil { invalidParams.AddNested("StandardObjectAttachmentConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSalesforceCustomKnowledgeArticleTypeConfiguration(v *types.SalesforceCustomKnowledgeArticleTypeConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SalesforceCustomKnowledgeArticleTypeConfiguration"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.DocumentDataFieldName == nil { invalidParams.Add(smithy.NewErrParamRequired("DocumentDataFieldName")) } if v.FieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.FieldMappings); err != nil { invalidParams.AddNested("FieldMappings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSalesforceCustomKnowledgeArticleTypeConfigurationList(v []types.SalesforceCustomKnowledgeArticleTypeConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SalesforceCustomKnowledgeArticleTypeConfigurationList"} for i := range v { if err := validateSalesforceCustomKnowledgeArticleTypeConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSalesforceKnowledgeArticleConfiguration(v *types.SalesforceKnowledgeArticleConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SalesforceKnowledgeArticleConfiguration"} if v.IncludedStates == nil { invalidParams.Add(smithy.NewErrParamRequired("IncludedStates")) } if v.StandardKnowledgeArticleTypeConfiguration != nil { if err := validateSalesforceStandardKnowledgeArticleTypeConfiguration(v.StandardKnowledgeArticleTypeConfiguration); err != nil { invalidParams.AddNested("StandardKnowledgeArticleTypeConfiguration", err.(smithy.InvalidParamsError)) } } if v.CustomKnowledgeArticleTypeConfigurations != nil { if err := validateSalesforceCustomKnowledgeArticleTypeConfigurationList(v.CustomKnowledgeArticleTypeConfigurations); err != nil { invalidParams.AddNested("CustomKnowledgeArticleTypeConfigurations", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSalesforceStandardKnowledgeArticleTypeConfiguration(v *types.SalesforceStandardKnowledgeArticleTypeConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SalesforceStandardKnowledgeArticleTypeConfiguration"} if v.DocumentDataFieldName == nil { invalidParams.Add(smithy.NewErrParamRequired("DocumentDataFieldName")) } if v.FieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.FieldMappings); err != nil { invalidParams.AddNested("FieldMappings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSalesforceStandardObjectAttachmentConfiguration(v *types.SalesforceStandardObjectAttachmentConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SalesforceStandardObjectAttachmentConfiguration"} if v.FieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.FieldMappings); err != nil { invalidParams.AddNested("FieldMappings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSalesforceStandardObjectConfiguration(v *types.SalesforceStandardObjectConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SalesforceStandardObjectConfiguration"} if len(v.Name) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.DocumentDataFieldName == nil { invalidParams.Add(smithy.NewErrParamRequired("DocumentDataFieldName")) } if v.FieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.FieldMappings); err != nil { invalidParams.AddNested("FieldMappings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSalesforceStandardObjectConfigurationList(v []types.SalesforceStandardObjectConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SalesforceStandardObjectConfigurationList"} for i := range v { if err := validateSalesforceStandardObjectConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSeedUrlConfiguration(v *types.SeedUrlConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SeedUrlConfiguration"} if v.SeedUrls == nil { invalidParams.Add(smithy.NewErrParamRequired("SeedUrls")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateServiceNowConfiguration(v *types.ServiceNowConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ServiceNowConfiguration"} if v.HostUrl == nil { invalidParams.Add(smithy.NewErrParamRequired("HostUrl")) } if v.SecretArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SecretArn")) } if len(v.ServiceNowBuildVersion) == 0 { invalidParams.Add(smithy.NewErrParamRequired("ServiceNowBuildVersion")) } if v.KnowledgeArticleConfiguration != nil { if err := validateServiceNowKnowledgeArticleConfiguration(v.KnowledgeArticleConfiguration); err != nil { invalidParams.AddNested("KnowledgeArticleConfiguration", err.(smithy.InvalidParamsError)) } } if v.ServiceCatalogConfiguration != nil { if err := validateServiceNowServiceCatalogConfiguration(v.ServiceCatalogConfiguration); err != nil { invalidParams.AddNested("ServiceCatalogConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateServiceNowKnowledgeArticleConfiguration(v *types.ServiceNowKnowledgeArticleConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ServiceNowKnowledgeArticleConfiguration"} if v.DocumentDataFieldName == nil { invalidParams.Add(smithy.NewErrParamRequired("DocumentDataFieldName")) } if v.FieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.FieldMappings); err != nil { invalidParams.AddNested("FieldMappings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateServiceNowServiceCatalogConfiguration(v *types.ServiceNowServiceCatalogConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ServiceNowServiceCatalogConfiguration"} if v.DocumentDataFieldName == nil { invalidParams.Add(smithy.NewErrParamRequired("DocumentDataFieldName")) } if v.FieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.FieldMappings); err != nil { invalidParams.AddNested("FieldMappings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSharePointConfiguration(v *types.SharePointConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SharePointConfiguration"} if len(v.SharePointVersion) == 0 { invalidParams.Add(smithy.NewErrParamRequired("SharePointVersion")) } if v.Urls == nil { invalidParams.Add(smithy.NewErrParamRequired("Urls")) } if v.SecretArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SecretArn")) } if v.VpcConfiguration != nil { if err := validateDataSourceVpcConfiguration(v.VpcConfiguration); err != nil { invalidParams.AddNested("VpcConfiguration", err.(smithy.InvalidParamsError)) } } if v.FieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.FieldMappings); err != nil { invalidParams.AddNested("FieldMappings", err.(smithy.InvalidParamsError)) } } if v.SslCertificateS3Path != nil { if err := validateS3Path(v.SslCertificateS3Path); err != nil { invalidParams.AddNested("SslCertificateS3Path", err.(smithy.InvalidParamsError)) } } if v.ProxyConfiguration != nil { if err := validateProxyConfiguration(v.ProxyConfiguration); err != nil { invalidParams.AddNested("ProxyConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSiteMapsConfiguration(v *types.SiteMapsConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SiteMapsConfiguration"} if v.SiteMaps == nil { invalidParams.Add(smithy.NewErrParamRequired("SiteMaps")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSlackConfiguration(v *types.SlackConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SlackConfiguration"} if v.TeamId == nil { invalidParams.Add(smithy.NewErrParamRequired("TeamId")) } if v.SecretArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SecretArn")) } if v.VpcConfiguration != nil { if err := validateDataSourceVpcConfiguration(v.VpcConfiguration); err != nil { invalidParams.AddNested("VpcConfiguration", err.(smithy.InvalidParamsError)) } } if v.SlackEntityList == nil { invalidParams.Add(smithy.NewErrParamRequired("SlackEntityList")) } if v.SinceCrawlDate == nil { invalidParams.Add(smithy.NewErrParamRequired("SinceCrawlDate")) } if v.FieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.FieldMappings); err != nil { invalidParams.AddNested("FieldMappings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSortingConfiguration(v *types.SortingConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SortingConfiguration"} if v.DocumentAttributeKey == nil { invalidParams.Add(smithy.NewErrParamRequired("DocumentAttributeKey")) } if len(v.SortOrder) == 0 { invalidParams.Add(smithy.NewErrParamRequired("SortOrder")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSpellCorrectionConfiguration(v *types.SpellCorrectionConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SpellCorrectionConfiguration"} if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTag(v *types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Tag"} if v.Key == nil { invalidParams.Add(smithy.NewErrParamRequired("Key")) } if v.Value == nil { invalidParams.Add(smithy.NewErrParamRequired("Value")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTagList(v []types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagList"} for i := range v { if err := validateTag(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateUrls(v *types.Urls) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Urls"} if v.SeedUrlConfiguration != nil { if err := validateSeedUrlConfiguration(v.SeedUrlConfiguration); err != nil { invalidParams.AddNested("SeedUrlConfiguration", err.(smithy.InvalidParamsError)) } } if v.SiteMapsConfiguration != nil { if err := validateSiteMapsConfiguration(v.SiteMapsConfiguration); err != nil { invalidParams.AddNested("SiteMapsConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateUserContext(v *types.UserContext) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UserContext"} if v.DataSourceGroups != nil { if err := validateDataSourceGroups(v.DataSourceGroups); err != nil { invalidParams.AddNested("DataSourceGroups", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateUserGroupResolutionConfiguration(v *types.UserGroupResolutionConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UserGroupResolutionConfiguration"} if len(v.UserGroupResolutionMode) == 0 { invalidParams.Add(smithy.NewErrParamRequired("UserGroupResolutionMode")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateUserTokenConfiguration(v *types.UserTokenConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UserTokenConfiguration"} if v.JwtTokenTypeConfiguration != nil { if err := validateJwtTokenTypeConfiguration(v.JwtTokenTypeConfiguration); err != nil { invalidParams.AddNested("JwtTokenTypeConfiguration", err.(smithy.InvalidParamsError)) } } if v.JsonTokenTypeConfiguration != nil { if err := validateJsonTokenTypeConfiguration(v.JsonTokenTypeConfiguration); err != nil { invalidParams.AddNested("JsonTokenTypeConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateUserTokenConfigurationList(v []types.UserTokenConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UserTokenConfigurationList"} for i := range v { if err := validateUserTokenConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateWebCrawlerConfiguration(v *types.WebCrawlerConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "WebCrawlerConfiguration"} if v.Urls == nil { invalidParams.Add(smithy.NewErrParamRequired("Urls")) } else if v.Urls != nil { if err := validateUrls(v.Urls); err != nil { invalidParams.AddNested("Urls", err.(smithy.InvalidParamsError)) } } if v.ProxyConfiguration != nil { if err := validateProxyConfiguration(v.ProxyConfiguration); err != nil { invalidParams.AddNested("ProxyConfiguration", err.(smithy.InvalidParamsError)) } } if v.AuthenticationConfiguration != nil { if err := validateAuthenticationConfiguration(v.AuthenticationConfiguration); err != nil { invalidParams.AddNested("AuthenticationConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateWorkDocsConfiguration(v *types.WorkDocsConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "WorkDocsConfiguration"} if v.OrganizationId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrganizationId")) } if v.FieldMappings != nil { if err := validateDataSourceToIndexFieldMappingList(v.FieldMappings); err != nil { invalidParams.AddNested("FieldMappings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAssociateEntitiesToExperienceInput(v *AssociateEntitiesToExperienceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AssociateEntitiesToExperienceInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.EntityList == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityList")) } else if v.EntityList != nil { if err := validateAssociateEntityList(v.EntityList); err != nil { invalidParams.AddNested("EntityList", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAssociatePersonasToEntitiesInput(v *AssociatePersonasToEntitiesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AssociatePersonasToEntitiesInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.Personas == nil { invalidParams.Add(smithy.NewErrParamRequired("Personas")) } else if v.Personas != nil { if err := validateEntityPersonaConfigurationList(v.Personas); err != nil { invalidParams.AddNested("Personas", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpBatchDeleteDocumentInput(v *BatchDeleteDocumentInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "BatchDeleteDocumentInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.DocumentIdList == nil { invalidParams.Add(smithy.NewErrParamRequired("DocumentIdList")) } if v.DataSourceSyncJobMetricTarget != nil { if err := validateDataSourceSyncJobMetricTarget(v.DataSourceSyncJobMetricTarget); err != nil { invalidParams.AddNested("DataSourceSyncJobMetricTarget", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpBatchDeleteFeaturedResultsSetInput(v *BatchDeleteFeaturedResultsSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "BatchDeleteFeaturedResultsSetInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.FeaturedResultsSetIds == nil { invalidParams.Add(smithy.NewErrParamRequired("FeaturedResultsSetIds")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpBatchGetDocumentStatusInput(v *BatchGetDocumentStatusInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "BatchGetDocumentStatusInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.DocumentInfoList == nil { invalidParams.Add(smithy.NewErrParamRequired("DocumentInfoList")) } else if v.DocumentInfoList != nil { if err := validateDocumentInfoList(v.DocumentInfoList); err != nil { invalidParams.AddNested("DocumentInfoList", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpBatchPutDocumentInput(v *BatchPutDocumentInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "BatchPutDocumentInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.Documents == nil { invalidParams.Add(smithy.NewErrParamRequired("Documents")) } else if v.Documents != nil { if err := validateDocumentList(v.Documents); err != nil { invalidParams.AddNested("Documents", err.(smithy.InvalidParamsError)) } } if v.CustomDocumentEnrichmentConfiguration != nil { if err := validateCustomDocumentEnrichmentConfiguration(v.CustomDocumentEnrichmentConfiguration); err != nil { invalidParams.AddNested("CustomDocumentEnrichmentConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpClearQuerySuggestionsInput(v *ClearQuerySuggestionsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ClearQuerySuggestionsInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateAccessControlConfigurationInput(v *CreateAccessControlConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateAccessControlConfigurationInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.AccessControlList != nil { if err := validatePrincipalList(v.AccessControlList); err != nil { invalidParams.AddNested("AccessControlList", err.(smithy.InvalidParamsError)) } } if v.HierarchicalAccessControlList != nil { if err := validateHierarchicalPrincipalList(v.HierarchicalAccessControlList); err != nil { invalidParams.AddNested("HierarchicalAccessControlList", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateDataSourceInput(v *CreateDataSourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateDataSourceInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } if v.Configuration != nil { if err := validateDataSourceConfiguration(v.Configuration); err != nil { invalidParams.AddNested("Configuration", err.(smithy.InvalidParamsError)) } } if v.VpcConfiguration != nil { if err := validateDataSourceVpcConfiguration(v.VpcConfiguration); err != nil { invalidParams.AddNested("VpcConfiguration", err.(smithy.InvalidParamsError)) } } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if v.CustomDocumentEnrichmentConfiguration != nil { if err := validateCustomDocumentEnrichmentConfiguration(v.CustomDocumentEnrichmentConfiguration); err != nil { invalidParams.AddNested("CustomDocumentEnrichmentConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateExperienceInput(v *CreateExperienceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateExperienceInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateFaqInput(v *CreateFaqInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateFaqInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.S3Path == nil { invalidParams.Add(smithy.NewErrParamRequired("S3Path")) } else if v.S3Path != nil { if err := validateS3Path(v.S3Path); err != nil { invalidParams.AddNested("S3Path", err.(smithy.InvalidParamsError)) } } if v.RoleArn == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateFeaturedResultsSetInput(v *CreateFeaturedResultsSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateFeaturedResultsSetInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.FeaturedResultsSetName == nil { invalidParams.Add(smithy.NewErrParamRequired("FeaturedResultsSetName")) } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateIndexInput(v *CreateIndexInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateIndexInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.RoleArn == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if v.UserTokenConfigurations != nil { if err := validateUserTokenConfigurationList(v.UserTokenConfigurations); err != nil { invalidParams.AddNested("UserTokenConfigurations", err.(smithy.InvalidParamsError)) } } if v.UserGroupResolutionConfiguration != nil { if err := validateUserGroupResolutionConfiguration(v.UserGroupResolutionConfiguration); err != nil { invalidParams.AddNested("UserGroupResolutionConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateQuerySuggestionsBlockListInput(v *CreateQuerySuggestionsBlockListInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateQuerySuggestionsBlockListInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.SourceS3Path == nil { invalidParams.Add(smithy.NewErrParamRequired("SourceS3Path")) } else if v.SourceS3Path != nil { if err := validateS3Path(v.SourceS3Path); err != nil { invalidParams.AddNested("SourceS3Path", err.(smithy.InvalidParamsError)) } } if v.RoleArn == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateThesaurusInput(v *CreateThesaurusInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateThesaurusInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.RoleArn == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if v.SourceS3Path == nil { invalidParams.Add(smithy.NewErrParamRequired("SourceS3Path")) } else if v.SourceS3Path != nil { if err := validateS3Path(v.SourceS3Path); err != nil { invalidParams.AddNested("SourceS3Path", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteAccessControlConfigurationInput(v *DeleteAccessControlConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteAccessControlConfigurationInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteDataSourceInput(v *DeleteDataSourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteDataSourceInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteExperienceInput(v *DeleteExperienceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteExperienceInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteFaqInput(v *DeleteFaqInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteFaqInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteIndexInput(v *DeleteIndexInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteIndexInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeletePrincipalMappingInput(v *DeletePrincipalMappingInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeletePrincipalMappingInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteQuerySuggestionsBlockListInput(v *DeleteQuerySuggestionsBlockListInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteQuerySuggestionsBlockListInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteThesaurusInput(v *DeleteThesaurusInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteThesaurusInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeAccessControlConfigurationInput(v *DescribeAccessControlConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeAccessControlConfigurationInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeDataSourceInput(v *DescribeDataSourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeDataSourceInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeExperienceInput(v *DescribeExperienceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeExperienceInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeFaqInput(v *DescribeFaqInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeFaqInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeFeaturedResultsSetInput(v *DescribeFeaturedResultsSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeFeaturedResultsSetInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.FeaturedResultsSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("FeaturedResultsSetId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeIndexInput(v *DescribeIndexInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeIndexInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribePrincipalMappingInput(v *DescribePrincipalMappingInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribePrincipalMappingInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeQuerySuggestionsBlockListInput(v *DescribeQuerySuggestionsBlockListInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeQuerySuggestionsBlockListInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeQuerySuggestionsConfigInput(v *DescribeQuerySuggestionsConfigInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeQuerySuggestionsConfigInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeThesaurusInput(v *DescribeThesaurusInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeThesaurusInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDisassociateEntitiesFromExperienceInput(v *DisassociateEntitiesFromExperienceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DisassociateEntitiesFromExperienceInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.EntityList == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityList")) } else if v.EntityList != nil { if err := validateDisassociateEntityList(v.EntityList); err != nil { invalidParams.AddNested("EntityList", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDisassociatePersonasFromEntitiesInput(v *DisassociatePersonasFromEntitiesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DisassociatePersonasFromEntitiesInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.EntityIds == nil { invalidParams.Add(smithy.NewErrParamRequired("EntityIds")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetQuerySuggestionsInput(v *GetQuerySuggestionsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetQuerySuggestionsInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.QueryText == nil { invalidParams.Add(smithy.NewErrParamRequired("QueryText")) } if v.AttributeSuggestionsConfig != nil { if err := validateAttributeSuggestionsGetConfig(v.AttributeSuggestionsConfig); err != nil { invalidParams.AddNested("AttributeSuggestionsConfig", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetSnapshotsInput(v *GetSnapshotsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetSnapshotsInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if len(v.Interval) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Interval")) } if len(v.MetricType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("MetricType")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListAccessControlConfigurationsInput(v *ListAccessControlConfigurationsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListAccessControlConfigurationsInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListDataSourcesInput(v *ListDataSourcesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListDataSourcesInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListDataSourceSyncJobsInput(v *ListDataSourceSyncJobsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListDataSourceSyncJobsInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListEntityPersonasInput(v *ListEntityPersonasInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListEntityPersonasInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListExperienceEntitiesInput(v *ListExperienceEntitiesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListExperienceEntitiesInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListExperiencesInput(v *ListExperiencesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListExperiencesInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListFaqsInput(v *ListFaqsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListFaqsInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListFeaturedResultsSetsInput(v *ListFeaturedResultsSetsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListFeaturedResultsSetsInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListGroupsOlderThanOrderingIdInput(v *ListGroupsOlderThanOrderingIdInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListGroupsOlderThanOrderingIdInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.OrderingId == nil { invalidParams.Add(smithy.NewErrParamRequired("OrderingId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListQuerySuggestionsBlockListsInput(v *ListQuerySuggestionsBlockListsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListQuerySuggestionsBlockListsInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListThesauriInput(v *ListThesauriInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListThesauriInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPutPrincipalMappingInput(v *PutPrincipalMappingInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutPrincipalMappingInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if v.GroupMembers == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupMembers")) } else if v.GroupMembers != nil { if err := validateGroupMembers(v.GroupMembers); err != nil { invalidParams.AddNested("GroupMembers", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpQueryInput(v *QueryInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "QueryInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.AttributeFilter != nil { if err := validateAttributeFilter(v.AttributeFilter); err != nil { invalidParams.AddNested("AttributeFilter", err.(smithy.InvalidParamsError)) } } if v.DocumentRelevanceOverrideConfigurations != nil { if err := validateDocumentRelevanceOverrideConfigurationList(v.DocumentRelevanceOverrideConfigurations); err != nil { invalidParams.AddNested("DocumentRelevanceOverrideConfigurations", err.(smithy.InvalidParamsError)) } } if v.SortingConfiguration != nil { if err := validateSortingConfiguration(v.SortingConfiguration); err != nil { invalidParams.AddNested("SortingConfiguration", err.(smithy.InvalidParamsError)) } } if v.UserContext != nil { if err := validateUserContext(v.UserContext); err != nil { invalidParams.AddNested("UserContext", err.(smithy.InvalidParamsError)) } } if v.SpellCorrectionConfiguration != nil { if err := validateSpellCorrectionConfiguration(v.SpellCorrectionConfiguration); err != nil { invalidParams.AddNested("SpellCorrectionConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRetrieveInput(v *RetrieveInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RetrieveInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.QueryText == nil { invalidParams.Add(smithy.NewErrParamRequired("QueryText")) } if v.AttributeFilter != nil { if err := validateAttributeFilter(v.AttributeFilter); err != nil { invalidParams.AddNested("AttributeFilter", err.(smithy.InvalidParamsError)) } } if v.DocumentRelevanceOverrideConfigurations != nil { if err := validateDocumentRelevanceOverrideConfigurationList(v.DocumentRelevanceOverrideConfigurations); err != nil { invalidParams.AddNested("DocumentRelevanceOverrideConfigurations", err.(smithy.InvalidParamsError)) } } if v.UserContext != nil { if err := validateUserContext(v.UserContext); err != nil { invalidParams.AddNested("UserContext", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpStartDataSourceSyncJobInput(v *StartDataSourceSyncJobInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StartDataSourceSyncJobInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpStopDataSourceSyncJobInput(v *StopDataSourceSyncJobInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StopDataSourceSyncJobInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpSubmitFeedbackInput(v *SubmitFeedbackInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SubmitFeedbackInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.QueryId == nil { invalidParams.Add(smithy.NewErrParamRequired("QueryId")) } if v.ClickFeedbackItems != nil { if err := validateClickFeedbackList(v.ClickFeedbackItems); err != nil { invalidParams.AddNested("ClickFeedbackItems", err.(smithy.InvalidParamsError)) } } if v.RelevanceFeedbackItems != nil { if err := validateRelevanceFeedbackList(v.RelevanceFeedbackItems); err != nil { invalidParams.AddNested("RelevanceFeedbackItems", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagResourceInput(v *TagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } else if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagResourceInput(v *UntagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateAccessControlConfigurationInput(v *UpdateAccessControlConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateAccessControlConfigurationInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.AccessControlList != nil { if err := validatePrincipalList(v.AccessControlList); err != nil { invalidParams.AddNested("AccessControlList", err.(smithy.InvalidParamsError)) } } if v.HierarchicalAccessControlList != nil { if err := validateHierarchicalPrincipalList(v.HierarchicalAccessControlList); err != nil { invalidParams.AddNested("HierarchicalAccessControlList", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateDataSourceInput(v *UpdateDataSourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateDataSourceInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.Configuration != nil { if err := validateDataSourceConfiguration(v.Configuration); err != nil { invalidParams.AddNested("Configuration", err.(smithy.InvalidParamsError)) } } if v.VpcConfiguration != nil { if err := validateDataSourceVpcConfiguration(v.VpcConfiguration); err != nil { invalidParams.AddNested("VpcConfiguration", err.(smithy.InvalidParamsError)) } } if v.CustomDocumentEnrichmentConfiguration != nil { if err := validateCustomDocumentEnrichmentConfiguration(v.CustomDocumentEnrichmentConfiguration); err != nil { invalidParams.AddNested("CustomDocumentEnrichmentConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateExperienceInput(v *UpdateExperienceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateExperienceInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateFeaturedResultsSetInput(v *UpdateFeaturedResultsSetInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateFeaturedResultsSetInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.FeaturedResultsSetId == nil { invalidParams.Add(smithy.NewErrParamRequired("FeaturedResultsSetId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateIndexInput(v *UpdateIndexInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateIndexInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.DocumentMetadataConfigurationUpdates != nil { if err := validateDocumentMetadataConfigurationList(v.DocumentMetadataConfigurationUpdates); err != nil { invalidParams.AddNested("DocumentMetadataConfigurationUpdates", err.(smithy.InvalidParamsError)) } } if v.CapacityUnits != nil { if err := validateCapacityUnitsConfiguration(v.CapacityUnits); err != nil { invalidParams.AddNested("CapacityUnits", err.(smithy.InvalidParamsError)) } } if v.UserTokenConfigurations != nil { if err := validateUserTokenConfigurationList(v.UserTokenConfigurations); err != nil { invalidParams.AddNested("UserTokenConfigurations", err.(smithy.InvalidParamsError)) } } if v.UserGroupResolutionConfiguration != nil { if err := validateUserGroupResolutionConfiguration(v.UserGroupResolutionConfiguration); err != nil { invalidParams.AddNested("UserGroupResolutionConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateQuerySuggestionsBlockListInput(v *UpdateQuerySuggestionsBlockListInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateQuerySuggestionsBlockListInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.SourceS3Path != nil { if err := validateS3Path(v.SourceS3Path); err != nil { invalidParams.AddNested("SourceS3Path", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateQuerySuggestionsConfigInput(v *UpdateQuerySuggestionsConfigInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateQuerySuggestionsConfigInput"} if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateThesaurusInput(v *UpdateThesaurusInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateThesaurusInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.IndexId == nil { invalidParams.Add(smithy.NewErrParamRequired("IndexId")) } if v.SourceS3Path != nil { if err := validateS3Path(v.SourceS3Path); err != nil { invalidParams.AddNested("SourceS3Path", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
5,145
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package document implements encoding and decoding of open-content that has a JSON-like data model. // This data-model allows for UTF-8 strings, arbitrary precision numbers, booleans, nulls, a list of these values, and a // map of UTF-8 strings to these values. // // Interface defines the semantics for how a document type is marshalled and unmarshalled for requests and responses // for the service. To send a document as input to the service you use NewLazyDocument and pass it the Go type to be // sent to the service. NewLazyDocument returns a document Interface type that encodes the provided Go type during // the request serialization step after you have invoked an API client operation that uses the document type. // // The following examples show how you can create document types using basic Go types. // // NewLazyDocument(map[string]interface{}{ // "favoriteNumber": 42, // "fruits": []string{"apple", "orange"}, // "capitals": map[string]interface{}{ // "Washington": "Olympia", // "Oregon": "Salem", // }, // "skyIsBlue": true, // }) // // NewLazyDocument(3.14159) // // NewLazyDocument([]interface{"One", 2, 3, 3.5, "four"}) // // NewLazyDocument(true) // // Services can send document types as part of their API responses. To retrieve the content of a response document // you use the UnmarshalSmithyDocument method on the response document. When calling UnmarshalSmithyDocument you pass // a reference to the Go type that you want to unmarshal and map the response to. // // For example, if you expect to receive key/value map from the service response: // // var kv map[string]interface{} // if err := outputDocument.UnmarshalSmithyDocument(&kv); err != nil { // // handle error // } // // If a service can return one or more data-types in the response, you can use an empty interface and type switch to // dynamically handle the response type. // // var v interface{} // if err := outputDocument.UnmarshalSmithyDocument(&v); err != nil { // // handle error // } // // switch vv := v.(type) { // case map[string]interface{}: // // handle key/value map // case []interface{}: // // handle array of values // case bool: // // handle boolean // case document.Number: // // handle an arbitrary precision number // case string: // // handle string // default: // // handle unknown case // } // // The mapping of Go types to document types is covered in more depth in https://pkg.go.dev/github.com/aws/smithy-go/document // including more in depth examples that cover user-defined structure types. package document
67
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package document import ( internaldocument "github.com/aws/aws-sdk-go-v2/service/kendra/internal/document" ) // Interface defines a document which is a protocol-agnostic type which supports a // JSON-like data-model. You can use this type to send UTF-8 strings, arbitrary // precision numbers, booleans, nulls, a list of these values, and a map of UTF-8 // strings to these values. // // You create a document type using the NewLazyDocument function and passing it // the Go type to marshal. When receiving a document in an API response, you use // the document's UnmarshalSmithyDocument function to decode the response to your // desired Go type. Unless documented specifically generated structure types in // client packages or client types packages are not supported at this time. Such // types embed a noSmithyDocumentSerde and will cause an error to be returned when // attempting to send an API request. // // For more information see the accompanying package documentation and linked // references. type Interface = internaldocument.Interface // You create document type using the NewLazyDocument function and passing it the // Go type to be marshaled and sent to the service. The document marshaler supports // semantics similar to the encoding/json Go standard library. // // For more information see the accompanying package documentation and linked // references. func NewLazyDocument(v interface{}) Interface { return internaldocument.NewDocumentMarshaler(v) }
35
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package document import ( "bytes" "encoding/json" smithydocument "github.com/aws/smithy-go/document" smithydocumentjson "github.com/aws/smithy-go/document/json" ) // github.com/aws/aws-sdk-go-v2/service/kendra/internal/document.smithyDocument is // an interface which is used to bind a document type to its service client. type smithyDocument interface { isSmithyDocument() } // github.com/aws/aws-sdk-go-v2/service/kendra/internal/document.Interface is a // JSON-like data model type that is protocol agnostic and is usedto send // open-content to a service. type Interface interface { smithyDocument smithydocument.Marshaler smithydocument.Unmarshaler } type documentMarshaler struct { value interface{} } func (m *documentMarshaler) UnmarshalSmithyDocument(v interface{}) error { mBytes, err := m.MarshalSmithyDocument() if err != nil { return err } jDecoder := json.NewDecoder(bytes.NewReader(mBytes)) jDecoder.UseNumber() var jv interface{} if err := jDecoder.Decode(&v); err != nil { return err } return NewDocumentUnmarshaler(v).UnmarshalSmithyDocument(&jv) } func (m *documentMarshaler) MarshalSmithyDocument() ([]byte, error) { return smithydocumentjson.NewEncoder().Encode(m.value) } func (m *documentMarshaler) isSmithyDocument() {} var _ Interface = (*documentMarshaler)(nil) type documentUnmarshaler struct { value interface{} } func (m *documentUnmarshaler) UnmarshalSmithyDocument(v interface{}) error { decoder := smithydocumentjson.NewDecoder() return decoder.DecodeJSONInterface(m.value, v) } func (m *documentUnmarshaler) MarshalSmithyDocument() ([]byte, error) { return json.Marshal(m.value) } func (m *documentUnmarshaler) isSmithyDocument() {} var _ Interface = (*documentUnmarshaler)(nil) // NewDocumentMarshaler creates a new document marshaler for the given input type func NewDocumentMarshaler(v interface{}) Interface { return &documentMarshaler{ value: v, } } // NewDocumentUnmarshaler creates a new document unmarshaler for the given service // response func NewDocumentUnmarshaler(v interface{}) Interface { return &documentUnmarshaler{ value: v, } } // github.com/aws/aws-sdk-go-v2/service/kendra/internal/document.IsInterface // returns whether the given Interface implementation is a valid client // implementation func IsInterface(v Interface) (ok bool) { defer func() { if err := recover(); err != nil { ok = false } }() v.isSmithyDocument() return true }
100
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package document import ( smithydocument "github.com/aws/smithy-go/document" ) var _ smithyDocument = (Interface)(nil) var _ smithydocument.Marshaler = (Interface)(nil) var _ smithydocument.Unmarshaler = (Interface)(nil)
12
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "github.com/aws/aws-sdk-go-v2/aws" endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" "github.com/aws/smithy-go/logging" "regexp" ) // Options is the endpoint resolver configuration options type Options struct { // Logger is a logging implementation that log events should be sent to. Logger logging.Logger // LogDeprecated indicates that deprecated endpoints should be logged to the // provided logger. LogDeprecated bool // ResolvedRegion is used to override the region to be resolved, rather then the // using the value passed to the ResolveEndpoint method. This value is used by the // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative // name. You must not set this value directly in your application. ResolvedRegion string // DisableHTTPS informs the resolver to return an endpoint that does not use the // HTTPS scheme. DisableHTTPS bool // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. UseDualStackEndpoint aws.DualStackEndpointState // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. UseFIPSEndpoint aws.FIPSEndpointState } func (o Options) GetResolvedRegion() string { return o.ResolvedRegion } func (o Options) GetDisableHTTPS() bool { return o.DisableHTTPS } func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { return o.UseDualStackEndpoint } func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { return o.UseFIPSEndpoint } func transformToSharedOptions(options Options) endpoints.Options { return endpoints.Options{ Logger: options.Logger, LogDeprecated: options.LogDeprecated, ResolvedRegion: options.ResolvedRegion, DisableHTTPS: options.DisableHTTPS, UseDualStackEndpoint: options.UseDualStackEndpoint, UseFIPSEndpoint: options.UseFIPSEndpoint, } } // Resolver kendra endpoint resolver type Resolver struct { partitions endpoints.Partitions } // ResolveEndpoint resolves the service endpoint for the given region and options func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { if len(region) == 0 { return endpoint, &aws.MissingRegionError{} } opt := transformToSharedOptions(options) return r.partitions.ResolveEndpoint(region, opt) } // New returns a new Resolver func New() *Resolver { return &Resolver{ partitions: defaultPartitions, } } var partitionRegexp = struct { Aws *regexp.Regexp AwsCn *regexp.Regexp AwsIso *regexp.Regexp AwsIsoB *regexp.Regexp AwsIsoE *regexp.Regexp AwsIsoF *regexp.Regexp AwsUsGov *regexp.Regexp }{ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), } var defaultPartitions = endpoints.Partitions{ { ID: "aws", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "kendra.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "kendra-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kendra.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "fips-us-east-1", }: endpoints.Endpoint{ Hostname: "kendra-fips.us-east-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "fips-us-east-2", }: endpoints.Endpoint{ Hostname: "kendra-fips.us-east-2.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-2", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "fips-us-west-2", }: endpoints.Endpoint{ Hostname: "kendra-fips.us-west-2.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-west-2", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-fips.us-east-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-2", Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-fips.us-east-2.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-fips.us-west-2.amazonaws.com", }, }, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "kendra.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-fips.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "kendra-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kendra.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: true, }, { ID: "aws-iso", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kendra.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, }, { ID: "aws-iso-b", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kendra.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, }, { ID: "aws-iso-e", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kendra.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoE, IsRegionalized: true, }, { ID: "aws-iso-f", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kendra.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoF, IsRegionalized: true, }, { ID: "aws-us-gov", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "kendra.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "kendra-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kendra.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "fips-us-gov-west-1", }: endpoints.Endpoint{ Hostname: "kendra-fips.us-gov-west-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-west-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "us-gov-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-gov-west-1", Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-fips.us-gov-west-1.amazonaws.com", }, }, }, }
394
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "testing" ) func TestRegexCompile(t *testing.T) { _ = defaultPartitions }
12
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types type AdditionalResultAttributeValueType string // Enum values for AdditionalResultAttributeValueType const ( AdditionalResultAttributeValueTypeTextWithHighlightsValue AdditionalResultAttributeValueType = "TEXT_WITH_HIGHLIGHTS_VALUE" ) // Values returns all known values for AdditionalResultAttributeValueType. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (AdditionalResultAttributeValueType) Values() []AdditionalResultAttributeValueType { return []AdditionalResultAttributeValueType{ "TEXT_WITH_HIGHLIGHTS_VALUE", } } type AlfrescoEntity string // Enum values for AlfrescoEntity const ( AlfrescoEntityWiki AlfrescoEntity = "wiki" AlfrescoEntityBlog AlfrescoEntity = "blog" AlfrescoEntityDocumentLibrary AlfrescoEntity = "documentLibrary" ) // Values returns all known values for AlfrescoEntity. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (AlfrescoEntity) Values() []AlfrescoEntity { return []AlfrescoEntity{ "wiki", "blog", "documentLibrary", } } type AttributeSuggestionsMode string // Enum values for AttributeSuggestionsMode const ( AttributeSuggestionsModeActive AttributeSuggestionsMode = "ACTIVE" AttributeSuggestionsModeInactive AttributeSuggestionsMode = "INACTIVE" ) // Values returns all known values for AttributeSuggestionsMode. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (AttributeSuggestionsMode) Values() []AttributeSuggestionsMode { return []AttributeSuggestionsMode{ "ACTIVE", "INACTIVE", } } type ConditionOperator string // Enum values for ConditionOperator const ( ConditionOperatorGreaterThan ConditionOperator = "GreaterThan" ConditionOperatorGreaterThanOrEquals ConditionOperator = "GreaterThanOrEquals" ConditionOperatorLessThan ConditionOperator = "LessThan" ConditionOperatorLessThanOrEquals ConditionOperator = "LessThanOrEquals" ConditionOperatorEquals ConditionOperator = "Equals" ConditionOperatorNotEquals ConditionOperator = "NotEquals" ConditionOperatorContains ConditionOperator = "Contains" ConditionOperatorNotContains ConditionOperator = "NotContains" ConditionOperatorExists ConditionOperator = "Exists" ConditionOperatorNotExists ConditionOperator = "NotExists" ConditionOperatorBeginsWith ConditionOperator = "BeginsWith" ) // Values returns all known values for ConditionOperator. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ConditionOperator) Values() []ConditionOperator { return []ConditionOperator{ "GreaterThan", "GreaterThanOrEquals", "LessThan", "LessThanOrEquals", "Equals", "NotEquals", "Contains", "NotContains", "Exists", "NotExists", "BeginsWith", } } type ConfluenceAttachmentFieldName string // Enum values for ConfluenceAttachmentFieldName const ( ConfluenceAttachmentFieldNameAuthor ConfluenceAttachmentFieldName = "AUTHOR" ConfluenceAttachmentFieldNameContentType ConfluenceAttachmentFieldName = "CONTENT_TYPE" ConfluenceAttachmentFieldNameCreatedDate ConfluenceAttachmentFieldName = "CREATED_DATE" ConfluenceAttachmentFieldNameDisplayUrl ConfluenceAttachmentFieldName = "DISPLAY_URL" ConfluenceAttachmentFieldNameFileSize ConfluenceAttachmentFieldName = "FILE_SIZE" ConfluenceAttachmentFieldNameItemType ConfluenceAttachmentFieldName = "ITEM_TYPE" ConfluenceAttachmentFieldNameParentId ConfluenceAttachmentFieldName = "PARENT_ID" ConfluenceAttachmentFieldNameSpaceKey ConfluenceAttachmentFieldName = "SPACE_KEY" ConfluenceAttachmentFieldNameSpaceName ConfluenceAttachmentFieldName = "SPACE_NAME" ConfluenceAttachmentFieldNameUrl ConfluenceAttachmentFieldName = "URL" ConfluenceAttachmentFieldNameVersion ConfluenceAttachmentFieldName = "VERSION" ) // Values returns all known values for ConfluenceAttachmentFieldName. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (ConfluenceAttachmentFieldName) Values() []ConfluenceAttachmentFieldName { return []ConfluenceAttachmentFieldName{ "AUTHOR", "CONTENT_TYPE", "CREATED_DATE", "DISPLAY_URL", "FILE_SIZE", "ITEM_TYPE", "PARENT_ID", "SPACE_KEY", "SPACE_NAME", "URL", "VERSION", } } type ConfluenceAuthenticationType string // Enum values for ConfluenceAuthenticationType const ( ConfluenceAuthenticationTypeHttpBasic ConfluenceAuthenticationType = "HTTP_BASIC" ConfluenceAuthenticationTypePat ConfluenceAuthenticationType = "PAT" ) // Values returns all known values for ConfluenceAuthenticationType. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (ConfluenceAuthenticationType) Values() []ConfluenceAuthenticationType { return []ConfluenceAuthenticationType{ "HTTP_BASIC", "PAT", } } type ConfluenceBlogFieldName string // Enum values for ConfluenceBlogFieldName const ( ConfluenceBlogFieldNameAuthor ConfluenceBlogFieldName = "AUTHOR" ConfluenceBlogFieldNameDisplayUrl ConfluenceBlogFieldName = "DISPLAY_URL" ConfluenceBlogFieldNameItemType ConfluenceBlogFieldName = "ITEM_TYPE" ConfluenceBlogFieldNameLabels ConfluenceBlogFieldName = "LABELS" ConfluenceBlogFieldNamePublishDate ConfluenceBlogFieldName = "PUBLISH_DATE" ConfluenceBlogFieldNameSpaceKey ConfluenceBlogFieldName = "SPACE_KEY" ConfluenceBlogFieldNameSpaceName ConfluenceBlogFieldName = "SPACE_NAME" ConfluenceBlogFieldNameUrl ConfluenceBlogFieldName = "URL" ConfluenceBlogFieldNameVersion ConfluenceBlogFieldName = "VERSION" ) // Values returns all known values for ConfluenceBlogFieldName. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ConfluenceBlogFieldName) Values() []ConfluenceBlogFieldName { return []ConfluenceBlogFieldName{ "AUTHOR", "DISPLAY_URL", "ITEM_TYPE", "LABELS", "PUBLISH_DATE", "SPACE_KEY", "SPACE_NAME", "URL", "VERSION", } } type ConfluencePageFieldName string // Enum values for ConfluencePageFieldName const ( ConfluencePageFieldNameAuthor ConfluencePageFieldName = "AUTHOR" ConfluencePageFieldNameContentStatus ConfluencePageFieldName = "CONTENT_STATUS" ConfluencePageFieldNameCreatedDate ConfluencePageFieldName = "CREATED_DATE" ConfluencePageFieldNameDisplayUrl ConfluencePageFieldName = "DISPLAY_URL" ConfluencePageFieldNameItemType ConfluencePageFieldName = "ITEM_TYPE" ConfluencePageFieldNameLabels ConfluencePageFieldName = "LABELS" ConfluencePageFieldNameModifiedDate ConfluencePageFieldName = "MODIFIED_DATE" ConfluencePageFieldNameParentId ConfluencePageFieldName = "PARENT_ID" ConfluencePageFieldNameSpaceKey ConfluencePageFieldName = "SPACE_KEY" ConfluencePageFieldNameSpaceName ConfluencePageFieldName = "SPACE_NAME" ConfluencePageFieldNameUrl ConfluencePageFieldName = "URL" ConfluencePageFieldNameVersion ConfluencePageFieldName = "VERSION" ) // Values returns all known values for ConfluencePageFieldName. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ConfluencePageFieldName) Values() []ConfluencePageFieldName { return []ConfluencePageFieldName{ "AUTHOR", "CONTENT_STATUS", "CREATED_DATE", "DISPLAY_URL", "ITEM_TYPE", "LABELS", "MODIFIED_DATE", "PARENT_ID", "SPACE_KEY", "SPACE_NAME", "URL", "VERSION", } } type ConfluenceSpaceFieldName string // Enum values for ConfluenceSpaceFieldName const ( ConfluenceSpaceFieldNameDisplayUrl ConfluenceSpaceFieldName = "DISPLAY_URL" ConfluenceSpaceFieldNameItemType ConfluenceSpaceFieldName = "ITEM_TYPE" ConfluenceSpaceFieldNameSpaceKey ConfluenceSpaceFieldName = "SPACE_KEY" ConfluenceSpaceFieldNameUrl ConfluenceSpaceFieldName = "URL" ) // Values returns all known values for ConfluenceSpaceFieldName. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (ConfluenceSpaceFieldName) Values() []ConfluenceSpaceFieldName { return []ConfluenceSpaceFieldName{ "DISPLAY_URL", "ITEM_TYPE", "SPACE_KEY", "URL", } } type ConfluenceVersion string // Enum values for ConfluenceVersion const ( ConfluenceVersionCloud ConfluenceVersion = "CLOUD" ConfluenceVersionServer ConfluenceVersion = "SERVER" ) // Values returns all known values for ConfluenceVersion. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ConfluenceVersion) Values() []ConfluenceVersion { return []ConfluenceVersion{ "CLOUD", "SERVER", } } type ContentType string // Enum values for ContentType const ( ContentTypePdf ContentType = "PDF" ContentTypeHtml ContentType = "HTML" ContentTypeMsWord ContentType = "MS_WORD" ContentTypePlainText ContentType = "PLAIN_TEXT" ContentTypePpt ContentType = "PPT" ContentTypeRtf ContentType = "RTF" ContentTypeXml ContentType = "XML" ContentTypeXslt ContentType = "XSLT" ContentTypeMsExcel ContentType = "MS_EXCEL" ContentTypeCsv ContentType = "CSV" ContentTypeJson ContentType = "JSON" ContentTypeMd ContentType = "MD" ) // Values returns all known values for ContentType. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (ContentType) Values() []ContentType { return []ContentType{ "PDF", "HTML", "MS_WORD", "PLAIN_TEXT", "PPT", "RTF", "XML", "XSLT", "MS_EXCEL", "CSV", "JSON", "MD", } } type DatabaseEngineType string // Enum values for DatabaseEngineType const ( DatabaseEngineTypeRdsAuroraMysql DatabaseEngineType = "RDS_AURORA_MYSQL" DatabaseEngineTypeRdsAuroraPostgresql DatabaseEngineType = "RDS_AURORA_POSTGRESQL" DatabaseEngineTypeRdsMysql DatabaseEngineType = "RDS_MYSQL" DatabaseEngineTypeRdsPostgresql DatabaseEngineType = "RDS_POSTGRESQL" ) // Values returns all known values for DatabaseEngineType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (DatabaseEngineType) Values() []DatabaseEngineType { return []DatabaseEngineType{ "RDS_AURORA_MYSQL", "RDS_AURORA_POSTGRESQL", "RDS_MYSQL", "RDS_POSTGRESQL", } } type DataSourceStatus string // Enum values for DataSourceStatus const ( DataSourceStatusCreating DataSourceStatus = "CREATING" DataSourceStatusDeleting DataSourceStatus = "DELETING" DataSourceStatusFailed DataSourceStatus = "FAILED" DataSourceStatusUpdating DataSourceStatus = "UPDATING" DataSourceStatusActive DataSourceStatus = "ACTIVE" ) // Values returns all known values for DataSourceStatus. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (DataSourceStatus) Values() []DataSourceStatus { return []DataSourceStatus{ "CREATING", "DELETING", "FAILED", "UPDATING", "ACTIVE", } } type DataSourceSyncJobStatus string // Enum values for DataSourceSyncJobStatus const ( DataSourceSyncJobStatusFailed DataSourceSyncJobStatus = "FAILED" DataSourceSyncJobStatusSucceeded DataSourceSyncJobStatus = "SUCCEEDED" DataSourceSyncJobStatusSyncing DataSourceSyncJobStatus = "SYNCING" DataSourceSyncJobStatusIncomplete DataSourceSyncJobStatus = "INCOMPLETE" DataSourceSyncJobStatusStopping DataSourceSyncJobStatus = "STOPPING" DataSourceSyncJobStatusAborted DataSourceSyncJobStatus = "ABORTED" DataSourceSyncJobStatusSyncingIndexing DataSourceSyncJobStatus = "SYNCING_INDEXING" ) // Values returns all known values for DataSourceSyncJobStatus. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (DataSourceSyncJobStatus) Values() []DataSourceSyncJobStatus { return []DataSourceSyncJobStatus{ "FAILED", "SUCCEEDED", "SYNCING", "INCOMPLETE", "STOPPING", "ABORTED", "SYNCING_INDEXING", } } type DataSourceType string // Enum values for DataSourceType const ( DataSourceTypeS3 DataSourceType = "S3" DataSourceTypeSharepoint DataSourceType = "SHAREPOINT" DataSourceTypeDatabase DataSourceType = "DATABASE" DataSourceTypeSalesforce DataSourceType = "SALESFORCE" DataSourceTypeOnedrive DataSourceType = "ONEDRIVE" DataSourceTypeServicenow DataSourceType = "SERVICENOW" DataSourceTypeCustom DataSourceType = "CUSTOM" DataSourceTypeConfluence DataSourceType = "CONFLUENCE" DataSourceTypeGoogledrive DataSourceType = "GOOGLEDRIVE" DataSourceTypeWebcrawler DataSourceType = "WEBCRAWLER" DataSourceTypeWorkdocs DataSourceType = "WORKDOCS" DataSourceTypeFsx DataSourceType = "FSX" DataSourceTypeSlack DataSourceType = "SLACK" DataSourceTypeBox DataSourceType = "BOX" DataSourceTypeQuip DataSourceType = "QUIP" DataSourceTypeJira DataSourceType = "JIRA" DataSourceTypeGithub DataSourceType = "GITHUB" DataSourceTypeAlfresco DataSourceType = "ALFRESCO" DataSourceTypeTemplate DataSourceType = "TEMPLATE" ) // Values returns all known values for DataSourceType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (DataSourceType) Values() []DataSourceType { return []DataSourceType{ "S3", "SHAREPOINT", "DATABASE", "SALESFORCE", "ONEDRIVE", "SERVICENOW", "CUSTOM", "CONFLUENCE", "GOOGLEDRIVE", "WEBCRAWLER", "WORKDOCS", "FSX", "SLACK", "BOX", "QUIP", "JIRA", "GITHUB", "ALFRESCO", "TEMPLATE", } } type DocumentAttributeValueType string // Enum values for DocumentAttributeValueType const ( DocumentAttributeValueTypeStringValue DocumentAttributeValueType = "STRING_VALUE" DocumentAttributeValueTypeStringListValue DocumentAttributeValueType = "STRING_LIST_VALUE" DocumentAttributeValueTypeLongValue DocumentAttributeValueType = "LONG_VALUE" DocumentAttributeValueTypeDateValue DocumentAttributeValueType = "DATE_VALUE" ) // Values returns all known values for DocumentAttributeValueType. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (DocumentAttributeValueType) Values() []DocumentAttributeValueType { return []DocumentAttributeValueType{ "STRING_VALUE", "STRING_LIST_VALUE", "LONG_VALUE", "DATE_VALUE", } } type DocumentStatus string // Enum values for DocumentStatus const ( DocumentStatusNotFound DocumentStatus = "NOT_FOUND" DocumentStatusProcessing DocumentStatus = "PROCESSING" DocumentStatusIndexed DocumentStatus = "INDEXED" DocumentStatusUpdated DocumentStatus = "UPDATED" DocumentStatusFailed DocumentStatus = "FAILED" DocumentStatusUpdateFailed DocumentStatus = "UPDATE_FAILED" ) // Values returns all known values for DocumentStatus. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (DocumentStatus) Values() []DocumentStatus { return []DocumentStatus{ "NOT_FOUND", "PROCESSING", "INDEXED", "UPDATED", "FAILED", "UPDATE_FAILED", } } type EndpointType string // Enum values for EndpointType const ( EndpointTypeHome EndpointType = "HOME" ) // Values returns all known values for EndpointType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (EndpointType) Values() []EndpointType { return []EndpointType{ "HOME", } } type EntityType string // Enum values for EntityType const ( EntityTypeUser EntityType = "USER" EntityTypeGroup EntityType = "GROUP" ) // Values returns all known values for EntityType. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (EntityType) Values() []EntityType { return []EntityType{ "USER", "GROUP", } } type ErrorCode string // Enum values for ErrorCode const ( ErrorCodeInternalError ErrorCode = "InternalError" ErrorCodeInvalidRequest ErrorCode = "InvalidRequest" ) // Values returns all known values for ErrorCode. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (ErrorCode) Values() []ErrorCode { return []ErrorCode{ "InternalError", "InvalidRequest", } } type ExperienceStatus string // Enum values for ExperienceStatus const ( ExperienceStatusCreating ExperienceStatus = "CREATING" ExperienceStatusActive ExperienceStatus = "ACTIVE" ExperienceStatusDeleting ExperienceStatus = "DELETING" ExperienceStatusFailed ExperienceStatus = "FAILED" ) // Values returns all known values for ExperienceStatus. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ExperienceStatus) Values() []ExperienceStatus { return []ExperienceStatus{ "CREATING", "ACTIVE", "DELETING", "FAILED", } } type FaqFileFormat string // Enum values for FaqFileFormat const ( FaqFileFormatCsv FaqFileFormat = "CSV" FaqFileFormatCsvWithHeader FaqFileFormat = "CSV_WITH_HEADER" FaqFileFormatJson FaqFileFormat = "JSON" ) // Values returns all known values for FaqFileFormat. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (FaqFileFormat) Values() []FaqFileFormat { return []FaqFileFormat{ "CSV", "CSV_WITH_HEADER", "JSON", } } type FaqStatus string // Enum values for FaqStatus const ( FaqStatusCreating FaqStatus = "CREATING" FaqStatusUpdating FaqStatus = "UPDATING" FaqStatusActive FaqStatus = "ACTIVE" FaqStatusDeleting FaqStatus = "DELETING" FaqStatusFailed FaqStatus = "FAILED" ) // Values returns all known values for FaqStatus. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (FaqStatus) Values() []FaqStatus { return []FaqStatus{ "CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", } } type FeaturedResultsSetStatus string // Enum values for FeaturedResultsSetStatus const ( FeaturedResultsSetStatusActive FeaturedResultsSetStatus = "ACTIVE" FeaturedResultsSetStatusInactive FeaturedResultsSetStatus = "INACTIVE" ) // Values returns all known values for FeaturedResultsSetStatus. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (FeaturedResultsSetStatus) Values() []FeaturedResultsSetStatus { return []FeaturedResultsSetStatus{ "ACTIVE", "INACTIVE", } } type FsxFileSystemType string // Enum values for FsxFileSystemType const ( FsxFileSystemTypeWindows FsxFileSystemType = "WINDOWS" ) // Values returns all known values for FsxFileSystemType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (FsxFileSystemType) Values() []FsxFileSystemType { return []FsxFileSystemType{ "WINDOWS", } } type HighlightType string // Enum values for HighlightType const ( HighlightTypeStandard HighlightType = "STANDARD" HighlightTypeThesaurusSynonym HighlightType = "THESAURUS_SYNONYM" ) // Values returns all known values for HighlightType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (HighlightType) Values() []HighlightType { return []HighlightType{ "STANDARD", "THESAURUS_SYNONYM", } } type IndexEdition string // Enum values for IndexEdition const ( IndexEditionDeveloperEdition IndexEdition = "DEVELOPER_EDITION" IndexEditionEnterpriseEdition IndexEdition = "ENTERPRISE_EDITION" ) // Values returns all known values for IndexEdition. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (IndexEdition) Values() []IndexEdition { return []IndexEdition{ "DEVELOPER_EDITION", "ENTERPRISE_EDITION", } } type IndexStatus string // Enum values for IndexStatus const ( IndexStatusCreating IndexStatus = "CREATING" IndexStatusActive IndexStatus = "ACTIVE" IndexStatusDeleting IndexStatus = "DELETING" IndexStatusFailed IndexStatus = "FAILED" IndexStatusUpdating IndexStatus = "UPDATING" IndexStatusSystemUpdating IndexStatus = "SYSTEM_UPDATING" ) // Values returns all known values for IndexStatus. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (IndexStatus) Values() []IndexStatus { return []IndexStatus{ "CREATING", "ACTIVE", "DELETING", "FAILED", "UPDATING", "SYSTEM_UPDATING", } } type Interval string // Enum values for Interval const ( IntervalThisMonth Interval = "THIS_MONTH" IntervalThisWeek Interval = "THIS_WEEK" IntervalOneWeekAgo Interval = "ONE_WEEK_AGO" IntervalTwoWeeksAgo Interval = "TWO_WEEKS_AGO" IntervalOneMonthAgo Interval = "ONE_MONTH_AGO" IntervalTwoMonthsAgo Interval = "TWO_MONTHS_AGO" ) // Values returns all known values for Interval. Note that this can be expanded in // the future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (Interval) Values() []Interval { return []Interval{ "THIS_MONTH", "THIS_WEEK", "ONE_WEEK_AGO", "TWO_WEEKS_AGO", "ONE_MONTH_AGO", "TWO_MONTHS_AGO", } } type IssueSubEntity string // Enum values for IssueSubEntity const ( IssueSubEntityComments IssueSubEntity = "COMMENTS" IssueSubEntityAttachments IssueSubEntity = "ATTACHMENTS" IssueSubEntityWorklogs IssueSubEntity = "WORKLOGS" ) // Values returns all known values for IssueSubEntity. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (IssueSubEntity) Values() []IssueSubEntity { return []IssueSubEntity{ "COMMENTS", "ATTACHMENTS", "WORKLOGS", } } type KeyLocation string // Enum values for KeyLocation const ( KeyLocationUrl KeyLocation = "URL" KeyLocationSecretManager KeyLocation = "SECRET_MANAGER" ) // Values returns all known values for KeyLocation. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (KeyLocation) Values() []KeyLocation { return []KeyLocation{ "URL", "SECRET_MANAGER", } } type MetricType string // Enum values for MetricType const ( MetricTypeQueriesByCount MetricType = "QUERIES_BY_COUNT" MetricTypeQueriesByZeroClickRate MetricType = "QUERIES_BY_ZERO_CLICK_RATE" MetricTypeQueriesByZeroResultRate MetricType = "QUERIES_BY_ZERO_RESULT_RATE" MetricTypeDocsByClickCount MetricType = "DOCS_BY_CLICK_COUNT" MetricTypeAggQueryDocMetrics MetricType = "AGG_QUERY_DOC_METRICS" MetricTypeTrendQueryDocMetrics MetricType = "TREND_QUERY_DOC_METRICS" ) // Values returns all known values for MetricType. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (MetricType) Values() []MetricType { return []MetricType{ "QUERIES_BY_COUNT", "QUERIES_BY_ZERO_CLICK_RATE", "QUERIES_BY_ZERO_RESULT_RATE", "DOCS_BY_CLICK_COUNT", "AGG_QUERY_DOC_METRICS", "TREND_QUERY_DOC_METRICS", } } type Mode string // Enum values for Mode const ( ModeEnabled Mode = "ENABLED" ModeLearnOnly Mode = "LEARN_ONLY" ) // Values returns all known values for Mode. Note that this can be expanded in the // future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (Mode) Values() []Mode { return []Mode{ "ENABLED", "LEARN_ONLY", } } type Order string // Enum values for Order const ( OrderAscending Order = "ASCENDING" OrderDescending Order = "DESCENDING" ) // Values returns all known values for Order. Note that this can be expanded in // the future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (Order) Values() []Order { return []Order{ "ASCENDING", "DESCENDING", } } type Persona string // Enum values for Persona const ( PersonaOwner Persona = "OWNER" PersonaViewer Persona = "VIEWER" ) // Values returns all known values for Persona. Note that this can be expanded in // the future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (Persona) Values() []Persona { return []Persona{ "OWNER", "VIEWER", } } type PrincipalMappingStatus string // Enum values for PrincipalMappingStatus const ( PrincipalMappingStatusFailed PrincipalMappingStatus = "FAILED" PrincipalMappingStatusSucceeded PrincipalMappingStatus = "SUCCEEDED" PrincipalMappingStatusProcessing PrincipalMappingStatus = "PROCESSING" PrincipalMappingStatusDeleting PrincipalMappingStatus = "DELETING" PrincipalMappingStatusDeleted PrincipalMappingStatus = "DELETED" ) // Values returns all known values for PrincipalMappingStatus. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (PrincipalMappingStatus) Values() []PrincipalMappingStatus { return []PrincipalMappingStatus{ "FAILED", "SUCCEEDED", "PROCESSING", "DELETING", "DELETED", } } type PrincipalType string // Enum values for PrincipalType const ( PrincipalTypeUser PrincipalType = "USER" PrincipalTypeGroup PrincipalType = "GROUP" ) // Values returns all known values for PrincipalType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (PrincipalType) Values() []PrincipalType { return []PrincipalType{ "USER", "GROUP", } } type QueryIdentifiersEnclosingOption string // Enum values for QueryIdentifiersEnclosingOption const ( QueryIdentifiersEnclosingOptionDoubleQuotes QueryIdentifiersEnclosingOption = "DOUBLE_QUOTES" QueryIdentifiersEnclosingOptionNone QueryIdentifiersEnclosingOption = "NONE" ) // Values returns all known values for QueryIdentifiersEnclosingOption. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (QueryIdentifiersEnclosingOption) Values() []QueryIdentifiersEnclosingOption { return []QueryIdentifiersEnclosingOption{ "DOUBLE_QUOTES", "NONE", } } type QueryResultFormat string // Enum values for QueryResultFormat const ( QueryResultFormatTable QueryResultFormat = "TABLE" QueryResultFormatText QueryResultFormat = "TEXT" ) // Values returns all known values for QueryResultFormat. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (QueryResultFormat) Values() []QueryResultFormat { return []QueryResultFormat{ "TABLE", "TEXT", } } type QueryResultType string // Enum values for QueryResultType const ( QueryResultTypeDocument QueryResultType = "DOCUMENT" QueryResultTypeQuestionAnswer QueryResultType = "QUESTION_ANSWER" QueryResultTypeAnswer QueryResultType = "ANSWER" ) // Values returns all known values for QueryResultType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (QueryResultType) Values() []QueryResultType { return []QueryResultType{ "DOCUMENT", "QUESTION_ANSWER", "ANSWER", } } type QuerySuggestionsBlockListStatus string // Enum values for QuerySuggestionsBlockListStatus const ( QuerySuggestionsBlockListStatusActive QuerySuggestionsBlockListStatus = "ACTIVE" QuerySuggestionsBlockListStatusCreating QuerySuggestionsBlockListStatus = "CREATING" QuerySuggestionsBlockListStatusDeleting QuerySuggestionsBlockListStatus = "DELETING" QuerySuggestionsBlockListStatusUpdating QuerySuggestionsBlockListStatus = "UPDATING" QuerySuggestionsBlockListStatusActiveButUpdateFailed QuerySuggestionsBlockListStatus = "ACTIVE_BUT_UPDATE_FAILED" QuerySuggestionsBlockListStatusFailed QuerySuggestionsBlockListStatus = "FAILED" ) // Values returns all known values for QuerySuggestionsBlockListStatus. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (QuerySuggestionsBlockListStatus) Values() []QuerySuggestionsBlockListStatus { return []QuerySuggestionsBlockListStatus{ "ACTIVE", "CREATING", "DELETING", "UPDATING", "ACTIVE_BUT_UPDATE_FAILED", "FAILED", } } type QuerySuggestionsStatus string // Enum values for QuerySuggestionsStatus const ( QuerySuggestionsStatusActive QuerySuggestionsStatus = "ACTIVE" QuerySuggestionsStatusUpdating QuerySuggestionsStatus = "UPDATING" ) // Values returns all known values for QuerySuggestionsStatus. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (QuerySuggestionsStatus) Values() []QuerySuggestionsStatus { return []QuerySuggestionsStatus{ "ACTIVE", "UPDATING", } } type ReadAccessType string // Enum values for ReadAccessType const ( ReadAccessTypeAllow ReadAccessType = "ALLOW" ReadAccessTypeDeny ReadAccessType = "DENY" ) // Values returns all known values for ReadAccessType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ReadAccessType) Values() []ReadAccessType { return []ReadAccessType{ "ALLOW", "DENY", } } type RelevanceType string // Enum values for RelevanceType const ( RelevanceTypeRelevant RelevanceType = "RELEVANT" RelevanceTypeNotRelevant RelevanceType = "NOT_RELEVANT" ) // Values returns all known values for RelevanceType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (RelevanceType) Values() []RelevanceType { return []RelevanceType{ "RELEVANT", "NOT_RELEVANT", } } type SalesforceChatterFeedIncludeFilterType string // Enum values for SalesforceChatterFeedIncludeFilterType const ( SalesforceChatterFeedIncludeFilterTypeActiveUser SalesforceChatterFeedIncludeFilterType = "ACTIVE_USER" SalesforceChatterFeedIncludeFilterTypeStandardUser SalesforceChatterFeedIncludeFilterType = "STANDARD_USER" ) // Values returns all known values for SalesforceChatterFeedIncludeFilterType. // Note that this can be expanded in the future, and so it is only as up to date as // the client. The ordering of this slice is not guaranteed to be stable across // updates. func (SalesforceChatterFeedIncludeFilterType) Values() []SalesforceChatterFeedIncludeFilterType { return []SalesforceChatterFeedIncludeFilterType{ "ACTIVE_USER", "STANDARD_USER", } } type SalesforceKnowledgeArticleState string // Enum values for SalesforceKnowledgeArticleState const ( SalesforceKnowledgeArticleStateDraft SalesforceKnowledgeArticleState = "DRAFT" SalesforceKnowledgeArticleStatePublished SalesforceKnowledgeArticleState = "PUBLISHED" SalesforceKnowledgeArticleStateArchived SalesforceKnowledgeArticleState = "ARCHIVED" ) // Values returns all known values for SalesforceKnowledgeArticleState. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (SalesforceKnowledgeArticleState) Values() []SalesforceKnowledgeArticleState { return []SalesforceKnowledgeArticleState{ "DRAFT", "PUBLISHED", "ARCHIVED", } } type SalesforceStandardObjectName string // Enum values for SalesforceStandardObjectName const ( SalesforceStandardObjectNameAccount SalesforceStandardObjectName = "ACCOUNT" SalesforceStandardObjectNameCampaign SalesforceStandardObjectName = "CAMPAIGN" SalesforceStandardObjectNameCase SalesforceStandardObjectName = "CASE" SalesforceStandardObjectNameContact SalesforceStandardObjectName = "CONTACT" SalesforceStandardObjectNameContract SalesforceStandardObjectName = "CONTRACT" SalesforceStandardObjectNameDocument SalesforceStandardObjectName = "DOCUMENT" SalesforceStandardObjectNameGroup SalesforceStandardObjectName = "GROUP" SalesforceStandardObjectNameIdea SalesforceStandardObjectName = "IDEA" SalesforceStandardObjectNameLead SalesforceStandardObjectName = "LEAD" SalesforceStandardObjectNameOpportunity SalesforceStandardObjectName = "OPPORTUNITY" SalesforceStandardObjectNamePartner SalesforceStandardObjectName = "PARTNER" SalesforceStandardObjectNamePricebook SalesforceStandardObjectName = "PRICEBOOK" SalesforceStandardObjectNameProduct SalesforceStandardObjectName = "PRODUCT" SalesforceStandardObjectNameProfile SalesforceStandardObjectName = "PROFILE" SalesforceStandardObjectNameSolution SalesforceStandardObjectName = "SOLUTION" SalesforceStandardObjectNameTask SalesforceStandardObjectName = "TASK" SalesforceStandardObjectNameUser SalesforceStandardObjectName = "USER" ) // Values returns all known values for SalesforceStandardObjectName. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (SalesforceStandardObjectName) Values() []SalesforceStandardObjectName { return []SalesforceStandardObjectName{ "ACCOUNT", "CAMPAIGN", "CASE", "CONTACT", "CONTRACT", "DOCUMENT", "GROUP", "IDEA", "LEAD", "OPPORTUNITY", "PARTNER", "PRICEBOOK", "PRODUCT", "PROFILE", "SOLUTION", "TASK", "USER", } } type ScoreConfidence string // Enum values for ScoreConfidence const ( ScoreConfidenceVeryHigh ScoreConfidence = "VERY_HIGH" ScoreConfidenceHigh ScoreConfidence = "HIGH" ScoreConfidenceMedium ScoreConfidence = "MEDIUM" ScoreConfidenceLow ScoreConfidence = "LOW" ScoreConfidenceNotAvailable ScoreConfidence = "NOT_AVAILABLE" ) // Values returns all known values for ScoreConfidence. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ScoreConfidence) Values() []ScoreConfidence { return []ScoreConfidence{ "VERY_HIGH", "HIGH", "MEDIUM", "LOW", "NOT_AVAILABLE", } } type ServiceNowAuthenticationType string // Enum values for ServiceNowAuthenticationType const ( ServiceNowAuthenticationTypeHttpBasic ServiceNowAuthenticationType = "HTTP_BASIC" ServiceNowAuthenticationTypeOauth2 ServiceNowAuthenticationType = "OAUTH2" ) // Values returns all known values for ServiceNowAuthenticationType. Note that // this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (ServiceNowAuthenticationType) Values() []ServiceNowAuthenticationType { return []ServiceNowAuthenticationType{ "HTTP_BASIC", "OAUTH2", } } type ServiceNowBuildVersionType string // Enum values for ServiceNowBuildVersionType const ( ServiceNowBuildVersionTypeLondon ServiceNowBuildVersionType = "LONDON" ServiceNowBuildVersionTypeOthers ServiceNowBuildVersionType = "OTHERS" ) // Values returns all known values for ServiceNowBuildVersionType. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (ServiceNowBuildVersionType) Values() []ServiceNowBuildVersionType { return []ServiceNowBuildVersionType{ "LONDON", "OTHERS", } } type SharePointOnlineAuthenticationType string // Enum values for SharePointOnlineAuthenticationType const ( SharePointOnlineAuthenticationTypeHttpBasic SharePointOnlineAuthenticationType = "HTTP_BASIC" SharePointOnlineAuthenticationTypeOauth2 SharePointOnlineAuthenticationType = "OAUTH2" ) // Values returns all known values for SharePointOnlineAuthenticationType. Note // that this can be expanded in the future, and so it is only as up to date as the // client. The ordering of this slice is not guaranteed to be stable across // updates. func (SharePointOnlineAuthenticationType) Values() []SharePointOnlineAuthenticationType { return []SharePointOnlineAuthenticationType{ "HTTP_BASIC", "OAUTH2", } } type SharePointVersion string // Enum values for SharePointVersion const ( SharePointVersionSharepoint2013 SharePointVersion = "SHAREPOINT_2013" SharePointVersionSharepoint2016 SharePointVersion = "SHAREPOINT_2016" SharePointVersionSharepointOnline SharePointVersion = "SHAREPOINT_ONLINE" SharePointVersionSharepoint2019 SharePointVersion = "SHAREPOINT_2019" ) // Values returns all known values for SharePointVersion. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (SharePointVersion) Values() []SharePointVersion { return []SharePointVersion{ "SHAREPOINT_2013", "SHAREPOINT_2016", "SHAREPOINT_ONLINE", "SHAREPOINT_2019", } } type SlackEntity string // Enum values for SlackEntity const ( SlackEntityPublicChannel SlackEntity = "PUBLIC_CHANNEL" SlackEntityPrivateChannel SlackEntity = "PRIVATE_CHANNEL" SlackEntityGroupMessage SlackEntity = "GROUP_MESSAGE" SlackEntityDirectMessage SlackEntity = "DIRECT_MESSAGE" ) // Values returns all known values for SlackEntity. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (SlackEntity) Values() []SlackEntity { return []SlackEntity{ "PUBLIC_CHANNEL", "PRIVATE_CHANNEL", "GROUP_MESSAGE", "DIRECT_MESSAGE", } } type SortOrder string // Enum values for SortOrder const ( SortOrderDesc SortOrder = "DESC" SortOrderAsc SortOrder = "ASC" ) // Values returns all known values for SortOrder. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (SortOrder) Values() []SortOrder { return []SortOrder{ "DESC", "ASC", } } type SuggestionType string // Enum values for SuggestionType const ( SuggestionTypeQuery SuggestionType = "QUERY" SuggestionTypeDocumentAttributes SuggestionType = "DOCUMENT_ATTRIBUTES" ) // Values returns all known values for SuggestionType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (SuggestionType) Values() []SuggestionType { return []SuggestionType{ "QUERY", "DOCUMENT_ATTRIBUTES", } } type ThesaurusStatus string // Enum values for ThesaurusStatus const ( ThesaurusStatusCreating ThesaurusStatus = "CREATING" ThesaurusStatusActive ThesaurusStatus = "ACTIVE" ThesaurusStatusDeleting ThesaurusStatus = "DELETING" ThesaurusStatusUpdating ThesaurusStatus = "UPDATING" ThesaurusStatusActiveButUpdateFailed ThesaurusStatus = "ACTIVE_BUT_UPDATE_FAILED" ThesaurusStatusFailed ThesaurusStatus = "FAILED" ) // Values returns all known values for ThesaurusStatus. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ThesaurusStatus) Values() []ThesaurusStatus { return []ThesaurusStatus{ "CREATING", "ACTIVE", "DELETING", "UPDATING", "ACTIVE_BUT_UPDATE_FAILED", "FAILED", } } type Type string // Enum values for Type const ( TypeSaas Type = "SAAS" TypeOnPremise Type = "ON_PREMISE" ) // Values returns all known values for Type. Note that this can be expanded in the // future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (Type) Values() []Type { return []Type{ "SAAS", "ON_PREMISE", } } type UserContextPolicy string // Enum values for UserContextPolicy const ( UserContextPolicyAttributeFilter UserContextPolicy = "ATTRIBUTE_FILTER" UserContextPolicyUserToken UserContextPolicy = "USER_TOKEN" ) // Values returns all known values for UserContextPolicy. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (UserContextPolicy) Values() []UserContextPolicy { return []UserContextPolicy{ "ATTRIBUTE_FILTER", "USER_TOKEN", } } type UserGroupResolutionMode string // Enum values for UserGroupResolutionMode const ( UserGroupResolutionModeAwsSso UserGroupResolutionMode = "AWS_SSO" UserGroupResolutionModeNone UserGroupResolutionMode = "NONE" ) // Values returns all known values for UserGroupResolutionMode. Note that this can // be expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (UserGroupResolutionMode) Values() []UserGroupResolutionMode { return []UserGroupResolutionMode{ "AWS_SSO", "NONE", } } type WarningCode string // Enum values for WarningCode const ( WarningCodeQueryLanguageInvalidSyntax WarningCode = "QUERY_LANGUAGE_INVALID_SYNTAX" ) // Values returns all known values for WarningCode. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (WarningCode) Values() []WarningCode { return []WarningCode{ "QUERY_LANGUAGE_INVALID_SYNTAX", } } type WebCrawlerMode string // Enum values for WebCrawlerMode const ( WebCrawlerModeHostOnly WebCrawlerMode = "HOST_ONLY" WebCrawlerModeSubdomains WebCrawlerMode = "SUBDOMAINS" WebCrawlerModeEverything WebCrawlerMode = "EVERYTHING" ) // Values returns all known values for WebCrawlerMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (WebCrawlerMode) Values() []WebCrawlerMode { return []WebCrawlerMode{ "HOST_ONLY", "SUBDOMAINS", "EVERYTHING", } }
1,376
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( "fmt" smithy "github.com/aws/smithy-go" ) // You don't have sufficient access to perform this action. Please ensure you have // the required permission policies and user accounts and try again. type AccessDeniedException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *AccessDeniedException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *AccessDeniedException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "AccessDeniedException" } return *e.ErrorCodeOverride } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // A conflict occurred with the request. Please fix any inconsistences with your // resources and try again. type ConflictException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ConflictException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ConflictException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ConflictException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ConflictException" } return *e.ErrorCodeOverride } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // An error message with a list of conflicting queries used across different sets // of featured results. This occurred with the request for a new featured results // set. Check that the queries you specified for featured results are unique per // featured results set for each index. type FeaturedResultsConflictException struct { Message *string ErrorCodeOverride *string ConflictingItems []ConflictingItem noSmithyDocumentSerde } func (e *FeaturedResultsConflictException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *FeaturedResultsConflictException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *FeaturedResultsConflictException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "FeaturedResultsConflictException" } return *e.ErrorCodeOverride } func (e *FeaturedResultsConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // An issue occurred with the internal server used for your Amazon Kendra service. // Please wait a few minutes and try again, or contact Support (http://aws.amazon.com/contact-us/) // for help. type InternalServerException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InternalServerException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InternalServerException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InternalServerException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InternalServerException" } return *e.ErrorCodeOverride } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // The input to the request is not valid. Please provide the correct input and try // again. type InvalidRequestException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidRequestException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidRequestException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidRequestException" } return *e.ErrorCodeOverride } func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The resource you want to use already exists. Please check you have provided the // correct resource and try again. type ResourceAlreadyExistException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceAlreadyExistException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceAlreadyExistException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceAlreadyExistException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceAlreadyExistException" } return *e.ErrorCodeOverride } func (e *ResourceAlreadyExistException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The resource you want to use is currently in use. Please check you have // provided the correct resource and try again. type ResourceInUseException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceInUseException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceInUseException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceInUseException" } return *e.ErrorCodeOverride } func (e *ResourceInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The resource you want to use doesn’t exist. Please check you have provided the // correct resource and try again. type ResourceNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceNotFoundException" } return *e.ErrorCodeOverride } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The resource you want to use isn't available. Please check you have provided // the correct resource and try again. type ResourceUnavailableException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceUnavailableException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceUnavailableException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceUnavailableException" } return *e.ErrorCodeOverride } func (e *ResourceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // You have exceeded the set limits for your Amazon Kendra service. Please see // Quotas (https://docs.aws.amazon.com/kendra/latest/dg/quotas.html) for more // information, or contact Support (http://aws.amazon.com/contact-us/) to inquire // about an increase of limits. type ServiceQuotaExceededException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ServiceQuotaExceededException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ServiceQuotaExceededException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ServiceQuotaExceededException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ServiceQuotaExceededException" } return *e.ErrorCodeOverride } func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was denied due to request throttling. Please reduce the number of // requests and try again. type ThrottlingException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ThrottlingException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ThrottlingException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ThrottlingException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ThrottlingException" } return *e.ErrorCodeOverride } func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The input fails to satisfy the constraints set by the Amazon Kendra service. // Please provide the correct input and try again. type ValidationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ValidationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ValidationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ValidationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ValidationException" } return *e.ErrorCodeOverride } func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
340
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( "github.com/aws/aws-sdk-go-v2/service/kendra/document" smithydocument "github.com/aws/smithy-go/document" "time" ) // Summary information on an access control configuration that you created for // your documents in an index. type AccessControlConfigurationSummary struct { // The identifier of the access control configuration. // // This member is required. Id *string noSmithyDocumentSerde } // Access Control List files for the documents in a data source. For the format of // the file, see Access control for S3 data sources (https://docs.aws.amazon.com/kendra/latest/dg/s3-acl.html) // . type AccessControlListConfiguration struct { // Path to the Amazon S3 bucket that contains the ACL files. KeyPath *string noSmithyDocumentSerde } // Provides information about the column that should be used for filtering the // query response by groups. type AclConfiguration struct { // A list of groups, separated by semi-colons, that filters a query response based // on user context. The document is only returned to users that are in one of the // groups specified in the UserContext field of the Query API. // // This member is required. AllowedGroupsColumnName *string noSmithyDocumentSerde } // An attribute returned from an index query. type AdditionalResultAttribute struct { // The key that identifies the attribute. // // This member is required. Key *string // An object that contains the attribute value. // // This member is required. Value *AdditionalResultAttributeValue // The data type of the Value property. // // This member is required. ValueType AdditionalResultAttributeValueType noSmithyDocumentSerde } // An attribute returned with a document from a search. type AdditionalResultAttributeValue struct { // The text associated with the attribute and information about the highlight to // apply to the text. TextWithHighlightsValue *TextWithHighlights noSmithyDocumentSerde } // Provides the configuration information to connect to Alfresco as your data // source. Support for AlfrescoConfiguration ended May 2023. We recommend // migrating to or using the Alfresco data source template schema / // TemplateConfiguration (https://docs.aws.amazon.com/kendra/latest/APIReference/API_TemplateConfiguration.html) // API. type AlfrescoConfiguration struct { // The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the // key-value pairs required to connect to your Alfresco data source. The secret // must contain a JSON structure with the following keys: // - username—The user name of the Alfresco account. // - password—The password of the Alfresco account. // // This member is required. SecretArn *string // The identifier of the Alfresco site. For example, my-site. // // This member is required. SiteId *string // The URL of the Alfresco site. For example, https://hostname:8080. // // This member is required. SiteUrl *string // The path to the SSL certificate stored in an Amazon S3 bucket. You use this to // connect to Alfresco if you require a secure SSL connection. You can simply // generate a self-signed X509 certificate on any computer using OpenSSL. For an // example of using OpenSSL to create an X509 certificate, see Create and sign an // X509 certificate (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-ssl.html) // . // // This member is required. SslCertificateS3Path *S3Path // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of Alfresco blogs to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to Alfresco fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Alfresco data source field names must exist in your Alfresco custom // metadata. BlogFieldMappings []DataSourceToIndexFieldMapping // TRUE to index comments of blogs and other content. CrawlComments bool // TRUE to index shared files. CrawlSystemFolders bool // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of Alfresco document libraries to Amazon Kendra index field names. To // create custom fields, use the UpdateIndex API before you map to Alfresco // fields. For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Alfresco data source field names must exist in your Alfresco custom // metadata. DocumentLibraryFieldMappings []DataSourceToIndexFieldMapping // Specify whether to index document libraries, wikis, or blogs. You can specify // one or more of these options. EntityFilter []AlfrescoEntity // A list of regular expression patterns to exclude certain files in your Alfresco // data source. Files that match the patterns are excluded from the index. Files // that don't match the patterns are included in the index. If a file matches both // an inclusion pattern and an exclusion pattern, the exclusion pattern takes // precedence and the file isn't included in the index. ExclusionPatterns []string // A list of regular expression patterns to include certain files in your Alfresco // data source. Files that match the patterns are included in the index. Files that // don't match the patterns are excluded from the index. If a file matches both an // inclusion pattern and an exclusion pattern, the exclusion pattern takes // precedence and the file isn't included in the index. InclusionPatterns []string // Configuration information for an Amazon Virtual Private Cloud to connect to // your Alfresco. For more information, see Configuring a VPC (https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html) // . VpcConfiguration *DataSourceVpcConfiguration // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of Alfresco wikis to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to Alfresco fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Alfresco data source field names must exist in your Alfresco custom // metadata. WikiFieldMappings []DataSourceToIndexFieldMapping noSmithyDocumentSerde } // Provides filtering the query results based on document attributes or metadata // fields. When you use the AndAllFilters or OrAllFilters , filters you can use 2 // layers under the first attribute filter. For example, you can use: // If you use more than 2 layers, you receive a ValidationException exception with // the message " AttributeFilter cannot have a depth of more than 2." If you use // more than 10 attribute filters in a given list for AndAllFilters or OrAllFilters // , you receive a ValidationException with the message " AttributeFilter cannot // have a length of more than 10". type AttributeFilter struct { // Performs a logical AND operation on all supplied filters. AndAllFilters []AttributeFilter // Returns true when a document contains all of the specified document attributes // or metadata fields. This filter is only applicable to StringListValue metadata. ContainsAll *DocumentAttribute // Returns true when a document contains any of the specified document attributes // or metadata fields. This filter is only applicable to StringListValue metadata. ContainsAny *DocumentAttribute // Performs an equals operation on two document attributes or metadata fields. EqualsTo *DocumentAttribute // Performs a greater than operation on two document attributes or metadata // fields. Use with a document attribute of type Date or Long . GreaterThan *DocumentAttribute // Performs a greater or equals than operation on two document attributes or // metadata fields. Use with a document attribute of type Date or Long . GreaterThanOrEquals *DocumentAttribute // Performs a less than operation on two document attributes or metadata fields. // Use with a document attribute of type Date or Long . LessThan *DocumentAttribute // Performs a less than or equals operation on two document attributes or metadata // fields. Use with a document attribute of type Date or Long . LessThanOrEquals *DocumentAttribute // Performs a logical NOT operation on all supplied filters. NotFilter *AttributeFilter // Performs a logical OR operation on all supplied filters. OrAllFilters []AttributeFilter noSmithyDocumentSerde } // Gets information on the configuration of document fields/attributes that you // want to base query suggestions on. To change your configuration, use // AttributeSuggestionsUpdateConfig (https://docs.aws.amazon.com/kendra/latest/dg/API_AttributeSuggestionsUpdateConfig.html) // and then call UpdateQuerySuggestionsConfig (https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateQuerySuggestionsConfig.html) // . type AttributeSuggestionsDescribeConfig struct { // The mode is set to either ACTIVE or INACTIVE . If the Mode for query history is // set to ENABLED when calling UpdateQuerySuggestionsConfig (https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateQuerySuggestionsConfig.html) // and AttributeSuggestionsMode to use fields/attributes is set to ACTIVE , and you // haven't set your SuggestionTypes preference to DOCUMENT_ATTRIBUTES , then Amazon // Kendra uses the query history. AttributeSuggestionsMode AttributeSuggestionsMode // The list of fields/attributes that you want to set as suggestible for query // suggestions. SuggestableConfigList []SuggestableConfig noSmithyDocumentSerde } // Provides the configuration information for the document fields/attributes that // you want to base query suggestions on. type AttributeSuggestionsGetConfig struct { // The list of additional document field/attribute keys or field names to include // in the response. You can use additional fields to provide extra information in // the response. Additional fields are not used to based suggestions on. AdditionalResponseAttributes []string // Filters the search results based on document fields/attributes. AttributeFilter *AttributeFilter // The list of document field/attribute keys or field names to use for query // suggestions. If the content within any of the fields match what your user starts // typing as their query, then the field content is returned as a query suggestion. SuggestionAttributes []string // Applies user context filtering so that only users who are given access to // certain documents see these document in their search results. UserContext *UserContext noSmithyDocumentSerde } // Updates the configuration information for the document fields/attributes that // you want to base query suggestions on. To deactivate using documents fields for // query suggestions, set the mode to INACTIVE . You must also set SuggestionTypes // as either QUERY or DOCUMENT_ATTRIBUTES and then call GetQuerySuggestions (https://docs.aws.amazon.com/kendra/latest/dg/API_GetQuerySuggestions.html) // . If you set to QUERY , then Amazon Kendra uses the query history to base // suggestions on. If you set to DOCUMENT_ATTRIBUTES , then Amazon Kendra uses the // contents of document fields to base suggestions on. type AttributeSuggestionsUpdateConfig struct { // You can set the mode to ACTIVE or INACTIVE . You must also set SuggestionTypes // as either QUERY or DOCUMENT_ATTRIBUTES and then call GetQuerySuggestions (https://docs.aws.amazon.com/kendra/latest/dg/API_GetQuerySuggestions.html) // . If Mode to use query history is set to ENABLED when calling // UpdateQuerySuggestionsConfig (https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateQuerySuggestionsConfig.html) // and AttributeSuggestionsMode to use fields/attributes is set to ACTIVE , and you // haven't set your SuggestionTypes preference to DOCUMENT_ATTRIBUTES , then Amazon // Kendra uses the query history. AttributeSuggestionsMode AttributeSuggestionsMode // The list of fields/attributes that you want to set as suggestible for query // suggestions. SuggestableConfigList []SuggestableConfig noSmithyDocumentSerde } // Provides the configuration information to connect to websites that require user // authentication. type AuthenticationConfiguration struct { // The list of configuration information that's required to connect to and crawl a // website host using basic authentication credentials. The list includes the name // and port number of the website host. BasicAuthentication []BasicAuthenticationConfiguration noSmithyDocumentSerde } // Provides the configuration information to connect to websites that require // basic user authentication. type BasicAuthenticationConfiguration struct { // Your secret ARN, which you can create in Secrets Manager (https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html) // You use a secret if basic authentication credentials are required to connect to // a website. The secret stores your credentials of user name and password. // // This member is required. Credentials *string // The name of the website host you want to connect to using authentication // credentials. For example, the host name of https://a.example.com/page1.html is // "a.example.com". // // This member is required. Host *string // The port number of the website host you want to connect to using authentication // credentials. For example, the port for https://a.example.com/page1.html is 443, // the standard port for HTTPS. // // This member is required. Port *int32 noSmithyDocumentSerde } // Provides information about documents that could not be removed from an index by // the BatchDeleteDocument API. type BatchDeleteDocumentResponseFailedDocument struct { // The error code for why the document couldn't be removed from the index. ErrorCode ErrorCode // An explanation for why the document couldn't be removed from the index. ErrorMessage *string // The identifier of the document that couldn't be removed from the index. Id *string noSmithyDocumentSerde } // Provides information about a set of featured results that couldn't be removed // from an index by the BatchDeleteFeaturedResultsSet (https://docs.aws.amazon.com/kendra/latest/dg/API_BatchDeleteFeaturedResultsSet.html) // API. type BatchDeleteFeaturedResultsSetError struct { // The error code for why the set of featured results couldn't be removed from the // index. // // This member is required. ErrorCode ErrorCode // An explanation for why the set of featured results couldn't be removed from the // index. // // This member is required. ErrorMessage *string // The identifier of the set of featured results that couldn't be removed from the // index. // // This member is required. Id *string noSmithyDocumentSerde } // Provides a response when the status of a document could not be retrieved. type BatchGetDocumentStatusResponseError struct { // The identifier of the document whose status could not be retrieved. DocumentId *string // Indicates the source of the error. ErrorCode ErrorCode // States that the API could not get the status of a document. This could be // because the request is not valid or there is a system error. ErrorMessage *string noSmithyDocumentSerde } // Provides information about a document that could not be indexed. type BatchPutDocumentResponseFailedDocument struct { // The type of error that caused the document to fail to be indexed. ErrorCode ErrorCode // A description of the reason why the document could not be indexed. ErrorMessage *string // The identifier of the document. Id *string noSmithyDocumentSerde } // Provides the configuration information to connect to Box as your data source. type BoxConfiguration struct { // The identifier of the Box Enterprise platform. You can find the enterprise ID // in the Box Developer Console settings or when you create an app in Box and // download your authentication credentials. For example, 801234567. // // This member is required. EnterpriseId *string // The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the // key-value pairs required to connect to your Box platform. The secret must // contain a JSON structure with the following keys: // - clientID—The identifier of the client OAuth 2.0 authentication application // created in Box. // - clientSecret—A set of characters known only to the OAuth 2.0 authentication // application created in Box. // - publicKeyId—The identifier of the public key contained within an identity // certificate. // - privateKey—A set of characters that make up an encryption key. // - passphrase—A set of characters that act like a password. // You create an application in Box to generate the keys or credentials required // for the secret. For more information, see Using a Box data source (https://docs.aws.amazon.com/kendra/latest/dg/data-source-box.html) // . // // This member is required. SecretArn *string // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of Box comments to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to Box fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Box field names must exist in your Box custom metadata. CommentFieldMappings []DataSourceToIndexFieldMapping // TRUE to index comments. CrawlComments bool // TRUE to index the contents of tasks. CrawlTasks bool // TRUE to index web links. CrawlWebLinks bool // A list of regular expression patterns to exclude certain files and folders from // your Box platform. Files and folders that match the patterns are excluded from // the index.Files and folders that don't match the patterns are included in the // index. If a file or folder matches both an inclusion and exclusion pattern, the // exclusion pattern takes precedence and the file or folder isn't included in the // index. ExclusionPatterns []string // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of Box files to Amazon Kendra index field names. To create custom fields, // use the UpdateIndex API before you map to Box fields. For more information, see // Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Box field names must exist in your Box custom metadata. FileFieldMappings []DataSourceToIndexFieldMapping // A list of regular expression patterns to include certain files and folders in // your Box platform. Files and folders that match the patterns are included in the // index. Files and folders that don't match the patterns are excluded from the // index. If a file or folder matches both an inclusion and exclusion pattern, the // exclusion pattern takes precedence and the file or folder isn't included in the // index. InclusionPatterns []string // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of Box tasks to Amazon Kendra index field names. To create custom fields, // use the UpdateIndex API before you map to Box fields. For more information, see // Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Box field names must exist in your Box custom metadata. TaskFieldMappings []DataSourceToIndexFieldMapping // TRUE to use the Slack change log to determine which documents require updating // in the index. Depending on the data source change log's size, it may take longer // for Amazon Kendra to use the change log than to scan all of your documents. UseChangeLog bool // Configuration information for an Amazon VPC to connect to your Box. For more // information, see Configuring a VPC (https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html) // . VpcConfiguration *DataSourceVpcConfiguration // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of Box web links to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to Box fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Box field names must exist in your Box custom metadata. WebLinkFieldMappings []DataSourceToIndexFieldMapping noSmithyDocumentSerde } // Specifies additional capacity units configured for your Enterprise Edition // index. You can add and remove capacity units to fit your usage requirements. type CapacityUnitsConfiguration struct { // The amount of extra query capacity for an index and GetQuerySuggestions (https://docs.aws.amazon.com/kendra/latest/dg/API_GetQuerySuggestions.html) // capacity. A single extra capacity unit for an index provides 0.1 queries per // second or approximately 8,000 queries per day. You can add up to 100 extra // capacity units. GetQuerySuggestions capacity is five times the provisioned // query capacity for an index, or the base capacity of 2.5 calls per second, // whichever is higher. For example, the base capacity for an index is 0.1 queries // per second, and GetQuerySuggestions capacity has a base of 2.5 calls per // second. If you add another 0.1 queries per second to total 0.2 queries per // second for an index, the GetQuerySuggestions capacity is 2.5 calls per second // (higher than five times 0.2 queries per second). // // This member is required. QueryCapacityUnits *int32 // The amount of extra storage capacity for an index. A single capacity unit // provides 30 GB of storage space or 100,000 documents, whichever is reached // first. You can add up to 100 extra capacity units. // // This member is required. StorageCapacityUnits *int32 noSmithyDocumentSerde } // Gathers information about when a particular result was clicked by a user. Your // application uses the SubmitFeedback API to provide click information. type ClickFeedback struct { // The Unix timestamp when the result was clicked. // // This member is required. ClickTime *time.Time // The identifier of the search result that was clicked. // // This member is required. ResultId *string noSmithyDocumentSerde } // Provides information about how Amazon Kendra should use the columns of a // database in an index. type ColumnConfiguration struct { // One to five columns that indicate when a document in the database has changed. // // This member is required. ChangeDetectingColumns []string // The column that contains the contents of the document. // // This member is required. DocumentDataColumnName *string // The column that provides the document's identifier. // // This member is required. DocumentIdColumnName *string // The column that contains the title of the document. DocumentTitleColumnName *string // An array of objects that map database column names to the corresponding fields // in an index. You must first create the fields in the index using the UpdateIndex // API. FieldMappings []DataSourceToIndexFieldMapping noSmithyDocumentSerde } // Information about a conflicting query used across different sets of featured // results. When you create a featured results set, you must check that the queries // are unique per featured results set for each index. type ConflictingItem struct { // The text of the conflicting query. QueryText *string // The identifier of the set of featured results that the conflicting query // belongs to. SetId *string // The name for the set of featured results that the conflicting query belongs to. SetName *string noSmithyDocumentSerde } // Configuration of attachment settings for the Confluence data source. Attachment // settings are optional, if you don't specify settings attachments, Amazon Kendra // won't index them. type ConfluenceAttachmentConfiguration struct { // Maps attributes or field names of Confluence attachments to Amazon Kendra index // field names. To create custom fields, use the UpdateIndex API before you map to // Confluence fields. For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Confluence data source field names must exist in your Confluence custom // metadata. If you specify the AttachentFieldMappings parameter, you must specify // at least one field mapping. AttachmentFieldMappings []ConfluenceAttachmentToIndexFieldMapping // TRUE to index attachments of pages and blogs in Confluence. CrawlAttachments bool noSmithyDocumentSerde } // Maps attributes or field names of Confluence attachments to Amazon Kendra index // field names. To create custom fields, use the UpdateIndex API before you map to // Confluence fields. For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Confuence data source field names must exist in your Confluence custom // metadata. type ConfluenceAttachmentToIndexFieldMapping struct { // The name of the field in the data source. You must first create the index field // using the UpdateIndex API. DataSourceFieldName ConfluenceAttachmentFieldName // The format for date fields in the data source. If the field specified in // DataSourceFieldName is a date field you must specify the date format. If the // field is not a date field, an exception is thrown. DateFieldFormat *string // The name of the index field to map to the Confluence data source field. The // index field type must match the Confluence field type. IndexFieldName *string noSmithyDocumentSerde } // Configuration of blog settings for the Confluence data source. Blogs are always // indexed unless filtered from the index by the ExclusionPatterns or // InclusionPatterns fields in the ConfluenceConfiguration object. type ConfluenceBlogConfiguration struct { // Maps attributes or field names of Confluence blogs to Amazon Kendra index field // names. To create custom fields, use the UpdateIndex API before you map to // Confluence fields. For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Confluence data source field names must exist in your Confluence custom // metadata. If you specify the BlogFieldMappings parameter, you must specify at // least one field mapping. BlogFieldMappings []ConfluenceBlogToIndexFieldMapping noSmithyDocumentSerde } // Maps attributes or field names of Confluence blog to Amazon Kendra index field // names. To create custom fields, use the UpdateIndex API before you map to // Confluence fields. For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Confluence data source field names must exist in your Confluence custom // metadata. type ConfluenceBlogToIndexFieldMapping struct { // The name of the field in the data source. DataSourceFieldName ConfluenceBlogFieldName // The format for date fields in the data source. If the field specified in // DataSourceFieldName is a date field you must specify the date format. If the // field is not a date field, an exception is thrown. DateFieldFormat *string // The name of the index field to map to the Confluence data source field. The // index field type must match the Confluence field type. IndexFieldName *string noSmithyDocumentSerde } // Provides the configuration information to connect to Confluence as your data // source. type ConfluenceConfiguration struct { // The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the // user name and password required to connect to the Confluence instance. If you // use Confluence Cloud, you use a generated API token as the password. You can // also provide authentication credentials in the form of a personal access token. // For more information, see Using a Confluence data source (https://docs.aws.amazon.com/kendra/latest/dg/data-source-confluence.html) // . // // This member is required. SecretArn *string // The URL of your Confluence instance. Use the full URL of the server. For // example, https://server.example.com:port/. You can also use an IP address, for // example, https://192.168.1.113/. // // This member is required. ServerUrl *string // The version or the type of Confluence installation to connect to. // // This member is required. Version ConfluenceVersion // Configuration information for indexing attachments to Confluence blogs and // pages. AttachmentConfiguration *ConfluenceAttachmentConfiguration // Whether you want to connect to Confluence using basic authentication of user // name and password, or a personal access token. You can use a personal access // token for Confluence Server. AuthenticationType ConfluenceAuthenticationType // Configuration information for indexing Confluence blogs. BlogConfiguration *ConfluenceBlogConfiguration // A list of regular expression patterns to exclude certain blog posts, pages, // spaces, or attachments in your Confluence. Content that matches the patterns are // excluded from the index. Content that doesn't match the patterns is included in // the index. If content matches both an inclusion and exclusion pattern, the // exclusion pattern takes precedence and the content isn't included in the index. ExclusionPatterns []string // A list of regular expression patterns to include certain blog posts, pages, // spaces, or attachments in your Confluence. Content that matches the patterns are // included in the index. Content that doesn't match the patterns is excluded from // the index. If content matches both an inclusion and exclusion pattern, the // exclusion pattern takes precedence and the content isn't included in the index. InclusionPatterns []string // Configuration information for indexing Confluence pages. PageConfiguration *ConfluencePageConfiguration // Configuration information to connect to your Confluence URL instance via a web // proxy. You can use this option for Confluence Server. You must provide the // website host name and port number. For example, the host name of // https://a.example.com/page1.html is "a.example.com" and the port is 443, the // standard port for HTTPS. Web proxy credentials are optional and you can use them // to connect to a web proxy server that requires basic authentication of user name // and password. To store web proxy credentials, you use a secret in Secrets // Manager. It is recommended that you follow best security practices when // configuring your web proxy. This includes setting up throttling, setting up // logging and monitoring, and applying security patches on a regular basis. If you // use your web proxy with multiple data sources, sync jobs that occur at the same // time could strain the load on your proxy. It is recommended you prepare your // proxy beforehand for any security and load requirements. ProxyConfiguration *ProxyConfiguration // Configuration information for indexing Confluence spaces. SpaceConfiguration *ConfluenceSpaceConfiguration // Configuration information for an Amazon Virtual Private Cloud to connect to // your Confluence. For more information, see Configuring a VPC (https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html) // . VpcConfiguration *DataSourceVpcConfiguration noSmithyDocumentSerde } // Configuration of the page settings for the Confluence data source. type ConfluencePageConfiguration struct { // Maps attributes or field names of Confluence pages to Amazon Kendra index field // names. To create custom fields, use the UpdateIndex API before you map to // Confluence fields. For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Confluence data source field names must exist in your Confluence custom // metadata. If you specify the PageFieldMappings parameter, you must specify at // least one field mapping. PageFieldMappings []ConfluencePageToIndexFieldMapping noSmithyDocumentSerde } // Maps attributes or field names of Confluence pages to Amazon Kendra index field // names. To create custom fields, use the UpdateIndex API before you map to // Confluence fields. For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Confluence data source field names must exist in your Confluence custom // metadata. type ConfluencePageToIndexFieldMapping struct { // The name of the field in the data source. DataSourceFieldName ConfluencePageFieldName // The format for date fields in the data source. If the field specified in // DataSourceFieldName is a date field you must specify the date format. If the // field is not a date field, an exception is thrown. DateFieldFormat *string // The name of the index field to map to the Confluence data source field. The // index field type must match the Confluence field type. IndexFieldName *string noSmithyDocumentSerde } // Configuration information for indexing Confluence spaces. type ConfluenceSpaceConfiguration struct { // TRUE to index archived spaces. CrawlArchivedSpaces bool // TRUE to index personal spaces. You can add restrictions to items in personal // spaces. If personal spaces are indexed, queries without user context information // may return restricted items from a personal space in their results. For more // information, see Filtering on user context (https://docs.aws.amazon.com/kendra/latest/dg/user-context-filter.html) // . CrawlPersonalSpaces bool // A list of space keys of Confluence spaces. If you include a key, the blogs, // documents, and attachments in the space are not indexed. If a space is in both // the ExcludeSpaces and the IncludeSpaces list, the space is excluded. ExcludeSpaces []string // A list of space keys for Confluence spaces. If you include a key, the blogs, // documents, and attachments in the space are indexed. Spaces that aren't in the // list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra // logs an error when the data source is synchronized. If a space is in both the // IncludeSpaces and the ExcludeSpaces list, the space is excluded. IncludeSpaces []string // Maps attributes or field names of Confluence spaces to Amazon Kendra index // field names. To create custom fields, use the UpdateIndex API before you map to // Confluence fields. For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Confluence data source field names must exist in your Confluence custom // metadata. If you specify the SpaceFieldMappings parameter, you must specify at // least one field mapping. SpaceFieldMappings []ConfluenceSpaceToIndexFieldMapping noSmithyDocumentSerde } // Maps attributes or field names of Confluence spaces to Amazon Kendra index // field names. To create custom fields, use the UpdateIndex API before you map to // Confluence fields. For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Confluence data source field names must exist in your Confluence custom // metadata. type ConfluenceSpaceToIndexFieldMapping struct { // The name of the field in the data source. DataSourceFieldName ConfluenceSpaceFieldName // The format for date fields in the data source. If the field specified in // DataSourceFieldName is a date field you must specify the date format. If the // field is not a date field, an exception is thrown. DateFieldFormat *string // The name of the index field to map to the Confluence data source field. The // index field type must match the Confluence field type. IndexFieldName *string noSmithyDocumentSerde } // Provides the configuration information that's required to connect to a database. type ConnectionConfiguration struct { // The name of the host for the database. Can be either a string // (host.subdomain.domain.tld) or an IPv4 or IPv6 address. // // This member is required. DatabaseHost *string // The name of the database containing the document data. // // This member is required. DatabaseName *string // The port that the database uses for connections. // // This member is required. DatabasePort *int32 // The Amazon Resource Name (ARN) of credentials stored in Secrets Manager. The // credentials should be a user/password pair. For more information, see Using a // Database Data Source (https://docs.aws.amazon.com/kendra/latest/dg/data-source-database.html) // . For more information about Secrets Manager, see What Is Secrets Manager (https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html) // in the Secrets Manager user guide. // // This member is required. SecretArn *string // The name of the table that contains the document data. // // This member is required. TableName *string noSmithyDocumentSerde } // Provides the configuration information for your content sources, such as data // sources, FAQs, and content indexed directly via BatchPutDocument (https://docs.aws.amazon.com/kendra/latest/dg/API_BatchPutDocument.html) // . type ContentSourceConfiguration struct { // The identifier of the data sources you want to use for your Amazon Kendra // experience. DataSourceIds []string // TRUE to use documents you indexed directly using the BatchPutDocument API. DirectPutContent bool // The identifier of the FAQs that you want to use for your Amazon Kendra // experience. FaqIds []string noSmithyDocumentSerde } // A corrected misspelled word in a query. type Correction struct { // The zero-based location in the response string or text where the corrected word // starts. BeginOffset *int32 // The string or text of a corrected misspelled word in a query. CorrectedTerm *string // The zero-based location in the response string or text where the corrected word // ends. EndOffset *int32 // The string or text of a misspelled word in a query. Term *string noSmithyDocumentSerde } // Provides the configuration information for altering document metadata and // content during the document ingestion process. For more information, see // Customizing document metadata during the ingestion process (https://docs.aws.amazon.com/kendra/latest/dg/custom-document-enrichment.html) // . type CustomDocumentEnrichmentConfiguration struct { // Configuration information to alter document attributes or metadata fields and // content when ingesting documents into Amazon Kendra. InlineConfigurations []InlineCustomDocumentEnrichmentConfiguration // Configuration information for invoking a Lambda function in Lambda on the // structured documents with their metadata and text extracted. You can use a // Lambda function to apply advanced logic for creating, modifying, or deleting // document metadata and content. For more information, see Advanced data // manipulation (https://docs.aws.amazon.com/kendra/latest/dg/custom-document-enrichment.html#advanced-data-manipulation) // . PostExtractionHookConfiguration *HookConfiguration // Configuration information for invoking a Lambda function in Lambda on the // original or raw documents before extracting their metadata and text. You can use // a Lambda function to apply advanced logic for creating, modifying, or deleting // document metadata and content. For more information, see Advanced data // manipulation (https://docs.aws.amazon.com/kendra/latest/dg/custom-document-enrichment.html#advanced-data-manipulation) // . PreExtractionHookConfiguration *HookConfiguration // The Amazon Resource Name (ARN) of a role with permission to run // PreExtractionHookConfiguration and PostExtractionHookConfiguration for altering // document metadata and content during the document ingestion process. For more // information, see IAM roles for Amazon Kendra (https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html) // . RoleArn *string noSmithyDocumentSerde } // Provides the configuration information to connect to a index. type DatabaseConfiguration struct { // Information about where the index should get the document information from the // database. // // This member is required. ColumnConfiguration *ColumnConfiguration // Configuration information that's required to connect to a database. // // This member is required. ConnectionConfiguration *ConnectionConfiguration // The type of database engine that runs the database. // // This member is required. DatabaseEngineType DatabaseEngineType // Information about the database column that provides information for user // context filtering. AclConfiguration *AclConfiguration // Provides information about how Amazon Kendra uses quote marks around SQL // identifiers when querying a database data source. SqlConfiguration *SqlConfiguration // Provides the configuration information to connect to an Amazon VPC. VpcConfiguration *DataSourceVpcConfiguration noSmithyDocumentSerde } // Provides the configuration information for an Amazon Kendra data source. type DataSourceConfiguration struct { // Provides the configuration information to connect to Alfresco as your data // source. Support for AlfrescoConfiguration ended May 2023. We recommend // migrating to or using the Alfresco data source template schema / // TemplateConfiguration (https://docs.aws.amazon.com/kendra/latest/APIReference/API_TemplateConfiguration.html) // API. // // Deprecated: Deprecated AlfrescoConfiguration in favor of TemplateConfiguration AlfrescoConfiguration *AlfrescoConfiguration // Provides the configuration information to connect to Box as your data source. BoxConfiguration *BoxConfiguration // Provides the configuration information to connect to Confluence as your data // source. ConfluenceConfiguration *ConfluenceConfiguration // Provides the configuration information to connect to a database as your data // source. DatabaseConfiguration *DatabaseConfiguration // Provides the configuration information to connect to Amazon FSx as your data // source. FsxConfiguration *FsxConfiguration // Provides the configuration information to connect to GitHub as your data source. GitHubConfiguration *GitHubConfiguration // Provides the configuration information to connect to Google Drive as your data // source. GoogleDriveConfiguration *GoogleDriveConfiguration // Provides the configuration information to connect to Jira as your data source. JiraConfiguration *JiraConfiguration // Provides the configuration information to connect to Microsoft OneDrive as your // data source. OneDriveConfiguration *OneDriveConfiguration // Provides the configuration information to connect to Quip as your data source. QuipConfiguration *QuipConfiguration // Provides the configuration information to connect to an Amazon S3 bucket as // your data source. S3Configuration *S3DataSourceConfiguration // Provides the configuration information to connect to Salesforce as your data // source. SalesforceConfiguration *SalesforceConfiguration // Provides the configuration information to connect to ServiceNow as your data // source. ServiceNowConfiguration *ServiceNowConfiguration // Provides the configuration information to connect to Microsoft SharePoint as // your data source. SharePointConfiguration *SharePointConfiguration // Provides the configuration information to connect to Slack as your data source. SlackConfiguration *SlackConfiguration // Provides a template for the configuration information to connect to your data // source. TemplateConfiguration *TemplateConfiguration // Provides the configuration information required for Amazon Kendra Web Crawler. WebCrawlerConfiguration *WebCrawlerConfiguration // Provides the configuration information to connect to Amazon WorkDocs as your // data source. WorkDocsConfiguration *WorkDocsConfiguration noSmithyDocumentSerde } // Data source information for user context filtering. type DataSourceGroup struct { // The identifier of the data source group you want to add to your list of data // source groups. This is for filtering search results based on the groups' access // to documents in that data source. // // This member is required. DataSourceId *string // The identifier of the group you want to add to your list of groups. This is for // filtering search results based on the groups' access to documents. // // This member is required. GroupId *string noSmithyDocumentSerde } // Summary information for a Amazon Kendra data source. type DataSourceSummary struct { // The Unix timestamp when the data source connector was created. CreatedAt *time.Time // The identifier for the data source. Id *string // The code for a language. This shows a supported language for all documents in // the data source. English is supported by default. For more information on // supported languages, including their codes, see Adding documents in languages // other than English (https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html) // . LanguageCode *string // The name of the data source. Name *string // The status of the data source. When the status is ACTIVE the data source is // ready to use. Status DataSourceStatus // The type of the data source. Type DataSourceType // The Unix timestamp when the data source connector was last updated. UpdatedAt *time.Time noSmithyDocumentSerde } // Provides information about a data source synchronization job. type DataSourceSyncJob struct { // If the reason that the synchronization failed is due to an error with the // underlying data source, this field contains a code that identifies the error. DataSourceErrorCode *string // The Unix timestamp when the synchronization job completed. EndTime *time.Time // If the Status field is set to FAILED , the ErrorCode field indicates the reason // the synchronization failed. ErrorCode ErrorCode // If the Status field is set to ERROR , the ErrorMessage field contains a // description of the error that caused the synchronization to fail. ErrorMessage *string // A identifier for the synchronization job. ExecutionId *string // Maps a batch delete document request to a specific data source sync job. This // is optional and should only be supplied when documents are deleted by a data // source connector. Metrics *DataSourceSyncJobMetrics // The Unix timestamp when the synchronization job started. StartTime *time.Time // The execution status of the synchronization job. When the Status field is set // to SUCCEEDED , the synchronization job is done. If the status code is set to // FAILED , the ErrorCode and ErrorMessage fields give you the reason for the // failure. Status DataSourceSyncJobStatus noSmithyDocumentSerde } // Maps a batch delete document request to a specific data source sync job. This // is optional and should only be supplied when documents are deleted by a data // source connector. type DataSourceSyncJobMetrics struct { // The number of documents added from the data source up to now in the data source // sync. DocumentsAdded *string // The number of documents deleted from the data source up to now in the data // source sync run. DocumentsDeleted *string // The number of documents that failed to sync from the data source up to now in // the data source sync run. DocumentsFailed *string // The number of documents modified in the data source up to now in the data // source sync run. DocumentsModified *string // The current number of documents crawled by the current sync job in the data // source. DocumentsScanned *string noSmithyDocumentSerde } // Maps a particular data source sync job to a particular data source. type DataSourceSyncJobMetricTarget struct { // The ID of the data source that is running the sync job. // // This member is required. DataSourceId *string // The ID of the sync job that is running on the data source. If the ID of a sync // job is not provided and there is a sync job running, then the ID of this sync // job is used and metrics are generated for this sync job. If the ID of a sync job // is not provided and there is no sync job running, then no metrics are generated // and documents are indexed/deleted at the index level without sync job metrics // included. DataSourceSyncJobId *string noSmithyDocumentSerde } // Maps a column or attribute in the data source to an index field. You must first // create the fields in the index using the UpdateIndex API. type DataSourceToIndexFieldMapping struct { // The name of the column or attribute in the data source. // // This member is required. DataSourceFieldName *string // The name of the field in the index. // // This member is required. IndexFieldName *string // The type of data stored in the column or attribute. DateFieldFormat *string noSmithyDocumentSerde } // Provides the configuration information to connect to an Amazon VPC. type DataSourceVpcConfiguration struct { // A list of identifiers of security groups within your Amazon VPC. The security // groups should enable Amazon Kendra to connect to the data source. // // This member is required. SecurityGroupIds []string // A list of identifiers for subnets within your Amazon VPC. The subnets should be // able to connect to each other in the VPC, and they should have outgoing access // to the Internet through a NAT device. // // This member is required. SubnetIds []string noSmithyDocumentSerde } // A document in an index. type Document struct { // A identifier of the document in the index. Note, each document ID must be // unique per index. You cannot create a data source to index your documents with // their unique IDs and then use the BatchPutDocument API to index the same // documents, or vice versa. You can delete a data source and then use the // BatchPutDocument API to index the same documents, or vice versa. // // This member is required. Id *string // The identifier of the access control configuration that you want to apply to // the document. AccessControlConfigurationId *string // Information on principals (users and/or groups) and which documents they should // have access to. This is useful for user context filtering, where search results // are filtered based on the user or their group access to documents. AccessControlList []Principal // Custom attributes to apply to the document. Use the custom attributes to // provide additional information for searching, to provide facets for refining // searches, and to provide additional information in the query response. For // example, 'DataSourceId' and 'DataSourceSyncJobId' are custom attributes that // provide information on the synchronization of documents running on a data // source. Note, 'DataSourceSyncJobId' could be an optional custom attribute as // Amazon Kendra will use the ID of a running sync job. Attributes []DocumentAttribute // The contents of the document. Documents passed to the Blob parameter must be // base64 encoded. Your code might not need to encode the document file bytes if // you're using an Amazon Web Services SDK to call Amazon Kendra APIs. If you are // calling the Amazon Kendra endpoint directly using REST, you must base64 encode // the contents before sending. Blob []byte // The file type of the document in the Blob field. If you want to index snippets // or subsets of HTML documents instead of the entirety of the HTML documents, you // must add the HTML start and closing tags ( content ) around the content. ContentType ContentType // The list of principal (https://docs.aws.amazon.com/kendra/latest/dg/API_Principal.html) // lists that define the hierarchy for which documents users should have access to. HierarchicalAccessControlList []HierarchicalPrincipal // Information required to find a specific file in an Amazon S3 bucket. S3Path *S3Path // The title of the document. Title *string noSmithyDocumentSerde } // A document attribute or metadata field. To create custom document attributes, // see Custom attributes (https://docs.aws.amazon.com/kendra/latest/dg/custom-attributes.html) // . type DocumentAttribute struct { // The identifier for the attribute. // // This member is required. Key *string // The value of the attribute. // // This member is required. Value *DocumentAttributeValue noSmithyDocumentSerde } // The condition used for the target document attribute or metadata field when // ingesting documents into Amazon Kendra. You use this with // DocumentAttributeTarget to apply the condition (https://docs.aws.amazon.com/kendra/latest/dg/API_DocumentAttributeTarget.html) // . For example, you can create the 'Department' target field and have it prefill // department names associated with the documents based on information in the // 'Source_URI' field. Set the condition that if the 'Source_URI' field contains // 'financial' in its URI value, then prefill the target field 'Department' with // the target value 'Finance' for the document. Amazon Kendra cannot create a // target field if it has not already been created as an index field. After you // create your index field, you can create a document metadata field using // DocumentAttributeTarget . Amazon Kendra then will map your newly created // metadata field to your index field. type DocumentAttributeCondition struct { // The identifier of the document attribute used for the condition. For example, // 'Source_URI' could be an identifier for the attribute or metadata field that // contains source URIs associated with the documents. Amazon Kendra currently does // not support _document_body as an attribute key used for the condition. // // This member is required. ConditionDocumentAttributeKey *string // The condition operator. For example, you can use 'Contains' to partially match // a string. // // This member is required. Operator ConditionOperator // The value used by the operator. For example, you can specify the value // 'financial' for strings in the 'Source_URI' field that partially match or // contain this value. ConditionOnValue *DocumentAttributeValue noSmithyDocumentSerde } // The target document attribute or metadata field you want to alter when // ingesting documents into Amazon Kendra. For example, you can delete customer // identification numbers associated with the documents, stored in the document // metadata field called 'Customer_ID'. You set the target key as 'Customer_ID' and // the deletion flag to TRUE . This removes all customer ID values in the field // 'Customer_ID'. This would scrub personally identifiable information from each // document's metadata. Amazon Kendra cannot create a target field if it has not // already been created as an index field. After you create your index field, you // can create a document metadata field using DocumentAttributeTarget . Amazon // Kendra then will map your newly created metadata field to your index field. You // can also use this with DocumentAttributeCondition (https://docs.aws.amazon.com/kendra/latest/dg/API_DocumentAttributeCondition.html) // . type DocumentAttributeTarget struct { // The identifier of the target document attribute or metadata field. For example, // 'Department' could be an identifier for the target attribute or metadata field // that includes the department names associated with the documents. TargetDocumentAttributeKey *string // The target value you want to create for the target attribute. For example, // 'Finance' could be the target value for the target attribute key 'Department'. TargetDocumentAttributeValue *DocumentAttributeValue // TRUE to delete the existing target value for your specified target attribute // key. You cannot create a target value and set this to TRUE . To create a target // value ( TargetDocumentAttributeValue ), set this to FALSE . TargetDocumentAttributeValueDeletion bool noSmithyDocumentSerde } // The value of a document attribute. You can only provide one value for a // document attribute. type DocumentAttributeValue struct { // A date expressed as an ISO 8601 string. It is important for the time zone to be // included in the ISO 8601 date-time format. For example, // 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 // at 12:30PM (plus 10 seconds) in Central European Time. DateValue *time.Time // A long integer value. LongValue *int64 // A list of strings. The default maximum length or number of strings is 10. StringListValue []string // A string, such as "department". StringValue *string noSmithyDocumentSerde } // Provides the count of documents that match a particular attribute when doing a // faceted search. type DocumentAttributeValueCountPair struct { // The number of documents in the response that have the attribute value for the // key. Count *int32 // The value of the attribute. For example, "HR". DocumentAttributeValue *DocumentAttributeValue // Contains the results of a document attribute that is a nested facet. A // FacetResult contains the counts for each facet nested within a facet. For // example, the document attribute or facet "Department" includes a value called // "Engineering". In addition, the document attribute or facet "SubDepartment" // includes the values "Frontend" and "Backend" for documents assigned to // "Engineering". You can display nested facets in the search results so that // documents can be searched not only by department but also by a sub department // within a department. The counts for documents that belong to "Frontend" and // "Backend" within "Engineering" are returned for a query. FacetResults []FacetResult noSmithyDocumentSerde } // Identifies a document for which to retrieve status information type DocumentInfo struct { // The identifier of the document. // // This member is required. DocumentId *string // Attributes that identify a specific version of a document to check. The only // valid attributes are: // - version // - datasourceId // - jobExecutionId // The attributes follow these rules: // - dataSourceId and jobExecutionId must be used together. // - version is ignored if dataSourceId and jobExecutionId are not provided. // - If dataSourceId and jobExecutionId are provided, but version is not, the // version defaults to "0". Attributes []DocumentAttribute noSmithyDocumentSerde } // Specifies the properties, such as relevance tuning and searchability, of an // index field. type DocumentMetadataConfiguration struct { // The name of the index field. // // This member is required. Name *string // The data type of the index field. // // This member is required. Type DocumentAttributeValueType // Provides tuning parameters to determine how the field affects the search // results. Relevance *Relevance // Provides information about how the field is used during a search. Search *Search noSmithyDocumentSerde } // Overrides the document relevance properties of a custom index field. type DocumentRelevanceConfiguration struct { // The name of the index field. // // This member is required. Name *string // Provides information for tuning the relevance of a field in a search. When a // query includes terms that match the field, the results are given a boost in the // response based on these tuning parameters. // // This member is required. Relevance *Relevance noSmithyDocumentSerde } // Document metadata files that contain information such as the document access // control information, source URI, document author, and custom attributes. Each // metadata file contains metadata about a single document. type DocumentsMetadataConfiguration struct { // A prefix used to filter metadata configuration files in the Amazon Web Services // S3 bucket. The S3 bucket might contain multiple metadata files. Use S3Prefix to // include only the desired metadata files. S3Prefix *string noSmithyDocumentSerde } // Provides the configuration information for users or groups in your IAM Identity // Center identity source to grant access your Amazon Kendra experience. type EntityConfiguration struct { // The identifier of a user or group in your IAM Identity Center identity source. // For example, a user ID could be an email. // // This member is required. EntityId *string // Specifies whether you are configuring a User or a Group . // // This member is required. EntityType EntityType noSmithyDocumentSerde } // Information about the user entity. type EntityDisplayData struct { // The first name of the user. FirstName *string // The name of the group. GroupName *string // The user name of the user. IdentifiedUserName *string // The last name of the user. LastName *string // The name of the user. UserName *string noSmithyDocumentSerde } // Provides the configuration information for users or groups in your IAM Identity // Center identity source for access to your Amazon Kendra experience. Specific // permissions are defined for each user or group once they are granted access to // your Amazon Kendra experience. type EntityPersonaConfiguration struct { // The identifier of a user or group in your IAM Identity Center identity source. // For example, a user ID could be an email. // // This member is required. EntityId *string // The persona that defines the specific permissions of the user or group in your // IAM Identity Center identity source. The available personas or access roles are // Owner and Viewer . For more information on these personas, see Providing access // to your search page (https://docs.aws.amazon.com/kendra/latest/dg/deploying-search-experience-no-code.html#access-search-experience) // . // // This member is required. Persona Persona noSmithyDocumentSerde } // Provides the configuration information for your Amazon Kendra experience. This // includes the data source IDs and/or FAQ IDs, and user or group information to // grant access to your Amazon Kendra experience. type ExperienceConfiguration struct { // The identifiers of your data sources and FAQs. Or, you can specify that you // want to use documents indexed via the BatchPutDocument API. This is the content // you want to use for your Amazon Kendra experience. ContentSourceConfiguration *ContentSourceConfiguration // The IAM Identity Center field name that contains the identifiers of your users, // such as their emails. UserIdentityConfiguration *UserIdentityConfiguration noSmithyDocumentSerde } // Provides the configuration information for the endpoint for your Amazon Kendra // experience. type ExperienceEndpoint struct { // The endpoint of your Amazon Kendra experience. Endpoint *string // The type of endpoint for your Amazon Kendra experience. The type currently // available is HOME , which is a unique and fully hosted URL to the home page of // your Amazon Kendra experience. EndpointType EndpointType noSmithyDocumentSerde } // Summary information for users or groups in your IAM Identity Center identity // source with granted access to your Amazon Kendra experience. You can create an // Amazon Kendra experience such as a search application. For more information on // creating a search application experience, see Building a search experience with // no code (https://docs.aws.amazon.com/kendra/latest/dg/deploying-search-experience-no-code.html) // . type ExperienceEntitiesSummary struct { // Information about the user entity. DisplayData *EntityDisplayData // The identifier of a user or group in your IAM Identity Center identity source. // For example, a user ID could be an email. EntityId *string // Shows the type as User or Group . EntityType EntityType noSmithyDocumentSerde } // Summary information for your Amazon Kendra experience. You can create an Amazon // Kendra experience such as a search application. For more information on creating // a search application experience, see Building a search experience with no code (https://docs.aws.amazon.com/kendra/latest/dg/deploying-search-experience-no-code.html) // . type ExperiencesSummary struct { // The Unix timestamp when your Amazon Kendra experience was created. CreatedAt *time.Time // The endpoint URLs for your Amazon Kendra experiences. The URLs are unique and // fully hosted by Amazon Web Services. Endpoints []ExperienceEndpoint // The identifier of your Amazon Kendra experience. Id *string // The name of your Amazon Kendra experience. Name *string // The processing status of your Amazon Kendra experience. Status ExperienceStatus noSmithyDocumentSerde } // Information about a document attribute. You can use document attributes as // facets. For example, the document attribute or facet "Department" includes the // values "HR", "Engineering", and "Accounting". You can display these values in // the search results so that documents can be searched by department. You can // display up to 10 facet values per facet for a query. If you want to increase // this limit, contact Support (http://aws.amazon.com/contact-us/) . type Facet struct { // The unique key for the document attribute. DocumentAttributeKey *string // An array of document attributes that are nested facets within a facet. For // example, the document attribute or facet "Department" includes a value called // "Engineering". In addition, the document attribute or facet "SubDepartment" // includes the values "Frontend" and "Backend" for documents assigned to // "Engineering". You can display nested facets in the search results so that // documents can be searched not only by department but also by a sub department // within a department. This helps your users further narrow their search. You can // only have one nested facet within a facet. If you want to increase this limit, // contact Support (http://aws.amazon.com/contact-us/) . Facets []Facet // Maximum number of facet values per facet. The default is 10. You can use this // to limit the number of facet values to less than 10. If you want to increase the // default, contact Support (http://aws.amazon.com/contact-us/) . MaxResults int32 noSmithyDocumentSerde } // The facet values for the documents in the response. type FacetResult struct { // The key for the facet values. This is the same as the DocumentAttributeKey // provided in the query. DocumentAttributeKey *string // An array of key/value pairs, where the key is the value of the attribute and // the count is the number of documents that share the key value. DocumentAttributeValueCountPairs []DocumentAttributeValueCountPair // The data type of the facet value. This is the same as the type defined for the // index field when it was created. DocumentAttributeValueType DocumentAttributeValueType noSmithyDocumentSerde } // Information on the users or groups in your IAM Identity Center identity source // that failed to properly configure with your Amazon Kendra experience. type FailedEntity struct { // The identifier of the user or group in your IAM Identity Center identity // source. For example, a user ID could be an email. EntityId *string // The reason the user or group in your IAM Identity Center identity source failed // to properly configure with your Amazon Kendra experience. ErrorMessage *string noSmithyDocumentSerde } // Provides statistical information about the FAQ questions and answers contained // in an index. type FaqStatistics struct { // The total number of FAQ questions and answers contained in the index. // // This member is required. IndexedQuestionAnswersCount int32 noSmithyDocumentSerde } // Summary information for frequently asked questions and answers included in an // index. type FaqSummary struct { // The Unix timestamp when the FAQ was created. CreatedAt *time.Time // The file type used to create the FAQ. FileFormat FaqFileFormat // The identifier of the FAQ. Id *string // The code for a language. This shows a supported language for the FAQ document // as part of the summary information for FAQs. English is supported by default. // For more information on supported languages, including their codes, see Adding // documents in languages other than English (https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html) // . LanguageCode *string // The name that you assigned the FAQ when you created or updated the FAQ. Name *string // The current status of the FAQ. When the status is ACTIVE the FAQ is ready for // use. Status FaqStatus // The Unix timestamp when the FAQ was last updated. UpdatedAt *time.Time noSmithyDocumentSerde } // A featured document. This document is displayed at the top of the search // results page, placed above all other results for certain queries. If there's an // exact match of a query, then the document is featured in the search results. type FeaturedDocument struct { // The identifier of the document to feature in the search results. You can use // the Query (https://docs.aws.amazon.com/kendra/latest/dg/API_Query.html) API to // search for specific documents with their document IDs included in the result // items, or you can use the console. Id *string noSmithyDocumentSerde } // A document ID doesn't exist but you have specified as a featured document. // Amazon Kendra cannot feature the document if it doesn't exist in the index. You // can check the status of a document and its ID or check for documents with status // errors using the BatchGetDocumentStatus (https://docs.aws.amazon.com/kendra/latest/dg/API_BatchGetDocumentStatus.html) // API. type FeaturedDocumentMissing struct { // The identifier of the document that doesn't exist but you have specified as a // featured document. Id *string noSmithyDocumentSerde } // A featured document with its metadata information. This document is displayed // at the top of the search results page, placed above all other results for // certain queries. If there's an exact match of a query, then the document is // featured in the search results. type FeaturedDocumentWithMetadata struct { // The identifier of the featured document with its metadata. You can use the Query (https://docs.aws.amazon.com/kendra/latest/dg/API_Query.html) // API to search for specific documents with their document IDs included in the // result items, or you can use the console. Id *string // The main title of the featured document. Title *string // The source URI location of the featured document. URI *string noSmithyDocumentSerde } // A single featured result item. A featured result is displayed at the top of the // search results page, placed above all other results for certain queries. If // there's an exact match of a query, then certain documents are featured in the // search results. type FeaturedResultsItem struct { // One or more additional attributes associated with the featured result. AdditionalAttributes []AdditionalResultAttribute // An array of document attributes assigned to a featured document in the search // results. For example, the document author ( _author ) or the source URI ( // _source_uri ) of the document. DocumentAttributes []DocumentAttribute // Provides text and information about where to highlight the text. DocumentExcerpt *TextWithHighlights // The identifier of the featured document. DocumentId *string // Provides text and information about where to highlight the text. DocumentTitle *TextWithHighlights // The source URI location of the featured document. DocumentURI *string // A token that identifies a particular featured result from a particular query. // Use this token to provide click-through feedback for the result. For more // information, see Submitting feedback (https://docs.aws.amazon.com/kendra/latest/dg/submitting-feedback.html) // . FeedbackToken *string // The identifier of the featured result. Id *string // The type of document within the featured result response. For example, a // response could include a question-answer type that's relevant to the query. Type QueryResultType noSmithyDocumentSerde } // A set of featured results that are displayed at the top of your search results. // Featured results are placed above all other results for certain queries. If // there's an exact match of a query, then one or more specific documents are // featured in the search results. type FeaturedResultsSet struct { // The Unix timestamp when the set of featured results was created. CreationTimestamp *int64 // The description for the set of featured results. Description *string // The list of document IDs for the documents you want to feature at the top of // the search results page. You can use the Query (https://docs.aws.amazon.com/kendra/latest/dg/API_Query.html) // API to search for specific documents with their document IDs included in the // result items, or you can use the console. You can add up to four featured // documents. You can request to increase this limit by contacting Support (http://aws.amazon.com/contact-us/) // . Specific queries are mapped to specific documents for featuring in the // results. If a query contains an exact match, then one or more specific documents // are featured in the results. The exact match applies to the full query. For // example, if you only specify 'Kendra', queries such as 'How does kendra // semantically rank results?' will not render the featured results. Featured // results are designed for specific queries, rather than queries that are too // broad in scope. FeaturedDocuments []FeaturedDocument // The identifier of the set of featured results. FeaturedResultsSetId *string // The name for the set of featured results. FeaturedResultsSetName *string // The Unix timestamp when the set of featured results was last updated. LastUpdatedTimestamp *int64 // The list of queries for featuring results. Specific queries are mapped to // specific documents for featuring in the results. If a query contains an exact // match, then one or more specific documents are featured in the results. The // exact match applies to the full query. For example, if you only specify // 'Kendra', queries such as 'How does kendra semantically rank results?' will not // render the featured results. Featured results are designed for specific queries, // rather than queries that are too broad in scope. QueryTexts []string // The current status of the set of featured results. When the value is ACTIVE , // featured results are ready for use. You can still configure your settings before // setting the status to ACTIVE . You can set the status to ACTIVE or INACTIVE // using the UpdateFeaturedResultsSet (https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateFeaturedResultsSet.html) // API. The queries you specify for featured results must be unique per featured // results set for each index, whether the status is ACTIVE or INACTIVE . Status FeaturedResultsSetStatus noSmithyDocumentSerde } // Summary information for a set of featured results. Featured results are placed // above all other results for certain queries. If there's an exact match of a // query, then one or more specific documents are featured in the search results. type FeaturedResultsSetSummary struct { // The Unix timestamp when the set of featured results was created. CreationTimestamp *int64 // The identifier of the set of featured results. FeaturedResultsSetId *string // The name for the set of featured results. FeaturedResultsSetName *string // The Unix timestamp when the set of featured results was last updated. LastUpdatedTimestamp *int64 // The current status of the set of featured results. When the value is ACTIVE , // featured results are ready for use. You can still configure your settings before // setting the status to ACTIVE . You can set the status to ACTIVE or INACTIVE // using the UpdateFeaturedResultsSet (https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateFeaturedResultsSet.html) // API. The queries you specify for featured results must be unique per featured // results set for each index, whether the status is ACTIVE or INACTIVE . Status FeaturedResultsSetStatus noSmithyDocumentSerde } // Provides the configuration information to connect to Amazon FSx as your data // source. type FsxConfiguration struct { // The identifier of the Amazon FSx file system. You can find your file system ID // on the file system dashboard in the Amazon FSx console. For information on how // to create a file system in Amazon FSx console, using Windows File Server as an // example, see Amazon FSx Getting started guide (https://docs.aws.amazon.com/fsx/latest/WindowsGuide/getting-started-step1.html) // . // // This member is required. FileSystemId *string // The Amazon FSx file system type. Windows is currently the only supported type. // // This member is required. FileSystemType FsxFileSystemType // Configuration information for an Amazon Virtual Private Cloud to connect to // your Amazon FSx. Your Amazon FSx instance must reside inside your VPC. // // This member is required. VpcConfiguration *DataSourceVpcConfiguration // A list of regular expression patterns to exclude certain files in your Amazon // FSx file system. Files that match the patterns are excluded from the index. // Files that don't match the patterns are included in the index. If a file matches // both an inclusion and exclusion pattern, the exclusion pattern takes precedence // and the file isn't included in the index. ExclusionPatterns []string // A list of DataSourceToIndexFieldMapping objects that map Amazon FSx data source // attributes or field names to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to Amazon FSx fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Amazon FSx data source field names must exist in your Amazon FSx custom // metadata. FieldMappings []DataSourceToIndexFieldMapping // A list of regular expression patterns to include certain files in your Amazon // FSx file system. Files that match the patterns are included in the index. Files // that don't match the patterns are excluded from the index. If a file matches // both an inclusion and exclusion pattern, the exclusion pattern takes precedence // and the file isn't included in the index. InclusionPatterns []string // The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the // key-value pairs required to connect to your Amazon FSx file system. Windows is // currently the only supported type. The secret must contain a JSON structure with // the following keys: // - username—The Active Directory user name, along with the Domain Name System // (DNS) domain name. For example, user@corp.example.com. The Active Directory user // account must have read and mounting access to the Amazon FSx file system for // Windows. // - password—The password of the Active Directory user account with read and // mounting access to the Amazon FSx Windows file system. SecretArn *string noSmithyDocumentSerde } // Provides the configuration information to connect to GitHub as your data source. type GitHubConfiguration struct { // The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the // key-value pairs required to connect to your GitHub. The secret must contain a // JSON structure with the following keys: // - personalToken—The access token created in GitHub. For more information on // creating a token in GitHub, see Using a GitHub data source (https://docs.aws.amazon.com/kendra/latest/dg/data-source-github.html) // . // // This member is required. SecretArn *string // A list of regular expression patterns to exclude certain file names in your // GitHub repository or repositories. File names that match the patterns are // excluded from the index. File names that don't match the patterns are included // in the index. If a file matches both an exclusion and inclusion pattern, the // exclusion pattern takes precedence and the file isn't included in the index. ExclusionFileNamePatterns []string // A list of regular expression patterns to exclude certain file types in your // GitHub repository or repositories. File types that match the patterns are // excluded from the index. File types that don't match the patterns are included // in the index. If a file matches both an exclusion and inclusion pattern, the // exclusion pattern takes precedence and the file isn't included in the index. ExclusionFileTypePatterns []string // A list of regular expression patterns to exclude certain folder names in your // GitHub repository or repositories. Folder names that match the patterns are // excluded from the index. Folder names that don't match the patterns are included // in the index. If a folder matches both an exclusion and inclusion pattern, the // exclusion pattern takes precedence and the folder isn't included in the index. ExclusionFolderNamePatterns []string // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of GitHub commits to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to GitHub fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The GitHub data source field names must exist in your GitHub custom metadata. GitHubCommitConfigurationFieldMappings []DataSourceToIndexFieldMapping // Configuration information to include certain types of GitHub content. You can // configure to index repository files only, or also include issues and pull // requests, comments, and comment attachments. GitHubDocumentCrawlProperties *GitHubDocumentCrawlProperties // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of GitHub issue attachments to Amazon Kendra index field names. To create // custom fields, use the UpdateIndex API before you map to GitHub fields. For // more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The GitHub data source field names must exist in your GitHub custom metadata. GitHubIssueAttachmentConfigurationFieldMappings []DataSourceToIndexFieldMapping // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of GitHub issue comments to Amazon Kendra index field names. To create // custom fields, use the UpdateIndex API before you map to GitHub fields. For // more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The GitHub data source field names must exist in your GitHub custom metadata. GitHubIssueCommentConfigurationFieldMappings []DataSourceToIndexFieldMapping // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of GitHub issues to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to GitHub fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The GitHub data source field names must exist in your GitHub custom metadata. GitHubIssueDocumentConfigurationFieldMappings []DataSourceToIndexFieldMapping // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of GitHub pull request comments to Amazon Kendra index field names. To // create custom fields, use the UpdateIndex API before you map to GitHub fields. // For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The GitHub data source field names must exist in your GitHub custom metadata. GitHubPullRequestCommentConfigurationFieldMappings []DataSourceToIndexFieldMapping // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of GitHub pull request attachments to Amazon Kendra index field names. To // create custom fields, use the UpdateIndex API before you map to GitHub fields. // For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The GitHub data source field names must exist in your GitHub custom metadata. GitHubPullRequestDocumentAttachmentConfigurationFieldMappings []DataSourceToIndexFieldMapping // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of GitHub pull requests to Amazon Kendra index field names. To create // custom fields, use the UpdateIndex API before you map to GitHub fields. For // more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The GitHub data source field names must exist in your GitHub custom metadata. GitHubPullRequestDocumentConfigurationFieldMappings []DataSourceToIndexFieldMapping // A list of DataSourceToIndexFieldMapping objects that map GitHub repository // attributes or field names to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to GitHub fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The GitHub data source field names must exist in your GitHub custom metadata. GitHubRepositoryConfigurationFieldMappings []DataSourceToIndexFieldMapping // A list of regular expression patterns to include certain file names in your // GitHub repository or repositories. File names that match the patterns are // included in the index. File names that don't match the patterns are excluded // from the index. If a file matches both an inclusion and exclusion pattern, the // exclusion pattern takes precedence and the file isn't included in the index. InclusionFileNamePatterns []string // A list of regular expression patterns to include certain file types in your // GitHub repository or repositories. File types that match the patterns are // included in the index. File types that don't match the patterns are excluded // from the index. If a file matches both an inclusion and exclusion pattern, the // exclusion pattern takes precedence and the file isn't included in the index. InclusionFileTypePatterns []string // A list of regular expression patterns to include certain folder names in your // GitHub repository or repositories. Folder names that match the patterns are // included in the index. Folder names that don't match the patterns are excluded // from the index. If a folder matches both an inclusion and exclusion pattern, the // exclusion pattern takes precedence and the folder isn't included in the index. InclusionFolderNamePatterns []string // Configuration information to connect to GitHub Enterprise Server (on premises). OnPremiseConfiguration *OnPremiseConfiguration // A list of names of the specific repositories you want to index. RepositoryFilter []string // Configuration information to connect to GitHub Enterprise Cloud (SaaS). SaaSConfiguration *SaaSConfiguration // The type of GitHub service you want to connect to—GitHub Enterprise Cloud // (SaaS) or GitHub Enterprise Server (on premises). Type Type // TRUE to use the GitHub change log to determine which documents require updating // in the index. Depending on the GitHub change log's size, it may take longer for // Amazon Kendra to use the change log than to scan all of your documents in // GitHub. UseChangeLog bool // Configuration information of an Amazon Virtual Private Cloud to connect to your // GitHub. For more information, see Configuring a VPC (https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html) // . VpcConfiguration *DataSourceVpcConfiguration noSmithyDocumentSerde } // Provides the configuration information to include certain types of GitHub // content. You can configure to index repository files only, or also include // issues and pull requests, comments, and comment attachments. type GitHubDocumentCrawlProperties struct { // TRUE to index all issues within a repository. CrawlIssue bool // TRUE to index all comments on issues. CrawlIssueComment bool // TRUE to include all comment attachments for issues. CrawlIssueCommentAttachment bool // TRUE to index all pull requests within a repository. CrawlPullRequest bool // TRUE to index all comments on pull requests. CrawlPullRequestComment bool // TRUE to include all comment attachments for pull requests. CrawlPullRequestCommentAttachment bool // TRUE to index all files with a repository. CrawlRepositoryDocuments bool noSmithyDocumentSerde } // Provides the configuration information to connect to Google Drive as your data // source. type GoogleDriveConfiguration struct { // The Amazon Resource Name (ARN) of a Secrets Managersecret that contains the // credentials required to connect to Google Drive. For more information, see // Using a Google Workspace Drive data source (https://docs.aws.amazon.com/kendra/latest/dg/data-source-google-drive.html) // . // // This member is required. SecretArn *string // A list of MIME types to exclude from the index. All documents matching the // specified MIME type are excluded. For a list of MIME types, see Using a Google // Workspace Drive data source (https://docs.aws.amazon.com/kendra/latest/dg/data-source-google-drive.html) // . ExcludeMimeTypes []string // A list of identifiers or shared drives to exclude from the index. All files and // folders stored on the shared drive are excluded. ExcludeSharedDrives []string // A list of email addresses of the users. Documents owned by these users are // excluded from the index. Documents shared with excluded users are indexed unless // they are excluded in another way. ExcludeUserAccounts []string // A list of regular expression patterns to exclude certain items in your Google // Drive, including shared drives and users' My Drives. Items that match the // patterns are excluded from the index. Items that don't match the patterns are // included in the index. If an item matches both an inclusion and exclusion // pattern, the exclusion pattern takes precedence and the item isn't included in // the index. ExclusionPatterns []string // Maps Google Drive data source attributes or field names to Amazon Kendra index // field names. To create custom fields, use the UpdateIndex API before you map to // Google Drive fields. For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Google Drive data source field names must exist in your Google Drive // custom metadata. FieldMappings []DataSourceToIndexFieldMapping // A list of regular expression patterns to include certain items in your Google // Drive, including shared drives and users' My Drives. Items that match the // patterns are included in the index. Items that don't match the patterns are // excluded from the index. If an item matches both an inclusion and exclusion // pattern, the exclusion pattern takes precedence and the item isn't included in // the index. InclusionPatterns []string noSmithyDocumentSerde } // A list of users or sub groups that belong to a group. This is useful for user // context filtering, where search results are filtered based on the user or their // group access to documents. type GroupMembers struct { // A list of sub groups that belong to a group. For example, the sub groups // "Research", "Engineering", and "Sales and Marketing" all belong to the group // "Company". MemberGroups []MemberGroup // A list of users that belong to a group. For example, a list of interns all // belong to the "Interns" group. MemberUsers []MemberUser // If you have more than 1000 users and/or sub groups for a single group, you need // to provide the path to the S3 file that lists your users and sub groups for a // group. Your sub groups can contain more than 1000 users, but the list of sub // groups that belong to a group (and/or users) must be no more than 1000. You can // download this example S3 file (https://docs.aws.amazon.com/kendra/latest/dg/samples/group_members.zip) // that uses the correct format for listing group members. Note, dataSourceId is // optional. The value of type for a group is always GROUP and for a user it is // always USER . S3PathforGroupMembers *S3Path noSmithyDocumentSerde } // Summary information on the processing of PUT and DELETE actions for mapping // users to their groups. type GroupOrderingIdSummary struct { // The reason an action could not be processed. An action can be a PUT or DELETE // action for mapping users to their groups. FailureReason *string // The Unix timestamp when an action was last updated. An action can be a PUT or // DELETE action for mapping users to their groups. LastUpdatedAt *time.Time // The order in which actions should complete processing. An action can be a PUT // or DELETE action for mapping users to their groups. OrderingId *int64 // The Unix timestamp when an action was received by Amazon Kendra. An action can // be a PUT or DELETE action for mapping users to their groups. ReceivedAt *time.Time // The current processing status of actions for mapping users to their groups. The // status can be either PROCESSING , SUCCEEDED , DELETING , DELETED , or FAILED . Status PrincipalMappingStatus noSmithyDocumentSerde } // Summary information for groups. type GroupSummary struct { // The identifier of the group you want group summary information on. GroupId *string // The timestamp identifier used for the latest PUT or DELETE action. OrderingId *int64 noSmithyDocumentSerde } // Information to define the hierarchy for which documents users should have // access to. type HierarchicalPrincipal struct { // A list of principal (https://docs.aws.amazon.com/kendra/latest/dg/API_Principal.html) // lists that define the hierarchy for which documents users should have access to. // Each hierarchical list specifies which user or group has allow or deny access // for each document. // // This member is required. PrincipalList []Principal noSmithyDocumentSerde } // Provides information that you can use to highlight a search result so that your // users can quickly identify terms in the response. type Highlight struct { // The zero-based location in the response string where the highlight starts. // // This member is required. BeginOffset *int32 // The zero-based location in the response string where the highlight ends. // // This member is required. EndOffset *int32 // Indicates whether the response is the best response. True if this is the best // response; otherwise, false. TopAnswer bool // The highlight type. Type HighlightType noSmithyDocumentSerde } // Provides the configuration information for invoking a Lambda function in Lambda // to alter document metadata and content when ingesting documents into Amazon // Kendra. You can configure your Lambda function using // PreExtractionHookConfiguration (https://docs.aws.amazon.com/kendra/latest/dg/API_CustomDocumentEnrichmentConfiguration.html) // if you want to apply advanced alterations on the original or raw documents. If // you want to apply advanced alterations on the Amazon Kendra structured // documents, you must configure your Lambda function using // PostExtractionHookConfiguration (https://docs.aws.amazon.com/kendra/latest/dg/API_CustomDocumentEnrichmentConfiguration.html) // . You can only invoke one Lambda function. However, this function can invoke // other functions it requires. For more information, see Customizing document // metadata during the ingestion process (https://docs.aws.amazon.com/kendra/latest/dg/custom-document-enrichment.html) // . type HookConfiguration struct { // The Amazon Resource Name (ARN) of a role with permission to run a Lambda // function during ingestion. For more information, see IAM roles for Amazon Kendra (https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html) // . // // This member is required. LambdaArn *string // Stores the original, raw documents or the structured, parsed documents before // and after altering them. For more information, see Data contracts for Lambda // functions (https://docs.aws.amazon.com/kendra/latest/dg/custom-document-enrichment.html#cde-data-contracts-lambda) // . // // This member is required. S3Bucket *string // The condition used for when a Lambda function should be invoked. For example, // you can specify a condition that if there are empty date-time values, then // Amazon Kendra should invoke a function that inserts the current date-time. InvocationCondition *DocumentAttributeCondition noSmithyDocumentSerde } // Summary information on the configuration of an index. type IndexConfigurationSummary struct { // The Unix timestamp when the index was created. // // This member is required. CreatedAt *time.Time // The current status of the index. When the status is ACTIVE , the index is ready // to search. // // This member is required. Status IndexStatus // The Unix timestamp when the index was last updated. // // This member is required. UpdatedAt *time.Time // Indicates whether the index is a Enterprise Edition index or a Developer // Edition index. Edition IndexEdition // A identifier for the index. Use this to identify the index when you are using // APIs such as Query , DescribeIndex , UpdateIndex , and DeleteIndex . Id *string // The name of the index. Name *string noSmithyDocumentSerde } // Provides information about the number of documents and the number of questions // and answers in an index. type IndexStatistics struct { // The number of question and answer topics in the index. // // This member is required. FaqStatistics *FaqStatistics // The number of text documents indexed. // // This member is required. TextDocumentStatistics *TextDocumentStatistics noSmithyDocumentSerde } // Provides the configuration information for applying basic logic to alter // document metadata and content when ingesting documents into Amazon Kendra. To // apply advanced logic, to go beyond what you can do with basic logic, see // HookConfiguration (https://docs.aws.amazon.com/kendra/latest/dg/API_HookConfiguration.html) // . For more information, see Customizing document metadata during the ingestion // process (https://docs.aws.amazon.com/kendra/latest/dg/custom-document-enrichment.html) // . type InlineCustomDocumentEnrichmentConfiguration struct { // Configuration of the condition used for the target document attribute or // metadata field when ingesting documents into Amazon Kendra. Condition *DocumentAttributeCondition // TRUE to delete content if the condition used for the target attribute is met. DocumentContentDeletion bool // Configuration of the target document attribute or metadata field when ingesting // documents into Amazon Kendra. You can also include a value. Target *DocumentAttributeTarget noSmithyDocumentSerde } // Provides the configuration information to connect to Jira as your data source. type JiraConfiguration struct { // The URL of the Jira account. For example, company.atlassian.net. // // This member is required. JiraAccountUrl *string // The Amazon Resource Name (ARN) of a secret in Secrets Manager contains the // key-value pairs required to connect to your Jira data source. The secret must // contain a JSON structure with the following keys: // - jiraId—The Jira user name or email. // - jiraCredentials—The Jira API token. For more information, see Using a Jira // data source (https://docs.aws.amazon.com/kendra/latest/dg/data-source-jira.html) // . // // This member is required. SecretArn *string // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of Jira attachments to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to Jira fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Jira data source field names must exist in your Jira custom metadata. AttachmentFieldMappings []DataSourceToIndexFieldMapping // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of Jira comments to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to Jira fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Jira data source field names must exist in your Jira custom metadata. CommentFieldMappings []DataSourceToIndexFieldMapping // A list of regular expression patterns to exclude certain file paths, file // names, and file types in your Jira data source. Files that match the patterns // are excluded from the index. Files that don’t match the patterns are included in // the index. If a file matches both an inclusion pattern and an exclusion pattern, // the exclusion pattern takes precedence and the file isn't included in the index. ExclusionPatterns []string // A list of regular expression patterns to include certain file paths, file // names, and file types in your Jira data source. Files that match the patterns // are included in the index. Files that don't match the patterns are excluded from // the index. If a file matches both an inclusion pattern and an exclusion pattern, // the exclusion pattern takes precedence and the file isn't included in the index. InclusionPatterns []string // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of Jira issues to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to Jira fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Jira data source field names must exist in your Jira custom metadata. IssueFieldMappings []DataSourceToIndexFieldMapping // Specify whether to crawl comments, attachments, and work logs. You can specify // one or more of these options. IssueSubEntityFilter []IssueSubEntity // Specify which issue types to crawl in your Jira data source. You can specify // one or more of these options to crawl. IssueType []string // Specify which projects to crawl in your Jira data source. You can specify one // or more Jira project IDs. Project []string // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of Jira projects to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to Jira fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Jira data source field names must exist in your Jira custom metadata. ProjectFieldMappings []DataSourceToIndexFieldMapping // Specify which statuses to crawl in your Jira data source. You can specify one // or more of these options to crawl. Status []string // TRUE to use the Jira change log to determine which documents require updating // in the index. Depending on the change log's size, it may take longer for Amazon // Kendra to use the change log than to scan all of your documents in Jira. UseChangeLog bool // Configuration information for an Amazon Virtual Private Cloud to connect to // your Jira. For more information, see Configuring a VPC (https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html) // . VpcConfiguration *DataSourceVpcConfiguration // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of Jira work logs to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to Jira fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Jira data source field names must exist in your Jira custom metadata. WorkLogFieldMappings []DataSourceToIndexFieldMapping noSmithyDocumentSerde } // Provides the configuration information for the JSON token type. type JsonTokenTypeConfiguration struct { // The group attribute field. // // This member is required. GroupAttributeField *string // The user name attribute field. // // This member is required. UserNameAttributeField *string noSmithyDocumentSerde } // Provides the configuration information for the JWT token type. type JwtTokenTypeConfiguration struct { // The location of the key. // // This member is required. KeyLocation KeyLocation // The regular expression that identifies the claim. ClaimRegex *string // The group attribute field. GroupAttributeField *string // The issuer of the token. Issuer *string // The Amazon Resource Name (arn) of the secret. SecretManagerArn *string // The signing key URL. URL *string // The user name attribute field. UserNameAttributeField *string noSmithyDocumentSerde } // The sub groups that belong to a group. type MemberGroup struct { // The identifier of the sub group you want to map to a group. // // This member is required. GroupId *string // The identifier of the data source for the sub group you want to map to a group. DataSourceId *string noSmithyDocumentSerde } // The users that belong to a group. type MemberUser struct { // The identifier of the user you want to map to a group. // // This member is required. UserId *string noSmithyDocumentSerde } // Provides the configuration information to connect to OneDrive as your data // source. type OneDriveConfiguration struct { // A list of user accounts whose documents should be indexed. // // This member is required. OneDriveUsers *OneDriveUsers // The Amazon Resource Name (ARN) of an Secrets Managersecret that contains the // user name and password to connect to OneDrive. The user name should be the // application ID for the OneDrive application, and the password is the application // key for the OneDrive application. // // This member is required. SecretArn *string // The Azure Active Directory domain of the organization. // // This member is required. TenantDomain *string // TRUE to disable local groups information. DisableLocalGroups bool // A list of regular expression patterns to exclude certain documents in your // OneDrive. Documents that match the patterns are excluded from the index. // Documents that don't match the patterns are included in the index. If a document // matches both an inclusion and exclusion pattern, the exclusion pattern takes // precedence and the document isn't included in the index. The pattern is applied // to the file name. ExclusionPatterns []string // A list of DataSourceToIndexFieldMapping objects that map OneDrive data source // attributes or field names to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to OneDrive fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The OneDrive data source field names must exist in your OneDrive custom // metadata. FieldMappings []DataSourceToIndexFieldMapping // A list of regular expression patterns to include certain documents in your // OneDrive. Documents that match the patterns are included in the index. Documents // that don't match the patterns are excluded from the index. If a document matches // both an inclusion and exclusion pattern, the exclusion pattern takes precedence // and the document isn't included in the index. The pattern is applied to the file // name. InclusionPatterns []string noSmithyDocumentSerde } // User accounts whose documents should be indexed. type OneDriveUsers struct { // A list of users whose documents should be indexed. Specify the user names in // email format, for example, username@tenantdomain . If you need to index the // documents of more than 100 users, use the OneDriveUserS3Path field to specify // the location of a file containing a list of users. OneDriveUserList []string // The S3 bucket location of a file containing a list of users whose documents // should be indexed. OneDriveUserS3Path *S3Path noSmithyDocumentSerde } // Provides the configuration information to connect to GitHub Enterprise Server // (on premises). type OnPremiseConfiguration struct { // The GitHub host URL or API endpoint URL. For example, // https://on-prem-host-url/api/v3/ // // This member is required. HostUrl *string // The name of the organization of the GitHub Enterprise Server (in-premise) // account you want to connect to. You can find your organization name by logging // into GitHub desktop and selecting Your organizations under your profile picture // dropdown. // // This member is required. OrganizationName *string // The path to the SSL certificate stored in an Amazon S3 bucket. You use this to // connect to GitHub if you require a secure SSL connection. You can simply // generate a self-signed X509 certificate on any computer using OpenSSL. For an // example of using OpenSSL to create an X509 certificate, see Create and sign an // X509 certificate (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-ssl.html) // . // // This member is required. SslCertificateS3Path *S3Path noSmithyDocumentSerde } // Summary information for users or groups in your IAM Identity Center identity // source. This applies to users and groups with specific permissions that define // their level of access to your Amazon Kendra experience. You can create an Amazon // Kendra experience such as a search application. For more information on creating // a search application experience, see Building a search experience with no code (https://docs.aws.amazon.com/kendra/latest/dg/deploying-search-experience-no-code.html) // . type PersonasSummary struct { // The Unix timestamp when the summary information was created. CreatedAt *time.Time // The identifier of a user or group in your IAM Identity Center identity source. // For example, a user ID could be an email. EntityId *string // The persona that defines the specific permissions of the user or group in your // IAM Identity Center identity source. The available personas or access roles are // Owner and Viewer . For more information on these personas, see Providing access // to your search page (https://docs.aws.amazon.com/kendra/latest/dg/deploying-search-experience-no-code.html#access-search-experience) // . Persona Persona // The Unix timestamp when the summary information was last updated. UpdatedAt *time.Time noSmithyDocumentSerde } // Provides user and group information for user context filtering (https://docs.aws.amazon.com/kendra/latest/dg/user-context-filter.html) // . type Principal struct { // Whether to allow or deny document access to the principal. // // This member is required. Access ReadAccessType // The name of the user or group. // // This member is required. Name *string // The type of principal. // // This member is required. Type PrincipalType // The identifier of the data source the principal should access documents from. DataSourceId *string noSmithyDocumentSerde } // Provides the configuration information for a web proxy to connect to website // hosts. type ProxyConfiguration struct { // The name of the website host you want to connect to via a web proxy server. For // example, the host name of https://a.example.com/page1.html is "a.example.com". // // This member is required. Host *string // The port number of the website host you want to connect to via a web proxy // server. For example, the port for https://a.example.com/page1.html is 443, the // standard port for HTTPS. // // This member is required. Port *int32 // Your secret ARN, which you can create in Secrets Manager (https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html) // The credentials are optional. You use a secret if web proxy credentials are // required to connect to a website host. Amazon Kendra currently support basic // authentication to connect to a web proxy server. The secret stores your // credentials. Credentials *string noSmithyDocumentSerde } // A single query result. A query result contains information about a document // returned by the query. This includes the original location of the document, a // list of attributes assigned to the document, and relevant text from the document // that satisfies the query. type QueryResultItem struct { // One or more additional fields/attributes associated with the query result. AdditionalAttributes []AdditionalResultAttribute // An array of document fields/attributes assigned to a document in the search // results. For example, the document author ( _author ) or the source URI ( // _source_uri ) of the document. DocumentAttributes []DocumentAttribute // An extract of the text in the document. Contains information about highlighting // the relevant terms in the excerpt. DocumentExcerpt *TextWithHighlights // The identifier for the document. DocumentId *string // The title of the document. Contains the text of the title and information for // highlighting the relevant terms in the title. DocumentTitle *TextWithHighlights // The URI of the original location of the document. DocumentURI *string // A token that identifies a particular result from a particular query. Use this // token to provide click-through feedback for the result. For more information, // see Submitting feedback (https://docs.aws.amazon.com/kendra/latest/dg/submitting-feedback.html) // . FeedbackToken *string // If the Type of document within the response is ANSWER , then it is either a // TABLE answer or TEXT answer. If it's a table answer, a table excerpt is // returned in TableExcerpt . If it's a text answer, a text excerpt is returned in // DocumentExcerpt . Format QueryResultFormat // The identifier for the query result. Id *string // Indicates the confidence level of Amazon Kendra providing a relevant result for // the query. Each result is placed into a bin that indicates the confidence, // VERY_HIGH , HIGH , MEDIUM and LOW . You can use the score to determine if a // response meets the confidence needed for your application. The field is only set // to LOW when the Type field is set to DOCUMENT and Amazon Kendra is not // confident that the result is relevant to the query. ScoreAttributes *ScoreAttributes // An excerpt from a table within a document. TableExcerpt *TableExcerpt // The type of document within the response. For example, a response could include // a question-answer that's relevant to the query. Type QueryResultType noSmithyDocumentSerde } // Summary information on a query suggestions block list. This includes // information on the block list ID, block list name, when the block list was // created, when the block list was last updated, and the count of block // words/phrases in the block list. For information on the current quota limits for // block lists, see Quotas for Amazon Kendra (https://docs.aws.amazon.com/kendra/latest/dg/quotas.html) // . type QuerySuggestionsBlockListSummary struct { // The Unix timestamp when the block list was created. CreatedAt *time.Time // The identifier of a block list. Id *string // The number of items in the block list file. ItemCount *int32 // The name of the block list. Name *string // The status of the block list. Status QuerySuggestionsBlockListStatus // The Unix timestamp when the block list was last updated. UpdatedAt *time.Time noSmithyDocumentSerde } // Provides the configuration information to connect to Quip as your data source. type QuipConfiguration struct { // The Quip site domain. For example, https://quip-company.quipdomain.com/browse. // The domain in this example is "quipdomain". // // This member is required. Domain *string // The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the // key-value pairs that are required to connect to your Quip. The secret must // contain a JSON structure with the following keys: // - accessToken—The token created in Quip. For more information, see Using a // Quip data source (https://docs.aws.amazon.com/kendra/latest/dg/data-source-slack.html) // . // // This member is required. SecretArn *string // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of Quip attachments to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to Quip fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Quip field names must exist in your Quip custom metadata. AttachmentFieldMappings []DataSourceToIndexFieldMapping // TRUE to index attachments. CrawlAttachments bool // TRUE to index the contents of chat rooms. CrawlChatRooms bool // TRUE to index file comments. CrawlFileComments bool // A list of regular expression patterns to exclude certain files in your Quip // file system. Files that match the patterns are excluded from the index. Files // that don’t match the patterns are included in the index. If a file matches both // an inclusion pattern and an exclusion pattern, the exclusion pattern takes // precedence, and the file isn't included in the index. ExclusionPatterns []string // The identifiers of the Quip folders you want to index. You can find the folder // ID in your browser URL when you access your folder in Quip. For example, // https://quip-company.quipdomain.com/zlLuOVNSarTL/folder-name. The folder ID in // this example is "zlLuOVNSarTL". FolderIds []string // A list of regular expression patterns to include certain files in your Quip // file system. Files that match the patterns are included in the index. Files that // don't match the patterns are excluded from the index. If a file matches both an // inclusion pattern and an exclusion pattern, the exclusion pattern takes // precedence, and the file isn't included in the index. InclusionPatterns []string // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of Quip messages to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to Quip fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Quip field names must exist in your Quip custom metadata. MessageFieldMappings []DataSourceToIndexFieldMapping // A list of DataSourceToIndexFieldMapping objects that map attributes or field // names of Quip threads to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to Quip fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Quip field names must exist in your Quip custom metadata. ThreadFieldMappings []DataSourceToIndexFieldMapping // Configuration information for an Amazon Virtual Private Cloud (VPC) to connect // to your Quip. For more information, see Configuring a VPC (https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html) // . VpcConfiguration *DataSourceVpcConfiguration noSmithyDocumentSerde } // Provides information for tuning the relevance of a field in a search. When a // query includes terms that match the field, the results are given a boost in the // response based on these tuning parameters. type Relevance struct { // Specifies the time period that the boost applies to. For example, to make the // boost apply to documents with the field value within the last month, you would // use "2628000s". Once the field value is beyond the specified range, the effect // of the boost drops off. The higher the importance, the faster the effect drops // off. If you don't specify a value, the default is 3 months. The value of the // field is a numeric string followed by the character "s", for example "86400s" // for one day, or "604800s" for one week. Only applies to DATE fields. Duration *string // Indicates that this field determines how "fresh" a document is. For example, if // document 1 was created on November 5, and document 2 was created on October 31, // document 1 is "fresher" than document 2. You can only set the Freshness field // on one DATE type field. Only applies to DATE fields. Freshness *bool // The relative importance of the field in the search. Larger numbers provide more // of a boost than smaller numbers. Importance *int32 // Determines how values should be interpreted. When the RankOrder field is // ASCENDING , higher numbers are better. For example, a document with a rating // score of 10 is higher ranking than a document with a rating score of 1. When the // RankOrder field is DESCENDING , lower numbers are better. For example, in a task // tracking application, a priority 1 task is more important than a priority 5 // task. Only applies to LONG and DOUBLE fields. RankOrder Order // A list of values that should be given a different boost when they appear in the // result list. For example, if you are boosting a field called "department," query // terms that match the department field are boosted in the result. However, you // can add entries from the department field to boost documents with those values // higher. For example, you can add entries to the map with names of departments. // If you add "HR",5 and "Legal",3 those departments are given special attention // when they appear in the metadata of a document. When those terms appear they are // given the specified importance instead of the regular importance for the boost. ValueImportanceMap map[string]int32 noSmithyDocumentSerde } // Provides feedback on how relevant a document is to a search. Your application // uses the SubmitFeedback API to provide relevance information. type RelevanceFeedback struct { // Whether the document was relevant or not relevant to the search. // // This member is required. RelevanceValue RelevanceType // The identifier of the search result that the user provided relevance feedback // for. // // This member is required. ResultId *string noSmithyDocumentSerde } // A single retrieved relevant passage result. type RetrieveResultItem struct { // The contents of the relevant passage. Content *string // An array of document fields/attributes assigned to a document in the search // results. For example, the document author ( _author ) or the source URI ( // _source_uri ) of the document. DocumentAttributes []DocumentAttribute // The identifier of the document. DocumentId *string // The title of the document. DocumentTitle *string // The URI of the original location of the document. DocumentURI *string // The identifier of the relevant passage result. Id *string noSmithyDocumentSerde } // Provides the configuration information to connect to an Amazon S3 bucket. type S3DataSourceConfiguration struct { // The name of the bucket that contains the documents. // // This member is required. BucketName *string // Provides the path to the S3 bucket that contains the user context filtering // files for the data source. For the format of the file, see Access control for // S3 data sources (https://docs.aws.amazon.com/kendra/latest/dg/s3-acl.html) . AccessControlListConfiguration *AccessControlListConfiguration // Document metadata files that contain information such as the document access // control information, source URI, document author, and custom attributes. Each // metadata file contains metadata about a single document. DocumentsMetadataConfiguration *DocumentsMetadataConfiguration // A list of glob patterns for documents that should not be indexed. If a document // that matches an inclusion prefix or inclusion pattern also matches an exclusion // pattern, the document is not indexed. Some examples (https://docs.aws.amazon.com/cli/latest/reference/s3/#use-of-exclude-and-include-filters) // are: // - *.png , *.jpg will exclude all PNG and JPEG image files in a directory // (files with the extensions .png and .jpg). // - *internal* will exclude all files in a directory that contain 'internal' in // the file name, such as 'internal', 'internal_only', 'company_internal'. // - **/*internal* will exclude all internal-related files in a directory and // its subdirectories. ExclusionPatterns []string // A list of glob patterns for documents that should be indexed. If a document // that matches an inclusion pattern also matches an exclusion pattern, the // document is not indexed. Some examples (https://docs.aws.amazon.com/cli/latest/reference/s3/#use-of-exclude-and-include-filters) // are: // - *.txt will include all text files in a directory (files with the extension // .txt). // - **/*.txt will include all text files in a directory and its subdirectories. // - *tax* will include all files in a directory that contain 'tax' in the file // name, such as 'tax', 'taxes', 'income_tax'. InclusionPatterns []string // A list of S3 prefixes for the documents that should be included in the index. InclusionPrefixes []string noSmithyDocumentSerde } // Information required to find a specific file in an Amazon S3 bucket. type S3Path struct { // The name of the S3 bucket that contains the file. // // This member is required. Bucket *string // The name of the file. // // This member is required. Key *string noSmithyDocumentSerde } // Provides the configuration information to connect to GitHub Enterprise Cloud // (SaaS). type SaaSConfiguration struct { // The GitHub host URL or API endpoint URL. For example, https://api.github.com. // // This member is required. HostUrl *string // The name of the organization of the GitHub Enterprise Cloud (SaaS) account you // want to connect to. You can find your organization name by logging into GitHub // desktop and selecting Your organizations under your profile picture dropdown. // // This member is required. OrganizationName *string noSmithyDocumentSerde } // The configuration information for syncing a Salesforce chatter feed. The // contents of the object comes from the Salesforce FeedItem table. type SalesforceChatterFeedConfiguration struct { // The name of the column in the Salesforce FeedItem table that contains the // content to index. Typically this is the Body column. // // This member is required. DocumentDataFieldName *string // The name of the column in the Salesforce FeedItem table that contains the title // of the document. This is typically the Title column. DocumentTitleFieldName *string // Maps fields from a Salesforce chatter feed into Amazon Kendra index fields. FieldMappings []DataSourceToIndexFieldMapping // Filters the documents in the feed based on status of the user. When you specify // ACTIVE_USERS only documents from users who have an active account are indexed. // When you specify STANDARD_USER only documents for Salesforce standard users are // documented. You can specify both. IncludeFilterTypes []SalesforceChatterFeedIncludeFilterType noSmithyDocumentSerde } // Provides the configuration information to connect to Salesforce as your data // source. type SalesforceConfiguration struct { // The Amazon Resource Name (ARN) of an Secrets Managersecret that contains the // key/value pairs required to connect to your Salesforce instance. The secret must // contain a JSON structure with the following keys: // - authenticationUrl - The OAUTH endpoint that Amazon Kendra connects to get // an OAUTH token. // - consumerKey - The application public key generated when you created your // Salesforce application. // - consumerSecret - The application private key generated when you created // your Salesforce application. // - password - The password associated with the user logging in to the // Salesforce instance. // - securityToken - The token associated with the user logging in to the // Salesforce instance. // - username - The user name of the user logging in to the Salesforce instance. // // This member is required. SecretArn *string // The instance URL for the Salesforce site that you want to index. // // This member is required. ServerUrl *string // Configuration information for Salesforce chatter feeds. ChatterFeedConfiguration *SalesforceChatterFeedConfiguration // Indicates whether Amazon Kendra should index attachments to Salesforce objects. CrawlAttachments bool // A list of regular expression patterns to exclude certain documents in your // Salesforce. Documents that match the patterns are excluded from the index. // Documents that don't match the patterns are included in the index. If a document // matches both an inclusion and exclusion pattern, the exclusion pattern takes // precedence and the document isn't included in the index. The pattern is applied // to the name of the attached file. ExcludeAttachmentFilePatterns []string // A list of regular expression patterns to include certain documents in your // Salesforce. Documents that match the patterns are included in the index. // Documents that don't match the patterns are excluded from the index. If a // document matches both an inclusion and exclusion pattern, the exclusion pattern // takes precedence and the document isn't included in the index. The pattern is // applied to the name of the attached file. IncludeAttachmentFilePatterns []string // Configuration information for the knowledge article types that Amazon Kendra // indexes. Amazon Kendra indexes standard knowledge articles and the standard // fields of knowledge articles, or the custom fields of custom knowledge articles, // but not both. KnowledgeArticleConfiguration *SalesforceKnowledgeArticleConfiguration // Configuration information for processing attachments to Salesforce standard // objects. StandardObjectAttachmentConfiguration *SalesforceStandardObjectAttachmentConfiguration // Configuration of the Salesforce standard objects that Amazon Kendra indexes. StandardObjectConfigurations []SalesforceStandardObjectConfiguration noSmithyDocumentSerde } // Provides the configuration information for indexing Salesforce custom articles. type SalesforceCustomKnowledgeArticleTypeConfiguration struct { // The name of the field in the custom knowledge article that contains the // document data to index. // // This member is required. DocumentDataFieldName *string // The name of the configuration. // // This member is required. Name *string // The name of the field in the custom knowledge article that contains the // document title. DocumentTitleFieldName *string // Maps attributes or field names of the custom knowledge article to Amazon Kendra // index field names. To create custom fields, use the UpdateIndex API before you // map to Salesforce fields. For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Salesforce data source field names must exist in your Salesforce custom // metadata. FieldMappings []DataSourceToIndexFieldMapping noSmithyDocumentSerde } // Provides the configuration information for the knowledge article types that // Amazon Kendra indexes. Amazon Kendra indexes standard knowledge articles and the // standard fields of knowledge articles, or the custom fields of custom knowledge // articles, but not both type SalesforceKnowledgeArticleConfiguration struct { // Specifies the document states that should be included when Amazon Kendra // indexes knowledge articles. You must specify at least one state. // // This member is required. IncludedStates []SalesforceKnowledgeArticleState // Configuration information for custom Salesforce knowledge articles. CustomKnowledgeArticleTypeConfigurations []SalesforceCustomKnowledgeArticleTypeConfiguration // Configuration information for standard Salesforce knowledge articles. StandardKnowledgeArticleTypeConfiguration *SalesforceStandardKnowledgeArticleTypeConfiguration noSmithyDocumentSerde } // Provides the configuration information for standard Salesforce knowledge // articles. type SalesforceStandardKnowledgeArticleTypeConfiguration struct { // The name of the field that contains the document data to index. // // This member is required. DocumentDataFieldName *string // The name of the field that contains the document title. DocumentTitleFieldName *string // Maps attributes or field names of the knowledge article to Amazon Kendra index // field names. To create custom fields, use the UpdateIndex API before you map to // Salesforce fields. For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Salesforce data source field names must exist in your Salesforce custom // metadata. FieldMappings []DataSourceToIndexFieldMapping noSmithyDocumentSerde } // Provides the configuration information for processing attachments to Salesforce // standard objects. type SalesforceStandardObjectAttachmentConfiguration struct { // The name of the field used for the document title. DocumentTitleFieldName *string // One or more objects that map fields in attachments to Amazon Kendra index // fields. FieldMappings []DataSourceToIndexFieldMapping noSmithyDocumentSerde } // Provides the configuration information for indexing a single standard object. type SalesforceStandardObjectConfiguration struct { // The name of the field in the standard object table that contains the document // contents. // // This member is required. DocumentDataFieldName *string // The name of the standard object. // // This member is required. Name SalesforceStandardObjectName // The name of the field in the standard object table that contains the document // title. DocumentTitleFieldName *string // Maps attributes or field names of the standard object to Amazon Kendra index // field names. To create custom fields, use the UpdateIndex API before you map to // Salesforce fields. For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Salesforce data source field names must exist in your Salesforce custom // metadata. FieldMappings []DataSourceToIndexFieldMapping noSmithyDocumentSerde } // Provides a relative ranking that indicates how confident Amazon Kendra is that // the response is relevant to the query. type ScoreAttributes struct { // A relative ranking for how relevant the response is to the query. ScoreConfidence ScoreConfidence noSmithyDocumentSerde } // Provides information about how a custom index field is used during a search. type Search struct { // Determines whether the field is returned in the query response. The default is // true . Displayable bool // Indicates that the field can be used to create search facets, a count of // results for each value in the field. The default is false . Facetable bool // Determines whether the field is used in the search. If the Searchable field is // true , you can use relevance tuning to manually tune how Amazon Kendra weights // the field in the search. The default is true for string fields and false for // number and date fields. Searchable bool // Determines whether the field can be used to sort the results of a query. If you // specify sorting on a field that does not have Sortable set to true , Amazon // Kendra returns an exception. The default is false . Sortable bool noSmithyDocumentSerde } // Provides the configuration information for the seed or starting point URLs to // crawl. When selecting websites to index, you must adhere to the Amazon // Acceptable Use Policy (https://aws.amazon.com/aup/) and all other Amazon terms. // Remember that you must only use Amazon Kendra Web Crawler to index your own web // pages, or web pages that you have authorization to index. type SeedUrlConfiguration struct { // The list of seed or starting point URLs of the websites you want to crawl. The // list can include a maximum of 100 seed URLs. // // This member is required. SeedUrls []string // You can choose one of the following modes: // - HOST_ONLY —crawl only the website host names. For example, if the seed URL // is "abc.example.com", then only URLs with host name "abc.example.com" are // crawled. // - SUBDOMAINS —crawl the website host names with subdomains. For example, if // the seed URL is "abc.example.com", then "a.abc.example.com" and // "b.abc.example.com" are also crawled. // - EVERYTHING —crawl the website host names with subdomains and other domains // that the web pages link to. // The default mode is set to HOST_ONLY . WebCrawlerMode WebCrawlerMode noSmithyDocumentSerde } // Provides the identifier of the KMS key used to encrypt data indexed by Amazon // Kendra. Amazon Kendra doesn't support asymmetric keys. type ServerSideEncryptionConfiguration struct { // The identifier of the KMS key. Amazon Kendra doesn't support asymmetric keys. KmsKeyId *string noSmithyDocumentSerde } // Provides the configuration information to connect to ServiceNow as your data // source. type ServiceNowConfiguration struct { // The ServiceNow instance that the data source connects to. The host endpoint // should look like the following: {instance}.service-now.com. // // This member is required. HostUrl *string // The Amazon Resource Name (ARN) of the Secrets Manager secret that contains the // user name and password required to connect to the ServiceNow instance. You can // also provide OAuth authentication credentials of user name, password, client ID, // and client secret. For more information, see Using a ServiceNow data source (https://docs.aws.amazon.com/kendra/latest/dg/data-source-servicenow.html) // . // // This member is required. SecretArn *string // The identifier of the release that the ServiceNow host is running. If the host // is not running the LONDON release, use OTHERS . // // This member is required. ServiceNowBuildVersion ServiceNowBuildVersionType // The type of authentication used to connect to the ServiceNow instance. If you // choose HTTP_BASIC , Amazon Kendra is authenticated using the user name and // password provided in the Secrets Manager secret in the SecretArn field. If you // choose OAUTH2 , Amazon Kendra is authenticated using the credentials of client // ID, client secret, user name and password. When you use OAUTH2 authentication, // you must generate a token and a client secret using the ServiceNow console. For // more information, see Using a ServiceNow data source (https://docs.aws.amazon.com/kendra/latest/dg/data-source-servicenow.html) // . AuthenticationType ServiceNowAuthenticationType // Configuration information for crawling knowledge articles in the ServiceNow // site. KnowledgeArticleConfiguration *ServiceNowKnowledgeArticleConfiguration // Configuration information for crawling service catalogs in the ServiceNow site. ServiceCatalogConfiguration *ServiceNowServiceCatalogConfiguration noSmithyDocumentSerde } // Provides the configuration information for crawling knowledge articles in the // ServiceNow site. type ServiceNowKnowledgeArticleConfiguration struct { // The name of the ServiceNow field that is mapped to the index document contents // field in the Amazon Kendra index. // // This member is required. DocumentDataFieldName *string // TRUE to index attachments to knowledge articles. CrawlAttachments bool // The name of the ServiceNow field that is mapped to the index document title // field. DocumentTitleFieldName *string // A list of regular expression patterns applied to exclude certain knowledge // article attachments. Attachments that match the patterns are excluded from the // index. Items that don't match the patterns are included in the index. If an item // matches both an inclusion and exclusion pattern, the exclusion pattern takes // precedence and the item isn't included in the index. ExcludeAttachmentFilePatterns []string // Maps attributes or field names of knoweldge articles to Amazon Kendra index // field names. To create custom fields, use the UpdateIndex API before you map to // ServiceNow fields. For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The ServiceNow data source field names must exist in your ServiceNow custom // metadata. FieldMappings []DataSourceToIndexFieldMapping // A query that selects the knowledge articles to index. The query can return // articles from multiple knowledge bases, and the knowledge bases can be public or // private. The query string must be one generated by the ServiceNow console. For // more information, see Specifying documents to index with a query (https://docs.aws.amazon.com/kendra/latest/dg/servicenow-query.html) // . FilterQuery *string // A list of regular expression patterns applied to include knowledge article // attachments. Attachments that match the patterns are included in the index. // Items that don't match the patterns are excluded from the index. If an item // matches both an inclusion and exclusion pattern, the exclusion pattern takes // precedence and the item isn't included in the index. IncludeAttachmentFilePatterns []string noSmithyDocumentSerde } // Provides the configuration information for crawling service catalog items in // the ServiceNow site type ServiceNowServiceCatalogConfiguration struct { // The name of the ServiceNow field that is mapped to the index document contents // field in the Amazon Kendra index. // // This member is required. DocumentDataFieldName *string // TRUE to index attachments to service catalog items. CrawlAttachments bool // The name of the ServiceNow field that is mapped to the index document title // field. DocumentTitleFieldName *string // A list of regular expression patterns to exclude certain attachments of // catalogs in your ServiceNow. Item that match the patterns are excluded from the // index. Items that don't match the patterns are included in the index. If an item // matches both an inclusion and exclusion pattern, the exclusion pattern takes // precedence and the item isn't included in the index. The regex is applied to the // file name of the attachment. ExcludeAttachmentFilePatterns []string // Maps attributes or field names of catalogs to Amazon Kendra index field names. // To create custom fields, use the UpdateIndex API before you map to ServiceNow // fields. For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The ServiceNow data source field names must exist in your ServiceNow custom // metadata. FieldMappings []DataSourceToIndexFieldMapping // A list of regular expression patterns to include certain attachments of // catalogs in your ServiceNow. Item that match the patterns are included in the // index. Items that don't match the patterns are excluded from the index. If an // item matches both an inclusion and exclusion pattern, the exclusion pattern // takes precedence and the item isn't included in the index. The regex is applied // to the file name of the attachment. IncludeAttachmentFilePatterns []string noSmithyDocumentSerde } // Provides the configuration information to connect to Microsoft SharePoint as // your data source. type SharePointConfiguration struct { // The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the // user name and password required to connect to the SharePoint instance. For more // information, see Microsoft SharePoint (https://docs.aws.amazon.com/kendra/latest/dg/data-source-sharepoint.html) // . // // This member is required. SecretArn *string // The version of Microsoft SharePoint that you use. // // This member is required. SharePointVersion SharePointVersion // The Microsoft SharePoint site URLs for the documents you want to index. // // This member is required. Urls []string // Whether you want to connect to SharePoint Online using basic authentication of // user name and password, or OAuth authentication of user name, password, client // ID, and client secret, or AD App-only authentication of client secret. AuthenticationType SharePointOnlineAuthenticationType // TRUE to index document attachments. CrawlAttachments bool // TRUE to disable local groups information. DisableLocalGroups bool // The Microsoft SharePoint attribute field that contains the title of the // document. DocumentTitleFieldName *string // A list of regular expression patterns to exclude certain documents in your // SharePoint. Documents that match the patterns are excluded from the index. // Documents that don't match the patterns are included in the index. If a document // matches both an inclusion and exclusion pattern, the exclusion pattern takes // precedence and the document isn't included in the index. The regex applies to // the display URL of the SharePoint document. ExclusionPatterns []string // A list of DataSourceToIndexFieldMapping objects that map SharePoint data source // attributes or field names to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to SharePoint fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The SharePoint data source field names must exist in your SharePoint custom // metadata. FieldMappings []DataSourceToIndexFieldMapping // A list of regular expression patterns to include certain documents in your // SharePoint. Documents that match the patterns are included in the index. // Documents that don't match the patterns are excluded from the index. If a // document matches both an inclusion and exclusion pattern, the exclusion pattern // takes precedence and the document isn't included in the index. The regex applies // to the display URL of the SharePoint document. InclusionPatterns []string // Configuration information to connect to your Microsoft SharePoint site URLs via // instance via a web proxy. You can use this option for SharePoint Server. You // must provide the website host name and port number. For example, the host name // of https://a.example.com/page1.html is "a.example.com" and the port is 443, the // standard port for HTTPS. Web proxy credentials are optional and you can use them // to connect to a web proxy server that requires basic authentication of user name // and password. To store web proxy credentials, you use a secret in Secrets // Manager. It is recommended that you follow best security practices when // configuring your web proxy. This includes setting up throttling, setting up // logging and monitoring, and applying security patches on a regular basis. If you // use your web proxy with multiple data sources, sync jobs that occur at the same // time could strain the load on your proxy. It is recommended you prepare your // proxy beforehand for any security and load requirements. ProxyConfiguration *ProxyConfiguration // The path to the SSL certificate stored in an Amazon S3 bucket. You use this to // connect to SharePoint Server if you require a secure SSL connection. You can // generate a self-signed X509 certificate on any computer using OpenSSL. For an // example of using OpenSSL to create an X509 certificate, see Create and sign an // X509 certificate (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-ssl.html) // . SslCertificateS3Path *S3Path // TRUE to use the SharePoint change log to determine which documents require // updating in the index. Depending on the change log's size, it may take longer // for Amazon Kendra to use the change log than to scan all of your documents in // SharePoint. UseChangeLog bool // Configuration information for an Amazon Virtual Private Cloud to connect to // your Microsoft SharePoint. For more information, see Configuring a VPC (https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html) // . VpcConfiguration *DataSourceVpcConfiguration noSmithyDocumentSerde } // Provides the configuration information for the sitemap URLs to crawl. When // selecting websites to index, you must adhere to the Amazon Acceptable Use Policy (https://aws.amazon.com/aup/) // and all other Amazon terms. Remember that you must only use Amazon Kendra Web // Crawler to index your own web pages, or web pages that you have authorization to // index. type SiteMapsConfiguration struct { // The list of sitemap URLs of the websites you want to crawl. The list can // include a maximum of three sitemap URLs. // // This member is required. SiteMaps []string noSmithyDocumentSerde } // Provides the configuration information to connect to Slack as your data source. type SlackConfiguration struct { // The Amazon Resource Name (ARN) of an Secrets Manager secret that contains the // key-value pairs required to connect to your Slack workspace team. The secret // must contain a JSON structure with the following keys: // - slackToken—The user or bot token created in Slack. For more information on // creating a token in Slack, see Authentication for a Slack data source (https://docs.aws.amazon.com/kendra/latest/dg/data-source-slack.html#slack-authentication) // . // // This member is required. SecretArn *string // The date to start crawling your data from your Slack workspace team. The date // must follow this format: yyyy-mm-dd . // // This member is required. SinceCrawlDate *string // Specify whether to index public channels, private channels, group messages, and // direct messages. You can specify one or more of these options. // // This member is required. SlackEntityList []SlackEntity // The identifier of the team in the Slack workspace. For example, T0123456789. // You can find your team ID in the URL of the main page of your Slack workspace. // When you log in to Slack via a browser, you are directed to the URL of the main // page. For example, https://app.slack.com/client/T0123456789/.... // // This member is required. TeamId *string // TRUE to index bot messages from your Slack workspace team. CrawlBotMessage bool // TRUE to exclude archived messages to index from your Slack workspace team. ExcludeArchived bool // A list of regular expression patterns to exclude certain attached files in your // Slack workspace team. Files that match the patterns are excluded from the index. // Files that don’t match the patterns are included in the index. If a file matches // both an inclusion and exclusion pattern, the exclusion pattern takes precedence // and the file isn't included in the index. ExclusionPatterns []string // A list of DataSourceToIndexFieldMapping objects that map Slack data source // attributes or field names to Amazon Kendra index field names. To create custom // fields, use the UpdateIndex API before you map to Slack fields. For more // information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Slack data source field names must exist in your Slack custom metadata. FieldMappings []DataSourceToIndexFieldMapping // A list of regular expression patterns to include certain attached files in your // Slack workspace team. Files that match the patterns are included in the index. // Files that don't match the patterns are excluded from the index. If a file // matches both an inclusion and exclusion pattern, the exclusion pattern takes // precedence and the file isn't included in the index. InclusionPatterns []string // The number of hours for change log to look back from when you last synchronized // your data. You can look back up to 7 days or 168 hours. Change log updates your // index only if new content was added since you last synced your data. Updated or // deleted content from before you last synced does not get updated in your index. // To capture updated or deleted content before you last synced, set the // LookBackPeriod to the number of hours you want change log to look back. LookBackPeriod *int32 // The list of private channel names from your Slack workspace team. You use this // if you want to index specific private channels, not all private channels. You // can also use regular expression patterns to filter private channels. PrivateChannelFilter []string // The list of public channel names to index from your Slack workspace team. You // use this if you want to index specific public channels, not all public channels. // You can also use regular expression patterns to filter public channels. PublicChannelFilter []string // TRUE to use the Slack change log to determine which documents require updating // in the index. Depending on the Slack change log's size, it may take longer for // Amazon Kendra to use the change log than to scan all of your documents in Slack. UseChangeLog bool // Configuration information for an Amazon Virtual Private Cloud to connect to // your Slack. For more information, see Configuring a VPC (https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html) // . VpcConfiguration *DataSourceVpcConfiguration noSmithyDocumentSerde } // Specifies the document attribute to use to sort the response to a Amazon Kendra // query. You can specify a single attribute for sorting. The attribute must have // the Sortable flag set to true , otherwise Amazon Kendra returns an exception. // You can sort attributes of the following types. // - Date value // - Long value // - String value // // You can't sort attributes of the following type. // - String list value type SortingConfiguration struct { // The name of the document attribute used to sort the response. You can use any // field that has the Sortable flag set to true. You can also sort by any of the // following built-in attributes: // - _category // - _created_at // - _last_updated_at // - _version // - _view_count // // This member is required. DocumentAttributeKey *string // The order that the results should be returned in. In case of ties, the // relevance assigned to the result by Amazon Kendra is used as the tie-breaker. // // This member is required. SortOrder SortOrder noSmithyDocumentSerde } // The document ID and its fields/attributes that are used for a query suggestion, // if document fields set to use for query suggestions. type SourceDocument struct { // The additional fields/attributes to include in the response. You can use // additional fields to provide extra information in the response. Additional // fields are not used to based suggestions on. AdditionalAttributes []DocumentAttribute // The identifier of the document used for a query suggestion. DocumentId *string // The document fields/attributes used for a query suggestion. SuggestionAttributes []string noSmithyDocumentSerde } // A query with suggested spell corrections. type SpellCorrectedQuery struct { // The corrected misspelled word or words in a query. Corrections []Correction // The query with the suggested spell corrections. SuggestedQueryText *string noSmithyDocumentSerde } // Provides the configuration information for suggested query spell corrections. // Suggested spell corrections are based on words that appear in your indexed // documents and how closely a corrected word matches a misspelled word. This // feature is designed with certain defaults or limits. For information on the // current limits and how to request more support for some limits, see the Spell // Checker documentation (https://docs.aws.amazon.com/kendra/latest/dg/query-spell-check.html) // . type SpellCorrectionConfiguration struct { // TRUE to suggest spell corrections for queries. // // This member is required. IncludeQuerySpellCheckSuggestions bool noSmithyDocumentSerde } // Provides the configuration information to use a SQL database. type SqlConfiguration struct { // Determines whether Amazon Kendra encloses SQL identifiers for tables and column // names in double quotes (") when making a database query. By default, Amazon // Kendra passes SQL identifiers the way that they are entered into the data source // configuration. It does not change the case of identifiers or enclose them in // quotes. PostgreSQL internally converts uppercase characters to lower case // characters in identifiers unless they are quoted. Choosing this option encloses // identifiers in quotes so that PostgreSQL does not convert the character's case. // For MySQL databases, you must enable the ansi_quotes option when you set this // field to DOUBLE_QUOTES . QueryIdentifiersEnclosingOption QueryIdentifiersEnclosingOption noSmithyDocumentSerde } // Provides information about the status of documents submitted for indexing. type Status struct { // The identifier of the document. DocumentId *string // The current status of a document. If the document was submitted for deletion, // the status is NOT_FOUND after the document is deleted. DocumentStatus DocumentStatus // Indicates the source of the error. FailureCode *string // Provides detailed information about why the document couldn't be indexed. Use // this information to correct the error before you resubmit the document for // indexing. FailureReason *string noSmithyDocumentSerde } // Provides the configuration information for a document field/attribute that you // want to base query suggestions on. type SuggestableConfig struct { // The name of the document field/attribute. AttributeName *string // TRUE means the document field/attribute is suggestible, so the contents within // the field can be used for query suggestions. Suggestable *bool noSmithyDocumentSerde } // A single query suggestion. type Suggestion struct { // The UUID (universally unique identifier) of a single query suggestion. Id *string // The list of document IDs and their fields/attributes that are used for a single // query suggestion, if document fields set to use for query suggestions. SourceDocuments []SourceDocument // The value for the UUID (universally unique identifier) of a single query // suggestion. The value is the text string of a suggestion. Value *SuggestionValue noSmithyDocumentSerde } // The text highlights for a single query suggestion. type SuggestionHighlight struct { // The zero-based location in the response string where the highlight starts. BeginOffset *int32 // The zero-based location in the response string where the highlight ends. EndOffset *int32 noSmithyDocumentSerde } // Provides text and information about where to highlight the query suggestion // text. type SuggestionTextWithHighlights struct { // The beginning and end of the query suggestion text that should be highlighted. Highlights []SuggestionHighlight // The query suggestion text to display to the user. Text *string noSmithyDocumentSerde } // The SuggestionTextWithHighlights structure information. type SuggestionValue struct { // The SuggestionTextWithHighlights structure that contains the query suggestion // text and highlights. Text *SuggestionTextWithHighlights noSmithyDocumentSerde } // Provides information about a table cell in a table excerpt. type TableCell struct { // TRUE means that the table cell should be treated as a header. Header bool // TRUE means that the table cell has a high enough confidence and is relevant to // the query, so the value or content should be highlighted. Highlighted bool // TRUE if the response of the table cell is the top answer. This is the cell // value or content with the highest confidence score or is the most relevant to // the query. TopAnswer bool // The actual value or content within a table cell. A table cell could contain a // date value of a year, or a string value of text, for example. Value *string noSmithyDocumentSerde } // An excerpt from a table within a document. The table excerpt displays up to // five columns and three rows, depending on how many table cells are relevant to // the query and how many columns are available in the original table. The top most // relevant cell is displayed in the table excerpt, along with the next most // relevant cells. type TableExcerpt struct { // A list of rows in the table excerpt. Rows []TableRow // A count of the number of rows in the original table within the document. TotalNumberOfRows *int32 noSmithyDocumentSerde } // Information about a row in a table excerpt. type TableRow struct { // A list of table cells in a row. Cells []TableCell noSmithyDocumentSerde } // A list of key/value pairs that identify an index, FAQ, or data source. Tag keys // and values can consist of Unicode letters, digits, white space, and any of the // following symbols: _ . : / = + - @. type Tag struct { // The key for the tag. Keys are not case sensitive and must be unique for the // index, FAQ, or data source. // // This member is required. Key *string // The value associated with the tag. The value may be an empty string but it // can't be null. // // This member is required. Value *string noSmithyDocumentSerde } // Provides a template for the configuration information to connect to your data // source. type TemplateConfiguration struct { // The template schema used for the data source, where templates schemas are // supported. See Data source template schemas (https://docs.aws.amazon.com/kendra/latest/dg/ds-schemas.html) // . Template document.Interface noSmithyDocumentSerde } // Provides information about text documents indexed in an index. type TextDocumentStatistics struct { // The total size, in bytes, of the indexed documents. // // This member is required. IndexedTextBytes int64 // The number of text documents indexed. // // This member is required. IndexedTextDocumentsCount int32 noSmithyDocumentSerde } // Provides text and information about where to highlight the text. type TextWithHighlights struct { // The beginning and end of the text that should be highlighted. Highlights []Highlight // The text to display to the user. Text *string noSmithyDocumentSerde } // An array of summary information for a thesaurus or multiple thesauri. type ThesaurusSummary struct { // The Unix timestamp when the thesaurus was created. CreatedAt *time.Time // The identifier of the thesaurus. Id *string // The name of the thesaurus. Name *string // The status of the thesaurus. Status ThesaurusStatus // The Unix timestamp when the thesaurus was last updated. UpdatedAt *time.Time noSmithyDocumentSerde } // Provides a range of time. type TimeRange struct { // The Unix timestamp for the end of the time range. EndTime *time.Time // The Unix timestamp for the beginning of the time range. StartTime *time.Time noSmithyDocumentSerde } // Provides the configuration information of the URLs to crawl. You can only crawl // websites that use the secure communication protocol, Hypertext Transfer Protocol // Secure (HTTPS). If you receive an error when crawling a website, it could be // that the website is blocked from crawling. When selecting websites to index, you // must adhere to the Amazon Acceptable Use Policy (https://aws.amazon.com/aup/) // and all other Amazon terms. Remember that you must only use Amazon Kendra Web // Crawler to index your own web pages, or web pages that you have authorization to // index. type Urls struct { // Configuration of the seed or starting point URLs of the websites you want to // crawl. You can choose to crawl only the website host names, or the website host // names with subdomains, or the website host names with subdomains and other // domains that the web pages link to. You can list up to 100 seed URLs. SeedUrlConfiguration *SeedUrlConfiguration // Configuration of the sitemap URLs of the websites you want to crawl. Only URLs // belonging to the same website host names are crawled. You can list up to three // sitemap URLs. SiteMapsConfiguration *SiteMapsConfiguration noSmithyDocumentSerde } // Provides information about the user context for an Amazon Kendra index. User // context filtering is a kind of personalized search with the benefit of // controlling access to documents. For example, not all teams that search the // company portal for information should access top-secret company documents, nor // are these documents relevant to all users. Only specific users or groups of // teams given access to top-secret documents should see these documents in their // search results. You provide one of the following: // - User token // - User ID, the groups the user belongs to, and any data sources the groups // can access. // // If you provide both, an exception is thrown. type UserContext struct { // The list of data source groups you want to filter search results based on // groups' access to documents in that data source. DataSourceGroups []DataSourceGroup // The list of groups you want to filter search results based on the groups' // access to documents. Groups []string // The user context token for filtering search results for a user. It must be a // JWT or a JSON token. Token *string // The identifier of the user you want to filter search results based on their // access to documents. UserId *string noSmithyDocumentSerde } // Provides the configuration information to get users and groups from an IAM // Identity Center (successor to Single Sign-On) identity source. This is useful // for user context filtering, where search results are filtered based on the user // or their group access to documents. You can also use the PutPrincipalMapping (https://docs.aws.amazon.com/kendra/latest/dg/API_PutPrincipalMapping.html) // API to map users to their groups so that you only need to provide the user ID // when you issue the query. To set up an IAM Identity Center identity source in // the console to use with Amazon Kendra, see Getting started with an IAM Identity // Center identity source (https://docs.aws.amazon.com/kendra/latest/dg/getting-started-aws-sso.html) // . You must also grant the required permissions to use IAM Identity Center with // Amazon Kendra. For more information, see IAM roles for IAM Identity Center (https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html#iam-roles-aws-sso) // . Amazon Kendra currently does not support using // UserGroupResolutionConfiguration with an Amazon Web Services organization member // account for your IAM Identity Center identify source. You must create your index // in the management account for the organization in order to use // UserGroupResolutionConfiguration . type UserGroupResolutionConfiguration struct { // The identity store provider (mode) you want to use to get users and groups. IAM // Identity Center (successor to Single Sign-On) is currently the only available // mode. Your users and groups must exist in an IAM Identity Center identity source // in order to use this mode. // // This member is required. UserGroupResolutionMode UserGroupResolutionMode noSmithyDocumentSerde } // Provides the configuration information for the identifiers of your users. type UserIdentityConfiguration struct { // The IAM Identity Center field name that contains the identifiers of your users, // such as their emails. This is used for user context filtering (https://docs.aws.amazon.com/kendra/latest/dg/user-context-filter.html) // and for granting access to your Amazon Kendra experience. You must set up IAM // Identity Center with Amazon Kendra. You must include your users and groups in // your Access Control List when you ingest documents into your index. For more // information, see Getting started with an IAM Identity Center identity source (https://docs.aws.amazon.com/kendra/latest/dg/getting-started-aws-sso.html) // . IdentityAttributeName *string noSmithyDocumentSerde } // Provides the configuration information for a token. type UserTokenConfiguration struct { // Information about the JSON token type configuration. JsonTokenTypeConfiguration *JsonTokenTypeConfiguration // Information about the JWT token type configuration. JwtTokenTypeConfiguration *JwtTokenTypeConfiguration noSmithyDocumentSerde } // The warning code and message that explains a problem with a query. type Warning struct { // The code used to show the type of warning for the query. Code WarningCode // The message that explains the problem with the query. Message *string noSmithyDocumentSerde } // Provides the configuration information required for Amazon Kendra Web Crawler. type WebCrawlerConfiguration struct { // Specifies the seed or starting point URLs of the websites or the sitemap URLs // of the websites you want to crawl. You can include website subdomains. You can // list up to 100 seed URLs and up to three sitemap URLs. You can only crawl // websites that use the secure communication protocol, Hypertext Transfer Protocol // Secure (HTTPS). If you receive an error when crawling a website, it could be // that the website is blocked from crawling. When selecting websites to index, you // must adhere to the Amazon Acceptable Use Policy (https://aws.amazon.com/aup/) // and all other Amazon terms. Remember that you must only use Amazon Kendra Web // Crawler to index your own web pages, or web pages that you have authorization to // index. // // This member is required. Urls *Urls // Configuration information required to connect to websites using authentication. // You can connect to websites using basic authentication of user name and // password. You use a secret in Secrets Manager (https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html) // to store your authentication credentials. You must provide the website host name // and port number. For example, the host name of https://a.example.com/page1.html // is "a.example.com" and the port is 443, the standard port for HTTPS. AuthenticationConfiguration *AuthenticationConfiguration // The 'depth' or number of levels from the seed level to crawl. For example, the // seed URL page is depth 1 and any hyperlinks on this page that are also crawled // are depth 2. CrawlDepth *int32 // The maximum size (in MB) of a web page or attachment to crawl. Files larger // than this size (in MB) are skipped/not crawled. The default maximum size of a // web page or attachment is set to 50 MB. MaxContentSizePerPageInMegaBytes *float32 // The maximum number of URLs on a web page to include when crawling a website. // This number is per web page. As a website’s web pages are crawled, any URLs the // web pages link to are also crawled. URLs on a web page are crawled in order of // appearance. The default maximum links per page is 100. MaxLinksPerPage *int32 // The maximum number of URLs crawled per website host per minute. A minimum of // one URL is required. The default maximum number of URLs crawled per website host // per minute is 300. MaxUrlsPerMinuteCrawlRate *int32 // Configuration information required to connect to your internal websites via a // web proxy. You must provide the website host name and port number. For example, // the host name of https://a.example.com/page1.html is "a.example.com" and the // port is 443, the standard port for HTTPS. Web proxy credentials are optional and // you can use them to connect to a web proxy server that requires basic // authentication. To store web proxy credentials, you use a secret in Secrets // Manager (https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html) // . ProxyConfiguration *ProxyConfiguration // A list of regular expression patterns to exclude certain URLs to crawl. URLs // that match the patterns are excluded from the index. URLs that don't match the // patterns are included in the index. If a URL matches both an inclusion and // exclusion pattern, the exclusion pattern takes precedence and the URL file isn't // included in the index. UrlExclusionPatterns []string // A list of regular expression patterns to include certain URLs to crawl. URLs // that match the patterns are included in the index. URLs that don't match the // patterns are excluded from the index. If a URL matches both an inclusion and // exclusion pattern, the exclusion pattern takes precedence and the URL file isn't // included in the index. UrlInclusionPatterns []string noSmithyDocumentSerde } // Provides the configuration information to connect to Amazon WorkDocs as your // data source. Amazon WorkDocs connector is available in Oregon, North Virginia, // Sydney, Singapore and Ireland regions. type WorkDocsConfiguration struct { // The identifier of the directory corresponding to your Amazon WorkDocs site // repository. You can find the organization ID in the Directory Service (https://console.aws.amazon.com/directoryservicev2/) // by going to Active Directory, then Directories. Your Amazon WorkDocs site // directory has an ID, which is the organization ID. You can also set up a new // Amazon WorkDocs directory in the Directory Service console and enable a Amazon // WorkDocs site for the directory in the Amazon WorkDocs console. // // This member is required. OrganizationId *string // TRUE to include comments on documents in your index. Including comments in your // index means each comment is a document that can be searched on. The default is // set to FALSE . CrawlComments bool // A list of regular expression patterns to exclude certain files in your Amazon // WorkDocs site repository. Files that match the patterns are excluded from the // index. Files that don’t match the patterns are included in the index. If a file // matches both an inclusion and exclusion pattern, the exclusion pattern takes // precedence and the file isn't included in the index. ExclusionPatterns []string // A list of DataSourceToIndexFieldMapping objects that map Amazon WorkDocs data // source attributes or field names to Amazon Kendra index field names. To create // custom fields, use the UpdateIndex API before you map to Amazon WorkDocs // fields. For more information, see Mapping data source fields (https://docs.aws.amazon.com/kendra/latest/dg/field-mapping.html) // . The Amazon WorkDocs data source field names must exist in your Amazon WorkDocs // custom metadata. FieldMappings []DataSourceToIndexFieldMapping // A list of regular expression patterns to include certain files in your Amazon // WorkDocs site repository. Files that match the patterns are included in the // index. Files that don't match the patterns are excluded from the index. If a // file matches both an inclusion and exclusion pattern, the exclusion pattern // takes precedence and the file isn't included in the index. InclusionPatterns []string // TRUE to use the Amazon WorkDocs change log to determine which documents require // updating in the index. Depending on the change log's size, it may take longer // for Amazon Kendra to use the change log than to scan all of your documents in // Amazon WorkDocs. UseChangeLog bool noSmithyDocumentSerde } type noSmithyDocumentSerde = smithydocument.NoSerde
4,304
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendraranking import ( "context" cryptorand "crypto/rand" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" smithy "github.com/aws/smithy-go" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" "time" ) const ServiceID = "Kendra Ranking" const ServiceAPIVersion = "2022-10-19" // Client provides the API client to make operations call for Amazon Kendra // Intelligent Ranking. type Client struct { options Options } // New returns an initialized Client based on the functional options. Provide // additional functional options to further configure the behavior of the client, // such as changing the client's endpoint or adding custom middleware behavior. func New(options Options, optFns ...func(*Options)) *Client { options = options.Copy() resolveDefaultLogger(&options) setResolvedDefaultsMode(&options) resolveRetryer(&options) resolveHTTPClient(&options) resolveHTTPSignerV4(&options) resolveDefaultEndpointConfiguration(&options) resolveIdempotencyTokenProvider(&options) for _, fn := range optFns { fn(&options) } client := &Client{ options: options, } return client } type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // Configures the events that will be sent to the configured logger. ClientLogMode aws.ClientLogMode // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The configuration DefaultsMode that the SDK should use when constructing the // clients initial default settings. DefaultsMode aws.DefaultsMode // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions // The service endpoint resolver. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // Provides idempotency tokens values that will be automatically populated into // idempotent API operations. IdempotencyTokenProvider IdempotencyTokenProvider // The logger writer interface to write logging messages to. Logger logging.Logger // The region to send requests to. (Required) Region string // RetryMaxAttempts specifies the maximum number attempts an API client will call // an operation that fails with a retryable error. A value of 0 is ignored, and // will not be used to configure the API client created default retryer, or modify // per operation call's retry max attempts. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. If specified in an operation call's functional // options with a value that is different than the constructed client's Options, // the Client's Retryer will be wrapped to use the operation's specific // RetryMaxAttempts value. RetryMaxAttempts int // RetryMode specifies the retry mode the API client will be created with, if // Retryer option is not also specified. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. Currently does not support per operation call // overrides, may in the future. RetryMode aws.RetryMode // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. The kind of // default retry created by the API client can be changed with the RetryMode // option. Retryer aws.Retryer // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You // should not populate this structure programmatically, or rely on the values here // within your applications. RuntimeEnvironment aws.RuntimeEnvironment // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. Currently does not support per operation call // overrides, may in the future. resolvedDefaultsMode aws.DefaultsMode // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient } // WithAPIOptions returns a functional option for setting the Client's APIOptions // option. func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { return func(o *Options) { o.APIOptions = append(o.APIOptions, optFns...) } } // WithEndpointResolver returns a functional option for setting the Client's // EndpointResolver option. func WithEndpointResolver(v EndpointResolver) func(*Options) { return func(o *Options) { o.EndpointResolver = v } } type HTTPClient interface { Do(*http.Request) (*http.Response, error) } // Copy creates a clone where the APIOptions list is deep copied. func (o Options) Copy() Options { to := o to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) copy(to.APIOptions, o.APIOptions) return to } func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { ctx = middleware.ClearStackValues(ctx) stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() for _, fn := range optFns { fn(&options) } finalizeRetryMaxAttemptOptions(&options, *c) finalizeClientEndpointResolverOptions(&options) for _, fn := range stackFns { if err := fn(stack, options); err != nil { return nil, metadata, err } } for _, fn := range options.APIOptions { if err := fn(stack); err != nil { return nil, metadata, err } } handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) result, metadata, err = handler.Handle(ctx, params) if err != nil { err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } return result, metadata, err } type noSmithyDocumentSerde = smithydocument.NoSerde func resolveDefaultLogger(o *Options) { if o.Logger != nil { return } o.Logger = logging.Nop{} } func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { return middleware.AddSetLoggerMiddleware(stack, o.Logger) } func setResolvedDefaultsMode(o *Options) { if len(o.resolvedDefaultsMode) > 0 { return } var mode aws.DefaultsMode mode.SetFromString(string(o.DefaultsMode)) if mode == aws.DefaultsModeAuto { mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) } o.resolvedDefaultsMode = mode } // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, DefaultsMode: cfg.DefaultsMode, RuntimeEnvironment: cfg.RuntimeEnvironment, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) resolveAWSRetryMode(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) resolveUseDualStackEndpoint(cfg, &opts) resolveUseFIPSEndpoint(cfg, &opts) return New(opts, optFns...) } func resolveHTTPClient(o *Options) { var buildable *awshttp.BuildableClient if o.HTTPClient != nil { var ok bool buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) if !ok { return } } else { buildable = awshttp.NewBuildableClient() } modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { dialer.Timeout = dialerTimeout } }) buildable = buildable.WithTransportOptions(func(transport *http.Transport) { if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { transport.TLSHandshakeTimeout = tlsHandshakeTimeout } }) } o.HTTPClient = buildable } func resolveRetryer(o *Options) { if o.Retryer != nil { return } if len(o.RetryMode) == 0 { modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { o.RetryMode = modeConfig.RetryMode } } if len(o.RetryMode) == 0 { o.RetryMode = aws.RetryModeStandard } var standardOptions []func(*retry.StandardOptions) if v := o.RetryMaxAttempts; v != 0 { standardOptions = append(standardOptions, func(so *retry.StandardOptions) { so.MaxAttempts = v }) } switch o.RetryMode { case aws.RetryModeAdaptive: var adaptiveOptions []func(*retry.AdaptiveModeOptions) if len(standardOptions) != 0 { adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { ao.StandardOptions = append(ao.StandardOptions, standardOptions...) }) } o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) default: o.Retryer = retry.NewStandard(standardOptions...) } } func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { if cfg.Retryer == nil { return } o.Retryer = cfg.Retryer() } func resolveAWSRetryMode(cfg aws.Config, o *Options) { if len(cfg.RetryMode) == 0 { return } o.RetryMode = cfg.RetryMode } func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { if cfg.RetryMaxAttempts == 0 { return } o.RetryMaxAttempts = cfg.RetryMaxAttempts } func finalizeRetryMaxAttemptOptions(o *Options, client Client) { if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { return } o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) } func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { return } o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) } func addClientUserAgent(stack *middleware.Stack) error { return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "kendraranking", goModuleVersion)(stack) } func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ CredentialsProvider: o.Credentials, Signer: o.HTTPSignerV4, LogSigning: o.ClientLogMode.IsSigning(), }) return stack.Finalize.Add(mw, middleware.After) } type HTTPSignerV4 interface { SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error } func resolveHTTPSignerV4(o *Options) { if o.HTTPSignerV4 != nil { return } o.HTTPSignerV4 = newDefaultV4Signer(*o) } func newDefaultV4Signer(o Options) *v4.Signer { return v4.NewSigner(func(so *v4.SignerOptions) { so.Logger = o.Logger so.LogSigning = o.ClientLogMode.IsSigning() }) } func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return } o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) } func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, LogRetryAttempts: o.ClientLogMode.IsRetries(), } return retry.AddRetryMiddlewares(stack, mo) } // resolves dual-stack endpoint configuration func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseDualStackEndpoint = value } return nil } // resolves FIPS endpoint configuration func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseFIPSEndpoint = value } return nil } // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) } func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } func addResponseErrorMiddleware(stack *middleware.Stack) error { return awshttp.AddResponseErrorMiddleware(stack) } func addRequestResponseLogging(stack *middleware.Stack, o Options) error { return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ LogRequest: o.ClientLogMode.IsRequest(), LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), LogResponse: o.ClientLogMode.IsResponse(), LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), }, middleware.After) }
455
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendraranking import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "io/ioutil" "net/http" "strings" "testing" ) func TestClient_resolveRetryOptions(t *testing.T) { nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { return &http.Response{ StatusCode: 200, Header: http.Header{}, Body: ioutil.NopCloser(strings.NewReader("")), }, nil }) cases := map[string]struct { defaultsMode aws.DefaultsMode retryer aws.Retryer retryMaxAttempts int opRetryMaxAttempts *int retryMode aws.RetryMode expectClientRetryMode aws.RetryMode expectClientMaxAttempts int expectOpMaxAttempts int }{ "defaults": { defaultsMode: aws.DefaultsModeStandard, expectClientRetryMode: aws.RetryModeStandard, expectClientMaxAttempts: 3, expectOpMaxAttempts: 3, }, "custom default retry": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(2), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 2, }, "custom op no change max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(10), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op 0 max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(0), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, } for name, c := range cases { t.Run(name, func(t *testing.T) { client := NewFromConfig(aws.Config{ DefaultsMode: c.defaultsMode, Retryer: func() func() aws.Retryer { if c.retryer == nil { return nil } return func() aws.Retryer { return c.retryer } }(), HTTPClient: nopClient, RetryMaxAttempts: c.retryMaxAttempts, RetryMode: c.retryMode, }) if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { t.Errorf("expect %v retry mode, got %v", e, a) } if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v max attempts, got %v", e, a) } _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, []func(*Options){ func(o *Options) { if c.opRetryMaxAttempts == nil { return } o.RetryMaxAttempts = *c.opRetryMaxAttempts }, }, func(s *middleware.Stack, o Options) error { s.Initialize.Clear() s.Serialize.Clear() s.Build.Clear() s.Finalize.Clear() s.Deserialize.Clear() if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v op max attempts, got %v", e, a) } return nil }) if err != nil { t.Fatalf("expect no operation error, got %v", err) } }) } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendraranking 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/kendraranking/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a rescore execution plan. A rescore execution plan is an Amazon Kendra // Intelligent Ranking resource used for provisioning the Rescore API. You set the // number of capacity units that you require for Amazon Kendra Intelligent Ranking // to rescore or re-rank a search service's results. For an example of using the // CreateRescoreExecutionPlan API, including using the Python and Java SDKs, see // Semantically ranking a search service's results (https://docs.aws.amazon.com/kendra/latest/dg/search-service-rerank.html) // . func (c *Client) CreateRescoreExecutionPlan(ctx context.Context, params *CreateRescoreExecutionPlanInput, optFns ...func(*Options)) (*CreateRescoreExecutionPlanOutput, error) { if params == nil { params = &CreateRescoreExecutionPlanInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateRescoreExecutionPlan", params, optFns, c.addOperationCreateRescoreExecutionPlanMiddlewares) if err != nil { return nil, err } out := result.(*CreateRescoreExecutionPlanOutput) out.ResultMetadata = metadata return out, nil } type CreateRescoreExecutionPlanInput struct { // A name for the rescore execution plan. // // This member is required. Name *string // You can set additional capacity units to meet the needs of your rescore // execution plan. You are given a single capacity unit by default. If you want to // use the default capacity, you don't set additional capacity units. For more // information on the default capacity and additional capacity units, see // Adjusting capacity (https://docs.aws.amazon.com/kendra/latest/dg/adjusting-capacity.html) // . CapacityUnits *types.CapacityUnitsConfiguration // A token that you provide to identify the request to create a rescore execution // plan. Multiple calls to the CreateRescoreExecutionPlanRequest API with the same // client token will create only one rescore execution plan. ClientToken *string // A description for the rescore execution plan. Description *string // A list of key-value pairs that identify or categorize your rescore execution // plan. You can also use tags to help control access to the rescore execution // plan. Tag keys and values can consist of Unicode letters, digits, white space, // and any of the following symbols: _ . : / = + - @. Tags []types.Tag noSmithyDocumentSerde } type CreateRescoreExecutionPlanOutput struct { // The Amazon Resource Name (ARN) of the rescore execution plan. // // This member is required. Arn *string // The identifier of the rescore execution plan. // // This member is required. Id *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateRescoreExecutionPlanMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateRescoreExecutionPlan{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateRescoreExecutionPlan{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addIdempotencyToken_opCreateRescoreExecutionPlanMiddleware(stack, options); err != nil { return err } if err = addOpCreateRescoreExecutionPlanValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRescoreExecutionPlan(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } type idempotencyToken_initializeOpCreateRescoreExecutionPlan struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateRescoreExecutionPlan) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateRescoreExecutionPlan) 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.(*CreateRescoreExecutionPlanInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateRescoreExecutionPlanInput ") } 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_opCreateRescoreExecutionPlanMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateRescoreExecutionPlan{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateRescoreExecutionPlan(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra-ranking", OperationName: "CreateRescoreExecutionPlan", } }
197
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendraranking import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes a rescore execution plan. A rescore execution plan is an Amazon Kendra // Intelligent Ranking resource used for provisioning the Rescore API. func (c *Client) DeleteRescoreExecutionPlan(ctx context.Context, params *DeleteRescoreExecutionPlanInput, optFns ...func(*Options)) (*DeleteRescoreExecutionPlanOutput, error) { if params == nil { params = &DeleteRescoreExecutionPlanInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteRescoreExecutionPlan", params, optFns, c.addOperationDeleteRescoreExecutionPlanMiddlewares) if err != nil { return nil, err } out := result.(*DeleteRescoreExecutionPlanOutput) out.ResultMetadata = metadata return out, nil } type DeleteRescoreExecutionPlanInput struct { // The identifier of the rescore execution plan that you want to delete. // // This member is required. Id *string noSmithyDocumentSerde } type DeleteRescoreExecutionPlanOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteRescoreExecutionPlanMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteRescoreExecutionPlan{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteRescoreExecutionPlan{}, 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 = addOpDeleteRescoreExecutionPlanValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRescoreExecutionPlan(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteRescoreExecutionPlan(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra-ranking", OperationName: "DeleteRescoreExecutionPlan", } }
121
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendraranking import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendraranking/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Gets information about a rescore execution plan. A rescore execution plan is an // Amazon Kendra Intelligent Ranking resource used for provisioning the Rescore // API. func (c *Client) DescribeRescoreExecutionPlan(ctx context.Context, params *DescribeRescoreExecutionPlanInput, optFns ...func(*Options)) (*DescribeRescoreExecutionPlanOutput, error) { if params == nil { params = &DescribeRescoreExecutionPlanInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeRescoreExecutionPlan", params, optFns, c.addOperationDescribeRescoreExecutionPlanMiddlewares) if err != nil { return nil, err } out := result.(*DescribeRescoreExecutionPlanOutput) out.ResultMetadata = metadata return out, nil } type DescribeRescoreExecutionPlanInput struct { // The identifier of the rescore execution plan that you want to get information // on. // // This member is required. Id *string noSmithyDocumentSerde } type DescribeRescoreExecutionPlanOutput struct { // The Amazon Resource Name (ARN) of the rescore execution plan. Arn *string // The capacity units set for the rescore execution plan. A capacity of zero // indicates that the rescore execution plan is using the default capacity. For // more information on the default capacity and additional capacity units, see // Adjusting capacity (https://docs.aws.amazon.com/kendra/latest/dg/adjusting-capacity.html) // . CapacityUnits *types.CapacityUnitsConfiguration // The Unix timestamp of when the rescore execution plan was created. CreatedAt *time.Time // The description for the rescore execution plan. Description *string // When the Status field value is FAILED , the ErrorMessage field contains a // message that explains why. ErrorMessage *string // The identifier of the rescore execution plan. Id *string // The name for the rescore execution plan. Name *string // The current status of the rescore execution plan. When the value is ACTIVE , the // rescore execution plan is ready for use. If the Status field value is FAILED , // the ErrorMessage field contains a message that explains why. Status types.RescoreExecutionPlanStatus // The Unix timestamp of when the rescore execution plan was last updated. UpdatedAt *time.Time // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeRescoreExecutionPlanMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpDescribeRescoreExecutionPlan{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDescribeRescoreExecutionPlan{}, 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 = addOpDescribeRescoreExecutionPlanValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRescoreExecutionPlan(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribeRescoreExecutionPlan(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra-ranking", OperationName: "DescribeRescoreExecutionPlan", } }
160
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendraranking 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/kendraranking/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists your rescore execution plans. A rescore execution plan is an Amazon // Kendra Intelligent Ranking resource used for provisioning the Rescore API. func (c *Client) ListRescoreExecutionPlans(ctx context.Context, params *ListRescoreExecutionPlansInput, optFns ...func(*Options)) (*ListRescoreExecutionPlansOutput, error) { if params == nil { params = &ListRescoreExecutionPlansInput{} } result, metadata, err := c.invokeOperation(ctx, "ListRescoreExecutionPlans", params, optFns, c.addOperationListRescoreExecutionPlansMiddlewares) if err != nil { return nil, err } out := result.(*ListRescoreExecutionPlansOutput) out.ResultMetadata = metadata return out, nil } type ListRescoreExecutionPlansInput struct { // The maximum number of rescore execution plans to return. MaxResults *int32 // If the response is truncated, Amazon Kendra Intelligent Ranking returns a // pagination token in the response. You can use this pagination token to retrieve // the next set of rescore execution plans. NextToken *string noSmithyDocumentSerde } type ListRescoreExecutionPlansOutput struct { // If the response is truncated, Amazon Kendra Intelligent Ranking returns a // pagination token in the response. NextToken *string // An array of summary information for one or more rescore execution plans. SummaryItems []types.RescoreExecutionPlanSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListRescoreExecutionPlansMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpListRescoreExecutionPlans{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListRescoreExecutionPlans{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRescoreExecutionPlans(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 } // ListRescoreExecutionPlansAPIClient is a client that implements the // ListRescoreExecutionPlans operation. type ListRescoreExecutionPlansAPIClient interface { ListRescoreExecutionPlans(context.Context, *ListRescoreExecutionPlansInput, ...func(*Options)) (*ListRescoreExecutionPlansOutput, error) } var _ ListRescoreExecutionPlansAPIClient = (*Client)(nil) // ListRescoreExecutionPlansPaginatorOptions is the paginator options for // ListRescoreExecutionPlans type ListRescoreExecutionPlansPaginatorOptions struct { // The maximum number of rescore execution plans to return. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListRescoreExecutionPlansPaginator is a paginator for ListRescoreExecutionPlans type ListRescoreExecutionPlansPaginator struct { options ListRescoreExecutionPlansPaginatorOptions client ListRescoreExecutionPlansAPIClient params *ListRescoreExecutionPlansInput nextToken *string firstPage bool } // NewListRescoreExecutionPlansPaginator returns a new // ListRescoreExecutionPlansPaginator func NewListRescoreExecutionPlansPaginator(client ListRescoreExecutionPlansAPIClient, params *ListRescoreExecutionPlansInput, optFns ...func(*ListRescoreExecutionPlansPaginatorOptions)) *ListRescoreExecutionPlansPaginator { if params == nil { params = &ListRescoreExecutionPlansInput{} } options := ListRescoreExecutionPlansPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListRescoreExecutionPlansPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRescoreExecutionPlansPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRescoreExecutionPlans page. func (p *ListRescoreExecutionPlansPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRescoreExecutionPlansOutput, 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.ListRescoreExecutionPlans(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListRescoreExecutionPlans(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra-ranking", OperationName: "ListRescoreExecutionPlans", } }
223
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendraranking import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendraranking/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets a list of tags associated with a specified resource. A rescore execution // plan is an example of a resource that can have tags associated with it. func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) if err != nil { return nil, err } out := result.(*ListTagsForResourceOutput) out.ResultMetadata = metadata return out, nil } // The request information for listing tags associated with a rescore execution // plan. A rescore execution plan is an Amazon Kendra Intelligent Ranking resource // used for provisioning the Rescore API. type ListTagsForResourceInput struct { // The Amazon Resource Name (ARN) of the rescore execution plan to get a list of // tags for. // // This member is required. ResourceARN *string noSmithyDocumentSerde } // If the action is successful, the service sends back an HTTP 200 response. type ListTagsForResourceOutput struct { // A list of tags associated with the rescore execution plan. Tags []types.Tag // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpListTagsForResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListTagsForResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra-ranking", OperationName: "ListTagsForResource", } }
131
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendraranking import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendraranking/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Rescores or re-ranks search results from a search service such as OpenSearch // (self managed). You use the semantic search capabilities of Amazon Kendra // Intelligent Ranking to improve the search service's results. func (c *Client) Rescore(ctx context.Context, params *RescoreInput, optFns ...func(*Options)) (*RescoreOutput, error) { if params == nil { params = &RescoreInput{} } result, metadata, err := c.invokeOperation(ctx, "Rescore", params, optFns, c.addOperationRescoreMiddlewares) if err != nil { return nil, err } out := result.(*RescoreOutput) out.ResultMetadata = metadata return out, nil } type RescoreInput struct { // The list of documents for Amazon Kendra Intelligent Ranking to rescore or rank // on. // // This member is required. Documents []types.Document // The identifier of the rescore execution plan. A rescore execution plan is an // Amazon Kendra Intelligent Ranking resource used for provisioning the Rescore // API. // // This member is required. RescoreExecutionPlanId *string // The input query from the search service. // // This member is required. SearchQuery *string noSmithyDocumentSerde } type RescoreOutput struct { // The identifier associated with the scores that Amazon Kendra Intelligent // Ranking gives to the results. Amazon Kendra Intelligent Ranking rescores or // re-ranks the results for the search service. RescoreId *string // A list of result items for documents with new relevancy scores. The results are // in descending order. ResultItems []types.RescoreResultItem // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRescoreMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpRescore{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpRescore{}, 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 = addOpRescoreValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRescore(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opRescore(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra-ranking", OperationName: "Rescore", } }
146
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendraranking import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendraranking/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Adds a specified tag to a specified rescore execution plan. A rescore execution // plan is an Amazon Kendra Intelligent Ranking resource used for provisioning the // Rescore API. If the tag already exists, the existing value is replaced with the // new value. func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) if err != nil { return nil, err } out := result.(*TagResourceOutput) out.ResultMetadata = metadata return out, nil } // The request information for tagging a rescore execution plan. A rescore // execution plan is an Amazon Kendra Intelligent Ranking resource used for // provisioning the Rescore API. type TagResourceInput struct { // The Amazon Resource Name (ARN) of the rescore execution plan to tag. // // This member is required. ResourceARN *string // A list of tag keys to add to a rescore execution plan. If a tag already exists, // the existing value is replaced with the new value. // // This member is required. Tags []types.Tag noSmithyDocumentSerde } // If the action is successful, the service sends back an HTTP 200 response with // an empty HTTP body. type TagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpTagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpTagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra-ranking", OperationName: "TagResource", } }
135
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendraranking import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes a tag from a rescore execution plan. A rescore execution plan is an // Amazon Kendra Intelligent Ranking resource used for provisioning the Rescore // operation. func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) if err != nil { return nil, err } out := result.(*UntagResourceOutput) out.ResultMetadata = metadata return out, nil } // The request information to remove a tag from a rescore execution plan. A // rescore execution plan is an Amazon Kendra Intelligent Ranking resource used for // provisioning the Rescore API. type UntagResourceInput struct { // The Amazon Resource Name (ARN) of the rescore execution plan to remove the tag. // // This member is required. ResourceARN *string // A list of tag keys to remove from the rescore execution plan. If a tag key does // not exist on the resource, it is ignored. // // This member is required. TagKeys []string noSmithyDocumentSerde } // If the action is successful, the service sends back an HTTP 200 response with // an empty HTTP body. type UntagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpUntagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUntagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra-ranking", OperationName: "UntagResource", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendraranking import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kendraranking/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates a rescore execution plan. A rescore execution plan is an Amazon Kendra // Intelligent Ranking resource used for provisioning the Rescore API. You can // update the number of capacity units you require for Amazon Kendra Intelligent // Ranking to rescore or re-rank a search service's results. func (c *Client) UpdateRescoreExecutionPlan(ctx context.Context, params *UpdateRescoreExecutionPlanInput, optFns ...func(*Options)) (*UpdateRescoreExecutionPlanOutput, error) { if params == nil { params = &UpdateRescoreExecutionPlanInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateRescoreExecutionPlan", params, optFns, c.addOperationUpdateRescoreExecutionPlanMiddlewares) if err != nil { return nil, err } out := result.(*UpdateRescoreExecutionPlanOutput) out.ResultMetadata = metadata return out, nil } type UpdateRescoreExecutionPlanInput struct { // The identifier of the rescore execution plan that you want to update. // // This member is required. Id *string // You can set additional capacity units to meet the needs of your rescore // execution plan. You are given a single capacity unit by default. If you want to // use the default capacity, you don't set additional capacity units. For more // information on the default capacity and additional capacity units, see // Adjusting capacity (https://docs.aws.amazon.com/kendra/latest/dg/adjusting-capacity.html) // . CapacityUnits *types.CapacityUnitsConfiguration // A new description for the rescore execution plan. Description *string // A new name for the rescore execution plan. Name *string noSmithyDocumentSerde } type UpdateRescoreExecutionPlanOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateRescoreExecutionPlanMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateRescoreExecutionPlan{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateRescoreExecutionPlan{}, 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 = addOpUpdateRescoreExecutionPlanValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRescoreExecutionPlan(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateRescoreExecutionPlan(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kendra-ranking", OperationName: "UpdateRescoreExecutionPlan", } }
138
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendraranking import ( "bytes" "context" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/kendraranking/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "io/ioutil" "math" "strings" ) type awsAwsjson10_deserializeOpCreateRescoreExecutionPlan struct { } func (*awsAwsjson10_deserializeOpCreateRescoreExecutionPlan) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpCreateRescoreExecutionPlan) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorCreateRescoreExecutionPlan(response, &metadata) } output := &CreateRescoreExecutionPlanOutput{} 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_deserializeOpDocumentCreateRescoreExecutionPlanOutput(&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_deserializeOpErrorCreateRescoreExecutionPlan(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return 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("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_deserializeOpDeleteRescoreExecutionPlan struct { } func (*awsAwsjson10_deserializeOpDeleteRescoreExecutionPlan) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpDeleteRescoreExecutionPlan) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorDeleteRescoreExecutionPlan(response, &metadata) } output := &DeleteRescoreExecutionPlanOutput{} 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_deserializeOpErrorDeleteRescoreExecutionPlan(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return 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 } } type awsAwsjson10_deserializeOpDescribeRescoreExecutionPlan struct { } func (*awsAwsjson10_deserializeOpDescribeRescoreExecutionPlan) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpDescribeRescoreExecutionPlan) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorDescribeRescoreExecutionPlan(response, &metadata) } output := &DescribeRescoreExecutionPlanOutput{} 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_deserializeOpDocumentDescribeRescoreExecutionPlanOutput(&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_deserializeOpErrorDescribeRescoreExecutionPlan(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return 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_deserializeOpListRescoreExecutionPlans struct { } func (*awsAwsjson10_deserializeOpListRescoreExecutionPlans) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpListRescoreExecutionPlans) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorListRescoreExecutionPlans(response, &metadata) } output := &ListRescoreExecutionPlansOutput{} 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_deserializeOpDocumentListRescoreExecutionPlansOutput(&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_deserializeOpErrorListRescoreExecutionPlans(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(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_deserializeOpListTagsForResource struct { } func (*awsAwsjson10_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorListTagsForResource(response, &metadata) } output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(&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_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceUnavailableException", errorCode): return awsAwsjson10_deserializeErrorResourceUnavailableException(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_deserializeOpRescore struct { } func (*awsAwsjson10_deserializeOpRescore) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpRescore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorRescore(response, &metadata) } output := &RescoreOutput{} 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_deserializeOpDocumentRescoreOutput(&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_deserializeOpErrorRescore(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return 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 } } type awsAwsjson10_deserializeOpTagResource struct { } func (*awsAwsjson10_deserializeOpTagResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorTagResource(response, &metadata) } output := &TagResourceOutput{} 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_deserializeOpDocumentTagResourceOutput(&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_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceUnavailableException", errorCode): return awsAwsjson10_deserializeErrorResourceUnavailableException(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_deserializeOpUntagResource struct { } func (*awsAwsjson10_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorUntagResource(response, &metadata) } output := &UntagResourceOutput{} 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_deserializeOpDocumentUntagResourceOutput(&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_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceUnavailableException", errorCode): return awsAwsjson10_deserializeErrorResourceUnavailableException(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_deserializeOpUpdateRescoreExecutionPlan struct { } func (*awsAwsjson10_deserializeOpUpdateRescoreExecutionPlan) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpUpdateRescoreExecutionPlan) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorUpdateRescoreExecutionPlan(response, &metadata) } output := &UpdateRescoreExecutionPlanOutput{} 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_deserializeOpErrorUpdateRescoreExecutionPlan(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return 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 } } 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_deserializeErrorResourceUnavailableException(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.ResourceUnavailableException{} err := awsAwsjson10_deserializeDocumentResourceUnavailableException(&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": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentCapacityUnitsConfiguration(v **types.CapacityUnitsConfiguration, 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.CapacityUnitsConfiguration if *v == nil { sv = &types.CapacityUnitsConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "RescoreCapacityUnits": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected RescoreCapacityUnit to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.RescoreCapacityUnits = ptr.Int32(int32(i64)) } default: _, _ = key, value } } *v = sv 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": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InternalServerException if *v == nil { sv = &types.InternalServerException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentRescoreExecutionPlanSummary(v **types.RescoreExecutionPlanSummary, 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.RescoreExecutionPlanSummary if *v == nil { sv = &types.RescoreExecutionPlanSummary{} } else { sv = *v } for key, value := range shape { switch key { case "CreatedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RescoreExecutionPlanId to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RescoreExecutionPlanName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "Status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RescoreExecutionPlanStatus to be of type string, got %T instead", value) } sv.Status = types.RescoreExecutionPlanStatus(jtv) } case "UpdatedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentRescoreExecutionPlanSummaryList(v *[]types.RescoreExecutionPlanSummary, 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.RescoreExecutionPlanSummary if *v == nil { cv = []types.RescoreExecutionPlanSummary{} } else { cv = *v } for _, value := range shape { var col types.RescoreExecutionPlanSummary destAddr := &col if err := awsAwsjson10_deserializeDocumentRescoreExecutionPlanSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentRescoreResultItem(v **types.RescoreResultItem, 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.RescoreResultItem if *v == nil { sv = &types.RescoreResultItem{} } else { sv = *v } for key, value := range shape { switch key { case "DocumentId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DocumentId to be of type string, got %T instead", value) } sv.DocumentId = ptr.String(jtv) } case "Score": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.Score = ptr.Float32(float32(f64)) case string: var f64 float64 switch { case strings.EqualFold(jtv, "NaN"): f64 = math.NaN() case strings.EqualFold(jtv, "Infinity"): f64 = math.Inf(1) case strings.EqualFold(jtv, "-Infinity"): f64 = math.Inf(-1) default: return fmt.Errorf("unknown JSON number value: %s", jtv) } sv.Score = ptr.Float32(float32(f64)) default: return fmt.Errorf("expected Float to be a JSON Number, got %T instead", value) } } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentRescoreResultItemList(v *[]types.RescoreResultItem, 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.RescoreResultItem if *v == nil { cv = []types.RescoreResultItem{} } else { cv = *v } for _, value := range shape { var col types.RescoreResultItem destAddr := &col if err := awsAwsjson10_deserializeDocumentRescoreResultItem(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ResourceNotFoundException if *v == nil { sv = &types.ResourceNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentResourceUnavailableException(v **types.ResourceUnavailableException, 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.ResourceUnavailableException if *v == nil { sv = &types.ResourceUnavailableException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ServiceQuotaExceededException if *v == nil { sv = &types.ServiceQuotaExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentTag(v **types.Tag, 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.Tag if *v == nil { sv = &types.Tag{} } else { sv = *v } for key, value := range shape { switch key { case "Key": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TagKey to be of type string, got %T instead", value) } sv.Key = ptr.String(jtv) } case "Value": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) } sv.Value = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentTagList(v *[]types.Tag, 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.Tag if *v == nil { cv = []types.Tag{} } else { cv = *v } for _, value := range shape { var col types.Tag destAddr := &col if err := awsAwsjson10_deserializeDocumentTag(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ThrottlingException if *v == nil { sv = &types.ThrottlingException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ValidationException if *v == nil { sv = &types.ValidationException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentCreateRescoreExecutionPlanOutput(v **CreateRescoreExecutionPlanOutput, 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 *CreateRescoreExecutionPlanOutput if *v == nil { sv = &CreateRescoreExecutionPlanOutput{} } 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 RescoreExecutionPlanArn 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 RescoreExecutionPlanId to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentDescribeRescoreExecutionPlanOutput(v **DescribeRescoreExecutionPlanOutput, 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 *DescribeRescoreExecutionPlanOutput if *v == nil { sv = &DescribeRescoreExecutionPlanOutput{} } 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 RescoreExecutionPlanArn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "CapacityUnits": if err := awsAwsjson10_deserializeDocumentCapacityUnitsConfiguration(&sv.CapacityUnits, value); err != nil { return err } case "CreatedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "ErrorMessage": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.ErrorMessage = ptr.String(jtv) } case "Id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RescoreExecutionPlanId to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RescoreExecutionPlanName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "Status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RescoreExecutionPlanStatus to be of type string, got %T instead", value) } sv.Status = types.RescoreExecutionPlanStatus(jtv) } case "UpdatedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentListRescoreExecutionPlansOutput(v **ListRescoreExecutionPlansOutput, 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 *ListRescoreExecutionPlansOutput if *v == nil { sv = &ListRescoreExecutionPlansOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "SummaryItems": if err := awsAwsjson10_deserializeDocumentRescoreExecutionPlanSummaryList(&sv.SummaryItems, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListTagsForResourceOutput if *v == nil { sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Tags": if err := awsAwsjson10_deserializeDocumentTagList(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentRescoreOutput(v **RescoreOutput, 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 *RescoreOutput if *v == nil { sv = &RescoreOutput{} } else { sv = *v } for key, value := range shape { switch key { case "RescoreId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RescoreId to be of type string, got %T instead", value) } sv.RescoreId = ptr.String(jtv) } case "ResultItems": if err := awsAwsjson10_deserializeDocumentRescoreResultItemList(&sv.ResultItems, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, 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 *TagResourceOutput if *v == nil { sv = &TagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, 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 *UntagResourceOutput if *v == nil { sv = &UntagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil }
2,416
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package kendraranking provides the API client, operations, and parameter types // for Amazon Kendra Intelligent Ranking. // // Amazon Kendra Intelligent Ranking uses Amazon Kendra semantic search // capabilities to intelligently re-rank a search service's results. package kendraranking
9
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendraranking import ( "context" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" internalendpoints "github.com/aws/aws-sdk-go-v2/service/kendraranking/internal/endpoints" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net/url" "strings" ) // EndpointResolverOptions is the service endpoint resolver options type EndpointResolverOptions = internalendpoints.Options // EndpointResolver interface for resolving service endpoints. type EndpointResolver interface { ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) } var _ EndpointResolver = &internalendpoints.Resolver{} // NewDefaultEndpointResolver constructs a new service endpoint resolver func NewDefaultEndpointResolver() *internalendpoints.Resolver { return internalendpoints.New() } // EndpointResolverFunc is a helper utility that wraps a function so it satisfies // the EndpointResolver interface. This is useful when you want to add additional // endpoint resolving logic, or stub out specific endpoints with custom values. type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { return fn(region, options) } func resolveDefaultEndpointConfiguration(o *Options) { if o.EndpointResolver != nil { return } o.EndpointResolver = NewDefaultEndpointResolver() } // EndpointResolverFromURL returns an EndpointResolver configured using the // provided endpoint url. By default, the resolved endpoint resolver uses the // client region as signing region, and the endpoint source is set to // EndpointSourceCustom.You can provide functional options to configure endpoint // values for the resolved endpoint. func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} for _, fn := range optFns { fn(&e) } return EndpointResolverFunc( func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { if len(e.SigningRegion) == 0 { e.SigningRegion = region } return e, nil }, ) } type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions } func (*ResolveEndpoint) ID() string { return "ResolveEndpoint" } func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) } if m.Resolver == nil { return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } eo := m.Options eo.Logger = middleware.GetLogger(ctx) var endpoint aws.Endpoint endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } req.URL, err = url.Parse(endpoint.URL) if err != nil { return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) } if len(awsmiddleware.GetSigningName(ctx)) == 0 { signingName := endpoint.SigningName if len(signingName) == 0 { signingName = "kendra-ranking" } ctx = awsmiddleware.SetSigningName(ctx, signingName) } ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) return next.HandleSerialize(ctx, in) } func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { return stack.Serialize.Insert(&ResolveEndpoint{ Resolver: o.EndpointResolver, Options: o.EndpointOptions, }, "OperationSerializer", middleware.Before) } func removeResolveEndpointMiddleware(stack *middleware.Stack) error { _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) return err } type wrappedEndpointResolver struct { awsResolver aws.EndpointResolverWithOptions resolver EndpointResolver } func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { if w.awsResolver == nil { goto fallback } endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) if err == nil { return endpoint, nil } if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { return endpoint, err } fallback: if w.resolver == nil { return endpoint, fmt.Errorf("default endpoint resolver provided was nil") } return w.resolver.ResolveEndpoint(region, options) } type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { return a(service, region) } var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) // withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. // If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided // fallbackResolver for resolution. // // fallbackResolver must not be nil func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { var resolver aws.EndpointResolverWithOptions if awsResolverWithOptions != nil { resolver = awsResolverWithOptions } else if awsResolver != nil { resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) } return &wrappedEndpointResolver{ awsResolver: resolver, resolver: fallbackResolver, } } func finalizeClientEndpointResolverOptions(options *Options) { options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() if len(options.EndpointOptions.ResolvedRegion) == 0 { const fipsInfix = "-fips-" const fipsPrefix = "fips-" const fipsSuffix = "-fips" if strings.Contains(options.Region, fipsInfix) || strings.Contains(options.Region, fipsPrefix) || strings.Contains(options.Region, fipsSuffix) { options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled } } }
201
aws-sdk-go-v2
aws
Go
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. package kendraranking // goModuleVersion is the tagged release for this module const goModuleVersion = "1.0.16"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendraranking
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendraranking import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/kendraranking/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "math" "path" ) type awsAwsjson10_serializeOpCreateRescoreExecutionPlan struct { } func (*awsAwsjson10_serializeOpCreateRescoreExecutionPlan) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpCreateRescoreExecutionPlan) 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.(*CreateRescoreExecutionPlanInput) _ = 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("AWSKendraRerankingFrontendService.CreateRescoreExecutionPlan") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentCreateRescoreExecutionPlanInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpDeleteRescoreExecutionPlan struct { } func (*awsAwsjson10_serializeOpDeleteRescoreExecutionPlan) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpDeleteRescoreExecutionPlan) 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.(*DeleteRescoreExecutionPlanInput) _ = 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("AWSKendraRerankingFrontendService.DeleteRescoreExecutionPlan") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentDeleteRescoreExecutionPlanInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpDescribeRescoreExecutionPlan struct { } func (*awsAwsjson10_serializeOpDescribeRescoreExecutionPlan) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpDescribeRescoreExecutionPlan) 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.(*DescribeRescoreExecutionPlanInput) _ = 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("AWSKendraRerankingFrontendService.DescribeRescoreExecutionPlan") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentDescribeRescoreExecutionPlanInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpListRescoreExecutionPlans struct { } func (*awsAwsjson10_serializeOpListRescoreExecutionPlans) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpListRescoreExecutionPlans) 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.(*ListRescoreExecutionPlansInput) _ = 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("AWSKendraRerankingFrontendService.ListRescoreExecutionPlans") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentListRescoreExecutionPlansInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpListTagsForResource struct { } func (*awsAwsjson10_serializeOpListTagsForResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListTagsForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraRerankingFrontendService.ListTagsForResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpRescore struct { } func (*awsAwsjson10_serializeOpRescore) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpRescore) 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.(*RescoreInput) _ = 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("AWSKendraRerankingFrontendService.Rescore") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentRescoreInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpTagResource struct { } func (*awsAwsjson10_serializeOpTagResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraRerankingFrontendService.TagResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpUntagResource struct { } func (*awsAwsjson10_serializeOpUntagResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSKendraRerankingFrontendService.UntagResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpUpdateRescoreExecutionPlan struct { } func (*awsAwsjson10_serializeOpUpdateRescoreExecutionPlan) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpUpdateRescoreExecutionPlan) 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.(*UpdateRescoreExecutionPlanInput) _ = 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("AWSKendraRerankingFrontendService.UpdateRescoreExecutionPlan") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentUpdateRescoreExecutionPlanInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsAwsjson10_serializeDocumentBodyTokensList(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_serializeDocumentCapacityUnitsConfiguration(v *types.CapacityUnitsConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RescoreCapacityUnits != nil { ok := object.Key("RescoreCapacityUnits") ok.Integer(*v.RescoreCapacityUnits) } return nil } func awsAwsjson10_serializeDocumentDocument(v *types.Document, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Body != nil { ok := object.Key("Body") ok.String(*v.Body) } if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.OriginalScore != nil { ok := object.Key("OriginalScore") switch { case math.IsNaN(float64(*v.OriginalScore)): ok.String("NaN") case math.IsInf(float64(*v.OriginalScore), 1): ok.String("Infinity") case math.IsInf(float64(*v.OriginalScore), -1): ok.String("-Infinity") default: ok.Float(*v.OriginalScore) } } if v.Title != nil { ok := object.Key("Title") ok.String(*v.Title) } if v.TokenizedBody != nil { ok := object.Key("TokenizedBody") if err := awsAwsjson10_serializeDocumentBodyTokensList(v.TokenizedBody, ok); err != nil { return err } } if v.TokenizedTitle != nil { ok := object.Key("TokenizedTitle") if err := awsAwsjson10_serializeDocumentTitleTokensList(v.TokenizedTitle, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentDocumentList(v []types.Document, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentDocument(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Key != nil { ok := object.Key("Key") ok.String(*v.Key) } if v.Value != nil { ok := object.Key("Value") ok.String(*v.Value) } return nil } func awsAwsjson10_serializeDocumentTagKeyList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson10_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentTag(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentTitleTokensList(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_serializeOpDocumentCreateRescoreExecutionPlanInput(v *CreateRescoreExecutionPlanInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CapacityUnits != nil { ok := object.Key("CapacityUnits") if err := awsAwsjson10_serializeDocumentCapacityUnitsConfiguration(v.CapacityUnits, ok); err != nil { return err } } if v.ClientToken != nil { ok := object.Key("ClientToken") ok.String(*v.ClientToken) } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeOpDocumentDeleteRescoreExecutionPlanInput(v *DeleteRescoreExecutionPlanInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } return nil } func awsAwsjson10_serializeOpDocumentDescribeRescoreExecutionPlanInput(v *DescribeRescoreExecutionPlanInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } return nil } func awsAwsjson10_serializeOpDocumentListRescoreExecutionPlansInput(v *ListRescoreExecutionPlansInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson10_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } return nil } func awsAwsjson10_serializeOpDocumentRescoreInput(v *RescoreInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Documents != nil { ok := object.Key("Documents") if err := awsAwsjson10_serializeDocumentDocumentList(v.Documents, ok); err != nil { return err } } if v.RescoreExecutionPlanId != nil { ok := object.Key("RescoreExecutionPlanId") ok.String(*v.RescoreExecutionPlanId) } if v.SearchQuery != nil { ok := object.Key("SearchQuery") ok.String(*v.SearchQuery) } return nil } func awsAwsjson10_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } if v.TagKeys != nil { ok := object.Key("TagKeys") if err := awsAwsjson10_serializeDocumentTagKeyList(v.TagKeys, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeOpDocumentUpdateRescoreExecutionPlanInput(v *UpdateRescoreExecutionPlanInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CapacityUnits != nil { ok := object.Key("CapacityUnits") if err := awsAwsjson10_serializeDocumentCapacityUnitsConfiguration(v.CapacityUnits, ok); err != nil { return err } } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.Id != nil { ok := object.Key("Id") ok.String(*v.Id) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } return nil }
839
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kendraranking import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/kendraranking/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpCreateRescoreExecutionPlan struct { } func (*validateOpCreateRescoreExecutionPlan) ID() string { return "OperationInputValidation" } func (m *validateOpCreateRescoreExecutionPlan) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateRescoreExecutionPlanInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateRescoreExecutionPlanInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteRescoreExecutionPlan struct { } func (*validateOpDeleteRescoreExecutionPlan) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteRescoreExecutionPlan) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteRescoreExecutionPlanInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteRescoreExecutionPlanInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeRescoreExecutionPlan struct { } func (*validateOpDescribeRescoreExecutionPlan) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeRescoreExecutionPlan) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeRescoreExecutionPlanInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeRescoreExecutionPlanInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListTagsForResource struct { } func (*validateOpListTagsForResource) ID() string { return "OperationInputValidation" } func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListTagsForResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListTagsForResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRescore struct { } func (*validateOpRescore) ID() string { return "OperationInputValidation" } func (m *validateOpRescore) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RescoreInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRescoreInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagResource struct { } func (*validateOpTagResource) ID() string { return "OperationInputValidation" } func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagResource struct { } func (*validateOpUntagResource) ID() string { return "OperationInputValidation" } func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateRescoreExecutionPlan struct { } func (*validateOpUpdateRescoreExecutionPlan) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateRescoreExecutionPlan) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateRescoreExecutionPlanInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateRescoreExecutionPlanInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpCreateRescoreExecutionPlanValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateRescoreExecutionPlan{}, middleware.After) } func addOpDeleteRescoreExecutionPlanValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteRescoreExecutionPlan{}, middleware.After) } func addOpDescribeRescoreExecutionPlanValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeRescoreExecutionPlan{}, middleware.After) } func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } func addOpRescoreValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRescore{}, middleware.After) } func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } func addOpUpdateRescoreExecutionPlanValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateRescoreExecutionPlan{}, middleware.After) } func validateCapacityUnitsConfiguration(v *types.CapacityUnitsConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CapacityUnitsConfiguration"} if v.RescoreCapacityUnits == nil { invalidParams.Add(smithy.NewErrParamRequired("RescoreCapacityUnits")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDocument(v *types.Document) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Document"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.OriginalScore == nil { invalidParams.Add(smithy.NewErrParamRequired("OriginalScore")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDocumentList(v []types.Document) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DocumentList"} for i := range v { if err := validateDocument(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTag(v *types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Tag"} if v.Key == nil { invalidParams.Add(smithy.NewErrParamRequired("Key")) } if v.Value == nil { invalidParams.Add(smithy.NewErrParamRequired("Value")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTagList(v []types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagList"} for i := range v { if err := validateTag(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateRescoreExecutionPlanInput(v *CreateRescoreExecutionPlanInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateRescoreExecutionPlanInput"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.CapacityUnits != nil { if err := validateCapacityUnitsConfiguration(v.CapacityUnits); err != nil { invalidParams.AddNested("CapacityUnits", err.(smithy.InvalidParamsError)) } } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteRescoreExecutionPlanInput(v *DeleteRescoreExecutionPlanInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteRescoreExecutionPlanInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeRescoreExecutionPlanInput(v *DescribeRescoreExecutionPlanInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeRescoreExecutionPlanInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRescoreInput(v *RescoreInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RescoreInput"} if v.RescoreExecutionPlanId == nil { invalidParams.Add(smithy.NewErrParamRequired("RescoreExecutionPlanId")) } if v.SearchQuery == nil { invalidParams.Add(smithy.NewErrParamRequired("SearchQuery")) } if v.Documents == nil { invalidParams.Add(smithy.NewErrParamRequired("Documents")) } else if v.Documents != nil { if err := validateDocumentList(v.Documents); err != nil { invalidParams.AddNested("Documents", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagResourceInput(v *TagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } else if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagResourceInput(v *UntagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateRescoreExecutionPlanInput(v *UpdateRescoreExecutionPlanInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateRescoreExecutionPlanInput"} if v.Id == nil { invalidParams.Add(smithy.NewErrParamRequired("Id")) } if v.CapacityUnits != nil { if err := validateCapacityUnitsConfiguration(v.CapacityUnits); err != nil { invalidParams.AddNested("CapacityUnits", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
444
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "github.com/aws/aws-sdk-go-v2/aws" endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" "github.com/aws/smithy-go/logging" "regexp" ) // Options is the endpoint resolver configuration options type Options struct { // Logger is a logging implementation that log events should be sent to. Logger logging.Logger // LogDeprecated indicates that deprecated endpoints should be logged to the // provided logger. LogDeprecated bool // ResolvedRegion is used to override the region to be resolved, rather then the // using the value passed to the ResolveEndpoint method. This value is used by the // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative // name. You must not set this value directly in your application. ResolvedRegion string // DisableHTTPS informs the resolver to return an endpoint that does not use the // HTTPS scheme. DisableHTTPS bool // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. UseDualStackEndpoint aws.DualStackEndpointState // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. UseFIPSEndpoint aws.FIPSEndpointState } func (o Options) GetResolvedRegion() string { return o.ResolvedRegion } func (o Options) GetDisableHTTPS() bool { return o.DisableHTTPS } func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { return o.UseDualStackEndpoint } func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { return o.UseFIPSEndpoint } func transformToSharedOptions(options Options) endpoints.Options { return endpoints.Options{ Logger: options.Logger, LogDeprecated: options.LogDeprecated, ResolvedRegion: options.ResolvedRegion, DisableHTTPS: options.DisableHTTPS, UseDualStackEndpoint: options.UseDualStackEndpoint, UseFIPSEndpoint: options.UseFIPSEndpoint, } } // Resolver Kendra Ranking endpoint resolver type Resolver struct { partitions endpoints.Partitions } // ResolveEndpoint resolves the service endpoint for the given region and options func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { if len(region) == 0 { return endpoint, &aws.MissingRegionError{} } opt := transformToSharedOptions(options) return r.partitions.ResolveEndpoint(region, opt) } // New returns a new Resolver func New() *Resolver { return &Resolver{ partitions: defaultPartitions, } } var partitionRegexp = struct { Aws *regexp.Regexp AwsCn *regexp.Regexp AwsIso *regexp.Regexp AwsIsoB *regexp.Regexp AwsIsoE *regexp.Regexp AwsIsoF *regexp.Regexp AwsUsGov *regexp.Regexp }{ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), } var defaultPartitions = endpoints.Partitions{ { ID: "aws", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "kendra-ranking.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-ranking-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "kendra-ranking-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kendra-ranking.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "af-south-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.af-south-1.api.aws", }, endpoints.EndpointKey{ Region: "ap-east-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.ap-east-1.api.aws", }, endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.ap-northeast-1.api.aws", }, endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{ Hostname: "kendra-ranking.ap-northeast-2.api.aws", }, endpoints.EndpointKey{ Region: "ap-northeast-3", }: endpoints.Endpoint{ Hostname: "kendra-ranking.ap-northeast-3.api.aws", }, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.ap-south-1.api.aws", }, endpoints.EndpointKey{ Region: "ap-south-2", }: endpoints.Endpoint{ Hostname: "kendra-ranking.ap-south-2.api.aws", }, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.ap-southeast-1.api.aws", }, endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{ Hostname: "kendra-ranking.ap-southeast-2.api.aws", }, endpoints.EndpointKey{ Region: "ap-southeast-3", }: endpoints.Endpoint{ Hostname: "kendra-ranking.ap-southeast-3.api.aws", }, endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{ Hostname: "kendra-ranking.ap-southeast-4.api.aws", }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.ca-central-1.api.aws", }, endpoints.EndpointKey{ Region: "ca-central-1", Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-ranking-fips.ca-central-1.api.aws", }, endpoints.EndpointKey{ Region: "eu-central-2", }: endpoints.Endpoint{ Hostname: "kendra-ranking.eu-central-2.api.aws", }, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.eu-north-1.api.aws", }, endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.eu-south-1.api.aws", }, endpoints.EndpointKey{ Region: "eu-south-2", }: endpoints.Endpoint{ Hostname: "kendra-ranking.eu-south-2.api.aws", }, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.eu-west-1.api.aws", }, endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{ Hostname: "kendra-ranking.eu-west-3.api.aws", }, endpoints.EndpointKey{ Region: "me-central-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.me-central-1.api.aws", }, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.me-south-1.api.aws", }, endpoints.EndpointKey{ Region: "sa-east-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.sa-east-1.api.aws", }, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.us-east-1.api.aws", }, endpoints.EndpointKey{ Region: "us-east-1", Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-ranking-fips.us-east-1.api.aws", }, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{ Hostname: "kendra-ranking.us-east-2.api.aws", }, endpoints.EndpointKey{ Region: "us-east-2", Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-ranking-fips.us-east-2.api.aws", }, endpoints.EndpointKey{ Region: "us-west-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.us-west-1.api.aws", }, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{ Hostname: "kendra-ranking.us-west-2.api.aws", }, endpoints.EndpointKey{ Region: "us-west-2", Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-ranking-fips.us-west-2.api.aws", }, }, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "kendra-ranking.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-ranking-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "kendra-ranking-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kendra-ranking.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "cn-north-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.cn-north-1.api.amazonwebservices.com.cn", }, endpoints.EndpointKey{ Region: "cn-northwest-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.cn-northwest-1.api.amazonwebservices.com.cn", }, }, }, { ID: "aws-iso", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-ranking-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kendra-ranking.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, }, { ID: "aws-iso-b", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-ranking-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kendra-ranking.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, }, { ID: "aws-iso-e", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-ranking-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kendra-ranking.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoE, IsRegionalized: true, }, { ID: "aws-iso-f", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-ranking-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kendra-ranking.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoF, IsRegionalized: true, }, { ID: "aws-us-gov", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "kendra-ranking.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "kendra-ranking-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "kendra-ranking-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kendra-ranking.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "us-gov-east-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.us-gov-east-1.api.aws", }, endpoints.EndpointKey{ Region: "us-gov-west-1", }: endpoints.Endpoint{ Hostname: "kendra-ranking.us-gov-west-1.api.aws", }, }, }, }
472
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "testing" ) func TestRegexCompile(t *testing.T) { _ = defaultPartitions }
12
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types type RescoreExecutionPlanStatus string // Enum values for RescoreExecutionPlanStatus const ( RescoreExecutionPlanStatusCreating RescoreExecutionPlanStatus = "CREATING" RescoreExecutionPlanStatusUpdating RescoreExecutionPlanStatus = "UPDATING" RescoreExecutionPlanStatusActive RescoreExecutionPlanStatus = "ACTIVE" RescoreExecutionPlanStatusDeleting RescoreExecutionPlanStatus = "DELETING" RescoreExecutionPlanStatusFailed RescoreExecutionPlanStatus = "FAILED" ) // Values returns all known values for RescoreExecutionPlanStatus. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (RescoreExecutionPlanStatus) Values() []RescoreExecutionPlanStatus { return []RescoreExecutionPlanStatus{ "CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", } }
28
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( "fmt" smithy "github.com/aws/smithy-go" ) // You don’t have sufficient access to perform this action. Please ensure you have // the required permission policies and user accounts and try again. type AccessDeniedException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *AccessDeniedException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *AccessDeniedException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "AccessDeniedException" } return *e.ErrorCodeOverride } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // A conflict occurred with the request. Please fix any inconsistencies with your // resources and try again. type ConflictException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ConflictException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ConflictException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ConflictException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ConflictException" } return *e.ErrorCodeOverride } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // An issue occurred with the internal server used for your Amazon Kendra // Intelligent Ranking service. Please wait a few minutes and try again, or contact // Support (http://aws.amazon.com/contact-us/) for help. type InternalServerException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InternalServerException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InternalServerException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InternalServerException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InternalServerException" } return *e.ErrorCodeOverride } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // The resource you want to use doesn't exist. Please check you have provided the // correct resource and try again. type ResourceNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceNotFoundException" } return *e.ErrorCodeOverride } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The resource you want to use is unavailable. Please check you have provided the // correct resource information and try again. type ResourceUnavailableException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceUnavailableException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceUnavailableException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceUnavailableException" } return *e.ErrorCodeOverride } func (e *ResourceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // You have exceeded the set limits for your Amazon Kendra Intelligent Ranking // service. Please see Quotas (https://docs.aws.amazon.com/kendra/latest/dg/quotas.html) // for more information, or contact Support (http://aws.amazon.com/contact-us/) to // inquire about an increase of limits. type ServiceQuotaExceededException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ServiceQuotaExceededException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ServiceQuotaExceededException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ServiceQuotaExceededException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ServiceQuotaExceededException" } return *e.ErrorCodeOverride } func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was denied due to request throttling. Please reduce the number of // requests and try again. type ThrottlingException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ThrottlingException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ThrottlingException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ThrottlingException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ThrottlingException" } return *e.ErrorCodeOverride } func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The input fails to satisfy the constraints set by the Amazon Kendra Intelligent // Ranking service. Please provide the correct input and try again. type ValidationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ValidationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ValidationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ValidationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ValidationException" } return *e.ErrorCodeOverride } func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
228
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( smithydocument "github.com/aws/smithy-go/document" "time" ) // Sets additional capacity units configured for your rescore execution plan. A // rescore execution plan is an Amazon Kendra Intelligent Ranking resource used for // provisioning the Rescore API. You can add and remove capacity units to fit your // usage requirements. type CapacityUnitsConfiguration struct { // The amount of extra capacity for your rescore execution plan. A single extra // capacity unit for a rescore execution plan provides 0.01 rescore requests per // second. You can add up to 1000 extra capacity units. // // This member is required. RescoreCapacityUnits *int32 noSmithyDocumentSerde } // Information about a document from a search service such as OpenSearch (self // managed). Amazon Kendra Intelligent Ranking uses this information to rank and // score on. type Document struct { // The identifier of the document from the search service. // // This member is required. Id *string // The original document score or rank from the search service. Amazon Kendra // Intelligent Ranking gives the document a new score or rank based on its // intelligent search algorithms. // // This member is required. OriginalScore *float32 // The body text of the search service's document. Body *string // The optional group identifier of the document from the search service. // Documents with the same group identifier are grouped together and processed as // one document within the service. GroupId *string // The title of the search service's document. Title *string // The body text of the search service's document represented as a list of tokens // or words. You must choose to provide Body or TokenizedBody . You cannot provide // both. TokenizedBody []string // The title of the search service's document represented as a list of tokens or // words. You must choose to provide Title or TokenizedTitle . You cannot provide // both. TokenizedTitle []string noSmithyDocumentSerde } // Summary information for a rescore execution plan. A rescore execution plan is // an Amazon Kendra Intelligent Ranking resource used for provisioning the Rescore // API. type RescoreExecutionPlanSummary struct { // The Unix timestamp when the rescore execution plan was created. CreatedAt *time.Time // The identifier of the rescore execution plan. Id *string // The name of the rescore execution plan. Name *string // The current status of the rescore execution plan. When the value is ACTIVE , the // rescore execution plan is ready for use. Status RescoreExecutionPlanStatus // The Unix timestamp when the rescore execution plan was last updated. UpdatedAt *time.Time noSmithyDocumentSerde } // A result item for a document with a new relevancy score. type RescoreResultItem struct { // The identifier of the document from the search service. DocumentId *string // The relevancy score or rank that Amazon Kendra Intelligent Ranking gives to the // result. Score *float32 noSmithyDocumentSerde } // A key-value pair that identifies or categorizes a rescore execution plan. A // rescore execution plan is an Amazon Kendra Intelligent Ranking resource used for // provisioning the Rescore API. You can also use a tag to help control access to // a rescore execution plan. A tag key and value can consist of Unicode letters, // digits, white space, and any of the following symbols: _ . : / = + - @. type Tag struct { // The key for the tag. Keys are not case sensitive and must be unique. // // This member is required. Key *string // The value associated with the tag. The value can be an empty string but it // can't be null. // // This member is required. Value *string noSmithyDocumentSerde } type noSmithyDocumentSerde = smithydocument.NoSerde
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" smithy "github.com/aws/smithy-go" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" "time" ) const ServiceID = "Keyspaces" const ServiceAPIVersion = "2022-02-10" // Client provides the API client to make operations call for Amazon Keyspaces. type Client struct { options Options } // New returns an initialized Client based on the functional options. Provide // additional functional options to further configure the behavior of the client, // such as changing the client's endpoint or adding custom middleware behavior. func New(options Options, optFns ...func(*Options)) *Client { options = options.Copy() resolveDefaultLogger(&options) setResolvedDefaultsMode(&options) resolveRetryer(&options) resolveHTTPClient(&options) resolveHTTPSignerV4(&options) resolveDefaultEndpointConfiguration(&options) for _, fn := range optFns { fn(&options) } client := &Client{ options: options, } return client } type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // Configures the events that will be sent to the configured logger. ClientLogMode aws.ClientLogMode // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The configuration DefaultsMode that the SDK should use when constructing the // clients initial default settings. DefaultsMode aws.DefaultsMode // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions // The service endpoint resolver. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // The logger writer interface to write logging messages to. Logger logging.Logger // The region to send requests to. (Required) Region string // RetryMaxAttempts specifies the maximum number attempts an API client will call // an operation that fails with a retryable error. A value of 0 is ignored, and // will not be used to configure the API client created default retryer, or modify // per operation call's retry max attempts. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. If specified in an operation call's functional // options with a value that is different than the constructed client's Options, // the Client's Retryer will be wrapped to use the operation's specific // RetryMaxAttempts value. RetryMaxAttempts int // RetryMode specifies the retry mode the API client will be created with, if // Retryer option is not also specified. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. Currently does not support per operation call // overrides, may in the future. RetryMode aws.RetryMode // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. The kind of // default retry created by the API client can be changed with the RetryMode // option. Retryer aws.Retryer // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You // should not populate this structure programmatically, or rely on the values here // within your applications. RuntimeEnvironment aws.RuntimeEnvironment // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. Currently does not support per operation call // overrides, may in the future. resolvedDefaultsMode aws.DefaultsMode // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient } // WithAPIOptions returns a functional option for setting the Client's APIOptions // option. func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { return func(o *Options) { o.APIOptions = append(o.APIOptions, optFns...) } } // WithEndpointResolver returns a functional option for setting the Client's // EndpointResolver option. func WithEndpointResolver(v EndpointResolver) func(*Options) { return func(o *Options) { o.EndpointResolver = v } } type HTTPClient interface { Do(*http.Request) (*http.Response, error) } // Copy creates a clone where the APIOptions list is deep copied. func (o Options) Copy() Options { to := o to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) copy(to.APIOptions, o.APIOptions) return to } func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { ctx = middleware.ClearStackValues(ctx) stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() for _, fn := range optFns { fn(&options) } finalizeRetryMaxAttemptOptions(&options, *c) finalizeClientEndpointResolverOptions(&options) for _, fn := range stackFns { if err := fn(stack, options); err != nil { return nil, metadata, err } } for _, fn := range options.APIOptions { if err := fn(stack); err != nil { return nil, metadata, err } } handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) result, metadata, err = handler.Handle(ctx, params) if err != nil { err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } return result, metadata, err } type noSmithyDocumentSerde = smithydocument.NoSerde func resolveDefaultLogger(o *Options) { if o.Logger != nil { return } o.Logger = logging.Nop{} } func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { return middleware.AddSetLoggerMiddleware(stack, o.Logger) } func setResolvedDefaultsMode(o *Options) { if len(o.resolvedDefaultsMode) > 0 { return } var mode aws.DefaultsMode mode.SetFromString(string(o.DefaultsMode)) if mode == aws.DefaultsModeAuto { mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) } o.resolvedDefaultsMode = mode } // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, DefaultsMode: cfg.DefaultsMode, RuntimeEnvironment: cfg.RuntimeEnvironment, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) resolveAWSRetryMode(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) resolveUseDualStackEndpoint(cfg, &opts) resolveUseFIPSEndpoint(cfg, &opts) return New(opts, optFns...) } func resolveHTTPClient(o *Options) { var buildable *awshttp.BuildableClient if o.HTTPClient != nil { var ok bool buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) if !ok { return } } else { buildable = awshttp.NewBuildableClient() } modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { dialer.Timeout = dialerTimeout } }) buildable = buildable.WithTransportOptions(func(transport *http.Transport) { if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { transport.TLSHandshakeTimeout = tlsHandshakeTimeout } }) } o.HTTPClient = buildable } func resolveRetryer(o *Options) { if o.Retryer != nil { return } if len(o.RetryMode) == 0 { modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { o.RetryMode = modeConfig.RetryMode } } if len(o.RetryMode) == 0 { o.RetryMode = aws.RetryModeStandard } var standardOptions []func(*retry.StandardOptions) if v := o.RetryMaxAttempts; v != 0 { standardOptions = append(standardOptions, func(so *retry.StandardOptions) { so.MaxAttempts = v }) } switch o.RetryMode { case aws.RetryModeAdaptive: var adaptiveOptions []func(*retry.AdaptiveModeOptions) if len(standardOptions) != 0 { adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { ao.StandardOptions = append(ao.StandardOptions, standardOptions...) }) } o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) default: o.Retryer = retry.NewStandard(standardOptions...) } } func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { if cfg.Retryer == nil { return } o.Retryer = cfg.Retryer() } func resolveAWSRetryMode(cfg aws.Config, o *Options) { if len(cfg.RetryMode) == 0 { return } o.RetryMode = cfg.RetryMode } func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { if cfg.RetryMaxAttempts == 0 { return } o.RetryMaxAttempts = cfg.RetryMaxAttempts } func finalizeRetryMaxAttemptOptions(o *Options, client Client) { if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { return } o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) } func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { return } o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) } func addClientUserAgent(stack *middleware.Stack) error { return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "keyspaces", goModuleVersion)(stack) } func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ CredentialsProvider: o.Credentials, Signer: o.HTTPSignerV4, LogSigning: o.ClientLogMode.IsSigning(), }) return stack.Finalize.Add(mw, middleware.After) } type HTTPSignerV4 interface { SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error } func resolveHTTPSignerV4(o *Options) { if o.HTTPSignerV4 != nil { return } o.HTTPSignerV4 = newDefaultV4Signer(*o) } func newDefaultV4Signer(o Options) *v4.Signer { return v4.NewSigner(func(so *v4.SignerOptions) { so.Logger = o.Logger so.LogSigning = o.ClientLogMode.IsSigning() }) } func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, LogRetryAttempts: o.ClientLogMode.IsRetries(), } return retry.AddRetryMiddlewares(stack, mo) } // resolves dual-stack endpoint configuration func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseDualStackEndpoint = value } return nil } // resolves FIPS endpoint configuration func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseFIPSEndpoint = value } return nil } func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } func addResponseErrorMiddleware(stack *middleware.Stack) error { return awshttp.AddResponseErrorMiddleware(stack) } func addRequestResponseLogging(stack *middleware.Stack, o Options) error { return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ LogRequest: o.ClientLogMode.IsRequest(), LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), LogResponse: o.ClientLogMode.IsResponse(), LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), }, middleware.After) }
434
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "io/ioutil" "net/http" "strings" "testing" ) func TestClient_resolveRetryOptions(t *testing.T) { nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { return &http.Response{ StatusCode: 200, Header: http.Header{}, Body: ioutil.NopCloser(strings.NewReader("")), }, nil }) cases := map[string]struct { defaultsMode aws.DefaultsMode retryer aws.Retryer retryMaxAttempts int opRetryMaxAttempts *int retryMode aws.RetryMode expectClientRetryMode aws.RetryMode expectClientMaxAttempts int expectOpMaxAttempts int }{ "defaults": { defaultsMode: aws.DefaultsModeStandard, expectClientRetryMode: aws.RetryModeStandard, expectClientMaxAttempts: 3, expectOpMaxAttempts: 3, }, "custom default retry": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(2), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 2, }, "custom op no change max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(10), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op 0 max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(0), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, } for name, c := range cases { t.Run(name, func(t *testing.T) { client := NewFromConfig(aws.Config{ DefaultsMode: c.defaultsMode, Retryer: func() func() aws.Retryer { if c.retryer == nil { return nil } return func() aws.Retryer { return c.retryer } }(), HTTPClient: nopClient, RetryMaxAttempts: c.retryMaxAttempts, RetryMode: c.retryMode, }) if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { t.Errorf("expect %v retry mode, got %v", e, a) } if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v max attempts, got %v", e, a) } _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, []func(*Options){ func(o *Options) { if c.opRetryMaxAttempts == nil { return } o.RetryMaxAttempts = *c.opRetryMaxAttempts }, }, func(s *middleware.Stack, o Options) error { s.Initialize.Clear() s.Serialize.Clear() s.Build.Clear() s.Finalize.Clear() s.Deserialize.Clear() if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v op max attempts, got %v", e, a) } return nil }) if err != nil { t.Fatalf("expect no operation error, got %v", err) } }) } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/keyspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // The CreateKeyspace operation adds a new keyspace to your account. In an Amazon // Web Services account, keyspace names must be unique within each Region. // CreateKeyspace is an asynchronous operation. You can monitor the creation status // of the new keyspace by using the GetKeyspace operation. For more information, // see Creating keyspaces (https://docs.aws.amazon.com/keyspaces/latest/devguide/working-with-keyspaces.html#keyspaces-create) // in the Amazon Keyspaces Developer Guide. func (c *Client) CreateKeyspace(ctx context.Context, params *CreateKeyspaceInput, optFns ...func(*Options)) (*CreateKeyspaceOutput, error) { if params == nil { params = &CreateKeyspaceInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateKeyspace", params, optFns, c.addOperationCreateKeyspaceMiddlewares) if err != nil { return nil, err } out := result.(*CreateKeyspaceOutput) out.ResultMetadata = metadata return out, nil } type CreateKeyspaceInput struct { // The name of the keyspace to be created. // // This member is required. KeyspaceName *string // The replication specification of the keyspace includes: // - replicationStrategy - the required value is SINGLE_REGION or MULTI_REGION . // - regionList - if the replicationStrategy is MULTI_REGION , the regionList // requires the current Region and at least one additional Amazon Web Services // Region where the keyspace is going to be replicated in. The maximum number of // supported replication Regions including the current Region is six. ReplicationSpecification *types.ReplicationSpecification // A list of key-value pair tags to be attached to the keyspace. For more // information, see Adding tags and labels to Amazon Keyspaces resources (https://docs.aws.amazon.com/keyspaces/latest/devguide/tagging-keyspaces.html) // in the Amazon Keyspaces Developer Guide. Tags []types.Tag noSmithyDocumentSerde } type CreateKeyspaceOutput struct { // The unique identifier of the keyspace in the format of an Amazon Resource Name // (ARN). // // This member is required. ResourceArn *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateKeyspaceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateKeyspace{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateKeyspace{}, 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 = addOpCreateKeyspaceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateKeyspace(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateKeyspace(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "cassandra", OperationName: "CreateKeyspace", } }
146
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/keyspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // The CreateTable operation adds a new table to the specified keyspace. Within a // keyspace, table names must be unique. CreateTable is an asynchronous operation. // When the request is received, the status of the table is set to CREATING . You // can monitor the creation status of the new table by using the GetTable // operation, which returns the current status of the table. You can start using a // table when the status is ACTIVE . For more information, see Creating tables (https://docs.aws.amazon.com/keyspaces/latest/devguide/working-with-tables.html#tables-create) // in the Amazon Keyspaces Developer Guide. func (c *Client) CreateTable(ctx context.Context, params *CreateTableInput, optFns ...func(*Options)) (*CreateTableOutput, error) { if params == nil { params = &CreateTableInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateTable", params, optFns, c.addOperationCreateTableMiddlewares) if err != nil { return nil, err } out := result.(*CreateTableOutput) out.ResultMetadata = metadata return out, nil } type CreateTableInput struct { // The name of the keyspace that the table is going to be created in. // // This member is required. KeyspaceName *string // The schemaDefinition consists of the following parameters. For each column to // be created: // - name - The name of the column. // - type - An Amazon Keyspaces data type. For more information, see Data types (https://docs.aws.amazon.com/keyspaces/latest/devguide/cql.elements.html#cql.data-types) // in the Amazon Keyspaces Developer Guide. // The primary key of the table consists of the following columns: // - partitionKeys - The partition key can be a single column, or it can be a // compound value composed of two or more columns. The partition key portion of the // primary key is required and determines how Amazon Keyspaces stores your data. // - name - The name of each partition key column. // - clusteringKeys - The optional clustering column portion of your primary key // determines how the data is clustered and sorted within each partition. // - name - The name of the clustering column. // - orderBy - Sets the ascendant ( ASC ) or descendant ( DESC ) order modifier. // To define a column as static use staticColumns - Static columns store values // that are shared by all rows in the same partition: // - name - The name of the column. // - type - An Amazon Keyspaces data type. // // This member is required. SchemaDefinition *types.SchemaDefinition // The name of the table. // // This member is required. TableName *string // Specifies the read/write throughput capacity mode for the table. The options // are: // - throughputMode:PAY_PER_REQUEST and // - throughputMode:PROVISIONED - Provisioned capacity mode requires // readCapacityUnits and writeCapacityUnits as input. // The default is throughput_mode:PAY_PER_REQUEST . For more information, see // Read/write capacity modes (https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html) // in the Amazon Keyspaces Developer Guide. CapacitySpecification *types.CapacitySpecification // Enables client-side timestamps for the table. By default, the setting is // disabled. You can enable client-side timestamps with the following option: // - status: "enabled" // Once client-side timestamps are enabled for a table, this setting cannot be // disabled. ClientSideTimestamps *types.ClientSideTimestamps // This parameter allows to enter a description of the table. Comment *types.Comment // The default Time to Live setting in seconds for the table. For more // information, see Setting the default TTL value for a table (https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL-how-it-works.html#ttl-howitworks_default_ttl) // in the Amazon Keyspaces Developer Guide. DefaultTimeToLive *int32 // Specifies how the encryption key for encryption at rest is managed for the // table. You can choose one of the following KMS key (KMS key): // - type:AWS_OWNED_KMS_KEY - This key is owned by Amazon Keyspaces. // - type:CUSTOMER_MANAGED_KMS_KEY - This key is stored in your account and is // created, owned, and managed by you. This option requires the // kms_key_identifier of the KMS key in Amazon Resource Name (ARN) format as // input. // The default is type:AWS_OWNED_KMS_KEY . For more information, see Encryption at // rest (https://docs.aws.amazon.com/keyspaces/latest/devguide/EncryptionAtRest.html) // in the Amazon Keyspaces Developer Guide. EncryptionSpecification *types.EncryptionSpecification // Specifies if pointInTimeRecovery is enabled or disabled for the table. The // options are: // - status=ENABLED // - status=DISABLED // If it's not specified, the default is status=DISABLED . For more information, // see Point-in-time recovery (https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html) // in the Amazon Keyspaces Developer Guide. PointInTimeRecovery *types.PointInTimeRecovery // A list of key-value pair tags to be attached to the resource. For more // information, see Adding tags and labels to Amazon Keyspaces resources (https://docs.aws.amazon.com/keyspaces/latest/devguide/tagging-keyspaces.html) // in the Amazon Keyspaces Developer Guide. Tags []types.Tag // Enables Time to Live custom settings for the table. The options are: // - status:enabled // - status:disabled // The default is status:disabled . After ttl is enabled, you can't disable it for // the table. For more information, see Expiring data by using Amazon Keyspaces // Time to Live (TTL) (https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL.html) // in the Amazon Keyspaces Developer Guide. Ttl *types.TimeToLive noSmithyDocumentSerde } type CreateTableOutput struct { // The unique identifier of the table in the format of an Amazon Resource Name // (ARN). // // This member is required. ResourceArn *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateTableMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateTable{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateTable{}, 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 = addOpCreateTableValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTable(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateTable(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "cassandra", OperationName: "CreateTable", } }
221
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // The DeleteKeyspace operation deletes a keyspace and all of its tables. func (c *Client) DeleteKeyspace(ctx context.Context, params *DeleteKeyspaceInput, optFns ...func(*Options)) (*DeleteKeyspaceOutput, error) { if params == nil { params = &DeleteKeyspaceInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteKeyspace", params, optFns, c.addOperationDeleteKeyspaceMiddlewares) if err != nil { return nil, err } out := result.(*DeleteKeyspaceOutput) out.ResultMetadata = metadata return out, nil } type DeleteKeyspaceInput struct { // The name of the keyspace to be deleted. // // This member is required. KeyspaceName *string noSmithyDocumentSerde } type DeleteKeyspaceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteKeyspaceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteKeyspace{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteKeyspace{}, 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 = addOpDeleteKeyspaceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteKeyspace(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteKeyspace(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "cassandra", OperationName: "DeleteKeyspace", } }
120
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // The DeleteTable operation deletes a table and all of its data. After a // DeleteTable request is received, the specified table is in the DELETING state // until Amazon Keyspaces completes the deletion. If the table is in the ACTIVE // state, you can delete it. If a table is either in the CREATING or UPDATING // states, then Amazon Keyspaces returns a ResourceInUseException . If the // specified table does not exist, Amazon Keyspaces returns a // ResourceNotFoundException . If the table is already in the DELETING state, no // error is returned. func (c *Client) DeleteTable(ctx context.Context, params *DeleteTableInput, optFns ...func(*Options)) (*DeleteTableOutput, error) { if params == nil { params = &DeleteTableInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteTable", params, optFns, c.addOperationDeleteTableMiddlewares) if err != nil { return nil, err } out := result.(*DeleteTableOutput) out.ResultMetadata = metadata return out, nil } type DeleteTableInput struct { // The name of the keyspace of the to be deleted table. // // This member is required. KeyspaceName *string // The name of the table to be deleted. // // This member is required. TableName *string noSmithyDocumentSerde } type DeleteTableOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteTableMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteTable{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteTable{}, 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 = addOpDeleteTableValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTable(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteTable(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "cassandra", OperationName: "DeleteTable", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/keyspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns the name and the Amazon Resource Name (ARN) of the specified table. func (c *Client) GetKeyspace(ctx context.Context, params *GetKeyspaceInput, optFns ...func(*Options)) (*GetKeyspaceOutput, error) { if params == nil { params = &GetKeyspaceInput{} } result, metadata, err := c.invokeOperation(ctx, "GetKeyspace", params, optFns, c.addOperationGetKeyspaceMiddlewares) if err != nil { return nil, err } out := result.(*GetKeyspaceOutput) out.ResultMetadata = metadata return out, nil } type GetKeyspaceInput struct { // The name of the keyspace. // // This member is required. KeyspaceName *string noSmithyDocumentSerde } type GetKeyspaceOutput struct { // The name of the keyspace. // // This member is required. KeyspaceName *string // Returns the replication strategy of the keyspace. The options are SINGLE_REGION // or MULTI_REGION . // // This member is required. ReplicationStrategy types.Rs // Returns the ARN of the keyspace. // // This member is required. ResourceArn *string // If the replicationStrategy of the keyspace is MULTI_REGION , a list of // replication Regions is returned. ReplicationRegions []string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetKeyspaceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetKeyspace{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetKeyspace{}, 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 = addOpGetKeyspaceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetKeyspace(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetKeyspace(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "cassandra", OperationName: "GetKeyspace", } }
142
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/keyspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Returns information about the table, including the table's name and current // status, the keyspace name, configuration settings, and metadata. To read table // metadata using GetTable , Select action permissions for the table and system // tables are required to complete the operation. func (c *Client) GetTable(ctx context.Context, params *GetTableInput, optFns ...func(*Options)) (*GetTableOutput, error) { if params == nil { params = &GetTableInput{} } result, metadata, err := c.invokeOperation(ctx, "GetTable", params, optFns, c.addOperationGetTableMiddlewares) if err != nil { return nil, err } out := result.(*GetTableOutput) out.ResultMetadata = metadata return out, nil } type GetTableInput struct { // The name of the keyspace that the table is stored in. // // This member is required. KeyspaceName *string // The name of the table. // // This member is required. TableName *string noSmithyDocumentSerde } type GetTableOutput struct { // The name of the keyspace that the specified table is stored in. // // This member is required. KeyspaceName *string // The Amazon Resource Name (ARN) of the specified table. // // This member is required. ResourceArn *string // The name of the specified table. // // This member is required. TableName *string // The read/write throughput capacity mode for a table. The options are: // - throughputMode:PAY_PER_REQUEST // - throughputMode:PROVISIONED CapacitySpecification *types.CapacitySpecificationSummary // The client-side timestamps setting of the table. ClientSideTimestamps *types.ClientSideTimestamps // The the description of the specified table. Comment *types.Comment // The creation timestamp of the specified table. CreationTimestamp *time.Time // The default Time to Live settings in seconds of the specified table. DefaultTimeToLive *int32 // The encryption settings of the specified table. EncryptionSpecification *types.EncryptionSpecification // The point-in-time recovery status of the specified table. PointInTimeRecovery *types.PointInTimeRecoverySummary // The schema definition of the specified table. SchemaDefinition *types.SchemaDefinition // The current status of the specified table. Status types.TableStatus // The custom Time to Live settings of the specified table. Ttl *types.TimeToLive // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetTableMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpGetTable{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpGetTable{}, 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 = addOpGetTableValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTable(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetTable(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "cassandra", OperationName: "GetTable", } }
178
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces 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/keyspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a list of keyspaces. func (c *Client) ListKeyspaces(ctx context.Context, params *ListKeyspacesInput, optFns ...func(*Options)) (*ListKeyspacesOutput, error) { if params == nil { params = &ListKeyspacesInput{} } result, metadata, err := c.invokeOperation(ctx, "ListKeyspaces", params, optFns, c.addOperationListKeyspacesMiddlewares) if err != nil { return nil, err } out := result.(*ListKeyspacesOutput) out.ResultMetadata = metadata return out, nil } type ListKeyspacesInput struct { // The total number of keyspaces to return in the output. If the total number of // keyspaces available is more than the value specified, a NextToken is provided // in the output. To resume pagination, provide the NextToken value as an argument // of a subsequent API invocation. MaxResults *int32 // The pagination token. To resume pagination, provide the NextToken value as // argument of a subsequent API invocation. NextToken *string noSmithyDocumentSerde } type ListKeyspacesOutput struct { // A list of keyspaces. // // This member is required. Keyspaces []types.KeyspaceSummary // A token to specify where to start paginating. This is the NextToken from a // previously truncated response. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListKeyspacesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpListKeyspaces{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListKeyspaces{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListKeyspaces(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 } // ListKeyspacesAPIClient is a client that implements the ListKeyspaces operation. type ListKeyspacesAPIClient interface { ListKeyspaces(context.Context, *ListKeyspacesInput, ...func(*Options)) (*ListKeyspacesOutput, error) } var _ ListKeyspacesAPIClient = (*Client)(nil) // ListKeyspacesPaginatorOptions is the paginator options for ListKeyspaces type ListKeyspacesPaginatorOptions struct { // The total number of keyspaces to return in the output. If the total number of // keyspaces available is more than the value specified, a NextToken is provided // in the output. To resume pagination, provide the NextToken value as an argument // of a subsequent API invocation. 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 } // ListKeyspacesPaginator is a paginator for ListKeyspaces type ListKeyspacesPaginator struct { options ListKeyspacesPaginatorOptions client ListKeyspacesAPIClient params *ListKeyspacesInput nextToken *string firstPage bool } // NewListKeyspacesPaginator returns a new ListKeyspacesPaginator func NewListKeyspacesPaginator(client ListKeyspacesAPIClient, params *ListKeyspacesInput, optFns ...func(*ListKeyspacesPaginatorOptions)) *ListKeyspacesPaginator { if params == nil { params = &ListKeyspacesInput{} } options := ListKeyspacesPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListKeyspacesPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListKeyspacesPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListKeyspaces page. func (p *ListKeyspacesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListKeyspacesOutput, 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.ListKeyspaces(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListKeyspaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "cassandra", OperationName: "ListKeyspaces", } }
226
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces 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/keyspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a list of tables for a specified keyspace. func (c *Client) ListTables(ctx context.Context, params *ListTablesInput, optFns ...func(*Options)) (*ListTablesOutput, error) { if params == nil { params = &ListTablesInput{} } result, metadata, err := c.invokeOperation(ctx, "ListTables", params, optFns, c.addOperationListTablesMiddlewares) if err != nil { return nil, err } out := result.(*ListTablesOutput) out.ResultMetadata = metadata return out, nil } type ListTablesInput struct { // The name of the keyspace. // // This member is required. KeyspaceName *string // The total number of tables to return in the output. If the total number of // tables available is more than the value specified, a NextToken is provided in // the output. To resume pagination, provide the NextToken value as an argument of // a subsequent API invocation. MaxResults *int32 // The pagination token. To resume pagination, provide the NextToken value as an // argument of a subsequent API invocation. NextToken *string noSmithyDocumentSerde } type ListTablesOutput struct { // A token to specify where to start paginating. This is the NextToken from a // previously truncated response. NextToken *string // A list of tables. Tables []types.TableSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListTablesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpListTables{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListTables{}, 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 = addOpListTablesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTables(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 } // ListTablesAPIClient is a client that implements the ListTables operation. type ListTablesAPIClient interface { ListTables(context.Context, *ListTablesInput, ...func(*Options)) (*ListTablesOutput, error) } var _ ListTablesAPIClient = (*Client)(nil) // ListTablesPaginatorOptions is the paginator options for ListTables type ListTablesPaginatorOptions struct { // The total number of tables to return in the output. If the total number of // tables available is more than the value specified, a NextToken is provided in // the output. To resume pagination, provide the NextToken value as an argument of // a subsequent API invocation. 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 } // ListTablesPaginator is a paginator for ListTables type ListTablesPaginator struct { options ListTablesPaginatorOptions client ListTablesAPIClient params *ListTablesInput nextToken *string firstPage bool } // NewListTablesPaginator returns a new ListTablesPaginator func NewListTablesPaginator(client ListTablesAPIClient, params *ListTablesInput, optFns ...func(*ListTablesPaginatorOptions)) *ListTablesPaginator { if params == nil { params = &ListTablesInput{} } options := ListTablesPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListTablesPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTablesPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTables page. func (p *ListTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTablesOutput, 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.ListTables(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListTables(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "cassandra", OperationName: "ListTables", } }
232
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces 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/keyspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a list of all tags associated with the specified Amazon Keyspaces // resource. func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) if err != nil { return nil, err } out := result.(*ListTagsForResourceOutput) out.ResultMetadata = metadata return out, nil } type ListTagsForResourceInput struct { // The Amazon Resource Name (ARN) of the Amazon Keyspaces resource. // // This member is required. ResourceArn *string // The total number of tags to return in the output. If the total number of tags // available is more than the value specified, a NextToken is provided in the // output. To resume pagination, provide the NextToken value as an argument of a // subsequent API invocation. MaxResults *int32 // The pagination token. To resume pagination, provide the NextToken value as // argument of a subsequent API invocation. NextToken *string noSmithyDocumentSerde } type ListTagsForResourceOutput struct { // A token to specify where to start paginating. This is the NextToken from a // previously truncated response. NextToken *string // A list of tags. Tags []types.Tag // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpListTagsForResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListTagsForResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } // ListTagsForResourceAPIClient is a client that implements the // ListTagsForResource operation. type ListTagsForResourceAPIClient interface { ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) } var _ ListTagsForResourceAPIClient = (*Client)(nil) // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { // The total number of tags to return in the output. If the total number of tags // available is more than the value specified, a NextToken is provided in the // output. To resume pagination, provide the NextToken value as an argument of a // subsequent API invocation. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool } // ListTagsForResourcePaginator is a paginator for ListTagsForResource type ListTagsForResourcePaginator struct { options ListTagsForResourcePaginatorOptions client ListTagsForResourceAPIClient params *ListTagsForResourceInput nextToken *string firstPage bool } // NewListTagsForResourcePaginator returns a new ListTagsForResourcePaginator func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params *ListTagsForResourceInput, optFns ...func(*ListTagsForResourcePaginatorOptions)) *ListTagsForResourcePaginator { if params == nil { params = &ListTagsForResourceInput{} } options := ListTagsForResourcePaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListTagsForResourcePaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTagsForResourcePaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTagsForResource page. func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.NextToken = p.nextToken var limit *int32 if p.options.Limit > 0 { limit = &p.options.Limit } params.MaxResults = limit result, err := p.client.ListTagsForResource(ctx, &params, optFns...) if err != nil { return nil, err } p.firstPage = false prevToken := p.nextToken p.nextToken = result.NextToken if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken { p.nextToken = nil } return result, nil } func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "cassandra", OperationName: "ListTagsForResource", } }
235
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/keyspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Restores the specified table to the specified point in time within the // earliest_restorable_timestamp and the current time. For more information about // restore points, see Time window for PITR continuous backups (https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_window) // in the Amazon Keyspaces Developer Guide. Any number of users can execute up to 4 // concurrent restores (any type of restore) in a given account. When you restore // using point in time recovery, Amazon Keyspaces restores your source table's // schema and data to the state based on the selected timestamp // (day:hour:minute:second) to a new table. The Time to Live (TTL) settings are // also restored to the state based on the selected timestamp. In addition to the // table's schema, data, and TTL settings, RestoreTable restores the capacity // mode, encryption, and point-in-time recovery settings from the source table. // Unlike the table's schema data and TTL settings, which are restored based on the // selected timestamp, these settings are always restored based on the table's // settings as of the current time or when the table was deleted. You can also // overwrite these settings during restore: // - Read/write capacity mode // - Provisioned throughput capacity settings // - Point-in-time (PITR) settings // - Tags // // For more information, see PITR restore settings (https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_settings) // in the Amazon Keyspaces Developer Guide. Note that the following settings are // not restored, and you must configure them manually for the new table: // - Automatic scaling policies (for tables that use provisioned capacity mode) // - Identity and Access Management (IAM) policies // - Amazon CloudWatch metrics and alarms func (c *Client) RestoreTable(ctx context.Context, params *RestoreTableInput, optFns ...func(*Options)) (*RestoreTableOutput, error) { if params == nil { params = &RestoreTableInput{} } result, metadata, err := c.invokeOperation(ctx, "RestoreTable", params, optFns, c.addOperationRestoreTableMiddlewares) if err != nil { return nil, err } out := result.(*RestoreTableOutput) out.ResultMetadata = metadata return out, nil } type RestoreTableInput struct { // The keyspace name of the source table. // // This member is required. SourceKeyspaceName *string // The name of the source table. // // This member is required. SourceTableName *string // The name of the target keyspace. // // This member is required. TargetKeyspaceName *string // The name of the target table. // // This member is required. TargetTableName *string // Specifies the read/write throughput capacity mode for the target table. The // options are: // - throughputMode:PAY_PER_REQUEST // - throughputMode:PROVISIONED - Provisioned capacity mode requires // readCapacityUnits and writeCapacityUnits as input. // The default is throughput_mode:PAY_PER_REQUEST . For more information, see // Read/write capacity modes (https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html) // in the Amazon Keyspaces Developer Guide. CapacitySpecificationOverride *types.CapacitySpecification // Specifies the encryption settings for the target table. You can choose one of // the following KMS key (KMS key): // - type:AWS_OWNED_KMS_KEY - This key is owned by Amazon Keyspaces. // - type:CUSTOMER_MANAGED_KMS_KEY - This key is stored in your account and is // created, owned, and managed by you. This option requires the // kms_key_identifier of the KMS key in Amazon Resource Name (ARN) format as // input. // The default is type:AWS_OWNED_KMS_KEY . For more information, see Encryption at // rest (https://docs.aws.amazon.com/keyspaces/latest/devguide/EncryptionAtRest.html) // in the Amazon Keyspaces Developer Guide. EncryptionSpecificationOverride *types.EncryptionSpecification // Specifies the pointInTimeRecovery settings for the target table. The options // are: // - status=ENABLED // - status=DISABLED // If it's not specified, the default is status=DISABLED . For more information, // see Point-in-time recovery (https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html) // in the Amazon Keyspaces Developer Guide. PointInTimeRecoveryOverride *types.PointInTimeRecovery // The restore timestamp in ISO 8601 format. RestoreTimestamp *time.Time // A list of key-value pair tags to be attached to the restored table. For more // information, see Adding tags and labels to Amazon Keyspaces resources (https://docs.aws.amazon.com/keyspaces/latest/devguide/tagging-keyspaces.html) // in the Amazon Keyspaces Developer Guide. TagsOverride []types.Tag noSmithyDocumentSerde } type RestoreTableOutput struct { // The Amazon Resource Name (ARN) of the restored table. // // This member is required. RestoredTableARN *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRestoreTableMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpRestoreTable{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpRestoreTable{}, 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 = addOpRestoreTableValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreTable(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opRestoreTable(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "cassandra", OperationName: "RestoreTable", } }
207
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/keyspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Associates a set of tags with a Amazon Keyspaces resource. You can then // activate these user-defined tags so that they appear on the Cost Management // Console for cost allocation tracking. For more information, see Adding tags and // labels to Amazon Keyspaces resources (https://docs.aws.amazon.com/keyspaces/latest/devguide/tagging-keyspaces.html) // in the Amazon Keyspaces Developer Guide. For IAM policy examples that show how // to control access to Amazon Keyspaces resources based on tags, see Amazon // Keyspaces resource access based on tags (https://docs.aws.amazon.com/keyspaces/latest/devguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-tags) // in the Amazon Keyspaces Developer Guide. func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) if err != nil { return nil, err } out := result.(*TagResourceOutput) out.ResultMetadata = metadata return out, nil } type TagResourceInput struct { // The Amazon Resource Name (ARN) of the Amazon Keyspaces resource to which to add // tags. // // This member is required. ResourceArn *string // The tags to be assigned to the Amazon Keyspaces resource. // // This member is required. Tags []types.Tag noSmithyDocumentSerde } type TagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpTagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpTagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "cassandra", OperationName: "TagResource", } }
134
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/keyspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes the association of tags from a Amazon Keyspaces resource. func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) if err != nil { return nil, err } out := result.(*UntagResourceOutput) out.ResultMetadata = metadata return out, nil } type UntagResourceInput struct { // The Amazon Keyspaces resource that the tags will be removed from. This value is // an Amazon Resource Name (ARN). // // This member is required. ResourceArn *string // A list of existing tags to be removed from the Amazon Keyspaces resource. // // This member is required. Tags []types.Tag noSmithyDocumentSerde } type UntagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpUntagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUntagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "cassandra", OperationName: "UntagResource", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/keyspaces/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Adds new columns to the table or updates one of the table's settings, for // example capacity mode, encryption, point-in-time recovery, or ttl settings. Note // that you can only update one specific table setting per update operation. func (c *Client) UpdateTable(ctx context.Context, params *UpdateTableInput, optFns ...func(*Options)) (*UpdateTableOutput, error) { if params == nil { params = &UpdateTableInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateTable", params, optFns, c.addOperationUpdateTableMiddlewares) if err != nil { return nil, err } out := result.(*UpdateTableOutput) out.ResultMetadata = metadata return out, nil } type UpdateTableInput struct { // The name of the keyspace the specified table is stored in. // // This member is required. KeyspaceName *string // The name of the table. // // This member is required. TableName *string // For each column to be added to the specified table: // - name - The name of the column. // - type - An Amazon Keyspaces data type. For more information, see Data types (https://docs.aws.amazon.com/keyspaces/latest/devguide/cql.elements.html#cql.data-types) // in the Amazon Keyspaces Developer Guide. AddColumns []types.ColumnDefinition // Modifies the read/write throughput capacity mode for the table. The options // are: // - throughputMode:PAY_PER_REQUEST and // - throughputMode:PROVISIONED - Provisioned capacity mode requires // readCapacityUnits and writeCapacityUnits as input. // The default is throughput_mode:PAY_PER_REQUEST . For more information, see // Read/write capacity modes (https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html) // in the Amazon Keyspaces Developer Guide. CapacitySpecification *types.CapacitySpecification // Enables client-side timestamps for the table. By default, the setting is // disabled. You can enable client-side timestamps with the following option: // - status: "enabled" // Once client-side timestamps are enabled for a table, this setting cannot be // disabled. ClientSideTimestamps *types.ClientSideTimestamps // The default Time to Live setting in seconds for the table. For more // information, see Setting the default TTL value for a table (https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL-how-it-works.html#ttl-howitworks_default_ttl) // in the Amazon Keyspaces Developer Guide. DefaultTimeToLive *int32 // Modifies the encryption settings of the table. You can choose one of the // following KMS key (KMS key): // - type:AWS_OWNED_KMS_KEY - This key is owned by Amazon Keyspaces. // - type:CUSTOMER_MANAGED_KMS_KEY - This key is stored in your account and is // created, owned, and managed by you. This option requires the // kms_key_identifier of the KMS key in Amazon Resource Name (ARN) format as // input. // The default is AWS_OWNED_KMS_KEY . For more information, see Encryption at rest (https://docs.aws.amazon.com/keyspaces/latest/devguide/EncryptionAtRest.html) // in the Amazon Keyspaces Developer Guide. EncryptionSpecification *types.EncryptionSpecification // Modifies the pointInTimeRecovery settings of the table. The options are: // - status=ENABLED // - status=DISABLED // If it's not specified, the default is status=DISABLED . For more information, // see Point-in-time recovery (https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html) // in the Amazon Keyspaces Developer Guide. PointInTimeRecovery *types.PointInTimeRecovery // Modifies Time to Live custom settings for the table. The options are: // - status:enabled // - status:disabled // The default is status:disabled . After ttl is enabled, you can't disable it for // the table. For more information, see Expiring data by using Amazon Keyspaces // Time to Live (TTL) (https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL.html) // in the Amazon Keyspaces Developer Guide. Ttl *types.TimeToLive noSmithyDocumentSerde } type UpdateTableOutput struct { // The Amazon Resource Name (ARN) of the modified table. // // This member is required. ResourceArn *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateTableMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateTable{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateTable{}, 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 = addOpUpdateTableValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTable(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateTable(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "cassandra", OperationName: "UpdateTable", } }
190
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces import ( "bytes" "context" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/keyspaces/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strings" ) type awsAwsjson10_deserializeOpCreateKeyspace struct { } func (*awsAwsjson10_deserializeOpCreateKeyspace) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpCreateKeyspace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorCreateKeyspace(response, &metadata) } output := &CreateKeyspaceOutput{} 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_deserializeOpDocumentCreateKeyspaceOutput(&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_deserializeOpErrorCreateKeyspace(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return 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("ServiceQuotaExceededException", errorCode): return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpCreateTable struct { } func (*awsAwsjson10_deserializeOpCreateTable) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpCreateTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorCreateTable(response, &metadata) } output := &CreateTableOutput{} 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_deserializeOpDocumentCreateTableOutput(&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_deserializeOpErrorCreateTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return 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("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpDeleteKeyspace struct { } func (*awsAwsjson10_deserializeOpDeleteKeyspace) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpDeleteKeyspace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorDeleteKeyspace(response, &metadata) } output := &DeleteKeyspaceOutput{} 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_deserializeOpDocumentDeleteKeyspaceOutput(&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_deserializeOpErrorDeleteKeyspace(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return 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("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpDeleteTable struct { } func (*awsAwsjson10_deserializeOpDeleteTable) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpDeleteTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorDeleteTable(response, &metadata) } output := &DeleteTableOutput{} 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_deserializeOpDocumentDeleteTableOutput(&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_deserializeOpErrorDeleteTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return 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("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpGetKeyspace struct { } func (*awsAwsjson10_deserializeOpGetKeyspace) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpGetKeyspace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorGetKeyspace(response, &metadata) } output := &GetKeyspaceOutput{} 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_deserializeOpDocumentGetKeyspaceOutput(&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_deserializeOpErrorGetKeyspace(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return 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("ServiceQuotaExceededException", errorCode): return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpGetTable struct { } func (*awsAwsjson10_deserializeOpGetTable) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpGetTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorGetTable(response, &metadata) } output := &GetTableOutput{} 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_deserializeOpDocumentGetTableOutput(&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_deserializeOpErrorGetTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return 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("ServiceQuotaExceededException", errorCode): return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpListKeyspaces struct { } func (*awsAwsjson10_deserializeOpListKeyspaces) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpListKeyspaces) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorListKeyspaces(response, &metadata) } output := &ListKeyspacesOutput{} 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_deserializeOpDocumentListKeyspacesOutput(&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_deserializeOpErrorListKeyspaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return 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("ServiceQuotaExceededException", errorCode): return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpListTables struct { } func (*awsAwsjson10_deserializeOpListTables) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpListTables) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorListTables(response, &metadata) } output := &ListTablesOutput{} 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_deserializeOpDocumentListTablesOutput(&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_deserializeOpErrorListTables(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return 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("ServiceQuotaExceededException", errorCode): return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpListTagsForResource struct { } func (*awsAwsjson10_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorListTagsForResource(response, &metadata) } output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(&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_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("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("ServiceQuotaExceededException", errorCode): return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpRestoreTable struct { } func (*awsAwsjson10_deserializeOpRestoreTable) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpRestoreTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorRestoreTable(response, &metadata) } output := &RestoreTableOutput{} 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_deserializeOpDocumentRestoreTableOutput(&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_deserializeOpErrorRestoreTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return 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("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpTagResource struct { } func (*awsAwsjson10_deserializeOpTagResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorTagResource(response, &metadata) } output := &TagResourceOutput{} 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_deserializeOpDocumentTagResourceOutput(&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_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("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("ServiceQuotaExceededException", errorCode): return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpUntagResource struct { } func (*awsAwsjson10_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorUntagResource(response, &metadata) } output := &UntagResourceOutput{} 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_deserializeOpDocumentUntagResourceOutput(&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_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("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("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpUpdateTable struct { } func (*awsAwsjson10_deserializeOpUpdateTable) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpUpdateTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorUpdateTable(response, &metadata) } output := &UpdateTableOutput{} 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_deserializeOpDocumentUpdateTableOutput(&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_deserializeOpErrorUpdateTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return 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("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_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": 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_deserializeDocumentCapacitySpecificationSummary(v **types.CapacitySpecificationSummary, 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.CapacitySpecificationSummary if *v == nil { sv = &types.CapacitySpecificationSummary{} } else { sv = *v } for key, value := range shape { switch key { case "lastUpdateToPayPerRequestTimestamp": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastUpdateToPayPerRequestTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "readCapacityUnits": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected CapacityUnits to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ReadCapacityUnits = ptr.Int64(i64) } case "throughputMode": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ThroughputMode to be of type string, got %T instead", value) } sv.ThroughputMode = types.ThroughputMode(jtv) } case "writeCapacityUnits": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected CapacityUnits to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.WriteCapacityUnits = ptr.Int64(i64) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentClientSideTimestamps(v **types.ClientSideTimestamps, 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.ClientSideTimestamps if *v == nil { sv = &types.ClientSideTimestamps{} } else { sv = *v } for key, value := range shape { switch key { case "status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ClientSideTimestampsStatus to be of type string, got %T instead", value) } sv.Status = types.ClientSideTimestampsStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentClusteringKey(v **types.ClusteringKey, 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.ClusteringKey if *v == nil { sv = &types.ClusteringKey{} } else { sv = *v } for key, value := range shape { switch key { case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "orderBy": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SortOrder to be of type string, got %T instead", value) } sv.OrderBy = types.SortOrder(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentClusteringKeyList(v *[]types.ClusteringKey, 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.ClusteringKey if *v == nil { cv = []types.ClusteringKey{} } else { cv = *v } for _, value := range shape { var col types.ClusteringKey destAddr := &col if err := awsAwsjson10_deserializeDocumentClusteringKey(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentColumnDefinition(v **types.ColumnDefinition, 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.ColumnDefinition if *v == nil { sv = &types.ColumnDefinition{} } else { sv = *v } for key, value := range shape { switch key { case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.Type = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentColumnDefinitionList(v *[]types.ColumnDefinition, 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.ColumnDefinition if *v == nil { cv = []types.ColumnDefinition{} } else { cv = *v } for _, value := range shape { var col types.ColumnDefinition destAddr := &col if err := awsAwsjson10_deserializeDocumentColumnDefinition(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentComment(v **types.Comment, 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.Comment if *v == nil { sv = &types.Comment{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func 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": 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_deserializeDocumentEncryptionSpecification(v **types.EncryptionSpecification, 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.EncryptionSpecification if *v == nil { sv = &types.EncryptionSpecification{} } else { sv = *v } for key, value := range shape { switch key { case "kmsKeyIdentifier": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected kmsKeyARN to be of type string, got %T instead", value) } sv.KmsKeyIdentifier = ptr.String(jtv) } case "type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EncryptionType to be of type string, got %T instead", value) } sv.Type = types.EncryptionType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InternalServerException if *v == nil { sv = &types.InternalServerException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentKeyspaceSummary(v **types.KeyspaceSummary, 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.KeyspaceSummary if *v == nil { sv = &types.KeyspaceSummary{} } else { sv = *v } for key, value := range shape { switch key { case "keyspaceName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected KeyspaceName to be of type string, got %T instead", value) } sv.KeyspaceName = ptr.String(jtv) } case "replicationRegions": if err := awsAwsjson10_deserializeDocumentRegionList(&sv.ReplicationRegions, value); err != nil { return err } case "replicationStrategy": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected rs to be of type string, got %T instead", value) } sv.ReplicationStrategy = types.Rs(jtv) } case "resourceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } sv.ResourceArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentKeyspaceSummaryList(v *[]types.KeyspaceSummary, 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.KeyspaceSummary if *v == nil { cv = []types.KeyspaceSummary{} } else { cv = *v } for _, value := range shape { var col types.KeyspaceSummary destAddr := &col if err := awsAwsjson10_deserializeDocumentKeyspaceSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentPartitionKey(v **types.PartitionKey, 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.PartitionKey if *v == nil { sv = &types.PartitionKey{} } else { sv = *v } for key, value := range shape { switch key { case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentPartitionKeyList(v *[]types.PartitionKey, 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.PartitionKey if *v == nil { cv = []types.PartitionKey{} } else { cv = *v } for _, value := range shape { var col types.PartitionKey destAddr := &col if err := awsAwsjson10_deserializeDocumentPartitionKey(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentPointInTimeRecoverySummary(v **types.PointInTimeRecoverySummary, 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.PointInTimeRecoverySummary if *v == nil { sv = &types.PointInTimeRecoverySummary{} } else { sv = *v } for key, value := range shape { switch key { case "earliestRestorableTimestamp": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.EarliestRestorableTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PointInTimeRecoveryStatus to be of type string, got %T instead", value) } sv.Status = types.PointInTimeRecoveryStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentRegionList(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 region to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ResourceNotFoundException if *v == nil { sv = &types.ResourceNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } case "resourceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } sv.ResourceArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentSchemaDefinition(v **types.SchemaDefinition, 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.SchemaDefinition if *v == nil { sv = &types.SchemaDefinition{} } else { sv = *v } for key, value := range shape { switch key { case "allColumns": if err := awsAwsjson10_deserializeDocumentColumnDefinitionList(&sv.AllColumns, value); err != nil { return err } case "clusteringKeys": if err := awsAwsjson10_deserializeDocumentClusteringKeyList(&sv.ClusteringKeys, value); err != nil { return err } case "partitionKeys": if err := awsAwsjson10_deserializeDocumentPartitionKeyList(&sv.PartitionKeys, value); err != nil { return err } case "staticColumns": if err := awsAwsjson10_deserializeDocumentStaticColumnList(&sv.StaticColumns, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ServiceQuotaExceededException if *v == nil { sv = &types.ServiceQuotaExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentStaticColumn(v **types.StaticColumn, 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.StaticColumn if *v == nil { sv = &types.StaticColumn{} } else { sv = *v } for key, value := range shape { switch key { case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentStaticColumnList(v *[]types.StaticColumn, 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.StaticColumn if *v == nil { cv = []types.StaticColumn{} } else { cv = *v } for _, value := range shape { var col types.StaticColumn destAddr := &col if err := awsAwsjson10_deserializeDocumentStaticColumn(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentTableSummary(v **types.TableSummary, 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.TableSummary if *v == nil { sv = &types.TableSummary{} } else { sv = *v } for key, value := range shape { switch key { case "keyspaceName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected KeyspaceName to be of type string, got %T instead", value) } sv.KeyspaceName = ptr.String(jtv) } case "resourceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } sv.ResourceArn = ptr.String(jtv) } case "tableName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TableName to be of type string, got %T instead", value) } sv.TableName = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentTableSummaryList(v *[]types.TableSummary, 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.TableSummary if *v == nil { cv = []types.TableSummary{} } else { cv = *v } for _, value := range shape { var col types.TableSummary destAddr := &col if err := awsAwsjson10_deserializeDocumentTableSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentTag(v **types.Tag, 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.Tag if *v == nil { sv = &types.Tag{} } else { sv = *v } for key, value := range shape { switch key { case "key": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TagKey to be of type string, got %T instead", value) } sv.Key = ptr.String(jtv) } case "value": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) } sv.Value = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentTagList(v *[]types.Tag, 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.Tag if *v == nil { cv = []types.Tag{} } else { cv = *v } for _, value := range shape { var col types.Tag destAddr := &col if err := awsAwsjson10_deserializeDocumentTag(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentTimeToLive(v **types.TimeToLive, 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.TimeToLive if *v == nil { sv = &types.TimeToLive{} } else { sv = *v } for key, value := range shape { switch key { case "status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TimeToLiveStatus to be of type string, got %T instead", value) } sv.Status = types.TimeToLiveStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ValidationException if *v == nil { sv = &types.ValidationException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentCreateKeyspaceOutput(v **CreateKeyspaceOutput, 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 *CreateKeyspaceOutput if *v == nil { sv = &CreateKeyspaceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "resourceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } sv.ResourceArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentCreateTableOutput(v **CreateTableOutput, 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 *CreateTableOutput if *v == nil { sv = &CreateTableOutput{} } else { sv = *v } for key, value := range shape { switch key { case "resourceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } sv.ResourceArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentDeleteKeyspaceOutput(v **DeleteKeyspaceOutput, 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 *DeleteKeyspaceOutput if *v == nil { sv = &DeleteKeyspaceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentDeleteTableOutput(v **DeleteTableOutput, 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 *DeleteTableOutput if *v == nil { sv = &DeleteTableOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentGetKeyspaceOutput(v **GetKeyspaceOutput, 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 *GetKeyspaceOutput if *v == nil { sv = &GetKeyspaceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "keyspaceName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected KeyspaceName to be of type string, got %T instead", value) } sv.KeyspaceName = ptr.String(jtv) } case "replicationRegions": if err := awsAwsjson10_deserializeDocumentRegionList(&sv.ReplicationRegions, value); err != nil { return err } case "replicationStrategy": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected rs to be of type string, got %T instead", value) } sv.ReplicationStrategy = types.Rs(jtv) } case "resourceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } sv.ResourceArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentGetTableOutput(v **GetTableOutput, 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 *GetTableOutput if *v == nil { sv = &GetTableOutput{} } else { sv = *v } for key, value := range shape { switch key { case "capacitySpecification": if err := awsAwsjson10_deserializeDocumentCapacitySpecificationSummary(&sv.CapacitySpecification, value); err != nil { return err } case "clientSideTimestamps": if err := awsAwsjson10_deserializeDocumentClientSideTimestamps(&sv.ClientSideTimestamps, value); err != nil { return err } case "comment": if err := awsAwsjson10_deserializeDocumentComment(&sv.Comment, value); err != nil { return err } case "creationTimestamp": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreationTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "defaultTimeToLive": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected DefaultTimeToLive to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.DefaultTimeToLive = ptr.Int32(int32(i64)) } case "encryptionSpecification": if err := awsAwsjson10_deserializeDocumentEncryptionSpecification(&sv.EncryptionSpecification, value); err != nil { return err } case "keyspaceName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected KeyspaceName to be of type string, got %T instead", value) } sv.KeyspaceName = ptr.String(jtv) } case "pointInTimeRecovery": if err := awsAwsjson10_deserializeDocumentPointInTimeRecoverySummary(&sv.PointInTimeRecovery, value); err != nil { return err } case "resourceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } sv.ResourceArn = ptr.String(jtv) } case "schemaDefinition": if err := awsAwsjson10_deserializeDocumentSchemaDefinition(&sv.SchemaDefinition, value); err != nil { return err } case "status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TableStatus to be of type string, got %T instead", value) } sv.Status = types.TableStatus(jtv) } case "tableName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TableName to be of type string, got %T instead", value) } sv.TableName = ptr.String(jtv) } case "ttl": if err := awsAwsjson10_deserializeDocumentTimeToLive(&sv.Ttl, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentListKeyspacesOutput(v **ListKeyspacesOutput, 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 *ListKeyspacesOutput if *v == nil { sv = &ListKeyspacesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "keyspaces": if err := awsAwsjson10_deserializeDocumentKeyspaceSummaryList(&sv.Keyspaces, value); err != nil { return err } case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentListTablesOutput(v **ListTablesOutput, 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 *ListTablesOutput if *v == nil { sv = &ListTablesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "tables": if err := awsAwsjson10_deserializeDocumentTableSummaryList(&sv.Tables, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListTagsForResourceOutput if *v == nil { sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "tags": if err := awsAwsjson10_deserializeDocumentTagList(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentRestoreTableOutput(v **RestoreTableOutput, 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 *RestoreTableOutput if *v == nil { sv = &RestoreTableOutput{} } else { sv = *v } for key, value := range shape { switch key { case "restoredTableARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } sv.RestoredTableARN = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, 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 *TagResourceOutput if *v == nil { sv = &TagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, 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 *UntagResourceOutput if *v == nil { sv = &UntagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentUpdateTableOutput(v **UpdateTableOutput, 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 *UpdateTableOutput if *v == nil { sv = &UpdateTableOutput{} } else { sv = *v } for key, value := range shape { switch key { case "resourceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } sv.ResourceArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil }
3,690
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package keyspaces provides the API client, operations, and parameter types for // Amazon Keyspaces. // // Amazon Keyspaces (for Apache Cassandra) is a scalable, highly available, and // managed Apache Cassandra-compatible database service. Amazon Keyspaces makes it // easy to migrate, run, and scale Cassandra workloads in the Amazon Web Services // Cloud. With just a few clicks on the Amazon Web Services Management Console or a // few lines of code, you can create keyspaces and tables in Amazon Keyspaces, // without deploying any infrastructure or installing software. In addition to // supporting Cassandra Query Language (CQL) requests via open-source Cassandra // drivers, Amazon Keyspaces supports data definition language (DDL) operations to // manage keyspaces and tables using the Amazon Web Services SDK and CLI, as well // as infrastructure as code (IaC) services and tools such as CloudFormation and // Terraform. This API reference describes the supported DDL operations in detail. // For the list of all supported CQL APIs, see Supported Cassandra APIs, // operations, and data types in Amazon Keyspaces (https://docs.aws.amazon.com/keyspaces/latest/devguide/cassandra-apis.html) // in the Amazon Keyspaces Developer Guide. To learn how Amazon Keyspaces API // actions are recorded with CloudTrail, see Amazon Keyspaces information in // CloudTrail (https://docs.aws.amazon.com/keyspaces/latest/devguide/logging-using-cloudtrail.html#service-name-info-in-cloudtrail) // in the Amazon Keyspaces Developer Guide. For more information about Amazon Web // Services APIs, for example how to implement retry logic or how to sign Amazon // Web Services API requests, see Amazon Web Services APIs (https://docs.aws.amazon.com/general/latest/gr/aws-apis.html) // in the General Reference. package keyspaces
27
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces import ( "context" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" internalendpoints "github.com/aws/aws-sdk-go-v2/service/keyspaces/internal/endpoints" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net/url" "strings" ) // EndpointResolverOptions is the service endpoint resolver options type EndpointResolverOptions = internalendpoints.Options // EndpointResolver interface for resolving service endpoints. type EndpointResolver interface { ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) } var _ EndpointResolver = &internalendpoints.Resolver{} // NewDefaultEndpointResolver constructs a new service endpoint resolver func NewDefaultEndpointResolver() *internalendpoints.Resolver { return internalendpoints.New() } // EndpointResolverFunc is a helper utility that wraps a function so it satisfies // the EndpointResolver interface. This is useful when you want to add additional // endpoint resolving logic, or stub out specific endpoints with custom values. type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { return fn(region, options) } func resolveDefaultEndpointConfiguration(o *Options) { if o.EndpointResolver != nil { return } o.EndpointResolver = NewDefaultEndpointResolver() } // EndpointResolverFromURL returns an EndpointResolver configured using the // provided endpoint url. By default, the resolved endpoint resolver uses the // client region as signing region, and the endpoint source is set to // EndpointSourceCustom.You can provide functional options to configure endpoint // values for the resolved endpoint. func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} for _, fn := range optFns { fn(&e) } return EndpointResolverFunc( func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { if len(e.SigningRegion) == 0 { e.SigningRegion = region } return e, nil }, ) } type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions } func (*ResolveEndpoint) ID() string { return "ResolveEndpoint" } func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) } if m.Resolver == nil { return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } eo := m.Options eo.Logger = middleware.GetLogger(ctx) var endpoint aws.Endpoint endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } req.URL, err = url.Parse(endpoint.URL) if err != nil { return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) } if len(awsmiddleware.GetSigningName(ctx)) == 0 { signingName := endpoint.SigningName if len(signingName) == 0 { signingName = "cassandra" } ctx = awsmiddleware.SetSigningName(ctx, signingName) } ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) return next.HandleSerialize(ctx, in) } func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { return stack.Serialize.Insert(&ResolveEndpoint{ Resolver: o.EndpointResolver, Options: o.EndpointOptions, }, "OperationSerializer", middleware.Before) } func removeResolveEndpointMiddleware(stack *middleware.Stack) error { _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) return err } type wrappedEndpointResolver struct { awsResolver aws.EndpointResolverWithOptions resolver EndpointResolver } func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { if w.awsResolver == nil { goto fallback } endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) if err == nil { return endpoint, nil } if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { return endpoint, err } fallback: if w.resolver == nil { return endpoint, fmt.Errorf("default endpoint resolver provided was nil") } return w.resolver.ResolveEndpoint(region, options) } type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { return a(service, region) } var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) // withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. // If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided // fallbackResolver for resolution. // // fallbackResolver must not be nil func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { var resolver aws.EndpointResolverWithOptions if awsResolverWithOptions != nil { resolver = awsResolverWithOptions } else if awsResolver != nil { resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) } return &wrappedEndpointResolver{ awsResolver: resolver, resolver: fallbackResolver, } } func finalizeClientEndpointResolverOptions(options *Options) { options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() if len(options.EndpointOptions.ResolvedRegion) == 0 { const fipsInfix = "-fips-" const fipsPrefix = "fips-" const fipsSuffix = "-fips" if strings.Contains(options.Region, fipsInfix) || strings.Contains(options.Region, fipsPrefix) || strings.Contains(options.Region, fipsSuffix) { options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled } } }
201
aws-sdk-go-v2
aws
Go
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. package keyspaces // goModuleVersion is the tagged release for this module const goModuleVersion = "1.3.2"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/keyspaces/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "path" ) type awsAwsjson10_serializeOpCreateKeyspace struct { } func (*awsAwsjson10_serializeOpCreateKeyspace) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpCreateKeyspace) 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.(*CreateKeyspaceInput) _ = 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("KeyspacesService.CreateKeyspace") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentCreateKeyspaceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpCreateTable struct { } func (*awsAwsjson10_serializeOpCreateTable) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpCreateTable) 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.(*CreateTableInput) _ = 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("KeyspacesService.CreateTable") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentCreateTableInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpDeleteKeyspace struct { } func (*awsAwsjson10_serializeOpDeleteKeyspace) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpDeleteKeyspace) 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.(*DeleteKeyspaceInput) _ = 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("KeyspacesService.DeleteKeyspace") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentDeleteKeyspaceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpDeleteTable struct { } func (*awsAwsjson10_serializeOpDeleteTable) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpDeleteTable) 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.(*DeleteTableInput) _ = 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("KeyspacesService.DeleteTable") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentDeleteTableInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpGetKeyspace struct { } func (*awsAwsjson10_serializeOpGetKeyspace) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpGetKeyspace) 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.(*GetKeyspaceInput) _ = 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("KeyspacesService.GetKeyspace") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentGetKeyspaceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpGetTable struct { } func (*awsAwsjson10_serializeOpGetTable) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpGetTable) 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.(*GetTableInput) _ = 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("KeyspacesService.GetTable") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentGetTableInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpListKeyspaces struct { } func (*awsAwsjson10_serializeOpListKeyspaces) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpListKeyspaces) 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.(*ListKeyspacesInput) _ = 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("KeyspacesService.ListKeyspaces") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentListKeyspacesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpListTables struct { } func (*awsAwsjson10_serializeOpListTables) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpListTables) 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.(*ListTablesInput) _ = 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("KeyspacesService.ListTables") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentListTablesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpListTagsForResource struct { } func (*awsAwsjson10_serializeOpListTagsForResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListTagsForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("KeyspacesService.ListTagsForResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpRestoreTable struct { } func (*awsAwsjson10_serializeOpRestoreTable) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpRestoreTable) 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.(*RestoreTableInput) _ = 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("KeyspacesService.RestoreTable") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentRestoreTableInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpTagResource struct { } func (*awsAwsjson10_serializeOpTagResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("KeyspacesService.TagResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpUntagResource struct { } func (*awsAwsjson10_serializeOpUntagResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("KeyspacesService.UntagResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpUpdateTable struct { } func (*awsAwsjson10_serializeOpUpdateTable) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpUpdateTable) 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.(*UpdateTableInput) _ = 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("KeyspacesService.UpdateTable") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentUpdateTableInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsAwsjson10_serializeDocumentCapacitySpecification(v *types.CapacitySpecification, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ReadCapacityUnits != nil { ok := object.Key("readCapacityUnits") ok.Long(*v.ReadCapacityUnits) } if len(v.ThroughputMode) > 0 { ok := object.Key("throughputMode") ok.String(string(v.ThroughputMode)) } if v.WriteCapacityUnits != nil { ok := object.Key("writeCapacityUnits") ok.Long(*v.WriteCapacityUnits) } return nil } func awsAwsjson10_serializeDocumentClientSideTimestamps(v *types.ClientSideTimestamps, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Status) > 0 { ok := object.Key("status") ok.String(string(v.Status)) } return nil } func awsAwsjson10_serializeDocumentClusteringKey(v *types.ClusteringKey, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) } if len(v.OrderBy) > 0 { ok := object.Key("orderBy") ok.String(string(v.OrderBy)) } return nil } func awsAwsjson10_serializeDocumentClusteringKeyList(v []types.ClusteringKey, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentClusteringKey(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentColumnDefinition(v *types.ColumnDefinition, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) } if v.Type != nil { ok := object.Key("type") ok.String(*v.Type) } return nil } func awsAwsjson10_serializeDocumentColumnDefinitionList(v []types.ColumnDefinition, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentColumnDefinition(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentComment(v *types.Comment, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Message != nil { ok := object.Key("message") ok.String(*v.Message) } return nil } func awsAwsjson10_serializeDocumentEncryptionSpecification(v *types.EncryptionSpecification, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.KmsKeyIdentifier != nil { ok := object.Key("kmsKeyIdentifier") ok.String(*v.KmsKeyIdentifier) } if len(v.Type) > 0 { ok := object.Key("type") ok.String(string(v.Type)) } return nil } func awsAwsjson10_serializeDocumentPartitionKey(v *types.PartitionKey, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) } return nil } func awsAwsjson10_serializeDocumentPartitionKeyList(v []types.PartitionKey, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentPartitionKey(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentPointInTimeRecovery(v *types.PointInTimeRecovery, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Status) > 0 { ok := object.Key("status") ok.String(string(v.Status)) } return nil } func awsAwsjson10_serializeDocumentRegionList(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_serializeDocumentReplicationSpecification(v *types.ReplicationSpecification, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RegionList != nil { ok := object.Key("regionList") if err := awsAwsjson10_serializeDocumentRegionList(v.RegionList, ok); err != nil { return err } } if len(v.ReplicationStrategy) > 0 { ok := object.Key("replicationStrategy") ok.String(string(v.ReplicationStrategy)) } return nil } func awsAwsjson10_serializeDocumentSchemaDefinition(v *types.SchemaDefinition, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AllColumns != nil { ok := object.Key("allColumns") if err := awsAwsjson10_serializeDocumentColumnDefinitionList(v.AllColumns, ok); err != nil { return err } } if v.ClusteringKeys != nil { ok := object.Key("clusteringKeys") if err := awsAwsjson10_serializeDocumentClusteringKeyList(v.ClusteringKeys, ok); err != nil { return err } } if v.PartitionKeys != nil { ok := object.Key("partitionKeys") if err := awsAwsjson10_serializeDocumentPartitionKeyList(v.PartitionKeys, ok); err != nil { return err } } if v.StaticColumns != nil { ok := object.Key("staticColumns") if err := awsAwsjson10_serializeDocumentStaticColumnList(v.StaticColumns, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentStaticColumn(v *types.StaticColumn, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) } return nil } func awsAwsjson10_serializeDocumentStaticColumnList(v []types.StaticColumn, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentStaticColumn(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Key != nil { ok := object.Key("key") ok.String(*v.Key) } if v.Value != nil { ok := object.Key("value") ok.String(*v.Value) } return nil } func awsAwsjson10_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentTag(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentTimeToLive(v *types.TimeToLive, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Status) > 0 { ok := object.Key("status") ok.String(string(v.Status)) } return nil } func awsAwsjson10_serializeOpDocumentCreateKeyspaceInput(v *CreateKeyspaceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.KeyspaceName != nil { ok := object.Key("keyspaceName") ok.String(*v.KeyspaceName) } if v.ReplicationSpecification != nil { ok := object.Key("replicationSpecification") if err := awsAwsjson10_serializeDocumentReplicationSpecification(v.ReplicationSpecification, ok); err != nil { return err } } if v.Tags != nil { ok := object.Key("tags") if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeOpDocumentCreateTableInput(v *CreateTableInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CapacitySpecification != nil { ok := object.Key("capacitySpecification") if err := awsAwsjson10_serializeDocumentCapacitySpecification(v.CapacitySpecification, ok); err != nil { return err } } if v.ClientSideTimestamps != nil { ok := object.Key("clientSideTimestamps") if err := awsAwsjson10_serializeDocumentClientSideTimestamps(v.ClientSideTimestamps, ok); err != nil { return err } } if v.Comment != nil { ok := object.Key("comment") if err := awsAwsjson10_serializeDocumentComment(v.Comment, ok); err != nil { return err } } if v.DefaultTimeToLive != nil { ok := object.Key("defaultTimeToLive") ok.Integer(*v.DefaultTimeToLive) } if v.EncryptionSpecification != nil { ok := object.Key("encryptionSpecification") if err := awsAwsjson10_serializeDocumentEncryptionSpecification(v.EncryptionSpecification, ok); err != nil { return err } } if v.KeyspaceName != nil { ok := object.Key("keyspaceName") ok.String(*v.KeyspaceName) } if v.PointInTimeRecovery != nil { ok := object.Key("pointInTimeRecovery") if err := awsAwsjson10_serializeDocumentPointInTimeRecovery(v.PointInTimeRecovery, ok); err != nil { return err } } if v.SchemaDefinition != nil { ok := object.Key("schemaDefinition") if err := awsAwsjson10_serializeDocumentSchemaDefinition(v.SchemaDefinition, ok); err != nil { return err } } if v.TableName != nil { ok := object.Key("tableName") ok.String(*v.TableName) } if v.Tags != nil { ok := object.Key("tags") if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } if v.Ttl != nil { ok := object.Key("ttl") if err := awsAwsjson10_serializeDocumentTimeToLive(v.Ttl, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeOpDocumentDeleteKeyspaceInput(v *DeleteKeyspaceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.KeyspaceName != nil { ok := object.Key("keyspaceName") ok.String(*v.KeyspaceName) } return nil } func awsAwsjson10_serializeOpDocumentDeleteTableInput(v *DeleteTableInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.KeyspaceName != nil { ok := object.Key("keyspaceName") ok.String(*v.KeyspaceName) } if v.TableName != nil { ok := object.Key("tableName") ok.String(*v.TableName) } return nil } func awsAwsjson10_serializeOpDocumentGetKeyspaceInput(v *GetKeyspaceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.KeyspaceName != nil { ok := object.Key("keyspaceName") ok.String(*v.KeyspaceName) } return nil } func awsAwsjson10_serializeOpDocumentGetTableInput(v *GetTableInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.KeyspaceName != nil { ok := object.Key("keyspaceName") ok.String(*v.KeyspaceName) } if v.TableName != nil { ok := object.Key("tableName") ok.String(*v.TableName) } return nil } func awsAwsjson10_serializeOpDocumentListKeyspacesInput(v *ListKeyspacesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("maxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("nextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson10_serializeOpDocumentListTablesInput(v *ListTablesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.KeyspaceName != nil { ok := object.Key("keyspaceName") ok.String(*v.KeyspaceName) } 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_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("maxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("nextToken") ok.String(*v.NextToken) } if v.ResourceArn != nil { ok := object.Key("resourceArn") ok.String(*v.ResourceArn) } return nil } func awsAwsjson10_serializeOpDocumentRestoreTableInput(v *RestoreTableInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CapacitySpecificationOverride != nil { ok := object.Key("capacitySpecificationOverride") if err := awsAwsjson10_serializeDocumentCapacitySpecification(v.CapacitySpecificationOverride, ok); err != nil { return err } } if v.EncryptionSpecificationOverride != nil { ok := object.Key("encryptionSpecificationOverride") if err := awsAwsjson10_serializeDocumentEncryptionSpecification(v.EncryptionSpecificationOverride, ok); err != nil { return err } } if v.PointInTimeRecoveryOverride != nil { ok := object.Key("pointInTimeRecoveryOverride") if err := awsAwsjson10_serializeDocumentPointInTimeRecovery(v.PointInTimeRecoveryOverride, ok); err != nil { return err } } if v.RestoreTimestamp != nil { ok := object.Key("restoreTimestamp") ok.Double(smithytime.FormatEpochSeconds(*v.RestoreTimestamp)) } if v.SourceKeyspaceName != nil { ok := object.Key("sourceKeyspaceName") ok.String(*v.SourceKeyspaceName) } if v.SourceTableName != nil { ok := object.Key("sourceTableName") ok.String(*v.SourceTableName) } if v.TagsOverride != nil { ok := object.Key("tagsOverride") if err := awsAwsjson10_serializeDocumentTagList(v.TagsOverride, ok); err != nil { return err } } if v.TargetKeyspaceName != nil { ok := object.Key("targetKeyspaceName") ok.String(*v.TargetKeyspaceName) } if v.TargetTableName != nil { ok := object.Key("targetTableName") ok.String(*v.TargetTableName) } return nil } func awsAwsjson10_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceArn != nil { ok := object.Key("resourceArn") ok.String(*v.ResourceArn) } if v.Tags != nil { ok := object.Key("tags") if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceArn != nil { ok := object.Key("resourceArn") ok.String(*v.ResourceArn) } if v.Tags != nil { ok := object.Key("tags") if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeOpDocumentUpdateTableInput(v *UpdateTableInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AddColumns != nil { ok := object.Key("addColumns") if err := awsAwsjson10_serializeDocumentColumnDefinitionList(v.AddColumns, ok); err != nil { return err } } if v.CapacitySpecification != nil { ok := object.Key("capacitySpecification") if err := awsAwsjson10_serializeDocumentCapacitySpecification(v.CapacitySpecification, ok); err != nil { return err } } if v.ClientSideTimestamps != nil { ok := object.Key("clientSideTimestamps") if err := awsAwsjson10_serializeDocumentClientSideTimestamps(v.ClientSideTimestamps, ok); err != nil { return err } } if v.DefaultTimeToLive != nil { ok := object.Key("defaultTimeToLive") ok.Integer(*v.DefaultTimeToLive) } if v.EncryptionSpecification != nil { ok := object.Key("encryptionSpecification") if err := awsAwsjson10_serializeDocumentEncryptionSpecification(v.EncryptionSpecification, ok); err != nil { return err } } if v.KeyspaceName != nil { ok := object.Key("keyspaceName") ok.String(*v.KeyspaceName) } if v.PointInTimeRecovery != nil { ok := object.Key("pointInTimeRecovery") if err := awsAwsjson10_serializeDocumentPointInTimeRecovery(v.PointInTimeRecovery, ok); err != nil { return err } } if v.TableName != nil { ok := object.Key("tableName") ok.String(*v.TableName) } if v.Ttl != nil { ok := object.Key("ttl") if err := awsAwsjson10_serializeDocumentTimeToLive(v.Ttl, ok); err != nil { return err } } return nil }
1,409
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package keyspaces import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/keyspaces/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpCreateKeyspace struct { } func (*validateOpCreateKeyspace) ID() string { return "OperationInputValidation" } func (m *validateOpCreateKeyspace) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateKeyspaceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateKeyspaceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateTable struct { } func (*validateOpCreateTable) ID() string { return "OperationInputValidation" } func (m *validateOpCreateTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateTableInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateTableInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteKeyspace struct { } func (*validateOpDeleteKeyspace) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteKeyspace) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteKeyspaceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteKeyspaceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteTable struct { } func (*validateOpDeleteTable) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteTableInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteTableInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetKeyspace struct { } func (*validateOpGetKeyspace) ID() string { return "OperationInputValidation" } func (m *validateOpGetKeyspace) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetKeyspaceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetKeyspaceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetTable struct { } func (*validateOpGetTable) ID() string { return "OperationInputValidation" } func (m *validateOpGetTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetTableInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetTableInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListTables struct { } func (*validateOpListTables) ID() string { return "OperationInputValidation" } func (m *validateOpListTables) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListTablesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListTablesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListTagsForResource struct { } func (*validateOpListTagsForResource) ID() string { return "OperationInputValidation" } func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListTagsForResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListTagsForResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRestoreTable struct { } func (*validateOpRestoreTable) ID() string { return "OperationInputValidation" } func (m *validateOpRestoreTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RestoreTableInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRestoreTableInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagResource struct { } func (*validateOpTagResource) ID() string { return "OperationInputValidation" } func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagResource struct { } func (*validateOpUntagResource) ID() string { return "OperationInputValidation" } func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateTable struct { } func (*validateOpUpdateTable) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateTableInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateTableInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpCreateKeyspaceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateKeyspace{}, middleware.After) } func addOpCreateTableValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateTable{}, middleware.After) } func addOpDeleteKeyspaceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteKeyspace{}, middleware.After) } func addOpDeleteTableValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteTable{}, middleware.After) } func addOpGetKeyspaceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetKeyspace{}, middleware.After) } func addOpGetTableValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetTable{}, middleware.After) } func addOpListTablesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTables{}, middleware.After) } func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } func addOpRestoreTableValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRestoreTable{}, middleware.After) } func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } func addOpUpdateTableValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateTable{}, middleware.After) } func validateCapacitySpecification(v *types.CapacitySpecification) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CapacitySpecification"} if len(v.ThroughputMode) == 0 { invalidParams.Add(smithy.NewErrParamRequired("ThroughputMode")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateClientSideTimestamps(v *types.ClientSideTimestamps) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ClientSideTimestamps"} if len(v.Status) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Status")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateClusteringKey(v *types.ClusteringKey) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ClusteringKey"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if len(v.OrderBy) == 0 { invalidParams.Add(smithy.NewErrParamRequired("OrderBy")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateClusteringKeyList(v []types.ClusteringKey) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ClusteringKeyList"} for i := range v { if err := validateClusteringKey(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateColumnDefinition(v *types.ColumnDefinition) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ColumnDefinition"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.Type == nil { invalidParams.Add(smithy.NewErrParamRequired("Type")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateColumnDefinitionList(v []types.ColumnDefinition) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ColumnDefinitionList"} for i := range v { if err := validateColumnDefinition(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateComment(v *types.Comment) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Comment"} if v.Message == nil { invalidParams.Add(smithy.NewErrParamRequired("Message")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateEncryptionSpecification(v *types.EncryptionSpecification) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "EncryptionSpecification"} if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validatePartitionKey(v *types.PartitionKey) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PartitionKey"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validatePartitionKeyList(v []types.PartitionKey) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PartitionKeyList"} for i := range v { if err := validatePartitionKey(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validatePointInTimeRecovery(v *types.PointInTimeRecovery) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PointInTimeRecovery"} if len(v.Status) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Status")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateReplicationSpecification(v *types.ReplicationSpecification) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ReplicationSpecification"} if len(v.ReplicationStrategy) == 0 { invalidParams.Add(smithy.NewErrParamRequired("ReplicationStrategy")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSchemaDefinition(v *types.SchemaDefinition) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SchemaDefinition"} if v.AllColumns == nil { invalidParams.Add(smithy.NewErrParamRequired("AllColumns")) } else if v.AllColumns != nil { if err := validateColumnDefinitionList(v.AllColumns); err != nil { invalidParams.AddNested("AllColumns", err.(smithy.InvalidParamsError)) } } if v.PartitionKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("PartitionKeys")) } else if v.PartitionKeys != nil { if err := validatePartitionKeyList(v.PartitionKeys); err != nil { invalidParams.AddNested("PartitionKeys", err.(smithy.InvalidParamsError)) } } if v.ClusteringKeys != nil { if err := validateClusteringKeyList(v.ClusteringKeys); err != nil { invalidParams.AddNested("ClusteringKeys", err.(smithy.InvalidParamsError)) } } if v.StaticColumns != nil { if err := validateStaticColumnList(v.StaticColumns); err != nil { invalidParams.AddNested("StaticColumns", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateStaticColumn(v *types.StaticColumn) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StaticColumn"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateStaticColumnList(v []types.StaticColumn) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StaticColumnList"} for i := range v { if err := validateStaticColumn(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTag(v *types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Tag"} if v.Key == nil { invalidParams.Add(smithy.NewErrParamRequired("Key")) } if v.Value == nil { invalidParams.Add(smithy.NewErrParamRequired("Value")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTagList(v []types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagList"} for i := range v { if err := validateTag(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTimeToLive(v *types.TimeToLive) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TimeToLive"} if len(v.Status) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Status")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateKeyspaceInput(v *CreateKeyspaceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateKeyspaceInput"} if v.KeyspaceName == nil { invalidParams.Add(smithy.NewErrParamRequired("KeyspaceName")) } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if v.ReplicationSpecification != nil { if err := validateReplicationSpecification(v.ReplicationSpecification); err != nil { invalidParams.AddNested("ReplicationSpecification", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateTableInput(v *CreateTableInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateTableInput"} if v.KeyspaceName == nil { invalidParams.Add(smithy.NewErrParamRequired("KeyspaceName")) } if v.TableName == nil { invalidParams.Add(smithy.NewErrParamRequired("TableName")) } if v.SchemaDefinition == nil { invalidParams.Add(smithy.NewErrParamRequired("SchemaDefinition")) } else if v.SchemaDefinition != nil { if err := validateSchemaDefinition(v.SchemaDefinition); err != nil { invalidParams.AddNested("SchemaDefinition", err.(smithy.InvalidParamsError)) } } if v.Comment != nil { if err := validateComment(v.Comment); err != nil { invalidParams.AddNested("Comment", err.(smithy.InvalidParamsError)) } } if v.CapacitySpecification != nil { if err := validateCapacitySpecification(v.CapacitySpecification); err != nil { invalidParams.AddNested("CapacitySpecification", err.(smithy.InvalidParamsError)) } } if v.EncryptionSpecification != nil { if err := validateEncryptionSpecification(v.EncryptionSpecification); err != nil { invalidParams.AddNested("EncryptionSpecification", err.(smithy.InvalidParamsError)) } } if v.PointInTimeRecovery != nil { if err := validatePointInTimeRecovery(v.PointInTimeRecovery); err != nil { invalidParams.AddNested("PointInTimeRecovery", err.(smithy.InvalidParamsError)) } } if v.Ttl != nil { if err := validateTimeToLive(v.Ttl); err != nil { invalidParams.AddNested("Ttl", err.(smithy.InvalidParamsError)) } } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if v.ClientSideTimestamps != nil { if err := validateClientSideTimestamps(v.ClientSideTimestamps); err != nil { invalidParams.AddNested("ClientSideTimestamps", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteKeyspaceInput(v *DeleteKeyspaceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteKeyspaceInput"} if v.KeyspaceName == nil { invalidParams.Add(smithy.NewErrParamRequired("KeyspaceName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteTableInput(v *DeleteTableInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteTableInput"} if v.KeyspaceName == nil { invalidParams.Add(smithy.NewErrParamRequired("KeyspaceName")) } if v.TableName == nil { invalidParams.Add(smithy.NewErrParamRequired("TableName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetKeyspaceInput(v *GetKeyspaceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetKeyspaceInput"} if v.KeyspaceName == nil { invalidParams.Add(smithy.NewErrParamRequired("KeyspaceName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetTableInput(v *GetTableInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetTableInput"} if v.KeyspaceName == nil { invalidParams.Add(smithy.NewErrParamRequired("KeyspaceName")) } if v.TableName == nil { invalidParams.Add(smithy.NewErrParamRequired("TableName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListTablesInput(v *ListTablesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListTablesInput"} if v.KeyspaceName == nil { invalidParams.Add(smithy.NewErrParamRequired("KeyspaceName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRestoreTableInput(v *RestoreTableInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RestoreTableInput"} if v.SourceKeyspaceName == nil { invalidParams.Add(smithy.NewErrParamRequired("SourceKeyspaceName")) } if v.SourceTableName == nil { invalidParams.Add(smithy.NewErrParamRequired("SourceTableName")) } if v.TargetKeyspaceName == nil { invalidParams.Add(smithy.NewErrParamRequired("TargetKeyspaceName")) } if v.TargetTableName == nil { invalidParams.Add(smithy.NewErrParamRequired("TargetTableName")) } if v.CapacitySpecificationOverride != nil { if err := validateCapacitySpecification(v.CapacitySpecificationOverride); err != nil { invalidParams.AddNested("CapacitySpecificationOverride", err.(smithy.InvalidParamsError)) } } if v.EncryptionSpecificationOverride != nil { if err := validateEncryptionSpecification(v.EncryptionSpecificationOverride); err != nil { invalidParams.AddNested("EncryptionSpecificationOverride", err.(smithy.InvalidParamsError)) } } if v.PointInTimeRecoveryOverride != nil { if err := validatePointInTimeRecovery(v.PointInTimeRecoveryOverride); err != nil { invalidParams.AddNested("PointInTimeRecoveryOverride", err.(smithy.InvalidParamsError)) } } if v.TagsOverride != nil { if err := validateTagList(v.TagsOverride); err != nil { invalidParams.AddNested("TagsOverride", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagResourceInput(v *TagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } else if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagResourceInput(v *UntagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } else if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateTableInput(v *UpdateTableInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateTableInput"} if v.KeyspaceName == nil { invalidParams.Add(smithy.NewErrParamRequired("KeyspaceName")) } if v.TableName == nil { invalidParams.Add(smithy.NewErrParamRequired("TableName")) } if v.AddColumns != nil { if err := validateColumnDefinitionList(v.AddColumns); err != nil { invalidParams.AddNested("AddColumns", err.(smithy.InvalidParamsError)) } } if v.CapacitySpecification != nil { if err := validateCapacitySpecification(v.CapacitySpecification); err != nil { invalidParams.AddNested("CapacitySpecification", err.(smithy.InvalidParamsError)) } } if v.EncryptionSpecification != nil { if err := validateEncryptionSpecification(v.EncryptionSpecification); err != nil { invalidParams.AddNested("EncryptionSpecification", err.(smithy.InvalidParamsError)) } } if v.PointInTimeRecovery != nil { if err := validatePointInTimeRecovery(v.PointInTimeRecovery); err != nil { invalidParams.AddNested("PointInTimeRecovery", err.(smithy.InvalidParamsError)) } } if v.Ttl != nil { if err := validateTimeToLive(v.Ttl); err != nil { invalidParams.AddNested("Ttl", err.(smithy.InvalidParamsError)) } } if v.ClientSideTimestamps != nil { if err := validateClientSideTimestamps(v.ClientSideTimestamps); err != nil { invalidParams.AddNested("ClientSideTimestamps", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
927
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "github.com/aws/aws-sdk-go-v2/aws" endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" "github.com/aws/smithy-go/logging" "regexp" ) // Options is the endpoint resolver configuration options type Options struct { // Logger is a logging implementation that log events should be sent to. Logger logging.Logger // LogDeprecated indicates that deprecated endpoints should be logged to the // provided logger. LogDeprecated bool // ResolvedRegion is used to override the region to be resolved, rather then the // using the value passed to the ResolveEndpoint method. This value is used by the // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative // name. You must not set this value directly in your application. ResolvedRegion string // DisableHTTPS informs the resolver to return an endpoint that does not use the // HTTPS scheme. DisableHTTPS bool // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. UseDualStackEndpoint aws.DualStackEndpointState // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. UseFIPSEndpoint aws.FIPSEndpointState } func (o Options) GetResolvedRegion() string { return o.ResolvedRegion } func (o Options) GetDisableHTTPS() bool { return o.DisableHTTPS } func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { return o.UseDualStackEndpoint } func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { return o.UseFIPSEndpoint } func transformToSharedOptions(options Options) endpoints.Options { return endpoints.Options{ Logger: options.Logger, LogDeprecated: options.LogDeprecated, ResolvedRegion: options.ResolvedRegion, DisableHTTPS: options.DisableHTTPS, UseDualStackEndpoint: options.UseDualStackEndpoint, UseFIPSEndpoint: options.UseFIPSEndpoint, } } // Resolver Keyspaces endpoint resolver type Resolver struct { partitions endpoints.Partitions } // ResolveEndpoint resolves the service endpoint for the given region and options func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { if len(region) == 0 { return endpoint, &aws.MissingRegionError{} } opt := transformToSharedOptions(options) return r.partitions.ResolveEndpoint(region, opt) } // New returns a new Resolver func New() *Resolver { return &Resolver{ partitions: defaultPartitions, } } var partitionRegexp = struct { Aws *regexp.Regexp AwsCn *regexp.Regexp AwsIso *regexp.Regexp AwsIsoB *regexp.Regexp AwsIsoE *regexp.Regexp AwsIsoF *regexp.Regexp AwsUsGov *regexp.Regexp }{ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), } var defaultPartitions = endpoints.Partitions{ { ID: "aws", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "cassandra.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "cassandra-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "cassandra-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "cassandra.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "ap-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "fips-us-east-1", }: endpoints.Endpoint{ Hostname: "cassandra-fips.us-east-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "fips-us-west-2", }: endpoints.Endpoint{ Hostname: "cassandra-fips.us-west-2.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-west-2", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "sa-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", Variant: endpoints.FIPSVariant, }: { Hostname: "cassandra-fips.us-east-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", Variant: endpoints.FIPSVariant, }: { Hostname: "cassandra-fips.us-west-2.amazonaws.com", }, }, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "cassandra.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "cassandra-fips.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "cassandra-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "cassandra.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "cn-north-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "cn-northwest-1", }: endpoints.Endpoint{}, }, }, { ID: "aws-iso", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "cassandra-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "cassandra.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, }, { ID: "aws-iso-b", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "cassandra-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "cassandra.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, }, { ID: "aws-iso-e", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "cassandra-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "cassandra.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoE, IsRegionalized: true, }, { ID: "aws-iso-f", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "cassandra-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "cassandra.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoF, IsRegionalized: true, }, { ID: "aws-us-gov", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "cassandra.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "cassandra-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "cassandra-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "cassandra.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "us-gov-east-1", }: endpoints.Endpoint{ Hostname: "cassandra.us-gov-east-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-east-1", }, }, endpoints.EndpointKey{ Region: "us-gov-east-1", Variant: endpoints.FIPSVariant, }: { Hostname: "cassandra.us-gov-east-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-east-1", }, }, endpoints.EndpointKey{ Region: "us-gov-east-1-fips", }: endpoints.Endpoint{ Hostname: "cassandra.us-gov-east-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "us-gov-west-1", }: endpoints.Endpoint{ Hostname: "cassandra.us-gov-west-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-west-1", }, }, endpoints.EndpointKey{ Region: "us-gov-west-1", Variant: endpoints.FIPSVariant, }: { Hostname: "cassandra.us-gov-west-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-west-1", }, }, endpoints.EndpointKey{ Region: "us-gov-west-1-fips", }: endpoints.Endpoint{ Hostname: "cassandra.us-gov-west-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-west-1", }, Deprecated: aws.TrueTernary, }, }, }, }
445
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "testing" ) func TestRegexCompile(t *testing.T) { _ = defaultPartitions }
12
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types type ClientSideTimestampsStatus string // Enum values for ClientSideTimestampsStatus const ( ClientSideTimestampsStatusEnabled ClientSideTimestampsStatus = "ENABLED" ) // Values returns all known values for ClientSideTimestampsStatus. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (ClientSideTimestampsStatus) Values() []ClientSideTimestampsStatus { return []ClientSideTimestampsStatus{ "ENABLED", } } type EncryptionType string // Enum values for EncryptionType const ( EncryptionTypeCustomerManagedKmsKey EncryptionType = "CUSTOMER_MANAGED_KMS_KEY" EncryptionTypeAwsOwnedKmsKey EncryptionType = "AWS_OWNED_KMS_KEY" ) // Values returns all known values for EncryptionType. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (EncryptionType) Values() []EncryptionType { return []EncryptionType{ "CUSTOMER_MANAGED_KMS_KEY", "AWS_OWNED_KMS_KEY", } } type PointInTimeRecoveryStatus string // Enum values for PointInTimeRecoveryStatus const ( PointInTimeRecoveryStatusEnabled PointInTimeRecoveryStatus = "ENABLED" PointInTimeRecoveryStatusDisabled PointInTimeRecoveryStatus = "DISABLED" ) // Values returns all known values for PointInTimeRecoveryStatus. Note that this // can be expanded in the future, and so it is only as up to date as the client. // The ordering of this slice is not guaranteed to be stable across updates. func (PointInTimeRecoveryStatus) Values() []PointInTimeRecoveryStatus { return []PointInTimeRecoveryStatus{ "ENABLED", "DISABLED", } } type Rs string // Enum values for Rs const ( RsSingleRegion Rs = "SINGLE_REGION" RsMultiRegion Rs = "MULTI_REGION" ) // Values returns all known values for Rs. Note that this can be expanded in the // future, and so it is only as up to date as the client. The ordering of this // slice is not guaranteed to be stable across updates. func (Rs) Values() []Rs { return []Rs{ "SINGLE_REGION", "MULTI_REGION", } } type SortOrder string // Enum values for SortOrder const ( SortOrderAsc SortOrder = "ASC" SortOrderDesc SortOrder = "DESC" ) // Values returns all known values for SortOrder. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (SortOrder) Values() []SortOrder { return []SortOrder{ "ASC", "DESC", } } type TableStatus string // Enum values for TableStatus const ( TableStatusActive TableStatus = "ACTIVE" TableStatusCreating TableStatus = "CREATING" TableStatusUpdating TableStatus = "UPDATING" TableStatusDeleting TableStatus = "DELETING" TableStatusDeleted TableStatus = "DELETED" TableStatusRestoring TableStatus = "RESTORING" TableStatusInaccessibleEncryptionCredentials TableStatus = "INACCESSIBLE_ENCRYPTION_CREDENTIALS" ) // Values returns all known values for TableStatus. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (TableStatus) Values() []TableStatus { return []TableStatus{ "ACTIVE", "CREATING", "UPDATING", "DELETING", "DELETED", "RESTORING", "INACCESSIBLE_ENCRYPTION_CREDENTIALS", } } type ThroughputMode string // Enum values for ThroughputMode const ( ThroughputModePayPerRequest ThroughputMode = "PAY_PER_REQUEST" ThroughputModeProvisioned ThroughputMode = "PROVISIONED" ) // Values returns all known values for ThroughputMode. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ThroughputMode) Values() []ThroughputMode { return []ThroughputMode{ "PAY_PER_REQUEST", "PROVISIONED", } } type TimeToLiveStatus string // Enum values for TimeToLiveStatus const ( TimeToLiveStatusEnabled TimeToLiveStatus = "ENABLED" ) // Values returns all known values for TimeToLiveStatus. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (TimeToLiveStatus) Values() []TimeToLiveStatus { return []TimeToLiveStatus{ "ENABLED", } }
154
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( "fmt" smithy "github.com/aws/smithy-go" ) // You do not have sufficient access to perform this action. type AccessDeniedException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *AccessDeniedException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *AccessDeniedException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "AccessDeniedException" } return *e.ErrorCodeOverride } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Amazon Keyspaces could not complete the requested action. This error may occur // if you try to perform an action and the same or a different action is already in // progress, or if you try to create a resource that already exists. type ConflictException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ConflictException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ConflictException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ConflictException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ConflictException" } return *e.ErrorCodeOverride } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Amazon Keyspaces was unable to fully process this request because of an // internal server error. type InternalServerException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InternalServerException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InternalServerException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InternalServerException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InternalServerException" } return *e.ErrorCodeOverride } func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // The operation tried to access a keyspace or table that doesn't exist. The // resource might not be specified correctly, or its status might not be ACTIVE . type ResourceNotFoundException struct { Message *string ErrorCodeOverride *string ResourceArn *string noSmithyDocumentSerde } func (e *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceNotFoundException" } return *e.ErrorCodeOverride } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The operation exceeded the service quota for this resource. For more // information on service quotas, see Quotas (https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html) // in the Amazon Keyspaces Developer Guide. type ServiceQuotaExceededException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ServiceQuotaExceededException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ServiceQuotaExceededException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ServiceQuotaExceededException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ServiceQuotaExceededException" } return *e.ErrorCodeOverride } func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The operation failed due to an invalid or malformed request. type ValidationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ValidationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ValidationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ValidationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ValidationException" } return *e.ErrorCodeOverride } func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
173
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( smithydocument "github.com/aws/smithy-go/document" "time" ) // Amazon Keyspaces has two read/write capacity modes for processing reads and // writes on your tables: // - On-demand (default) // - Provisioned // // The read/write capacity mode that you choose controls how you are charged for // read and write throughput and how table throughput capacity is managed. For more // information, see Read/write capacity modes (https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html) // in the Amazon Keyspaces Developer Guide. type CapacitySpecification struct { // The read/write throughput capacity mode for a table. The options are: // - throughputMode:PAY_PER_REQUEST and // - throughputMode:PROVISIONED - Provisioned capacity mode requires // readCapacityUnits and writeCapacityUnits as input. // The default is throughput_mode:PAY_PER_REQUEST . For more information, see // Read/write capacity modes (https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html) // in the Amazon Keyspaces Developer Guide. // // This member is required. ThroughputMode ThroughputMode // The throughput capacity specified for read operations defined in read capacity // units (RCUs) . ReadCapacityUnits *int64 // The throughput capacity specified for write operations defined in write // capacity units (WCUs) . WriteCapacityUnits *int64 noSmithyDocumentSerde } // The read/write throughput capacity mode for a table. The options are: // - throughputMode:PAY_PER_REQUEST and // - throughputMode:PROVISIONED . // // For more information, see Read/write capacity modes (https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html) // in the Amazon Keyspaces Developer Guide. type CapacitySpecificationSummary struct { // The read/write throughput capacity mode for a table. The options are: // - throughputMode:PAY_PER_REQUEST and // - throughputMode:PROVISIONED - Provisioned capacity mode requires // readCapacityUnits and writeCapacityUnits as input. // The default is throughput_mode:PAY_PER_REQUEST . For more information, see // Read/write capacity modes (https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html) // in the Amazon Keyspaces Developer Guide. // // This member is required. ThroughputMode ThroughputMode // The timestamp of the last operation that changed the provisioned throughput // capacity of a table. LastUpdateToPayPerRequestTimestamp *time.Time // The throughput capacity specified for read operations defined in read capacity // units (RCUs) . ReadCapacityUnits *int64 // The throughput capacity specified for write operations defined in write // capacity units (WCUs) . WriteCapacityUnits *int64 noSmithyDocumentSerde } // The client-side timestamp setting of the table. For more information, see How // it works: Amazon Keyspaces client-side timestamps (https://docs.aws.amazon.com/keyspaces/latest/devguide/client-side-timestamps-how-it-works.html) // in the Amazon Keyspaces Developer Guide. type ClientSideTimestamps struct { // Shows how to enable client-side timestamps settings for the specified table. // // This member is required. Status ClientSideTimestampsStatus noSmithyDocumentSerde } // The optional clustering column portion of your primary key determines how the // data is clustered and sorted within each partition. type ClusteringKey struct { // The name(s) of the clustering column(s). // // This member is required. Name *string // Sets the ascendant ( ASC ) or descendant ( DESC ) order modifier. // // This member is required. OrderBy SortOrder noSmithyDocumentSerde } // The names and data types of regular columns. type ColumnDefinition struct { // The name of the column. // // This member is required. Name *string // The data type of the column. For a list of available data types, see Data types (https://docs.aws.amazon.com/keyspaces/latest/devguide/cql.elements.html#cql.data-types) // in the Amazon Keyspaces Developer Guide. // // This member is required. Type *string noSmithyDocumentSerde } // An optional comment that describes the table. type Comment struct { // An optional description of the table. // // This member is required. Message *string noSmithyDocumentSerde } // Amazon Keyspaces encrypts and decrypts the table data at rest transparently and // integrates with Key Management Service for storing and managing the encryption // key. You can choose one of the following KMS keys (KMS keys): // - Amazon Web Services owned key - This is the default encryption type. The // key is owned by Amazon Keyspaces (no additional charge). // - Customer managed key - This key is stored in your account and is created, // owned, and managed by you. You have full control over the customer managed key // (KMS charges apply). // // For more information about encryption at rest in Amazon Keyspaces, see // Encryption at rest (https://docs.aws.amazon.com/keyspaces/latest/devguide/EncryptionAtRest.html) // in the Amazon Keyspaces Developer Guide. For more information about KMS, see // KMS management service concepts (https://docs.aws.amazon.com/keyspaces/latest/devguide/EncryptionAtRest.html) // in the Key Management Service Developer Guide. type EncryptionSpecification struct { // The encryption option specified for the table. You can choose one of the // following KMS keys (KMS keys): // - type:AWS_OWNED_KMS_KEY - This key is owned by Amazon Keyspaces. // - type:CUSTOMER_MANAGED_KMS_KEY - This key is stored in your account and is // created, owned, and managed by you. This option requires the // kms_key_identifier of the KMS key in Amazon Resource Name (ARN) format as // input. // The default is type:AWS_OWNED_KMS_KEY . For more information, see Encryption at // rest (https://docs.aws.amazon.com/keyspaces/latest/devguide/EncryptionAtRest.html) // in the Amazon Keyspaces Developer Guide. // // This member is required. Type EncryptionType // The Amazon Resource Name (ARN) of the customer managed KMS key, for example // kms_key_identifier:ARN . KmsKeyIdentifier *string noSmithyDocumentSerde } // Represents the properties of a keyspace. type KeyspaceSummary struct { // The name of the keyspace. // // This member is required. KeyspaceName *string // This property specifies if a keyspace is a single Region keyspace or a // multi-Region keyspace. The available values are SINGLE_REGION or MULTI_REGION . // // This member is required. ReplicationStrategy Rs // The unique identifier of the keyspace in the format of an Amazon Resource Name // (ARN). // // This member is required. ResourceArn *string // If the replicationStrategy of the keyspace is MULTI_REGION , a list of // replication Regions is returned. ReplicationRegions []string noSmithyDocumentSerde } // The partition key portion of the primary key is required and determines how // Amazon Keyspaces stores the data. The partition key can be a single column, or // it can be a compound value composed of two or more columns. type PartitionKey struct { // The name(s) of the partition key column(s). // // This member is required. Name *string noSmithyDocumentSerde } // Point-in-time recovery (PITR) helps protect your Amazon Keyspaces tables from // accidental write or delete operations by providing you continuous backups of // your table data. For more information, see Point-in-time recovery (https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html) // in the Amazon Keyspaces Developer Guide. type PointInTimeRecovery struct { // The options are: // - status=ENABLED // - status=DISABLED // // This member is required. Status PointInTimeRecoveryStatus noSmithyDocumentSerde } // The point-in-time recovery status of the specified table. type PointInTimeRecoverySummary struct { // Shows if point-in-time recovery is enabled or disabled for the specified table. // // This member is required. Status PointInTimeRecoveryStatus // Specifies the earliest possible restore point of the table in ISO 8601 format. EarliestRestorableTimestamp *time.Time noSmithyDocumentSerde } // The replication specification of the keyspace includes: // - regionList - up to six Amazon Web Services Regions where the keyspace is // replicated in. // - replicationStrategy - the required value is SINGLE_REGION or MULTI_REGION . type ReplicationSpecification struct { // The replicationStrategy of a keyspace, the required value is SINGLE_REGION or // MULTI_REGION . // // This member is required. ReplicationStrategy Rs // The regionList can contain up to six Amazon Web Services Regions where the // keyspace is replicated in. RegionList []string noSmithyDocumentSerde } // Describes the schema of the table. type SchemaDefinition struct { // The regular columns of the table. // // This member is required. AllColumns []ColumnDefinition // The columns that are part of the partition key of the table . // // This member is required. PartitionKeys []PartitionKey // The columns that are part of the clustering key of the table. ClusteringKeys []ClusteringKey // The columns that have been defined as STATIC . Static columns store values that // are shared by all rows in the same partition. StaticColumns []StaticColumn noSmithyDocumentSerde } // The static columns of the table. Static columns store values that are shared by // all rows in the same partition. type StaticColumn struct { // The name of the static column. // // This member is required. Name *string noSmithyDocumentSerde } // Returns the name of the specified table, the keyspace it is stored in, and the // unique identifier in the format of an Amazon Resource Name (ARN). type TableSummary struct { // The name of the keyspace that the table is stored in. // // This member is required. KeyspaceName *string // The unique identifier of the table in the format of an Amazon Resource Name // (ARN). // // This member is required. ResourceArn *string // The name of the table. // // This member is required. TableName *string noSmithyDocumentSerde } // Describes a tag. A tag is a key-value pair. You can add up to 50 tags to a // single Amazon Keyspaces resource. Amazon Web Services-assigned tag names and // values are automatically assigned the aws: prefix, which the user cannot // assign. Amazon Web Services-assigned tag names do not count towards the tag // limit of 50. User-assigned tag names have the prefix user: in the Cost // Allocation Report. You cannot backdate the application of a tag. For more // information, see Adding tags and labels to Amazon Keyspaces resources (https://docs.aws.amazon.com/keyspaces/latest/devguide/tagging-keyspaces.html) // in the Amazon Keyspaces Developer Guide. type Tag struct { // The key of the tag. Tag keys are case sensitive. Each Amazon Keyspaces resource // can only have up to one tag with the same key. If you try to add an existing tag // (same key), the existing tag value will be updated to the new value. // // This member is required. Key *string // The value of the tag. Tag values are case-sensitive and can be null. // // This member is required. Value *string noSmithyDocumentSerde } // Enable custom Time to Live (TTL) settings for rows and columns without setting // a TTL default for the specified table. For more information, see Enabling TTL // on tables (https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL-how-it-works.html#ttl-howitworks_enabling) // in the Amazon Keyspaces Developer Guide. type TimeToLive struct { // Shows how to enable custom Time to Live (TTL) settings for the specified table. // // This member is required. Status TimeToLiveStatus noSmithyDocumentSerde } type noSmithyDocumentSerde = smithydocument.NoSerde
359