aws-sdk-applicationdiscovery 1.100.0

AWS SDK for AWS Application Discovery Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateApplicationInput {
    /// <p>The name of the application to be created.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The description of the application to be created.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The name of the migration wave of the application to be created.</p>
    pub wave: ::std::option::Option<::std::string::String>,
}
impl CreateApplicationInput {
    /// <p>The name of the application to be created.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The description of the application to be created.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The name of the migration wave of the application to be created.</p>
    pub fn wave(&self) -> ::std::option::Option<&str> {
        self.wave.as_deref()
    }
}
impl CreateApplicationInput {
    /// Creates a new builder-style object to manufacture [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
    pub fn builder() -> crate::operation::create_application::builders::CreateApplicationInputBuilder {
        crate::operation::create_application::builders::CreateApplicationInputBuilder::default()
    }
}

/// A builder for [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateApplicationInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) wave: ::std::option::Option<::std::string::String>,
}
impl CreateApplicationInputBuilder {
    /// <p>The name of the application to be created.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the application to be created.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the application to be created.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The description of the application to be created.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the application to be created.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the application to be created.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The name of the migration wave of the application to be created.</p>
    pub fn wave(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.wave = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the migration wave of the application to be created.</p>
    pub fn set_wave(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.wave = input;
        self
    }
    /// <p>The name of the migration wave of the application to be created.</p>
    pub fn get_wave(&self) -> &::std::option::Option<::std::string::String> {
        &self.wave
    }
    /// Consumes the builder and constructs a [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_application::CreateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_application::CreateApplicationInput {
            name: self.name,
            description: self.description,
            wave: self.wave,
        })
    }
}