aws_sdk_databasemigration/operation/start_recommendations/
_start_recommendations_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct StartRecommendationsInput {
6    /// <p>The identifier of the source database to analyze and provide recommendations for.</p>
7    pub database_id: ::std::option::Option<::std::string::String>,
8    /// <p>The settings in JSON format that Fleet Advisor uses to determine target engine recommendations. These parameters include target instance sizing and availability and durability settings. For target instance sizing, Fleet Advisor supports the following two options: total capacity and resource utilization. For availability and durability, Fleet Advisor supports the following two options: production (Multi-AZ deployments) and Dev/Test (Single-AZ deployments).</p>
9    pub settings: ::std::option::Option<crate::types::RecommendationSettings>,
10}
11impl StartRecommendationsInput {
12    /// <p>The identifier of the source database to analyze and provide recommendations for.</p>
13    pub fn database_id(&self) -> ::std::option::Option<&str> {
14        self.database_id.as_deref()
15    }
16    /// <p>The settings in JSON format that Fleet Advisor uses to determine target engine recommendations. These parameters include target instance sizing and availability and durability settings. For target instance sizing, Fleet Advisor supports the following two options: total capacity and resource utilization. For availability and durability, Fleet Advisor supports the following two options: production (Multi-AZ deployments) and Dev/Test (Single-AZ deployments).</p>
17    pub fn settings(&self) -> ::std::option::Option<&crate::types::RecommendationSettings> {
18        self.settings.as_ref()
19    }
20}
21impl StartRecommendationsInput {
22    /// Creates a new builder-style object to manufacture [`StartRecommendationsInput`](crate::operation::start_recommendations::StartRecommendationsInput).
23    pub fn builder() -> crate::operation::start_recommendations::builders::StartRecommendationsInputBuilder {
24        crate::operation::start_recommendations::builders::StartRecommendationsInputBuilder::default()
25    }
26}
27
28/// A builder for [`StartRecommendationsInput`](crate::operation::start_recommendations::StartRecommendationsInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct StartRecommendationsInputBuilder {
32    pub(crate) database_id: ::std::option::Option<::std::string::String>,
33    pub(crate) settings: ::std::option::Option<crate::types::RecommendationSettings>,
34}
35impl StartRecommendationsInputBuilder {
36    /// <p>The identifier of the source database to analyze and provide recommendations for.</p>
37    /// This field is required.
38    pub fn database_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.database_id = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The identifier of the source database to analyze and provide recommendations for.</p>
43    pub fn set_database_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.database_id = input;
45        self
46    }
47    /// <p>The identifier of the source database to analyze and provide recommendations for.</p>
48    pub fn get_database_id(&self) -> &::std::option::Option<::std::string::String> {
49        &self.database_id
50    }
51    /// <p>The settings in JSON format that Fleet Advisor uses to determine target engine recommendations. These parameters include target instance sizing and availability and durability settings. For target instance sizing, Fleet Advisor supports the following two options: total capacity and resource utilization. For availability and durability, Fleet Advisor supports the following two options: production (Multi-AZ deployments) and Dev/Test (Single-AZ deployments).</p>
52    /// This field is required.
53    pub fn settings(mut self, input: crate::types::RecommendationSettings) -> Self {
54        self.settings = ::std::option::Option::Some(input);
55        self
56    }
57    /// <p>The settings in JSON format that Fleet Advisor uses to determine target engine recommendations. These parameters include target instance sizing and availability and durability settings. For target instance sizing, Fleet Advisor supports the following two options: total capacity and resource utilization. For availability and durability, Fleet Advisor supports the following two options: production (Multi-AZ deployments) and Dev/Test (Single-AZ deployments).</p>
58    pub fn set_settings(mut self, input: ::std::option::Option<crate::types::RecommendationSettings>) -> Self {
59        self.settings = input;
60        self
61    }
62    /// <p>The settings in JSON format that Fleet Advisor uses to determine target engine recommendations. These parameters include target instance sizing and availability and durability settings. For target instance sizing, Fleet Advisor supports the following two options: total capacity and resource utilization. For availability and durability, Fleet Advisor supports the following two options: production (Multi-AZ deployments) and Dev/Test (Single-AZ deployments).</p>
63    pub fn get_settings(&self) -> &::std::option::Option<crate::types::RecommendationSettings> {
64        &self.settings
65    }
66    /// Consumes the builder and constructs a [`StartRecommendationsInput`](crate::operation::start_recommendations::StartRecommendationsInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<crate::operation::start_recommendations::StartRecommendationsInput, ::aws_smithy_types::error::operation::BuildError>
70    {
71        ::std::result::Result::Ok(crate::operation::start_recommendations::StartRecommendationsInput {
72            database_id: self.database_id,
73            settings: self.settings,
74        })
75    }
76}