aws-sdk-databasemigration 1.115.0

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

/// <p>Provides information that describes a recommendation of a target engine.</p>
/// <p>A <i>recommendation</i> is a set of possible Amazon Web Services target engines that you can choose to migrate your source on-premises database. In this set, Fleet Advisor suggests a single target engine as the right sized migration destination. To determine this rightsized migration destination, Fleet Advisor uses the inventory metadata and metrics from data collector. You can use recommendations before the start of migration to save costs and reduce risks.</p>
/// <p>With recommendations, you can explore different target options and compare metrics, so you can make an informed decision when you choose the migration target.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Recommendation {
    /// <p>The identifier of the source database for which Fleet Advisor provided this recommendation.</p>
    pub database_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the target engine. Valid values include <code>"rds-aurora-mysql"</code>, <code>"rds-aurora-postgresql"</code>, <code>"rds-mysql"</code>, <code>"rds-oracle"</code>, <code>"rds-sql-server"</code>, and <code>"rds-postgresql"</code>.</p>
    pub engine_name: ::std::option::Option<::std::string::String>,
    /// <p>The date when Fleet Advisor created the target engine recommendation.</p>
    pub created_date: ::std::option::Option<::std::string::String>,
    /// <p>The status of the target engine recommendation. Valid values include <code>"alternate"</code>, <code>"in-progress"</code>, <code>"not-viable"</code>, and <code>"recommended"</code>.</p>
    pub status: ::std::option::Option<::std::string::String>,
    /// <p>Indicates that this target is the rightsized migration destination.</p>
    pub preferred: ::std::option::Option<bool>,
    /// <p>The settings in JSON format for the preferred target engine parameters. These parameters include capacity, resource utilization, and the usage type (production, development, or testing).</p>
    pub settings: ::std::option::Option<crate::types::RecommendationSettings>,
    /// <p>The recommendation of a target engine for the specified source database.</p>
    pub data: ::std::option::Option<crate::types::RecommendationData>,
}
impl Recommendation {
    /// <p>The identifier of the source database for which Fleet Advisor provided this recommendation.</p>
    pub fn database_id(&self) -> ::std::option::Option<&str> {
        self.database_id.as_deref()
    }
    /// <p>The name of the target engine. Valid values include <code>"rds-aurora-mysql"</code>, <code>"rds-aurora-postgresql"</code>, <code>"rds-mysql"</code>, <code>"rds-oracle"</code>, <code>"rds-sql-server"</code>, and <code>"rds-postgresql"</code>.</p>
    pub fn engine_name(&self) -> ::std::option::Option<&str> {
        self.engine_name.as_deref()
    }
    /// <p>The date when Fleet Advisor created the target engine recommendation.</p>
    pub fn created_date(&self) -> ::std::option::Option<&str> {
        self.created_date.as_deref()
    }
    /// <p>The status of the target engine recommendation. Valid values include <code>"alternate"</code>, <code>"in-progress"</code>, <code>"not-viable"</code>, and <code>"recommended"</code>.</p>
    pub fn status(&self) -> ::std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>Indicates that this target is the rightsized migration destination.</p>
    pub fn preferred(&self) -> ::std::option::Option<bool> {
        self.preferred
    }
    /// <p>The settings in JSON format for the preferred target engine parameters. These parameters include capacity, resource utilization, and the usage type (production, development, or testing).</p>
    pub fn settings(&self) -> ::std::option::Option<&crate::types::RecommendationSettings> {
        self.settings.as_ref()
    }
    /// <p>The recommendation of a target engine for the specified source database.</p>
    pub fn data(&self) -> ::std::option::Option<&crate::types::RecommendationData> {
        self.data.as_ref()
    }
}
impl Recommendation {
    /// Creates a new builder-style object to manufacture [`Recommendation`](crate::types::Recommendation).
    pub fn builder() -> crate::types::builders::RecommendationBuilder {
        crate::types::builders::RecommendationBuilder::default()
    }
}

/// A builder for [`Recommendation`](crate::types::Recommendation).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RecommendationBuilder {
    pub(crate) database_id: ::std::option::Option<::std::string::String>,
    pub(crate) engine_name: ::std::option::Option<::std::string::String>,
    pub(crate) created_date: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<::std::string::String>,
    pub(crate) preferred: ::std::option::Option<bool>,
    pub(crate) settings: ::std::option::Option<crate::types::RecommendationSettings>,
    pub(crate) data: ::std::option::Option<crate::types::RecommendationData>,
}
impl RecommendationBuilder {
    /// <p>The identifier of the source database for which Fleet Advisor provided this recommendation.</p>
    pub fn database_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.database_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the source database for which Fleet Advisor provided this recommendation.</p>
    pub fn set_database_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.database_id = input;
        self
    }
    /// <p>The identifier of the source database for which Fleet Advisor provided this recommendation.</p>
    pub fn get_database_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.database_id
    }
    /// <p>The name of the target engine. Valid values include <code>"rds-aurora-mysql"</code>, <code>"rds-aurora-postgresql"</code>, <code>"rds-mysql"</code>, <code>"rds-oracle"</code>, <code>"rds-sql-server"</code>, and <code>"rds-postgresql"</code>.</p>
    pub fn engine_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.engine_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the target engine. Valid values include <code>"rds-aurora-mysql"</code>, <code>"rds-aurora-postgresql"</code>, <code>"rds-mysql"</code>, <code>"rds-oracle"</code>, <code>"rds-sql-server"</code>, and <code>"rds-postgresql"</code>.</p>
    pub fn set_engine_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.engine_name = input;
        self
    }
    /// <p>The name of the target engine. Valid values include <code>"rds-aurora-mysql"</code>, <code>"rds-aurora-postgresql"</code>, <code>"rds-mysql"</code>, <code>"rds-oracle"</code>, <code>"rds-sql-server"</code>, and <code>"rds-postgresql"</code>.</p>
    pub fn get_engine_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.engine_name
    }
    /// <p>The date when Fleet Advisor created the target engine recommendation.</p>
    pub fn created_date(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.created_date = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The date when Fleet Advisor created the target engine recommendation.</p>
    pub fn set_created_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.created_date = input;
        self
    }
    /// <p>The date when Fleet Advisor created the target engine recommendation.</p>
    pub fn get_created_date(&self) -> &::std::option::Option<::std::string::String> {
        &self.created_date
    }
    /// <p>The status of the target engine recommendation. Valid values include <code>"alternate"</code>, <code>"in-progress"</code>, <code>"not-viable"</code>, and <code>"recommended"</code>.</p>
    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The status of the target engine recommendation. Valid values include <code>"alternate"</code>, <code>"in-progress"</code>, <code>"not-viable"</code>, and <code>"recommended"</code>.</p>
    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the target engine recommendation. Valid values include <code>"alternate"</code>, <code>"in-progress"</code>, <code>"not-viable"</code>, and <code>"recommended"</code>.</p>
    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.status
    }
    /// <p>Indicates that this target is the rightsized migration destination.</p>
    pub fn preferred(mut self, input: bool) -> Self {
        self.preferred = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates that this target is the rightsized migration destination.</p>
    pub fn set_preferred(mut self, input: ::std::option::Option<bool>) -> Self {
        self.preferred = input;
        self
    }
    /// <p>Indicates that this target is the rightsized migration destination.</p>
    pub fn get_preferred(&self) -> &::std::option::Option<bool> {
        &self.preferred
    }
    /// <p>The settings in JSON format for the preferred target engine parameters. These parameters include capacity, resource utilization, and the usage type (production, development, or testing).</p>
    pub fn settings(mut self, input: crate::types::RecommendationSettings) -> Self {
        self.settings = ::std::option::Option::Some(input);
        self
    }
    /// <p>The settings in JSON format for the preferred target engine parameters. These parameters include capacity, resource utilization, and the usage type (production, development, or testing).</p>
    pub fn set_settings(mut self, input: ::std::option::Option<crate::types::RecommendationSettings>) -> Self {
        self.settings = input;
        self
    }
    /// <p>The settings in JSON format for the preferred target engine parameters. These parameters include capacity, resource utilization, and the usage type (production, development, or testing).</p>
    pub fn get_settings(&self) -> &::std::option::Option<crate::types::RecommendationSettings> {
        &self.settings
    }
    /// <p>The recommendation of a target engine for the specified source database.</p>
    pub fn data(mut self, input: crate::types::RecommendationData) -> Self {
        self.data = ::std::option::Option::Some(input);
        self
    }
    /// <p>The recommendation of a target engine for the specified source database.</p>
    pub fn set_data(mut self, input: ::std::option::Option<crate::types::RecommendationData>) -> Self {
        self.data = input;
        self
    }
    /// <p>The recommendation of a target engine for the specified source database.</p>
    pub fn get_data(&self) -> &::std::option::Option<crate::types::RecommendationData> {
        &self.data
    }
    /// Consumes the builder and constructs a [`Recommendation`](crate::types::Recommendation).
    pub fn build(self) -> crate::types::Recommendation {
        crate::types::Recommendation {
            database_id: self.database_id,
            engine_name: self.engine_name,
            created_date: self.created_date,
            status: self.status,
            preferred: self.preferred,
            settings: self.settings,
            data: self.data,
        }
    }
}