aws-sdk-migrationhubstrategy 1.78.0

AWS SDK for Migration Hub Strategy Recommendations
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The object containing details about homogeneous database preferences.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Homogeneous {
    /// <p>The target database engine for homogeneous database migration preferences.</p>
    pub target_database_engine: ::std::option::Option<::std::vec::Vec<crate::types::HomogeneousTargetDatabaseEngine>>,
}
impl Homogeneous {
    /// <p>The target database engine for homogeneous database migration preferences.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.target_database_engine.is_none()`.
    pub fn target_database_engine(&self) -> &[crate::types::HomogeneousTargetDatabaseEngine] {
        self.target_database_engine.as_deref().unwrap_or_default()
    }
}
impl Homogeneous {
    /// Creates a new builder-style object to manufacture [`Homogeneous`](crate::types::Homogeneous).
    pub fn builder() -> crate::types::builders::HomogeneousBuilder {
        crate::types::builders::HomogeneousBuilder::default()
    }
}

/// A builder for [`Homogeneous`](crate::types::Homogeneous).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct HomogeneousBuilder {
    pub(crate) target_database_engine: ::std::option::Option<::std::vec::Vec<crate::types::HomogeneousTargetDatabaseEngine>>,
}
impl HomogeneousBuilder {
    /// Appends an item to `target_database_engine`.
    ///
    /// To override the contents of this collection use [`set_target_database_engine`](Self::set_target_database_engine).
    ///
    /// <p>The target database engine for homogeneous database migration preferences.</p>
    pub fn target_database_engine(mut self, input: crate::types::HomogeneousTargetDatabaseEngine) -> Self {
        let mut v = self.target_database_engine.unwrap_or_default();
        v.push(input);
        self.target_database_engine = ::std::option::Option::Some(v);
        self
    }
    /// <p>The target database engine for homogeneous database migration preferences.</p>
    pub fn set_target_database_engine(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::HomogeneousTargetDatabaseEngine>>,
    ) -> Self {
        self.target_database_engine = input;
        self
    }
    /// <p>The target database engine for homogeneous database migration preferences.</p>
    pub fn get_target_database_engine(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::HomogeneousTargetDatabaseEngine>> {
        &self.target_database_engine
    }
    /// Consumes the builder and constructs a [`Homogeneous`](crate::types::Homogeneous).
    pub fn build(self) -> crate::types::Homogeneous {
        crate::types::Homogeneous {
            target_database_engine: self.target_database_engine,
        }
    }
}