// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`RetrieveAndGenerate`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`session_id(impl Into<String>)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::session_id) / [`set_session_id(Option<String>)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::set_session_id):<br>required: **false**<br><p>The unique identifier of the session. When you first make a <code>RetrieveAndGenerate</code> request, Amazon Bedrock automatically generates this value. You must reuse this value for all subsequent requests in the same conversational session. This value allows Amazon Bedrock to maintain context and knowledge from previous interactions. You can't explicitly set the <code>sessionId</code> yourself.</p><br>
/// - [`input(RetrieveAndGenerateInput)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::input) / [`set_input(Option<RetrieveAndGenerateInput>)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::set_input):<br>required: **true**<br><p>Contains the query to be made to the knowledge base.</p><br>
/// - [`retrieve_and_generate_configuration(RetrieveAndGenerateConfiguration)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::retrieve_and_generate_configuration) / [`set_retrieve_and_generate_configuration(Option<RetrieveAndGenerateConfiguration>)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::set_retrieve_and_generate_configuration):<br>required: **false**<br><p>Contains configurations for the knowledge base query and retrieval process. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p><br>
/// - [`session_configuration(RetrieveAndGenerateSessionConfiguration)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::session_configuration) / [`set_session_configuration(Option<RetrieveAndGenerateSessionConfiguration>)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::set_session_configuration):<br>required: **false**<br><p>Contains details about the session with the knowledge base.</p><br>
/// - [`user_context(UserContext)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::user_context) / [`set_user_context(Option<UserContext>)`](crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::set_user_context):<br>required: **false**<br><p>Contains information about the user making the request. Use this to pass user identity information for access control filtering, so that retrieval results only include documents the user is authorized to access.</p><br>
/// - On success, responds with [`RetrieveAndGenerateOutput`](crate::operation::retrieve_and_generate::RetrieveAndGenerateOutput) with field(s):
/// - [`session_id(String)`](crate::operation::retrieve_and_generate::RetrieveAndGenerateOutput::session_id): <p>The unique identifier of the session. When you first make a <code>RetrieveAndGenerate</code> request, Amazon Bedrock automatically generates this value. You must reuse this value for all subsequent requests in the same conversational session. This value allows Amazon Bedrock to maintain context and knowledge from previous interactions. You can't explicitly set the <code>sessionId</code> yourself.</p>
/// - [`output(Option<RetrieveAndGenerateOutput>)`](crate::operation::retrieve_and_generate::RetrieveAndGenerateOutput::output): <p>Contains the response generated from querying the knowledge base.</p>
/// - [`citations(Option<Vec::<Citation>>)`](crate::operation::retrieve_and_generate::RetrieveAndGenerateOutput::citations): <p>A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.</p>
/// - [`guardrail_action(Option<GuadrailAction>)`](crate::operation::retrieve_and_generate::RetrieveAndGenerateOutput::guardrail_action): <p>Specifies if there is a guardrail intervention in the response.</p>
/// - On failure, responds with [`SdkError<RetrieveAndGenerateError>`](crate::operation::retrieve_and_generate::RetrieveAndGenerateError)
pub fn retrieve_and_generate(&self) -> crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder {
crate::operation::retrieve_and_generate::builders::RetrieveAndGenerateFluentBuilder::new(self.handle.clone())
}
}