aws-sdk-migrationhubstrategy 0.25.0

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

/// <p> The object containing information about distinct imports or groups for Strategy Recommendations. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Group {
    /// <p> The key of the specific import group. </p>
    #[doc(hidden)]
    pub name: std::option::Option<crate::types::GroupName>,
    /// <p> The value of the specific import group. </p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl Group {
    /// <p> The key of the specific import group. </p>
    pub fn name(&self) -> std::option::Option<&crate::types::GroupName> {
        self.name.as_ref()
    }
    /// <p> The value of the specific import group. </p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
impl Group {
    /// Creates a new builder-style object to manufacture [`Group`](crate::types::Group).
    pub fn builder() -> crate::types::builders::GroupBuilder {
        crate::types::builders::GroupBuilder::default()
    }
}

/// A builder for [`Group`](crate::types::Group).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct GroupBuilder {
    pub(crate) name: std::option::Option<crate::types::GroupName>,
    pub(crate) value: std::option::Option<std::string::String>,
}
impl GroupBuilder {
    /// <p> The key of the specific import group. </p>
    pub fn name(mut self, input: crate::types::GroupName) -> Self {
        self.name = Some(input);
        self
    }
    /// <p> The key of the specific import group. </p>
    pub fn set_name(mut self, input: std::option::Option<crate::types::GroupName>) -> Self {
        self.name = input;
        self
    }
    /// <p> The value of the specific import group. </p>
    pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
        self.value = Some(input.into());
        self
    }
    /// <p> The value of the specific import group. </p>
    pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.value = input;
        self
    }
    /// Consumes the builder and constructs a [`Group`](crate::types::Group).
    pub fn build(self) -> crate::types::Group {
        crate::types::Group {
            name: self.name,
            value: self.value,
        }
    }
}