1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
// 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,
}
}
}