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 CreateApplianceInput {
    /// The name of the appliance.
    pub appliance_name: ::std::option::Option<::std::string::String>,
    /// The environment in which the appliance runs.
    pub environment_type: ::std::option::Option<crate::types::ApplianceEnvironmentType>,
    /// 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::ApplianceNetworkConfigurationForCreate>,
    /// A unique, case-sensitive identifier that you provide to ensure that the request is idempotent.
    pub client_token: ::std::option::Option<::std::string::String>,
    /// The tags to associate with the appliance.
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateApplianceInput {
    /// The name of the appliance.
    pub fn appliance_name(&self) -> ::std::option::Option<&str> {
        self.appliance_name.as_deref()
    }
    /// The environment in which the appliance runs.
    pub fn environment_type(&self) -> ::std::option::Option<&crate::types::ApplianceEnvironmentType> {
        self.environment_type.as_ref()
    }
    /// 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::ApplianceNetworkConfigurationForCreate> {
        self.network_configuration.as_ref()
    }
    /// A unique, case-sensitive identifier that you provide to ensure that the request is idempotent.
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// The tags to associate with the appliance.
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl CreateApplianceInput {
    /// Creates a new builder-style object to manufacture [`CreateApplianceInput`](crate::operation::create_appliance::CreateApplianceInput).
    pub fn builder() -> crate::operation::create_appliance::builders::CreateApplianceInputBuilder {
        crate::operation::create_appliance::builders::CreateApplianceInputBuilder::default()
    }
}

/// A builder for [`CreateApplianceInput`](crate::operation::create_appliance::CreateApplianceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateApplianceInputBuilder {
    pub(crate) appliance_name: ::std::option::Option<::std::string::String>,
    pub(crate) environment_type: ::std::option::Option<crate::types::ApplianceEnvironmentType>,
    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::ApplianceNetworkConfigurationForCreate>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateApplianceInputBuilder {
    /// The name of the appliance.
    /// This field is required.
    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 environment in which the appliance runs.
    /// This field is required.
    pub fn environment_type(mut self, input: crate::types::ApplianceEnvironmentType) -> Self {
        self.environment_type = ::std::option::Option::Some(input);
        self
    }
    /// The environment in which the appliance runs.
    pub fn set_environment_type(mut self, input: ::std::option::Option<crate::types::ApplianceEnvironmentType>) -> Self {
        self.environment_type = input;
        self
    }
    /// The environment in which the appliance runs.
    pub fn get_environment_type(&self) -> &::std::option::Option<crate::types::ApplianceEnvironmentType> {
        &self.environment_type
    }
    /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role used by the appliance.
    /// This field is required.
    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.
    /// This field is required.
    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.
    /// This field is required.
    pub fn network_configuration(mut self, input: crate::types::ApplianceNetworkConfigurationForCreate) -> 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::ApplianceNetworkConfigurationForCreate>) -> Self {
        self.network_configuration = input;
        self
    }
    /// The network configuration of the appliance.
    pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::ApplianceNetworkConfigurationForCreate> {
        &self.network_configuration
    }
    /// A unique, case-sensitive identifier that you provide to ensure that the request is idempotent.
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// A unique, case-sensitive identifier that you provide to ensure that the request is idempotent.
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// A unique, case-sensitive identifier that you provide to ensure that the request is idempotent.
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// The tags to associate with the appliance.
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// The tags to associate with the appliance.
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// The tags to associate with the appliance.
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateApplianceInput`](crate::operation::create_appliance::CreateApplianceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_appliance::CreateApplianceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_appliance::CreateApplianceInput {
            appliance_name: self.appliance_name,
            environment_type: self.environment_type,
            appliance_iam_role_arn: self.appliance_iam_role_arn,
            node_fault_tolerance: self.node_fault_tolerance,
            network_configuration: self.network_configuration,
            client_token: self.client_token,
            tags: self.tags,
        })
    }
}