aws_sdk_kendra/operation/query/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::query::_query_output::QueryOutputBuilder;
3
4pub use crate::operation::query::_query_input::QueryInputBuilder;
5
6impl crate::operation::query::builders::QueryInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::query::QueryOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::query::QueryError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.query();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `Query`.
24///
25/// <p>Searches an index given an input query.</p><note>
26/// <p>If you are working with large language models (LLMs) or implementing retrieval augmented generation (RAG) systems, you can use Amazon Kendra's <a href="https://docs.aws.amazon.com/kendra/latest/APIReference/API_Retrieve.html">Retrieve</a> API, which can return longer semantically relevant passages. We recommend using the <code>Retrieve</code> API instead of filing a service limit increase to increase the <code>Query</code> API document excerpt length.</p>
27/// </note>
28/// <p>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.</p>
29/// <p>A query response contains three types of results.</p>
30/// <ul>
31/// <li>
32/// <p>Relevant suggested answers. The answers can be either a text excerpt or table excerpt. The answer can be highlighted in the excerpt.</p></li>
33/// <li>
34/// <p>Matching FAQs or questions-answer from your FAQ file.</p></li>
35/// <li>
36/// <p>Relevant documents. This result type includes an excerpt of the document with the document title. The searched terms can be highlighted in the excerpt.</p></li>
37/// </ul>
38/// <p>You can specify that the query return only one type of result using the <code>QueryResultTypeFilter</code> 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.</p><important>
39/// <p>If you're using an Amazon Kendra Gen AI Enterprise Edition index, you can only use <code>ATTRIBUTE_FILTER</code> to filter search results by user context. If you're using an Amazon Kendra Gen AI Enterprise Edition index and you try to use <code>USER_TOKEN</code> to configure user context policy, Amazon Kendra returns a <code>ValidationException</code> error.</p>
40/// </important>
41#[derive(::std::clone::Clone, ::std::fmt::Debug)]
42pub struct QueryFluentBuilder {
43    handle: ::std::sync::Arc<crate::client::Handle>,
44    inner: crate::operation::query::builders::QueryInputBuilder,
45    config_override: ::std::option::Option<crate::config::Builder>,
46}
47impl crate::client::customize::internal::CustomizableSend<crate::operation::query::QueryOutput, crate::operation::query::QueryError>
48    for QueryFluentBuilder
49{
50    fn send(
51        self,
52        config_override: crate::config::Builder,
53    ) -> crate::client::customize::internal::BoxFuture<
54        crate::client::customize::internal::SendResult<crate::operation::query::QueryOutput, crate::operation::query::QueryError>,
55    > {
56        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
57    }
58}
59impl QueryFluentBuilder {
60    /// Creates a new `QueryFluentBuilder`.
61    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
62        Self {
63            handle,
64            inner: ::std::default::Default::default(),
65            config_override: ::std::option::Option::None,
66        }
67    }
68    /// Access the Query as a reference.
69    pub fn as_input(&self) -> &crate::operation::query::builders::QueryInputBuilder {
70        &self.inner
71    }
72    /// Sends the request and returns the response.
73    ///
74    /// If an error occurs, an `SdkError` will be returned with additional details that
75    /// can be matched against.
76    ///
77    /// By default, any retryable failures will be retried twice. Retry behavior
78    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
79    /// set when configuring the client.
80    pub async fn send(
81        self,
82    ) -> ::std::result::Result<
83        crate::operation::query::QueryOutput,
84        ::aws_smithy_runtime_api::client::result::SdkError<
85            crate::operation::query::QueryError,
86            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
87        >,
88    > {
89        let input = self
90            .inner
91            .build()
92            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
93        let runtime_plugins =
94            crate::operation::query::Query::operation_runtime_plugins(self.handle.runtime_plugins.clone(), &self.handle.conf, self.config_override);
95        crate::operation::query::Query::orchestrate(&runtime_plugins, input).await
96    }
97
98    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
99    pub fn customize(
100        self,
101    ) -> crate::client::customize::CustomizableOperation<crate::operation::query::QueryOutput, crate::operation::query::QueryError, Self> {
102        crate::client::customize::CustomizableOperation::new(self)
103    }
104    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
105        self.set_config_override(::std::option::Option::Some(config_override.into()));
106        self
107    }
108
109    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
110        self.config_override = config_override;
111        self
112    }
113    /// <p>The identifier of the index for the search.</p>
114    pub fn index_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.inner = self.inner.index_id(input.into());
116        self
117    }
118    /// <p>The identifier of the index for the search.</p>
119    pub fn set_index_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.inner = self.inner.set_index_id(input);
121        self
122    }
123    /// <p>The identifier of the index for the search.</p>
124    pub fn get_index_id(&self) -> &::std::option::Option<::std::string::String> {
125        self.inner.get_index_id()
126    }
127    /// <p>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. For example, <code>Timeoff AND October AND Category:HR</code> is counted as 3 tokens: <code>timeoff</code>, <code>october</code>, <code>hr</code>. For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/searching-example.html#searching-index-query-syntax">Searching with advanced query syntax</a> in the Amazon Kendra Developer Guide.</p>
128    pub fn query_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.inner = self.inner.query_text(input.into());
130        self
131    }
132    /// <p>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. For example, <code>Timeoff AND October AND Category:HR</code> is counted as 3 tokens: <code>timeoff</code>, <code>october</code>, <code>hr</code>. For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/searching-example.html#searching-index-query-syntax">Searching with advanced query syntax</a> in the Amazon Kendra Developer Guide.</p>
133    pub fn set_query_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.inner = self.inner.set_query_text(input);
135        self
136    }
137    /// <p>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. For example, <code>Timeoff AND October AND Category:HR</code> is counted as 3 tokens: <code>timeoff</code>, <code>october</code>, <code>hr</code>. For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/searching-example.html#searching-index-query-syntax">Searching with advanced query syntax</a> in the Amazon Kendra Developer Guide.</p>
138    pub fn get_query_text(&self) -> &::std::option::Option<::std::string::String> {
139        self.inner.get_query_text()
140    }
141    /// <p>Filters search results by document fields/attributes. You can only provide one attribute filter; however, the <code>AndAllFilters</code>, <code>NotFilter</code>, and <code>OrAllFilters</code> parameters contain a list of other filters.</p>
142    /// <p>The <code>AttributeFilter</code> parameter means you can create a set of filtering rules that a document must satisfy to be included in the query results.</p><note>
143    /// <p>For Amazon Kendra Gen AI Enterprise Edition indices use <code>AttributeFilter</code> to enable document filtering for end users using <code>_email_id</code> or include public documents (<code>_email_id=null</code>).</p>
144    /// </note>
145    pub fn attribute_filter(mut self, input: crate::types::AttributeFilter) -> Self {
146        self.inner = self.inner.attribute_filter(input);
147        self
148    }
149    /// <p>Filters search results by document fields/attributes. You can only provide one attribute filter; however, the <code>AndAllFilters</code>, <code>NotFilter</code>, and <code>OrAllFilters</code> parameters contain a list of other filters.</p>
150    /// <p>The <code>AttributeFilter</code> parameter means you can create a set of filtering rules that a document must satisfy to be included in the query results.</p><note>
151    /// <p>For Amazon Kendra Gen AI Enterprise Edition indices use <code>AttributeFilter</code> to enable document filtering for end users using <code>_email_id</code> or include public documents (<code>_email_id=null</code>).</p>
152    /// </note>
153    pub fn set_attribute_filter(mut self, input: ::std::option::Option<crate::types::AttributeFilter>) -> Self {
154        self.inner = self.inner.set_attribute_filter(input);
155        self
156    }
157    /// <p>Filters search results by document fields/attributes. You can only provide one attribute filter; however, the <code>AndAllFilters</code>, <code>NotFilter</code>, and <code>OrAllFilters</code> parameters contain a list of other filters.</p>
158    /// <p>The <code>AttributeFilter</code> parameter means you can create a set of filtering rules that a document must satisfy to be included in the query results.</p><note>
159    /// <p>For Amazon Kendra Gen AI Enterprise Edition indices use <code>AttributeFilter</code> to enable document filtering for end users using <code>_email_id</code> or include public documents (<code>_email_id=null</code>).</p>
160    /// </note>
161    pub fn get_attribute_filter(&self) -> &::std::option::Option<crate::types::AttributeFilter> {
162        self.inner.get_attribute_filter()
163    }
164    ///
165    /// Appends an item to `Facets`.
166    ///
167    /// To override the contents of this collection use [`set_facets`](Self::set_facets).
168    ///
169    /// <p>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.</p>
170    pub fn facets(mut self, input: crate::types::Facet) -> Self {
171        self.inner = self.inner.facets(input);
172        self
173    }
174    /// <p>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.</p>
175    pub fn set_facets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Facet>>) -> Self {
176        self.inner = self.inner.set_facets(input);
177        self
178    }
179    /// <p>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.</p>
180    pub fn get_facets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Facet>> {
181        self.inner.get_facets()
182    }
183    ///
184    /// Appends an item to `RequestedDocumentAttributes`.
185    ///
186    /// To override the contents of this collection use [`set_requested_document_attributes`](Self::set_requested_document_attributes).
187    ///
188    /// <p>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.</p>
189    pub fn requested_document_attributes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
190        self.inner = self.inner.requested_document_attributes(input.into());
191        self
192    }
193    /// <p>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.</p>
194    pub fn set_requested_document_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
195        self.inner = self.inner.set_requested_document_attributes(input);
196        self
197    }
198    /// <p>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.</p>
199    pub fn get_requested_document_attributes(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
200        self.inner.get_requested_document_attributes()
201    }
202    /// <p>Sets the type of query result or response. Only results for the specified type are returned.</p>
203    pub fn query_result_type_filter(mut self, input: crate::types::QueryResultType) -> Self {
204        self.inner = self.inner.query_result_type_filter(input);
205        self
206    }
207    /// <p>Sets the type of query result or response. Only results for the specified type are returned.</p>
208    pub fn set_query_result_type_filter(mut self, input: ::std::option::Option<crate::types::QueryResultType>) -> Self {
209        self.inner = self.inner.set_query_result_type_filter(input);
210        self
211    }
212    /// <p>Sets the type of query result or response. Only results for the specified type are returned.</p>
213    pub fn get_query_result_type_filter(&self) -> &::std::option::Option<crate::types::QueryResultType> {
214        self.inner.get_query_result_type_filter()
215    }
216    ///
217    /// Appends an item to `DocumentRelevanceOverrideConfigurations`.
218    ///
219    /// To override the contents of this collection use [`set_document_relevance_override_configurations`](Self::set_document_relevance_override_configurations).
220    ///
221    /// <p>Overrides relevance tuning configurations of fields/attributes set at the index level.</p>
222    /// <p>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.</p>
223    /// <p>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.</p>
224    pub fn document_relevance_override_configurations(mut self, input: crate::types::DocumentRelevanceConfiguration) -> Self {
225        self.inner = self.inner.document_relevance_override_configurations(input);
226        self
227    }
228    /// <p>Overrides relevance tuning configurations of fields/attributes set at the index level.</p>
229    /// <p>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.</p>
230    /// <p>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.</p>
231    pub fn set_document_relevance_override_configurations(
232        mut self,
233        input: ::std::option::Option<::std::vec::Vec<crate::types::DocumentRelevanceConfiguration>>,
234    ) -> Self {
235        self.inner = self.inner.set_document_relevance_override_configurations(input);
236        self
237    }
238    /// <p>Overrides relevance tuning configurations of fields/attributes set at the index level.</p>
239    /// <p>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.</p>
240    /// <p>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.</p>
241    pub fn get_document_relevance_override_configurations(
242        &self,
243    ) -> &::std::option::Option<::std::vec::Vec<crate::types::DocumentRelevanceConfiguration>> {
244        self.inner.get_document_relevance_override_configurations()
245    }
246    /// <p>Query results are returned in pages the size of the <code>PageSize</code> parameter. By default, Amazon Kendra returns the first page of results. Use this parameter to get result pages after the first one.</p>
247    pub fn page_number(mut self, input: i32) -> Self {
248        self.inner = self.inner.page_number(input);
249        self
250    }
251    /// <p>Query results are returned in pages the size of the <code>PageSize</code> parameter. By default, Amazon Kendra returns the first page of results. Use this parameter to get result pages after the first one.</p>
252    pub fn set_page_number(mut self, input: ::std::option::Option<i32>) -> Self {
253        self.inner = self.inner.set_page_number(input);
254        self
255    }
256    /// <p>Query results are returned in pages the size of the <code>PageSize</code> parameter. By default, Amazon Kendra returns the first page of results. Use this parameter to get result pages after the first one.</p>
257    pub fn get_page_number(&self) -> &::std::option::Option<i32> {
258        self.inner.get_page_number()
259    }
260    /// <p>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.</p>
261    pub fn page_size(mut self, input: i32) -> Self {
262        self.inner = self.inner.page_size(input);
263        self
264    }
265    /// <p>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.</p>
266    pub fn set_page_size(mut self, input: ::std::option::Option<i32>) -> Self {
267        self.inner = self.inner.set_page_size(input);
268        self
269    }
270    /// <p>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.</p>
271    pub fn get_page_size(&self) -> &::std::option::Option<i32> {
272        self.inner.get_page_size()
273    }
274    /// <p>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.</p>
275    /// <p>If you don't provide sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result.</p>
276    pub fn sorting_configuration(mut self, input: crate::types::SortingConfiguration) -> Self {
277        self.inner = self.inner.sorting_configuration(input);
278        self
279    }
280    /// <p>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.</p>
281    /// <p>If you don't provide sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result.</p>
282    pub fn set_sorting_configuration(mut self, input: ::std::option::Option<crate::types::SortingConfiguration>) -> Self {
283        self.inner = self.inner.set_sorting_configuration(input);
284        self
285    }
286    /// <p>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.</p>
287    /// <p>If you don't provide sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result.</p>
288    pub fn get_sorting_configuration(&self) -> &::std::option::Option<crate::types::SortingConfiguration> {
289        self.inner.get_sorting_configuration()
290    }
291    ///
292    /// Appends an item to `SortingConfigurations`.
293    ///
294    /// To override the contents of this collection use [`set_sorting_configurations`](Self::set_sorting_configurations).
295    ///
296    /// <p>Provides configuration information to determine how the results of a query are sorted.</p>
297    /// <p>You can set upto 3 fields that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. The sort field quota can be increased.</p>
298    /// <p>If you don't provide a sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result. In the case of ties in sorting the results, the results are sorted by relevance.</p>
299    pub fn sorting_configurations(mut self, input: crate::types::SortingConfiguration) -> Self {
300        self.inner = self.inner.sorting_configurations(input);
301        self
302    }
303    /// <p>Provides configuration information to determine how the results of a query are sorted.</p>
304    /// <p>You can set upto 3 fields that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. The sort field quota can be increased.</p>
305    /// <p>If you don't provide a sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result. In the case of ties in sorting the results, the results are sorted by relevance.</p>
306    pub fn set_sorting_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SortingConfiguration>>) -> Self {
307        self.inner = self.inner.set_sorting_configurations(input);
308        self
309    }
310    /// <p>Provides configuration information to determine how the results of a query are sorted.</p>
311    /// <p>You can set upto 3 fields that Amazon Kendra should sort the results on, and specify whether the results should be sorted in ascending or descending order. The sort field quota can be increased.</p>
312    /// <p>If you don't provide a sorting configuration, the results are sorted by the relevance that Amazon Kendra determines for the result. In the case of ties in sorting the results, the results are sorted by relevance.</p>
313    pub fn get_sorting_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SortingConfiguration>> {
314        self.inner.get_sorting_configurations()
315    }
316    /// <p>The user context token or user and group information.</p>
317    pub fn user_context(mut self, input: crate::types::UserContext) -> Self {
318        self.inner = self.inner.user_context(input);
319        self
320    }
321    /// <p>The user context token or user and group information.</p>
322    pub fn set_user_context(mut self, input: ::std::option::Option<crate::types::UserContext>) -> Self {
323        self.inner = self.inner.set_user_context(input);
324        self
325    }
326    /// <p>The user context token or user and group information.</p>
327    pub fn get_user_context(&self) -> &::std::option::Option<crate::types::UserContext> {
328        self.inner.get_user_context()
329    }
330    /// <p>Provides an identifier for a specific user. The <code>VisitorId</code> should be a unique identifier, such as a GUID. Don't use personally identifiable information, such as the user's email address, as the <code>VisitorId</code>.</p>
331    pub fn visitor_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
332        self.inner = self.inner.visitor_id(input.into());
333        self
334    }
335    /// <p>Provides an identifier for a specific user. The <code>VisitorId</code> should be a unique identifier, such as a GUID. Don't use personally identifiable information, such as the user's email address, as the <code>VisitorId</code>.</p>
336    pub fn set_visitor_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
337        self.inner = self.inner.set_visitor_id(input);
338        self
339    }
340    /// <p>Provides an identifier for a specific user. The <code>VisitorId</code> should be a unique identifier, such as a GUID. Don't use personally identifiable information, such as the user's email address, as the <code>VisitorId</code>.</p>
341    pub fn get_visitor_id(&self) -> &::std::option::Option<::std::string::String> {
342        self.inner.get_visitor_id()
343    }
344    /// <p>Enables suggested spell corrections for queries.</p>
345    pub fn spell_correction_configuration(mut self, input: crate::types::SpellCorrectionConfiguration) -> Self {
346        self.inner = self.inner.spell_correction_configuration(input);
347        self
348    }
349    /// <p>Enables suggested spell corrections for queries.</p>
350    pub fn set_spell_correction_configuration(mut self, input: ::std::option::Option<crate::types::SpellCorrectionConfiguration>) -> Self {
351        self.inner = self.inner.set_spell_correction_configuration(input);
352        self
353    }
354    /// <p>Enables suggested spell corrections for queries.</p>
355    pub fn get_spell_correction_configuration(&self) -> &::std::option::Option<crate::types::SpellCorrectionConfiguration> {
356        self.inner.get_spell_correction_configuration()
357    }
358    /// <p>Provides configuration to determine how to group results by document attribute value, and how to display them (collapsed or expanded) under a designated primary document for each group.</p>
359    pub fn collapse_configuration(mut self, input: crate::types::CollapseConfiguration) -> Self {
360        self.inner = self.inner.collapse_configuration(input);
361        self
362    }
363    /// <p>Provides configuration to determine how to group results by document attribute value, and how to display them (collapsed or expanded) under a designated primary document for each group.</p>
364    pub fn set_collapse_configuration(mut self, input: ::std::option::Option<crate::types::CollapseConfiguration>) -> Self {
365        self.inner = self.inner.set_collapse_configuration(input);
366        self
367    }
368    /// <p>Provides configuration to determine how to group results by document attribute value, and how to display them (collapsed or expanded) under a designated primary document for each group.</p>
369    pub fn get_collapse_configuration(&self) -> &::std::option::Option<crate::types::CollapseConfiguration> {
370        self.inner.get_collapse_configuration()
371    }
372}