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 GetMountTargetOutput {
    /// <p>The Availability Zone ID where the mount target is located.</p>
    pub availability_zone_id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Web Services account ID of the mount target owner.</p>
    pub owner_id: ::std::string::String,
    /// <p>The ID of the mount target.</p>
    pub mount_target_id: ::std::string::String,
    /// <p>The ID of the file system.</p>
    pub file_system_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the subnet where the mount target is located.</p>
    pub subnet_id: ::std::string::String,
    /// <p>The IPv4 address of the mount target.</p>
    pub ipv4_address: ::std::option::Option<::std::string::String>,
    /// <p>The IPv6 address of the mount target.</p>
    pub ipv6_address: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the network interface associated with the mount target.</p>
    pub network_interface_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the VPC where the mount target is located.</p>
    pub vpc_id: ::std::option::Option<::std::string::String>,
    /// <p>The security groups associated with the mount target.</p>
    pub security_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The current status of the mount target.</p>
    pub status: ::std::option::Option<crate::types::LifeCycleState>,
    /// <p>Additional information about the mount target status.</p>
    pub status_message: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetMountTargetOutput {
    /// <p>The Availability Zone ID where the mount target is located.</p>
    pub fn availability_zone_id(&self) -> ::std::option::Option<&str> {
        self.availability_zone_id.as_deref()
    }
    /// <p>The Amazon Web Services account ID of the mount target owner.</p>
    pub fn owner_id(&self) -> &str {
        use std::ops::Deref;
        self.owner_id.deref()
    }
    /// <p>The ID of the mount target.</p>
    pub fn mount_target_id(&self) -> &str {
        use std::ops::Deref;
        self.mount_target_id.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 ID of the subnet where the mount target is located.</p>
    pub fn subnet_id(&self) -> &str {
        use std::ops::Deref;
        self.subnet_id.deref()
    }
    /// <p>The IPv4 address of the mount target.</p>
    pub fn ipv4_address(&self) -> ::std::option::Option<&str> {
        self.ipv4_address.as_deref()
    }
    /// <p>The IPv6 address of the mount target.</p>
    pub fn ipv6_address(&self) -> ::std::option::Option<&str> {
        self.ipv6_address.as_deref()
    }
    /// <p>The ID of the network interface associated with the mount target.</p>
    pub fn network_interface_id(&self) -> ::std::option::Option<&str> {
        self.network_interface_id.as_deref()
    }
    /// <p>The ID of the VPC where the mount target is located.</p>
    pub fn vpc_id(&self) -> ::std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The security groups associated with the mount target.</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 `.security_groups.is_none()`.
    pub fn security_groups(&self) -> &[::std::string::String] {
        self.security_groups.as_deref().unwrap_or_default()
    }
    /// <p>The current status of the mount target.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::LifeCycleState> {
        self.status.as_ref()
    }
    /// <p>Additional information about the mount target status.</p>
    pub fn status_message(&self) -> ::std::option::Option<&str> {
        self.status_message.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for GetMountTargetOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetMountTargetOutput {
    /// Creates a new builder-style object to manufacture [`GetMountTargetOutput`](crate::operation::get_mount_target::GetMountTargetOutput).
    pub fn builder() -> crate::operation::get_mount_target::builders::GetMountTargetOutputBuilder {
        crate::operation::get_mount_target::builders::GetMountTargetOutputBuilder::default()
    }
}

/// A builder for [`GetMountTargetOutput`](crate::operation::get_mount_target::GetMountTargetOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetMountTargetOutputBuilder {
    pub(crate) availability_zone_id: ::std::option::Option<::std::string::String>,
    pub(crate) owner_id: ::std::option::Option<::std::string::String>,
    pub(crate) mount_target_id: ::std::option::Option<::std::string::String>,
    pub(crate) file_system_id: ::std::option::Option<::std::string::String>,
    pub(crate) subnet_id: ::std::option::Option<::std::string::String>,
    pub(crate) ipv4_address: ::std::option::Option<::std::string::String>,
    pub(crate) ipv6_address: ::std::option::Option<::std::string::String>,
    pub(crate) network_interface_id: ::std::option::Option<::std::string::String>,
    pub(crate) vpc_id: ::std::option::Option<::std::string::String>,
    pub(crate) security_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) status: ::std::option::Option<crate::types::LifeCycleState>,
    pub(crate) status_message: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetMountTargetOutputBuilder {
    /// <p>The Availability Zone ID where the mount target is located.</p>
    pub fn availability_zone_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.availability_zone_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Availability Zone ID where the mount target is located.</p>
    pub fn set_availability_zone_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.availability_zone_id = input;
        self
    }
    /// <p>The Availability Zone ID where the mount target is located.</p>
    pub fn get_availability_zone_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.availability_zone_id
    }
    /// <p>The Amazon Web Services account ID of the mount target owner.</p>
    /// This field is required.
    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 mount target 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 mount target owner.</p>
    pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner_id
    }
    /// <p>The ID of the mount target.</p>
    /// This field is required.
    pub fn mount_target_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.mount_target_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the mount target.</p>
    pub fn set_mount_target_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.mount_target_id = input;
        self
    }
    /// <p>The ID of the mount target.</p>
    pub fn get_mount_target_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.mount_target_id
    }
    /// <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 ID of the subnet where the mount target is located.</p>
    /// This field is required.
    pub fn subnet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.subnet_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the subnet where the mount target is located.</p>
    pub fn set_subnet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.subnet_id = input;
        self
    }
    /// <p>The ID of the subnet where the mount target is located.</p>
    pub fn get_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.subnet_id
    }
    /// <p>The IPv4 address of the mount target.</p>
    pub fn ipv4_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ipv4_address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The IPv4 address of the mount target.</p>
    pub fn set_ipv4_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ipv4_address = input;
        self
    }
    /// <p>The IPv4 address of the mount target.</p>
    pub fn get_ipv4_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.ipv4_address
    }
    /// <p>The IPv6 address of the mount target.</p>
    pub fn ipv6_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ipv6_address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The IPv6 address of the mount target.</p>
    pub fn set_ipv6_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ipv6_address = input;
        self
    }
    /// <p>The IPv6 address of the mount target.</p>
    pub fn get_ipv6_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.ipv6_address
    }
    /// <p>The ID of the network interface associated with the mount target.</p>
    pub fn network_interface_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.network_interface_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the network interface associated with the mount target.</p>
    pub fn set_network_interface_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.network_interface_id = input;
        self
    }
    /// <p>The ID of the network interface associated with the mount target.</p>
    pub fn get_network_interface_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.network_interface_id
    }
    /// <p>The ID of the VPC where the mount target is located.</p>
    pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.vpc_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the VPC where the mount target is located.</p>
    pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.vpc_id = input;
        self
    }
    /// <p>The ID of the VPC where the mount target is located.</p>
    pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.vpc_id
    }
    /// Appends an item to `security_groups`.
    ///
    /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
    ///
    /// <p>The security groups associated with the mount target.</p>
    pub fn security_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.security_groups.unwrap_or_default();
        v.push(input.into());
        self.security_groups = ::std::option::Option::Some(v);
        self
    }
    /// <p>The security groups associated with the mount target.</p>
    pub fn set_security_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.security_groups = input;
        self
    }
    /// <p>The security groups associated with the mount target.</p>
    pub fn get_security_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.security_groups
    }
    /// <p>The current status of the mount target.</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 mount target.</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 mount target.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::LifeCycleState> {
        &self.status
    }
    /// <p>Additional information about the mount target 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 mount target 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 mount target status.</p>
    pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_message
    }
    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 [`GetMountTargetOutput`](crate::operation::get_mount_target::GetMountTargetOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`owner_id`](crate::operation::get_mount_target::builders::GetMountTargetOutputBuilder::owner_id)
    /// - [`mount_target_id`](crate::operation::get_mount_target::builders::GetMountTargetOutputBuilder::mount_target_id)
    /// - [`subnet_id`](crate::operation::get_mount_target::builders::GetMountTargetOutputBuilder::subnet_id)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_mount_target::GetMountTargetOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_mount_target::GetMountTargetOutput {
            availability_zone_id: self.availability_zone_id,
            owner_id: self.owner_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "owner_id",
                    "owner_id was not specified but it is required when building GetMountTargetOutput",
                )
            })?,
            mount_target_id: self.mount_target_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "mount_target_id",
                    "mount_target_id was not specified but it is required when building GetMountTargetOutput",
                )
            })?,
            file_system_id: self.file_system_id,
            subnet_id: self.subnet_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "subnet_id",
                    "subnet_id was not specified but it is required when building GetMountTargetOutput",
                )
            })?,
            ipv4_address: self.ipv4_address,
            ipv6_address: self.ipv6_address,
            network_interface_id: self.network_interface_id,
            vpc_id: self.vpc_id,
            security_groups: self.security_groups,
            status: self.status,
            status_message: self.status_message,
            _request_id: self._request_id,
        })
    }
}