/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace kendra { namespace Model { /** */ class RetrieveRequest : public KendraRequest { public: AWS_KENDRA_API RetrieveRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "Retrieve"; } AWS_KENDRA_API Aws::String SerializePayload() const override; AWS_KENDRA_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The identifier of the index to retrieve relevant passages for the search.

*/ inline const Aws::String& GetIndexId() const{ return m_indexId; } /** *

The identifier of the index to retrieve relevant passages for the search.

*/ inline bool IndexIdHasBeenSet() const { return m_indexIdHasBeenSet; } /** *

The identifier of the index to retrieve relevant passages for the search.

*/ inline void SetIndexId(const Aws::String& value) { m_indexIdHasBeenSet = true; m_indexId = value; } /** *

The identifier of the index to retrieve relevant passages for the search.

*/ inline void SetIndexId(Aws::String&& value) { m_indexIdHasBeenSet = true; m_indexId = std::move(value); } /** *

The identifier of the index to retrieve relevant passages for the search.

*/ inline void SetIndexId(const char* value) { m_indexIdHasBeenSet = true; m_indexId.assign(value); } /** *

The identifier of the index to retrieve relevant passages for the search.

*/ inline RetrieveRequest& WithIndexId(const Aws::String& value) { SetIndexId(value); return *this;} /** *

The identifier of the index to retrieve relevant passages for the search.

*/ inline RetrieveRequest& WithIndexId(Aws::String&& value) { SetIndexId(std::move(value)); return *this;} /** *

The identifier of the index to retrieve relevant passages for the search.

*/ inline RetrieveRequest& WithIndexId(const char* value) { SetIndexId(value); return *this;} /** *

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.

*/ inline const Aws::String& GetQueryText() const{ return m_queryText; } /** *

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.

*/ inline bool QueryTextHasBeenSet() const { return m_queryTextHasBeenSet; } /** *

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.

*/ inline void SetQueryText(const Aws::String& value) { m_queryTextHasBeenSet = true; m_queryText = value; } /** *

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.

*/ inline void SetQueryText(Aws::String&& value) { m_queryTextHasBeenSet = true; m_queryText = std::move(value); } /** *

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.

*/ inline void SetQueryText(const char* value) { m_queryTextHasBeenSet = true; m_queryText.assign(value); } /** *

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.

*/ inline RetrieveRequest& WithQueryText(const Aws::String& value) { SetQueryText(value); return *this;} /** *

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.

*/ inline RetrieveRequest& WithQueryText(Aws::String&& value) { SetQueryText(std::move(value)); return *this;} /** *

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.

*/ inline RetrieveRequest& WithQueryText(const char* value) { SetQueryText(value); return *this;} /** *

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.

*/ inline const AttributeFilter& GetAttributeFilter() const{ return m_attributeFilter; } /** *

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.

*/ inline bool AttributeFilterHasBeenSet() const { return m_attributeFilterHasBeenSet; } /** *

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.

*/ inline void SetAttributeFilter(const AttributeFilter& value) { m_attributeFilterHasBeenSet = true; m_attributeFilter = value; } /** *

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.

*/ inline void SetAttributeFilter(AttributeFilter&& value) { m_attributeFilterHasBeenSet = true; m_attributeFilter = std::move(value); } /** *

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.

*/ inline RetrieveRequest& WithAttributeFilter(const AttributeFilter& value) { SetAttributeFilter(value); return *this;} /** *

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.

*/ inline RetrieveRequest& WithAttributeFilter(AttributeFilter&& value) { SetAttributeFilter(std::move(value)); return *this;} /** *

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.

*/ inline const Aws::Vector& GetRequestedDocumentAttributes() const{ return m_requestedDocumentAttributes; } /** *

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.

*/ inline bool RequestedDocumentAttributesHasBeenSet() const { return m_requestedDocumentAttributesHasBeenSet; } /** *

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.

*/ inline void SetRequestedDocumentAttributes(const Aws::Vector& value) { m_requestedDocumentAttributesHasBeenSet = true; m_requestedDocumentAttributes = value; } /** *

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.

*/ inline void SetRequestedDocumentAttributes(Aws::Vector&& value) { m_requestedDocumentAttributesHasBeenSet = true; m_requestedDocumentAttributes = std::move(value); } /** *

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.

*/ inline RetrieveRequest& WithRequestedDocumentAttributes(const Aws::Vector& value) { SetRequestedDocumentAttributes(value); return *this;} /** *

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.

*/ inline RetrieveRequest& WithRequestedDocumentAttributes(Aws::Vector&& value) { SetRequestedDocumentAttributes(std::move(value)); return *this;} /** *

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.

*/ inline RetrieveRequest& AddRequestedDocumentAttributes(const Aws::String& value) { m_requestedDocumentAttributesHasBeenSet = true; m_requestedDocumentAttributes.push_back(value); return *this; } /** *

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.

*/ inline RetrieveRequest& AddRequestedDocumentAttributes(Aws::String&& value) { m_requestedDocumentAttributesHasBeenSet = true; m_requestedDocumentAttributes.push_back(std::move(value)); return *this; } /** *

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.

*/ inline RetrieveRequest& AddRequestedDocumentAttributes(const char* value) { m_requestedDocumentAttributesHasBeenSet = true; m_requestedDocumentAttributes.push_back(value); return *this; } /** *

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.

*/ inline const Aws::Vector& GetDocumentRelevanceOverrideConfigurations() const{ return m_documentRelevanceOverrideConfigurations; } /** *

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.

*/ inline bool DocumentRelevanceOverrideConfigurationsHasBeenSet() const { return m_documentRelevanceOverrideConfigurationsHasBeenSet; } /** *

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.

*/ inline void SetDocumentRelevanceOverrideConfigurations(const Aws::Vector& value) { m_documentRelevanceOverrideConfigurationsHasBeenSet = true; m_documentRelevanceOverrideConfigurations = value; } /** *

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.

*/ inline void SetDocumentRelevanceOverrideConfigurations(Aws::Vector&& value) { m_documentRelevanceOverrideConfigurationsHasBeenSet = true; m_documentRelevanceOverrideConfigurations = std::move(value); } /** *

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.

*/ inline RetrieveRequest& WithDocumentRelevanceOverrideConfigurations(const Aws::Vector& value) { SetDocumentRelevanceOverrideConfigurations(value); return *this;} /** *

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.

*/ inline RetrieveRequest& WithDocumentRelevanceOverrideConfigurations(Aws::Vector&& value) { SetDocumentRelevanceOverrideConfigurations(std::move(value)); return *this;} /** *

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.

*/ inline RetrieveRequest& AddDocumentRelevanceOverrideConfigurations(const DocumentRelevanceConfiguration& value) { m_documentRelevanceOverrideConfigurationsHasBeenSet = true; m_documentRelevanceOverrideConfigurations.push_back(value); return *this; } /** *

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.

*/ inline RetrieveRequest& AddDocumentRelevanceOverrideConfigurations(DocumentRelevanceConfiguration&& value) { m_documentRelevanceOverrideConfigurationsHasBeenSet = true; m_documentRelevanceOverrideConfigurations.push_back(std::move(value)); return *this; } /** *

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.

*/ inline int GetPageNumber() const{ return m_pageNumber; } /** *

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.

*/ inline bool PageNumberHasBeenSet() const { return m_pageNumberHasBeenSet; } /** *

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.

*/ inline void SetPageNumber(int value) { m_pageNumberHasBeenSet = true; m_pageNumber = value; } /** *

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.

*/ inline RetrieveRequest& WithPageNumber(int value) { SetPageNumber(value); return *this;} /** *

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.

*/ inline int GetPageSize() const{ return m_pageSize; } /** *

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.

*/ inline bool PageSizeHasBeenSet() const { return m_pageSizeHasBeenSet; } /** *

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.

*/ inline void SetPageSize(int value) { m_pageSizeHasBeenSet = true; m_pageSize = value; } /** *

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.

*/ inline RetrieveRequest& WithPageSize(int value) { SetPageSize(value); return *this;} /** *

The user context token or user and group information.

*/ inline const UserContext& GetUserContext() const{ return m_userContext; } /** *

The user context token or user and group information.

*/ inline bool UserContextHasBeenSet() const { return m_userContextHasBeenSet; } /** *

The user context token or user and group information.

*/ inline void SetUserContext(const UserContext& value) { m_userContextHasBeenSet = true; m_userContext = value; } /** *

The user context token or user and group information.

*/ inline void SetUserContext(UserContext&& value) { m_userContextHasBeenSet = true; m_userContext = std::move(value); } /** *

The user context token or user and group information.

*/ inline RetrieveRequest& WithUserContext(const UserContext& value) { SetUserContext(value); return *this;} /** *

The user context token or user and group information.

*/ inline RetrieveRequest& WithUserContext(UserContext&& value) { SetUserContext(std::move(value)); return *this;} private: Aws::String m_indexId; bool m_indexIdHasBeenSet = false; Aws::String m_queryText; bool m_queryTextHasBeenSet = false; AttributeFilter m_attributeFilter; bool m_attributeFilterHasBeenSet = false; Aws::Vector m_requestedDocumentAttributes; bool m_requestedDocumentAttributesHasBeenSet = false; Aws::Vector m_documentRelevanceOverrideConfigurations; bool m_documentRelevanceOverrideConfigurationsHasBeenSet = false; int m_pageNumber; bool m_pageNumberHasBeenSet = false; int m_pageSize; bool m_pageSizeHasBeenSet = false; UserContext m_userContext; bool m_userContextHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws