aws-sdk-efs 1.78.0

AWS SDK for Amazon Elastic File System
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p></p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeMountTargetsOutput {
    /// <p>If the request included the <code>Marker</code>, the response returns that value in this field.</p>
    pub marker: ::std::option::Option<::std::string::String>,
    /// <p>Returns the file system's mount targets as an array of <code>MountTargetDescription</code> objects.</p>
    pub mount_targets: ::std::option::Option<::std::vec::Vec<crate::types::MountTargetDescription>>,
    /// <p>If a value is present, there are more mount targets to return. In a subsequent request, you can provide <code>Marker</code> in your request with this value to retrieve the next set of mount targets.</p>
    pub next_marker: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DescribeMountTargetsOutput {
    /// <p>If the request included the <code>Marker</code>, the response returns that value in this field.</p>
    pub fn marker(&self) -> ::std::option::Option<&str> {
        self.marker.as_deref()
    }
    /// <p>Returns the file system's mount targets as an array of <code>MountTargetDescription</code> objects.</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 `.mount_targets.is_none()`.
    pub fn mount_targets(&self) -> &[crate::types::MountTargetDescription] {
        self.mount_targets.as_deref().unwrap_or_default()
    }
    /// <p>If a value is present, there are more mount targets to return. In a subsequent request, you can provide <code>Marker</code> in your request with this value to retrieve the next set of mount targets.</p>
    pub fn next_marker(&self) -> ::std::option::Option<&str> {
        self.next_marker.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for DescribeMountTargetsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeMountTargetsOutput {
    /// Creates a new builder-style object to manufacture [`DescribeMountTargetsOutput`](crate::operation::describe_mount_targets::DescribeMountTargetsOutput).
    pub fn builder() -> crate::operation::describe_mount_targets::builders::DescribeMountTargetsOutputBuilder {
        crate::operation::describe_mount_targets::builders::DescribeMountTargetsOutputBuilder::default()
    }
}

/// A builder for [`DescribeMountTargetsOutput`](crate::operation::describe_mount_targets::DescribeMountTargetsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeMountTargetsOutputBuilder {
    pub(crate) marker: ::std::option::Option<::std::string::String>,
    pub(crate) mount_targets: ::std::option::Option<::std::vec::Vec<crate::types::MountTargetDescription>>,
    pub(crate) next_marker: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DescribeMountTargetsOutputBuilder {
    /// <p>If the request included the <code>Marker</code>, the response returns that value in this field.</p>
    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.marker = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If the request included the <code>Marker</code>, the response returns that value in this field.</p>
    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.marker = input;
        self
    }
    /// <p>If the request included the <code>Marker</code>, the response returns that value in this field.</p>
    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
        &self.marker
    }
    /// Appends an item to `mount_targets`.
    ///
    /// To override the contents of this collection use [`set_mount_targets`](Self::set_mount_targets).
    ///
    /// <p>Returns the file system's mount targets as an array of <code>MountTargetDescription</code> objects.</p>
    pub fn mount_targets(mut self, input: crate::types::MountTargetDescription) -> Self {
        let mut v = self.mount_targets.unwrap_or_default();
        v.push(input);
        self.mount_targets = ::std::option::Option::Some(v);
        self
    }
    /// <p>Returns the file system's mount targets as an array of <code>MountTargetDescription</code> objects.</p>
    pub fn set_mount_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MountTargetDescription>>) -> Self {
        self.mount_targets = input;
        self
    }
    /// <p>Returns the file system's mount targets as an array of <code>MountTargetDescription</code> objects.</p>
    pub fn get_mount_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MountTargetDescription>> {
        &self.mount_targets
    }
    /// <p>If a value is present, there are more mount targets to return. In a subsequent request, you can provide <code>Marker</code> in your request with this value to retrieve the next set of mount targets.</p>
    pub fn next_marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_marker = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If a value is present, there are more mount targets to return. In a subsequent request, you can provide <code>Marker</code> in your request with this value to retrieve the next set of mount targets.</p>
    pub fn set_next_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_marker = input;
        self
    }
    /// <p>If a value is present, there are more mount targets to return. In a subsequent request, you can provide <code>Marker</code> in your request with this value to retrieve the next set of mount targets.</p>
    pub fn get_next_marker(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_marker
    }
    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 [`DescribeMountTargetsOutput`](crate::operation::describe_mount_targets::DescribeMountTargetsOutput).
    pub fn build(self) -> crate::operation::describe_mount_targets::DescribeMountTargetsOutput {
        crate::operation::describe_mount_targets::DescribeMountTargetsOutput {
            marker: self.marker,
            mount_targets: self.mount_targets,
            next_marker: self.next_marker,
            _request_id: self._request_id,
        }
    }
}