aws-sdk-s3files 1.5.0

AWS SDK for Amazon S3 Files
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 GetFileSystemOutput {
    /// <p>The time when the file system was created.</p>
    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The Amazon Resource Name (ARN) of the file system.</p>
    pub file_system_arn: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the file system.</p>
    pub file_system_id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the S3 bucket.</p>
    pub bucket: ::std::option::Option<::std::string::String>,
    /// <p>The prefix in the S3 bucket that the file system provides access to.</p>
    pub prefix: ::std::string::String,
    /// <p>The client token used for idempotency when the file system was created.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services KMS key used for encryption.</p>
    pub kms_key_id: ::std::option::Option<::std::string::String>,
    /// <p>The current status of the file system.</p>
    pub status: ::std::option::Option<crate::types::LifeCycleState>,
    /// <p>Additional information about the file system status.</p>
    pub status_message: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the IAM role used for S3 access.</p>
    pub role_arn: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Web Services account ID of the file system owner.</p>
    pub owner_id: ::std::option::Option<::std::string::String>,
    /// <p>The tags associated with the file system.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>The name of the file system.</p>
    pub name: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetFileSystemOutput {
    /// <p>The time when the file system was created.</p>
    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of the file system.</p>
    pub fn file_system_arn(&self) -> ::std::option::Option<&str> {
        self.file_system_arn.as_deref()
    }
    /// <p>The ID of the file system.</p>
    pub fn file_system_id(&self) -> ::std::option::Option<&str> {
        self.file_system_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the S3 bucket.</p>
    pub fn bucket(&self) -> ::std::option::Option<&str> {
        self.bucket.as_deref()
    }
    /// <p>The prefix in the S3 bucket that the file system provides access to.</p>
    pub fn prefix(&self) -> &str {
        use std::ops::Deref;
        self.prefix.deref()
    }
    /// <p>The client token used for idempotency when the file system was created.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services KMS key used for encryption.</p>
    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <p>The current status of the file system.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::LifeCycleState> {
        self.status.as_ref()
    }
    /// <p>Additional information about the file system status.</p>
    pub fn status_message(&self) -> ::std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role used for S3 access.</p>
    pub fn role_arn(&self) -> ::std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>The Amazon Web Services account ID of the file system owner.</p>
    pub fn owner_id(&self) -> ::std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The tags associated with the file system.</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 `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
    /// <p>The name of the file system.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for GetFileSystemOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetFileSystemOutput {
    /// Creates a new builder-style object to manufacture [`GetFileSystemOutput`](crate::operation::get_file_system::GetFileSystemOutput).
    pub fn builder() -> crate::operation::get_file_system::builders::GetFileSystemOutputBuilder {
        crate::operation::get_file_system::builders::GetFileSystemOutputBuilder::default()
    }
}

/// A builder for [`GetFileSystemOutput`](crate::operation::get_file_system::GetFileSystemOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetFileSystemOutputBuilder {
    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) file_system_arn: ::std::option::Option<::std::string::String>,
    pub(crate) file_system_id: ::std::option::Option<::std::string::String>,
    pub(crate) bucket: ::std::option::Option<::std::string::String>,
    pub(crate) prefix: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::LifeCycleState>,
    pub(crate) status_message: ::std::option::Option<::std::string::String>,
    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) owner_id: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetFileSystemOutputBuilder {
    /// <p>The time when the file system was created.</p>
    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.creation_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time when the file system was created.</p>
    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.creation_time = input;
        self
    }
    /// <p>The time when the file system was created.</p>
    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.creation_time
    }
    /// <p>The Amazon Resource Name (ARN) of the file system.</p>
    pub fn file_system_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.file_system_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the file system.</p>
    pub fn set_file_system_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.file_system_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the file system.</p>
    pub fn get_file_system_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.file_system_arn
    }
    /// <p>The ID of the file system.</p>
    pub fn file_system_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.file_system_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the file system.</p>
    pub fn set_file_system_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.file_system_id = input;
        self
    }
    /// <p>The ID of the file system.</p>
    pub fn get_file_system_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.file_system_id
    }
    /// <p>The Amazon Resource Name (ARN) of the S3 bucket.</p>
    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.bucket = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the S3 bucket.</p>
    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.bucket = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the S3 bucket.</p>
    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
        &self.bucket
    }
    /// <p>The prefix in the S3 bucket that the file system provides access to.</p>
    pub fn prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.prefix = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The prefix in the S3 bucket that the file system provides access to.</p>
    pub fn set_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.prefix = input;
        self
    }
    /// <p>The prefix in the S3 bucket that the file system provides access to.</p>
    pub fn get_prefix(&self) -> &::std::option::Option<::std::string::String> {
        &self.prefix
    }
    /// <p>The client token used for idempotency when the file system was created.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The client token used for idempotency when the file system was created.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>The client token used for idempotency when the file system was created.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services KMS key used for encryption.</p>
    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services KMS key used for encryption.</p>
    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key_id = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services KMS key used for encryption.</p>
    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_id
    }
    /// <p>The current status of the file system.</p>
    pub fn status(mut self, input: crate::types::LifeCycleState) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current status of the file system.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::LifeCycleState>) -> Self {
        self.status = input;
        self
    }
    /// <p>The current status of the file system.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::LifeCycleState> {
        &self.status
    }
    /// <p>Additional information about the file system status.</p>
    pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Additional information about the file system status.</p>
    pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_message = input;
        self
    }
    /// <p>Additional information about the file system status.</p>
    pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_message
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role used for S3 access.</p>
    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role used for S3 access.</p>
    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.role_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role used for S3 access.</p>
    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.role_arn
    }
    /// <p>The Amazon Web Services account ID of the file system owner.</p>
    pub fn owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services account ID of the file system owner.</p>
    pub fn set_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner_id = input;
        self
    }
    /// <p>The Amazon Web Services account ID of the file system owner.</p>
    pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner_id
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags associated with the file system.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>The tags associated with the file system.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags associated with the file system.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// <p>The name of the file system.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the file system.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the file system.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetFileSystemOutput`](crate::operation::get_file_system::GetFileSystemOutput).
    pub fn build(self) -> crate::operation::get_file_system::GetFileSystemOutput {
        crate::operation::get_file_system::GetFileSystemOutput {
            creation_time: self.creation_time,
            file_system_arn: self.file_system_arn,
            file_system_id: self.file_system_id,
            bucket: self.bucket,
            prefix: self.prefix.unwrap_or_default(),
            client_token: self.client_token,
            kms_key_id: self.kms_key_id,
            status: self.status,
            status_message: self.status_message,
            role_arn: self.role_arn,
            owner_id: self.owner_id,
            tags: self.tags,
            name: self.name,
            _request_id: self._request_id,
        }
    }
}