aws-sdk-sms 1.51.0

AWS SDK for AWS Server Migration 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 GenerateTemplateInput {
    /// <p>The ID of the application associated with the CloudFormation template.</p>
    pub app_id: ::std::option::Option<::std::string::String>,
    /// <p>The format for generating the CloudFormation template.</p>
    pub template_format: ::std::option::Option<crate::types::OutputFormat>,
}
impl GenerateTemplateInput {
    /// <p>The ID of the application associated with the CloudFormation template.</p>
    pub fn app_id(&self) -> ::std::option::Option<&str> {
        self.app_id.as_deref()
    }
    /// <p>The format for generating the CloudFormation template.</p>
    pub fn template_format(&self) -> ::std::option::Option<&crate::types::OutputFormat> {
        self.template_format.as_ref()
    }
}
impl GenerateTemplateInput {
    /// Creates a new builder-style object to manufacture [`GenerateTemplateInput`](crate::operation::generate_template::GenerateTemplateInput).
    pub fn builder() -> crate::operation::generate_template::builders::GenerateTemplateInputBuilder {
        crate::operation::generate_template::builders::GenerateTemplateInputBuilder::default()
    }
}

/// A builder for [`GenerateTemplateInput`](crate::operation::generate_template::GenerateTemplateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GenerateTemplateInputBuilder {
    pub(crate) app_id: ::std::option::Option<::std::string::String>,
    pub(crate) template_format: ::std::option::Option<crate::types::OutputFormat>,
}
impl GenerateTemplateInputBuilder {
    /// <p>The ID of the application associated with the CloudFormation template.</p>
    pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.app_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the application associated with the CloudFormation template.</p>
    pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.app_id = input;
        self
    }
    /// <p>The ID of the application associated with the CloudFormation template.</p>
    pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.app_id
    }
    /// <p>The format for generating the CloudFormation template.</p>
    pub fn template_format(mut self, input: crate::types::OutputFormat) -> Self {
        self.template_format = ::std::option::Option::Some(input);
        self
    }
    /// <p>The format for generating the CloudFormation template.</p>
    pub fn set_template_format(mut self, input: ::std::option::Option<crate::types::OutputFormat>) -> Self {
        self.template_format = input;
        self
    }
    /// <p>The format for generating the CloudFormation template.</p>
    pub fn get_template_format(&self) -> &::std::option::Option<crate::types::OutputFormat> {
        &self.template_format
    }
    /// Consumes the builder and constructs a [`GenerateTemplateInput`](crate::operation::generate_template::GenerateTemplateInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::generate_template::GenerateTemplateInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::generate_template::GenerateTemplateInput {
            app_id: self.app_id,
            template_format: self.template_format,
        })
    }
}