aws-sdk-connectcases 1.113.0

AWS SDK for Amazon Connect Cases
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 ListTemplatesInput {
    /// <p>The unique identifier of the Cases domain.</p>
    pub domain_id: ::std::option::Option<::std::string::String>,
    /// <p>The maximum number of results to return per page.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <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>A list of status values to filter on.</p>
    pub status: ::std::option::Option<::std::vec::Vec<crate::types::TemplateStatus>>,
}
impl ListTemplatesInput {
    /// <p>The unique identifier of the Cases domain.</p>
    pub fn domain_id(&self) -> ::std::option::Option<&str> {
        self.domain_id.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
    }
    /// <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>A list of status values to filter on.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.status.is_none()`.
    pub fn status(&self) -> &[crate::types::TemplateStatus] {
        self.status.as_deref().unwrap_or_default()
    }
}
impl ListTemplatesInput {
    /// Creates a new builder-style object to manufacture [`ListTemplatesInput`](crate::operation::list_templates::ListTemplatesInput).
    pub fn builder() -> crate::operation::list_templates::builders::ListTemplatesInputBuilder {
        crate::operation::list_templates::builders::ListTemplatesInputBuilder::default()
    }
}

/// A builder for [`ListTemplatesInput`](crate::operation::list_templates::ListTemplatesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListTemplatesInputBuilder {
    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<::std::vec::Vec<crate::types::TemplateStatus>>,
}
impl ListTemplatesInputBuilder {
    /// <p>The unique identifier of the Cases domain.</p>
    /// This field is required.
    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the Cases domain.</p>
    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_id = input;
        self
    }
    /// <p>The unique identifier of the Cases domain.</p>
    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_id
    }
    /// <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
    }
    /// <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
    }
    /// Appends an item to `status`.
    ///
    /// To override the contents of this collection use [`set_status`](Self::set_status).
    ///
    /// <p>A list of status values to filter on.</p>
    pub fn status(mut self, input: crate::types::TemplateStatus) -> Self {
        let mut v = self.status.unwrap_or_default();
        v.push(input);
        self.status = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of status values to filter on.</p>
    pub fn set_status(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TemplateStatus>>) -> Self {
        self.status = input;
        self
    }
    /// <p>A list of status values to filter on.</p>
    pub fn get_status(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TemplateStatus>> {
        &self.status
    }
    /// Consumes the builder and constructs a [`ListTemplatesInput`](crate::operation::list_templates::ListTemplatesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::list_templates::ListTemplatesInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_templates::ListTemplatesInput {
            domain_id: self.domain_id,
            max_results: self.max_results,
            next_token: self.next_token,
            status: self.status,
        })
    }
}