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 UpdateResourceTargetInput {
    /// The Amazon Resource Name (ARN) of the resource target.
    pub arn: ::std::option::Option<::std::string::String>,
    /// The name of the resource target.
    pub name: ::std::option::Option<::std::string::String>,
    /// The backup configuration for the resource target.
    pub target_configuration: ::std::option::Option<crate::types::ResourceTargetConfiguration>,
    /// The source of the resource target's backup configuration.
    pub target_configuration_source: ::std::option::Option<crate::types::ResourceTargetConfigurationSource>,
}
impl UpdateResourceTargetInput {
    /// The Amazon Resource Name (ARN) of the resource target.
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// The name of the resource target.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// The backup configuration for the resource target.
    pub fn target_configuration(&self) -> ::std::option::Option<&crate::types::ResourceTargetConfiguration> {
        self.target_configuration.as_ref()
    }
    /// The source of the resource target's backup configuration.
    pub fn target_configuration_source(&self) -> ::std::option::Option<&crate::types::ResourceTargetConfigurationSource> {
        self.target_configuration_source.as_ref()
    }
}
impl UpdateResourceTargetInput {
    /// Creates a new builder-style object to manufacture [`UpdateResourceTargetInput`](crate::operation::update_resource_target::UpdateResourceTargetInput).
    pub fn builder() -> crate::operation::update_resource_target::builders::UpdateResourceTargetInputBuilder {
        crate::operation::update_resource_target::builders::UpdateResourceTargetInputBuilder::default()
    }
}

/// A builder for [`UpdateResourceTargetInput`](crate::operation::update_resource_target::UpdateResourceTargetInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateResourceTargetInputBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) target_configuration: ::std::option::Option<crate::types::ResourceTargetConfiguration>,
    pub(crate) target_configuration_source: ::std::option::Option<crate::types::ResourceTargetConfigurationSource>,
}
impl UpdateResourceTargetInputBuilder {
    /// The Amazon Resource Name (ARN) of the resource target.
    /// This field is required.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the resource target.
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// The Amazon Resource Name (ARN) of the resource target.
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// The name of the resource target.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// The name of the resource target.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// The name of the resource target.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// The backup configuration for the resource target.
    pub fn target_configuration(mut self, input: crate::types::ResourceTargetConfiguration) -> Self {
        self.target_configuration = ::std::option::Option::Some(input);
        self
    }
    /// The backup configuration for the resource target.
    pub fn set_target_configuration(mut self, input: ::std::option::Option<crate::types::ResourceTargetConfiguration>) -> Self {
        self.target_configuration = input;
        self
    }
    /// The backup configuration for the resource target.
    pub fn get_target_configuration(&self) -> &::std::option::Option<crate::types::ResourceTargetConfiguration> {
        &self.target_configuration
    }
    /// The source of the resource target's backup configuration.
    pub fn target_configuration_source(mut self, input: crate::types::ResourceTargetConfigurationSource) -> Self {
        self.target_configuration_source = ::std::option::Option::Some(input);
        self
    }
    /// The source of the resource target's backup configuration.
    pub fn set_target_configuration_source(mut self, input: ::std::option::Option<crate::types::ResourceTargetConfigurationSource>) -> Self {
        self.target_configuration_source = input;
        self
    }
    /// The source of the resource target's backup configuration.
    pub fn get_target_configuration_source(&self) -> &::std::option::Option<crate::types::ResourceTargetConfigurationSource> {
        &self.target_configuration_source
    }
    /// Consumes the builder and constructs a [`UpdateResourceTargetInput`](crate::operation::update_resource_target::UpdateResourceTargetInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_resource_target::UpdateResourceTargetInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_resource_target::UpdateResourceTargetInput {
            arn: self.arn,
            name: self.name,
            target_configuration: self.target_configuration,
            target_configuration_source: self.target_configuration_source,
        })
    }
}