aws-sdk-qconnect 1.109.0

AWS SDK for Amazon Q Connect
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SearchMessageTemplatesInput {
    /// <p>The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
    pub knowledge_base_id: ::std::option::Option<::std::string::String>,
    /// <p>The search expression for querying the message template.</p>
    pub search_expression: ::std::option::Option<crate::types::MessageTemplateSearchExpression>,
    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>The maximum number of results to return per page.</p>
    pub max_results: ::std::option::Option<i32>,
}
impl SearchMessageTemplatesInput {
    /// <p>The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
    pub fn knowledge_base_id(&self) -> ::std::option::Option<&str> {
        self.knowledge_base_id.as_deref()
    }
    /// <p>The search expression for querying the message template.</p>
    pub fn search_expression(&self) -> ::std::option::Option<&crate::types::MessageTemplateSearchExpression> {
        self.search_expression.as_ref()
    }
    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The maximum number of results to return per page.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
}
impl SearchMessageTemplatesInput {
    /// Creates a new builder-style object to manufacture [`SearchMessageTemplatesInput`](crate::operation::search_message_templates::SearchMessageTemplatesInput).
    pub fn builder() -> crate::operation::search_message_templates::builders::SearchMessageTemplatesInputBuilder {
        crate::operation::search_message_templates::builders::SearchMessageTemplatesInputBuilder::default()
    }
}

/// A builder for [`SearchMessageTemplatesInput`](crate::operation::search_message_templates::SearchMessageTemplatesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SearchMessageTemplatesInputBuilder {
    pub(crate) knowledge_base_id: ::std::option::Option<::std::string::String>,
    pub(crate) search_expression: ::std::option::Option<crate::types::MessageTemplateSearchExpression>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
}
impl SearchMessageTemplatesInputBuilder {
    /// <p>The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
    /// This field is required.
    pub fn knowledge_base_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.knowledge_base_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
    pub fn set_knowledge_base_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.knowledge_base_id = input;
        self
    }
    /// <p>The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
    pub fn get_knowledge_base_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.knowledge_base_id
    }
    /// <p>The search expression for querying the message template.</p>
    /// This field is required.
    pub fn search_expression(mut self, input: crate::types::MessageTemplateSearchExpression) -> Self {
        self.search_expression = ::std::option::Option::Some(input);
        self
    }
    /// <p>The search expression for querying the message template.</p>
    pub fn set_search_expression(mut self, input: ::std::option::Option<crate::types::MessageTemplateSearchExpression>) -> Self {
        self.search_expression = input;
        self
    }
    /// <p>The search expression for querying the message template.</p>
    pub fn get_search_expression(&self) -> &::std::option::Option<crate::types::MessageTemplateSearchExpression> {
        &self.search_expression
    }
    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>The maximum number of results to return per page.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of results to return per page.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of results to return per page.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// Consumes the builder and constructs a [`SearchMessageTemplatesInput`](crate::operation::search_message_templates::SearchMessageTemplatesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::search_message_templates::SearchMessageTemplatesInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::search_message_templates::SearchMessageTemplatesInput {
            knowledge_base_id: self.knowledge_base_id,
            search_expression: self.search_expression,
            next_token: self.next_token,
            max_results: self.max_results,
        })
    }
}