aws-sdk-opsworks 0.27.0

AWS SDK for AWS OpsWorks
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 DeregisterVolumeInput {
    /// <p>The AWS OpsWorks Stacks volume ID, which is the GUID that AWS OpsWorks Stacks assigned to the instance when you registered the volume with the stack, not the Amazon EC2 volume ID.</p>
    #[doc(hidden)]
    pub volume_id: std::option::Option<std::string::String>,
}
impl DeregisterVolumeInput {
    /// <p>The AWS OpsWorks Stacks volume ID, which is the GUID that AWS OpsWorks Stacks assigned to the instance when you registered the volume with the stack, not the Amazon EC2 volume ID.</p>
    pub fn volume_id(&self) -> std::option::Option<&str> {
        self.volume_id.as_deref()
    }
}
impl DeregisterVolumeInput {
    /// Creates a new builder-style object to manufacture [`DeregisterVolumeInput`](crate::operation::deregister_volume::DeregisterVolumeInput).
    pub fn builder() -> crate::operation::deregister_volume::builders::DeregisterVolumeInputBuilder
    {
        crate::operation::deregister_volume::builders::DeregisterVolumeInputBuilder::default()
    }
}

/// A builder for [`DeregisterVolumeInput`](crate::operation::deregister_volume::DeregisterVolumeInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DeregisterVolumeInputBuilder {
    pub(crate) volume_id: std::option::Option<std::string::String>,
}
impl DeregisterVolumeInputBuilder {
    /// <p>The AWS OpsWorks Stacks volume ID, which is the GUID that AWS OpsWorks Stacks assigned to the instance when you registered the volume with the stack, not the Amazon EC2 volume ID.</p>
    pub fn volume_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.volume_id = Some(input.into());
        self
    }
    /// <p>The AWS OpsWorks Stacks volume ID, which is the GUID that AWS OpsWorks Stacks assigned to the instance when you registered the volume with the stack, not the Amazon EC2 volume ID.</p>
    pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.volume_id = input;
        self
    }
    /// Consumes the builder and constructs a [`DeregisterVolumeInput`](crate::operation::deregister_volume::DeregisterVolumeInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::deregister_volume::DeregisterVolumeInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::deregister_volume::DeregisterVolumeInput {
            volume_id: self.volume_id,
        })
    }
}