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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The details about an Amazon Web Services storage service that DataSync Discovery recommends for a resource in your on-premises storage system.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/discovery-understand-recommendations.html">Recommendations provided by DataSync Discovery</a>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Recommendation {
/// <p>A recommended Amazon Web Services storage service that you can migrate data to based on information that DataSync Discovery collects about your on-premises storage system.</p>
pub storage_type: ::std::option::Option<::std::string::String>,
/// <p>Information about how you can set up a recommended Amazon Web Services storage service.</p>
pub storage_configuration: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>The estimated monthly cost of the recommended Amazon Web Services storage service.</p>
pub estimated_monthly_storage_cost: ::std::option::Option<::std::string::String>,
}
impl Recommendation {
/// <p>A recommended Amazon Web Services storage service that you can migrate data to based on information that DataSync Discovery collects about your on-premises storage system.</p>
pub fn storage_type(&self) -> ::std::option::Option<&str> {
self.storage_type.as_deref()
}
/// <p>Information about how you can set up a recommended Amazon Web Services storage service.</p>
pub fn storage_configuration(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.storage_configuration.as_ref()
}
/// <p>The estimated monthly cost of the recommended Amazon Web Services storage service.</p>
pub fn estimated_monthly_storage_cost(&self) -> ::std::option::Option<&str> {
self.estimated_monthly_storage_cost.as_deref()
}
}
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) storage_type: ::std::option::Option<::std::string::String>,
pub(crate) storage_configuration: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) estimated_monthly_storage_cost: ::std::option::Option<::std::string::String>,
}
impl RecommendationBuilder {
/// <p>A recommended Amazon Web Services storage service that you can migrate data to based on information that DataSync Discovery collects about your on-premises storage system.</p>
pub fn storage_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.storage_type = ::std::option::Option::Some(input.into());
self
}
/// <p>A recommended Amazon Web Services storage service that you can migrate data to based on information that DataSync Discovery collects about your on-premises storage system.</p>
pub fn set_storage_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.storage_type = input;
self
}
/// <p>A recommended Amazon Web Services storage service that you can migrate data to based on information that DataSync Discovery collects about your on-premises storage system.</p>
pub fn get_storage_type(&self) -> &::std::option::Option<::std::string::String> {
&self.storage_type
}
/// Adds a key-value pair to `storage_configuration`.
///
/// To override the contents of this collection use [`set_storage_configuration`](Self::set_storage_configuration).
///
/// <p>Information about how you can set up a recommended Amazon Web Services storage service.</p>
pub fn storage_configuration(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.storage_configuration.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.storage_configuration = ::std::option::Option::Some(hash_map);
self
}
/// <p>Information about how you can set up a recommended Amazon Web Services storage service.</p>
pub fn set_storage_configuration(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.storage_configuration = input;
self
}
/// <p>Information about how you can set up a recommended Amazon Web Services storage service.</p>
pub fn get_storage_configuration(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.storage_configuration
}
/// <p>The estimated monthly cost of the recommended Amazon Web Services storage service.</p>
pub fn estimated_monthly_storage_cost(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.estimated_monthly_storage_cost = ::std::option::Option::Some(input.into());
self
}
/// <p>The estimated monthly cost of the recommended Amazon Web Services storage service.</p>
pub fn set_estimated_monthly_storage_cost(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.estimated_monthly_storage_cost = input;
self
}
/// <p>The estimated monthly cost of the recommended Amazon Web Services storage service.</p>
pub fn get_estimated_monthly_storage_cost(&self) -> &::std::option::Option<::std::string::String> {
&self.estimated_monthly_storage_cost
}
/// Consumes the builder and constructs a [`Recommendation`](crate::types::Recommendation).
pub fn build(self) -> crate::types::Recommendation {
crate::types::Recommendation {
storage_type: self.storage_type,
storage_configuration: self.storage_configuration,
estimated_monthly_storage_cost: self.estimated_monthly_storage_cost,
}
}
}