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 UpdateApplianceInput {
    /// The Amazon Resource Name (ARN) of the appliance.
    pub appliance_arn: ::std::option::Option<::std::string::String>,
    /// The name of the appliance.
    pub appliance_name: ::std::option::Option<::std::string::String>,
    /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role used by the appliance.
    pub appliance_iam_role_arn: ::std::option::Option<::std::string::String>,
    /// The number of node failures that the appliance can tolerate.
    pub node_fault_tolerance: ::std::option::Option<i32>,
    /// The network configuration of the appliance.
    pub network_configuration: ::std::option::Option<crate::types::ApplianceNetworkConfigurationForUpdate>,
    /// The operation mode of the appliance.
    pub appliance_operation_mode: ::std::option::Option<crate::types::ApplianceOperationModeForUpdate>,
}
impl UpdateApplianceInput {
    /// The Amazon Resource Name (ARN) of the appliance.
    pub fn appliance_arn(&self) -> ::std::option::Option<&str> {
        self.appliance_arn.as_deref()
    }
    /// The name of the appliance.
    pub fn appliance_name(&self) -> ::std::option::Option<&str> {
        self.appliance_name.as_deref()
    }
    /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role used by the appliance.
    pub fn appliance_iam_role_arn(&self) -> ::std::option::Option<&str> {
        self.appliance_iam_role_arn.as_deref()
    }
    /// The number of node failures that the appliance can tolerate.
    pub fn node_fault_tolerance(&self) -> ::std::option::Option<i32> {
        self.node_fault_tolerance
    }
    /// The network configuration of the appliance.
    pub fn network_configuration(&self) -> ::std::option::Option<&crate::types::ApplianceNetworkConfigurationForUpdate> {
        self.network_configuration.as_ref()
    }
    /// The operation mode of the appliance.
    pub fn appliance_operation_mode(&self) -> ::std::option::Option<&crate::types::ApplianceOperationModeForUpdate> {
        self.appliance_operation_mode.as_ref()
    }
}
impl UpdateApplianceInput {
    /// Creates a new builder-style object to manufacture [`UpdateApplianceInput`](crate::operation::update_appliance::UpdateApplianceInput).
    pub fn builder() -> crate::operation::update_appliance::builders::UpdateApplianceInputBuilder {
        crate::operation::update_appliance::builders::UpdateApplianceInputBuilder::default()
    }
}

/// A builder for [`UpdateApplianceInput`](crate::operation::update_appliance::UpdateApplianceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateApplianceInputBuilder {
    pub(crate) appliance_arn: ::std::option::Option<::std::string::String>,
    pub(crate) appliance_name: ::std::option::Option<::std::string::String>,
    pub(crate) appliance_iam_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) node_fault_tolerance: ::std::option::Option<i32>,
    pub(crate) network_configuration: ::std::option::Option<crate::types::ApplianceNetworkConfigurationForUpdate>,
    pub(crate) appliance_operation_mode: ::std::option::Option<crate::types::ApplianceOperationModeForUpdate>,
}
impl UpdateApplianceInputBuilder {
    /// 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 name of the appliance.
    pub fn appliance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.appliance_name = ::std::option::Option::Some(input.into());
        self
    }
    /// The name of the appliance.
    pub fn set_appliance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.appliance_name = input;
        self
    }
    /// The name of the appliance.
    pub fn get_appliance_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.appliance_name
    }
    /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role used by the appliance.
    pub fn appliance_iam_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.appliance_iam_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role used by the appliance.
    pub fn set_appliance_iam_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.appliance_iam_role_arn = input;
        self
    }
    /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role used by the appliance.
    pub fn get_appliance_iam_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.appliance_iam_role_arn
    }
    /// The number of node failures that the appliance can tolerate.
    pub fn node_fault_tolerance(mut self, input: i32) -> Self {
        self.node_fault_tolerance = ::std::option::Option::Some(input);
        self
    }
    /// The number of node failures that the appliance can tolerate.
    pub fn set_node_fault_tolerance(mut self, input: ::std::option::Option<i32>) -> Self {
        self.node_fault_tolerance = input;
        self
    }
    /// The number of node failures that the appliance can tolerate.
    pub fn get_node_fault_tolerance(&self) -> &::std::option::Option<i32> {
        &self.node_fault_tolerance
    }
    /// The network configuration of the appliance.
    pub fn network_configuration(mut self, input: crate::types::ApplianceNetworkConfigurationForUpdate) -> Self {
        self.network_configuration = ::std::option::Option::Some(input);
        self
    }
    /// The network configuration of the appliance.
    pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::ApplianceNetworkConfigurationForUpdate>) -> Self {
        self.network_configuration = input;
        self
    }
    /// The network configuration of the appliance.
    pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::ApplianceNetworkConfigurationForUpdate> {
        &self.network_configuration
    }
    /// The operation mode of the appliance.
    pub fn appliance_operation_mode(mut self, input: crate::types::ApplianceOperationModeForUpdate) -> Self {
        self.appliance_operation_mode = ::std::option::Option::Some(input);
        self
    }
    /// The operation mode of the appliance.
    pub fn set_appliance_operation_mode(mut self, input: ::std::option::Option<crate::types::ApplianceOperationModeForUpdate>) -> Self {
        self.appliance_operation_mode = input;
        self
    }
    /// The operation mode of the appliance.
    pub fn get_appliance_operation_mode(&self) -> &::std::option::Option<crate::types::ApplianceOperationModeForUpdate> {
        &self.appliance_operation_mode
    }
    /// Consumes the builder and constructs a [`UpdateApplianceInput`](crate::operation::update_appliance::UpdateApplianceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_appliance::UpdateApplianceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_appliance::UpdateApplianceInput {
            appliance_arn: self.appliance_arn,
            appliance_name: self.appliance_name,
            appliance_iam_role_arn: self.appliance_iam_role_arn,
            node_fault_tolerance: self.node_fault_tolerance,
            network_configuration: self.network_configuration,
            appliance_operation_mode: self.appliance_operation_mode,
        })
    }
}