aws-sdk-fsx 1.105.0

AWS SDK for Amazon FSx
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 DescribeFileCachesInput {
    /// <p>IDs of the caches whose descriptions you want to retrieve (String).</p>
    pub file_cache_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The maximum number of resources to return in the response. This value must be an integer greater than zero.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>(Optional) Opaque pagination token returned from a previous operation (String). If present, this token indicates from what point you can continue processing the request, where the previous <code>NextToken</code> value left off.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
}
impl DescribeFileCachesInput {
    /// <p>IDs of the caches whose descriptions you want to retrieve (String).</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 `.file_cache_ids.is_none()`.
    pub fn file_cache_ids(&self) -> &[::std::string::String] {
        self.file_cache_ids.as_deref().unwrap_or_default()
    }
    /// <p>The maximum number of resources to return in the response. This value must be an integer greater than zero.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>(Optional) Opaque pagination token returned from a previous operation (String). If present, this token indicates from what point you can continue processing the request, where the previous <code>NextToken</code> value left off.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl DescribeFileCachesInput {
    /// Creates a new builder-style object to manufacture [`DescribeFileCachesInput`](crate::operation::describe_file_caches::DescribeFileCachesInput).
    pub fn builder() -> crate::operation::describe_file_caches::builders::DescribeFileCachesInputBuilder {
        crate::operation::describe_file_caches::builders::DescribeFileCachesInputBuilder::default()
    }
}

/// A builder for [`DescribeFileCachesInput`](crate::operation::describe_file_caches::DescribeFileCachesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeFileCachesInputBuilder {
    pub(crate) file_cache_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl DescribeFileCachesInputBuilder {
    /// Appends an item to `file_cache_ids`.
    ///
    /// To override the contents of this collection use [`set_file_cache_ids`](Self::set_file_cache_ids).
    ///
    /// <p>IDs of the caches whose descriptions you want to retrieve (String).</p>
    pub fn file_cache_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.file_cache_ids.unwrap_or_default();
        v.push(input.into());
        self.file_cache_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>IDs of the caches whose descriptions you want to retrieve (String).</p>
    pub fn set_file_cache_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.file_cache_ids = input;
        self
    }
    /// <p>IDs of the caches whose descriptions you want to retrieve (String).</p>
    pub fn get_file_cache_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.file_cache_ids
    }
    /// <p>The maximum number of resources to return in the response. This value must be an integer greater than zero.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of resources to return in the response. This value must be an integer greater than zero.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of resources to return in the response. This value must be an integer greater than zero.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>(Optional) Opaque pagination token returned from a previous operation (String). If present, this token indicates from what point you can continue processing the request, where the previous <code>NextToken</code> value left off.</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>(Optional) Opaque pagination token returned from a previous operation (String). If present, this token indicates from what point you can continue processing the request, where the previous <code>NextToken</code> value left off.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>(Optional) Opaque pagination token returned from a previous operation (String). If present, this token indicates from what point you can continue processing the request, where the previous <code>NextToken</code> value left off.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Consumes the builder and constructs a [`DescribeFileCachesInput`](crate::operation::describe_file_caches::DescribeFileCachesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_file_caches::DescribeFileCachesInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::describe_file_caches::DescribeFileCachesInput {
            file_cache_ids: self.file_cache_ids,
            max_results: self.max_results,
            next_token: self.next_token,
        })
    }
}