aws-sdk-storagegateway 1.102.0

AWS SDK for AWS Storage Gateway
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A JSON object containing the <code>DeleteVolumeInput$VolumeARN</code> to delete.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteVolumeInput {
    /// <p>The Amazon Resource Name (ARN) of the volume. Use the <code>ListVolumes</code> operation to return a list of gateway volumes.</p>
    pub volume_arn: ::std::option::Option<::std::string::String>,
}
impl DeleteVolumeInput {
    /// <p>The Amazon Resource Name (ARN) of the volume. Use the <code>ListVolumes</code> operation to return a list of gateway volumes.</p>
    pub fn volume_arn(&self) -> ::std::option::Option<&str> {
        self.volume_arn.as_deref()
    }
}
impl DeleteVolumeInput {
    /// Creates a new builder-style object to manufacture [`DeleteVolumeInput`](crate::operation::delete_volume::DeleteVolumeInput).
    pub fn builder() -> crate::operation::delete_volume::builders::DeleteVolumeInputBuilder {
        crate::operation::delete_volume::builders::DeleteVolumeInputBuilder::default()
    }
}

/// A builder for [`DeleteVolumeInput`](crate::operation::delete_volume::DeleteVolumeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteVolumeInputBuilder {
    pub(crate) volume_arn: ::std::option::Option<::std::string::String>,
}
impl DeleteVolumeInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the volume. Use the <code>ListVolumes</code> operation to return a list of gateway volumes.</p>
    /// This field is required.
    pub fn volume_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.volume_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the volume. Use the <code>ListVolumes</code> operation to return a list of gateway volumes.</p>
    pub fn set_volume_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.volume_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the volume. Use the <code>ListVolumes</code> operation to return a list of gateway volumes.</p>
    pub fn get_volume_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.volume_arn
    }
    /// Consumes the builder and constructs a [`DeleteVolumeInput`](crate::operation::delete_volume::DeleteVolumeInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_volume::DeleteVolumeInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_volume::DeleteVolumeInput { volume_arn: self.volume_arn })
    }
}