aws-sdk-migrationhubstrategy 1.61.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>
    pub name: ::std::option::Option<crate::types::GroupName>,
    /// <p>The value of the specific import group.</p>
    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).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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 = ::std::option::Option::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 key of the specific import group.</p>
    pub fn get_name(&self) -> &::std::option::Option<crate::types::GroupName> {
        &self.name
    }
    /// <p>The value of the specific import group.</p>
    pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.value = ::std::option::Option::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
    }
    /// <p>The value of the specific import group.</p>
    pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
        &self.value
    }
    /// 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,
        }
    }
}