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 VerifyNodesInput {
    /// The Amazon Resource Name (ARN) of the appliance.
    pub appliance_arn: ::std::option::Option<::std::string::String>,
    /// The Amazon Resource Names (ARNs) of the appliance nodes to verify.
    pub node_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl VerifyNodesInput {
    /// 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 Names (ARNs) of the appliance nodes to verify.
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.node_arns.is_none()`.
    pub fn node_arns(&self) -> &[::std::string::String] {
        self.node_arns.as_deref().unwrap_or_default()
    }
}
impl VerifyNodesInput {
    /// Creates a new builder-style object to manufacture [`VerifyNodesInput`](crate::operation::verify_nodes::VerifyNodesInput).
    pub fn builder() -> crate::operation::verify_nodes::builders::VerifyNodesInputBuilder {
        crate::operation::verify_nodes::builders::VerifyNodesInputBuilder::default()
    }
}

/// A builder for [`VerifyNodesInput`](crate::operation::verify_nodes::VerifyNodesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct VerifyNodesInputBuilder {
    pub(crate) appliance_arn: ::std::option::Option<::std::string::String>,
    pub(crate) node_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl VerifyNodesInputBuilder {
    /// 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
    }
    /// Appends an item to `node_arns`.
    ///
    /// To override the contents of this collection use [`set_node_arns`](Self::set_node_arns).
    ///
    /// The Amazon Resource Names (ARNs) of the appliance nodes to verify.
    pub fn node_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.node_arns.unwrap_or_default();
        v.push(input.into());
        self.node_arns = ::std::option::Option::Some(v);
        self
    }
    /// The Amazon Resource Names (ARNs) of the appliance nodes to verify.
    pub fn set_node_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.node_arns = input;
        self
    }
    /// The Amazon Resource Names (ARNs) of the appliance nodes to verify.
    pub fn get_node_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.node_arns
    }
    /// Consumes the builder and constructs a [`VerifyNodesInput`](crate::operation::verify_nodes::VerifyNodesInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::verify_nodes::VerifyNodesInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::verify_nodes::VerifyNodesInput {
            appliance_arn: self.appliance_arn,
            node_arns: self.node_arns,
        })
    }
}