aws-sdk-backup 1.110.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 GetBackupPlanInput {
    /// <p>Uniquely identifies a backup plan.</p>
    pub backup_plan_id: ::std::option::Option<::std::string::String>,
    /// <p>Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. Version IDs cannot be edited.</p>
    pub version_id: ::std::option::Option<::std::string::String>,
    /// <p>Number of future scheduled backup runs to preview. When set to 0 (default), no scheduled runs preview is included in the response. Valid range is 0-10.</p>
    pub max_scheduled_runs_preview: ::std::option::Option<i32>,
}
impl GetBackupPlanInput {
    /// <p>Uniquely identifies a backup plan.</p>
    pub fn backup_plan_id(&self) -> ::std::option::Option<&str> {
        self.backup_plan_id.as_deref()
    }
    /// <p>Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. Version IDs cannot be edited.</p>
    pub fn version_id(&self) -> ::std::option::Option<&str> {
        self.version_id.as_deref()
    }
    /// <p>Number of future scheduled backup runs to preview. When set to 0 (default), no scheduled runs preview is included in the response. Valid range is 0-10.</p>
    pub fn max_scheduled_runs_preview(&self) -> ::std::option::Option<i32> {
        self.max_scheduled_runs_preview
    }
}
impl GetBackupPlanInput {
    /// Creates a new builder-style object to manufacture [`GetBackupPlanInput`](crate::operation::get_backup_plan::GetBackupPlanInput).
    pub fn builder() -> crate::operation::get_backup_plan::builders::GetBackupPlanInputBuilder {
        crate::operation::get_backup_plan::builders::GetBackupPlanInputBuilder::default()
    }
}

/// A builder for [`GetBackupPlanInput`](crate::operation::get_backup_plan::GetBackupPlanInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetBackupPlanInputBuilder {
    pub(crate) backup_plan_id: ::std::option::Option<::std::string::String>,
    pub(crate) version_id: ::std::option::Option<::std::string::String>,
    pub(crate) max_scheduled_runs_preview: ::std::option::Option<i32>,
}
impl GetBackupPlanInputBuilder {
    /// <p>Uniquely identifies a 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>Uniquely identifies a 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>Uniquely identifies a backup plan.</p>
    pub fn get_backup_plan_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.backup_plan_id
    }
    /// <p>Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. Version IDs cannot be edited.</p>
    pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.version_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. Version IDs cannot be edited.</p>
    pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.version_id = input;
        self
    }
    /// <p>Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. Version IDs cannot be edited.</p>
    pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.version_id
    }
    /// <p>Number of future scheduled backup runs to preview. When set to 0 (default), no scheduled runs preview is included in the response. Valid range is 0-10.</p>
    pub fn max_scheduled_runs_preview(mut self, input: i32) -> Self {
        self.max_scheduled_runs_preview = ::std::option::Option::Some(input);
        self
    }
    /// <p>Number of future scheduled backup runs to preview. When set to 0 (default), no scheduled runs preview is included in the response. Valid range is 0-10.</p>
    pub fn set_max_scheduled_runs_preview(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_scheduled_runs_preview = input;
        self
    }
    /// <p>Number of future scheduled backup runs to preview. When set to 0 (default), no scheduled runs preview is included in the response. Valid range is 0-10.</p>
    pub fn get_max_scheduled_runs_preview(&self) -> &::std::option::Option<i32> {
        &self.max_scheduled_runs_preview
    }
    /// Consumes the builder and constructs a [`GetBackupPlanInput`](crate::operation::get_backup_plan::GetBackupPlanInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_backup_plan::GetBackupPlanInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_backup_plan::GetBackupPlanInput {
            backup_plan_id: self.backup_plan_id,
            version_id: self.version_id,
            max_scheduled_runs_preview: self.max_scheduled_runs_preview,
        })
    }
}