aws-sdk-backup 1.109.0

AWS SDK for AWS Backup
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 UpdateBackupPlanInput {
    /// <p>The ID of the backup plan.</p>
    pub backup_plan_id: ::std::option::Option<::std::string::String>,
    /// <p>The body of a backup plan. Includes a <code>BackupPlanName</code> and one or more sets of <code>Rules</code>.</p>
    pub backup_plan: ::std::option::Option<crate::types::BackupPlanInput>,
}
impl UpdateBackupPlanInput {
    /// <p>The ID of the backup plan.</p>
    pub fn backup_plan_id(&self) -> ::std::option::Option<&str> {
        self.backup_plan_id.as_deref()
    }
    /// <p>The body of a backup plan. Includes a <code>BackupPlanName</code> and one or more sets of <code>Rules</code>.</p>
    pub fn backup_plan(&self) -> ::std::option::Option<&crate::types::BackupPlanInput> {
        self.backup_plan.as_ref()
    }
}
impl UpdateBackupPlanInput {
    /// Creates a new builder-style object to manufacture [`UpdateBackupPlanInput`](crate::operation::update_backup_plan::UpdateBackupPlanInput).
    pub fn builder() -> crate::operation::update_backup_plan::builders::UpdateBackupPlanInputBuilder {
        crate::operation::update_backup_plan::builders::UpdateBackupPlanInputBuilder::default()
    }
}

/// A builder for [`UpdateBackupPlanInput`](crate::operation::update_backup_plan::UpdateBackupPlanInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateBackupPlanInputBuilder {
    pub(crate) backup_plan_id: ::std::option::Option<::std::string::String>,
    pub(crate) backup_plan: ::std::option::Option<crate::types::BackupPlanInput>,
}
impl UpdateBackupPlanInputBuilder {
    /// <p>The ID of the backup plan.</p>
    /// This field is required.
    pub fn backup_plan_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.backup_plan_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the backup plan.</p>
    pub fn set_backup_plan_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.backup_plan_id = input;
        self
    }
    /// <p>The ID of the backup plan.</p>
    pub fn get_backup_plan_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.backup_plan_id
    }
    /// <p>The body of a backup plan. Includes a <code>BackupPlanName</code> and one or more sets of <code>Rules</code>.</p>
    /// This field is required.
    pub fn backup_plan(mut self, input: crate::types::BackupPlanInput) -> Self {
        self.backup_plan = ::std::option::Option::Some(input);
        self
    }
    /// <p>The body of a backup plan. Includes a <code>BackupPlanName</code> and one or more sets of <code>Rules</code>.</p>
    pub fn set_backup_plan(mut self, input: ::std::option::Option<crate::types::BackupPlanInput>) -> Self {
        self.backup_plan = input;
        self
    }
    /// <p>The body of a backup plan. Includes a <code>BackupPlanName</code> and one or more sets of <code>Rules</code>.</p>
    pub fn get_backup_plan(&self) -> &::std::option::Option<crate::types::BackupPlanInput> {
        &self.backup_plan
    }
    /// Consumes the builder and constructs a [`UpdateBackupPlanInput`](crate::operation::update_backup_plan::UpdateBackupPlanInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_backup_plan::UpdateBackupPlanInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_backup_plan::UpdateBackupPlanInput {
            backup_plan_id: self.backup_plan_id,
            backup_plan: self.backup_plan,
        })
    }
}