aws-sdk-amplifygen3 1.0.0

AWS SDK for AWS Amplify Gen 3
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 RestoreBranchInput {
    /// <p>The Amazon Resource Name (ARN) of the production branch of the Production environment. Other branches can't be restored.</p>
    pub branch_arn: ::std::option::Option<::std::string::String>,
    /// <p>The point in time to restore the production branch to. The time must be within the window that GetRestoreWindow returns and can't be in the future. Fractions of a second are ignored.</p>
    pub restore_to_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl RestoreBranchInput {
    /// <p>The Amazon Resource Name (ARN) of the production branch of the Production environment. Other branches can't be restored.</p>
    pub fn branch_arn(&self) -> ::std::option::Option<&str> {
        self.branch_arn.as_deref()
    }
    /// <p>The point in time to restore the production branch to. The time must be within the window that GetRestoreWindow returns and can't be in the future. Fractions of a second are ignored.</p>
    pub fn restore_to_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.restore_to_time.as_ref()
    }
}
impl RestoreBranchInput {
    /// Creates a new builder-style object to manufacture [`RestoreBranchInput`](crate::operation::restore_branch::RestoreBranchInput).
    pub fn builder() -> crate::operation::restore_branch::builders::RestoreBranchInputBuilder {
        crate::operation::restore_branch::builders::RestoreBranchInputBuilder::default()
    }
}

/// A builder for [`RestoreBranchInput`](crate::operation::restore_branch::RestoreBranchInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RestoreBranchInputBuilder {
    pub(crate) branch_arn: ::std::option::Option<::std::string::String>,
    pub(crate) restore_to_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl RestoreBranchInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the production branch of the Production environment. Other branches can't be restored.</p>
    /// This field is required.
    pub fn branch_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.branch_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the production branch of the Production environment. Other branches can't be restored.</p>
    pub fn set_branch_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.branch_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the production branch of the Production environment. Other branches can't be restored.</p>
    pub fn get_branch_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.branch_arn
    }
    /// <p>The point in time to restore the production branch to. The time must be within the window that GetRestoreWindow returns and can't be in the future. Fractions of a second are ignored.</p>
    /// This field is required.
    pub fn restore_to_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.restore_to_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The point in time to restore the production branch to. The time must be within the window that GetRestoreWindow returns and can't be in the future. Fractions of a second are ignored.</p>
    pub fn set_restore_to_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.restore_to_time = input;
        self
    }
    /// <p>The point in time to restore the production branch to. The time must be within the window that GetRestoreWindow returns and can't be in the future. Fractions of a second are ignored.</p>
    pub fn get_restore_to_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.restore_to_time
    }
    /// Consumes the builder and constructs a [`RestoreBranchInput`](crate::operation::restore_branch::RestoreBranchInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::restore_branch::RestoreBranchInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::restore_branch::RestoreBranchInput {
            branch_arn: self.branch_arn,
            restore_to_time: self.restore_to_time,
        })
    }
}