// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>RefreshCacheInput</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RefreshCacheInput {
/// <p>The Amazon Resource Name (ARN) of the file share you want to refresh.</p>
pub file_share_arn: ::std::option::Option<::std::string::String>,
/// <p>A comma-separated list of the paths of folders to refresh in the cache. The default is \["/"\]. The default refreshes objects and folders at the root of the Amazon S3 bucket. If Recursive is set to true, the entire S3 bucket that the file share has access to is refreshed.</p>
/// <p>Do not include <code>/</code> when specifying folder names. For example, you would specify <code>samplefolder</code> rather than <code>samplefolder/</code>.</p>
pub folder_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>A value that specifies whether to recursively refresh folders in the cache. The refresh includes folders that were in the cache the last time the gateway listed the folder's contents. If this value set to <code>true</code>, each folder that is listed in <code>FolderList</code> is recursively updated. Otherwise, subfolders listed in <code>FolderList</code> are not refreshed. Only objects that are in folders listed directly under <code>FolderList</code> are found and used for the update. The default is <code>true</code>.</p>
/// <p>Valid Values: <code>true</code> | <code>false</code></p>
pub recursive: ::std::option::Option<bool>,
}
impl RefreshCacheInput {
/// <p>The Amazon Resource Name (ARN) of the file share you want to refresh.</p>
pub fn file_share_arn(&self) -> ::std::option::Option<&str> {
self.file_share_arn.as_deref()
}
/// <p>A comma-separated list of the paths of folders to refresh in the cache. The default is \["/"\]. The default refreshes objects and folders at the root of the Amazon S3 bucket. If Recursive is set to true, the entire S3 bucket that the file share has access to is refreshed.</p>
/// <p>Do not include <code>/</code> when specifying folder names. For example, you would specify <code>samplefolder</code> rather than <code>samplefolder/</code>.</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 `.folder_list.is_none()`.
pub fn folder_list(&self) -> &[::std::string::String] {
self.folder_list.as_deref().unwrap_or_default()
}
/// <p>A value that specifies whether to recursively refresh folders in the cache. The refresh includes folders that were in the cache the last time the gateway listed the folder's contents. If this value set to <code>true</code>, each folder that is listed in <code>FolderList</code> is recursively updated. Otherwise, subfolders listed in <code>FolderList</code> are not refreshed. Only objects that are in folders listed directly under <code>FolderList</code> are found and used for the update. The default is <code>true</code>.</p>
/// <p>Valid Values: <code>true</code> | <code>false</code></p>
pub fn recursive(&self) -> ::std::option::Option<bool> {
self.recursive
}
}
impl RefreshCacheInput {
/// Creates a new builder-style object to manufacture [`RefreshCacheInput`](crate::operation::refresh_cache::RefreshCacheInput).
pub fn builder() -> crate::operation::refresh_cache::builders::RefreshCacheInputBuilder {
crate::operation::refresh_cache::builders::RefreshCacheInputBuilder::default()
}
}
/// A builder for [`RefreshCacheInput`](crate::operation::refresh_cache::RefreshCacheInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RefreshCacheInputBuilder {
pub(crate) file_share_arn: ::std::option::Option<::std::string::String>,
pub(crate) folder_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) recursive: ::std::option::Option<bool>,
}
impl RefreshCacheInputBuilder {
/// <p>The Amazon Resource Name (ARN) of the file share you want to refresh.</p>
/// This field is required.
pub fn file_share_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.file_share_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the file share you want to refresh.</p>
pub fn set_file_share_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.file_share_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the file share you want to refresh.</p>
pub fn get_file_share_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.file_share_arn
}
/// Appends an item to `folder_list`.
///
/// To override the contents of this collection use [`set_folder_list`](Self::set_folder_list).
///
/// <p>A comma-separated list of the paths of folders to refresh in the cache. The default is \["/"\]. The default refreshes objects and folders at the root of the Amazon S3 bucket. If Recursive is set to true, the entire S3 bucket that the file share has access to is refreshed.</p>
/// <p>Do not include <code>/</code> when specifying folder names. For example, you would specify <code>samplefolder</code> rather than <code>samplefolder/</code>.</p>
pub fn folder_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.folder_list.unwrap_or_default();
v.push(input.into());
self.folder_list = ::std::option::Option::Some(v);
self
}
/// <p>A comma-separated list of the paths of folders to refresh in the cache. The default is \["/"\]. The default refreshes objects and folders at the root of the Amazon S3 bucket. If Recursive is set to true, the entire S3 bucket that the file share has access to is refreshed.</p>
/// <p>Do not include <code>/</code> when specifying folder names. For example, you would specify <code>samplefolder</code> rather than <code>samplefolder/</code>.</p>
pub fn set_folder_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.folder_list = input;
self
}
/// <p>A comma-separated list of the paths of folders to refresh in the cache. The default is \["/"\]. The default refreshes objects and folders at the root of the Amazon S3 bucket. If Recursive is set to true, the entire S3 bucket that the file share has access to is refreshed.</p>
/// <p>Do not include <code>/</code> when specifying folder names. For example, you would specify <code>samplefolder</code> rather than <code>samplefolder/</code>.</p>
pub fn get_folder_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.folder_list
}
/// <p>A value that specifies whether to recursively refresh folders in the cache. The refresh includes folders that were in the cache the last time the gateway listed the folder's contents. If this value set to <code>true</code>, each folder that is listed in <code>FolderList</code> is recursively updated. Otherwise, subfolders listed in <code>FolderList</code> are not refreshed. Only objects that are in folders listed directly under <code>FolderList</code> are found and used for the update. The default is <code>true</code>.</p>
/// <p>Valid Values: <code>true</code> | <code>false</code></p>
pub fn recursive(mut self, input: bool) -> Self {
self.recursive = ::std::option::Option::Some(input);
self
}
/// <p>A value that specifies whether to recursively refresh folders in the cache. The refresh includes folders that were in the cache the last time the gateway listed the folder's contents. If this value set to <code>true</code>, each folder that is listed in <code>FolderList</code> is recursively updated. Otherwise, subfolders listed in <code>FolderList</code> are not refreshed. Only objects that are in folders listed directly under <code>FolderList</code> are found and used for the update. The default is <code>true</code>.</p>
/// <p>Valid Values: <code>true</code> | <code>false</code></p>
pub fn set_recursive(mut self, input: ::std::option::Option<bool>) -> Self {
self.recursive = input;
self
}
/// <p>A value that specifies whether to recursively refresh folders in the cache. The refresh includes folders that were in the cache the last time the gateway listed the folder's contents. If this value set to <code>true</code>, each folder that is listed in <code>FolderList</code> is recursively updated. Otherwise, subfolders listed in <code>FolderList</code> are not refreshed. Only objects that are in folders listed directly under <code>FolderList</code> are found and used for the update. The default is <code>true</code>.</p>
/// <p>Valid Values: <code>true</code> | <code>false</code></p>
pub fn get_recursive(&self) -> &::std::option::Option<bool> {
&self.recursive
}
/// Consumes the builder and constructs a [`RefreshCacheInput`](crate::operation::refresh_cache::RefreshCacheInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::refresh_cache::RefreshCacheInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::refresh_cache::RefreshCacheInput {
file_share_arn: self.file_share_arn,
folder_list: self.folder_list,
recursive: self.recursive,
})
}
}