aws-sdk-backupexternal 1.0.0

AWS SDK for AWS Backup External
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 AssociateDiskInput {
    /// The Amazon Resource Name (ARN) of the appliance.
    pub appliance_arn: ::std::option::Option<::std::string::String>,
    /// The Amazon Resource Name (ARN) of the appliance node.
    pub node_arn: ::std::option::Option<::std::string::String>,
    /// The identifier of the disk attached to the appliance node.
    pub disk_identifier: ::std::option::Option<::std::string::String>,
    /// The type of storage provided by the disk.
    pub disk_type: ::std::option::Option<crate::types::DiskType>,
}
impl AssociateDiskInput {
    /// The Amazon Resource Name (ARN) of the appliance.
    pub fn appliance_arn(&self) -> ::std::option::Option<&str> {
        self.appliance_arn.as_deref()
    }
    /// The Amazon Resource Name (ARN) of the appliance node.
    pub fn node_arn(&self) -> ::std::option::Option<&str> {
        self.node_arn.as_deref()
    }
    /// The identifier of the disk attached to the appliance node.
    pub fn disk_identifier(&self) -> ::std::option::Option<&str> {
        self.disk_identifier.as_deref()
    }
    /// The type of storage provided by the disk.
    pub fn disk_type(&self) -> ::std::option::Option<&crate::types::DiskType> {
        self.disk_type.as_ref()
    }
}
impl AssociateDiskInput {
    /// Creates a new builder-style object to manufacture [`AssociateDiskInput`](crate::operation::associate_disk::AssociateDiskInput).
    pub fn builder() -> crate::operation::associate_disk::builders::AssociateDiskInputBuilder {
        crate::operation::associate_disk::builders::AssociateDiskInputBuilder::default()
    }
}

/// A builder for [`AssociateDiskInput`](crate::operation::associate_disk::AssociateDiskInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateDiskInputBuilder {
    pub(crate) appliance_arn: ::std::option::Option<::std::string::String>,
    pub(crate) node_arn: ::std::option::Option<::std::string::String>,
    pub(crate) disk_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) disk_type: ::std::option::Option<crate::types::DiskType>,
}
impl AssociateDiskInputBuilder {
    /// The Amazon Resource Name (ARN) of the appliance.
    /// This field is required.
    pub fn appliance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.appliance_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the appliance.
    pub fn set_appliance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.appliance_arn = input;
        self
    }
    /// The Amazon Resource Name (ARN) of the appliance.
    pub fn get_appliance_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.appliance_arn
    }
    /// The Amazon Resource Name (ARN) of the appliance node.
    /// This field is required.
    pub fn node_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.node_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the appliance node.
    pub fn set_node_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.node_arn = input;
        self
    }
    /// The Amazon Resource Name (ARN) of the appliance node.
    pub fn get_node_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.node_arn
    }
    /// The identifier of the disk attached to the appliance node.
    /// This field is required.
    pub fn disk_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.disk_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// The identifier of the disk attached to the appliance node.
    pub fn set_disk_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.disk_identifier = input;
        self
    }
    /// The identifier of the disk attached to the appliance node.
    pub fn get_disk_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.disk_identifier
    }
    /// The type of storage provided by the disk.
    /// This field is required.
    pub fn disk_type(mut self, input: crate::types::DiskType) -> Self {
        self.disk_type = ::std::option::Option::Some(input);
        self
    }
    /// The type of storage provided by the disk.
    pub fn set_disk_type(mut self, input: ::std::option::Option<crate::types::DiskType>) -> Self {
        self.disk_type = input;
        self
    }
    /// The type of storage provided by the disk.
    pub fn get_disk_type(&self) -> &::std::option::Option<crate::types::DiskType> {
        &self.disk_type
    }
    /// Consumes the builder and constructs a [`AssociateDiskInput`](crate::operation::associate_disk::AssociateDiskInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::associate_disk::AssociateDiskInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::associate_disk::AssociateDiskInput {
            appliance_arn: self.appliance_arn,
            node_arn: self.node_arn,
            disk_identifier: self.disk_identifier,
            disk_type: self.disk_type,
        })
    }
}