aws-sdk-datasync 1.58.0

AWS SDK for AWS DataSync
Documentation
// 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,
        }
    }
}