aws-sdk-cloudformation 1.111.0

AWS SDK for AWS CloudFormation
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The output for a <code>CreateStack</code> action.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateStackOutput {
    /// <p>Unique identifier of the stack.</p>
    pub stack_id: ::std::option::Option<::std::string::String>,
    /// <p>A unique identifier for this stack operation that can be used to track the operation's progress and events.</p>
    pub operation_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CreateStackOutput {
    /// <p>Unique identifier of the stack.</p>
    pub fn stack_id(&self) -> ::std::option::Option<&str> {
        self.stack_id.as_deref()
    }
    /// <p>A unique identifier for this stack operation that can be used to track the operation's progress and events.</p>
    pub fn operation_id(&self) -> ::std::option::Option<&str> {
        self.operation_id.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for CreateStackOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateStackOutput {
    /// Creates a new builder-style object to manufacture [`CreateStackOutput`](crate::operation::create_stack::CreateStackOutput).
    pub fn builder() -> crate::operation::create_stack::builders::CreateStackOutputBuilder {
        crate::operation::create_stack::builders::CreateStackOutputBuilder::default()
    }
}

/// A builder for [`CreateStackOutput`](crate::operation::create_stack::CreateStackOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateStackOutputBuilder {
    pub(crate) stack_id: ::std::option::Option<::std::string::String>,
    pub(crate) operation_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CreateStackOutputBuilder {
    /// <p>Unique identifier of the stack.</p>
    pub fn stack_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.stack_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Unique identifier of the stack.</p>
    pub fn set_stack_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.stack_id = input;
        self
    }
    /// <p>Unique identifier of the stack.</p>
    pub fn get_stack_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.stack_id
    }
    /// <p>A unique identifier for this stack operation that can be used to track the operation's progress and events.</p>
    pub fn operation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.operation_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier for this stack operation that can be used to track the operation's progress and events.</p>
    pub fn set_operation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.operation_id = input;
        self
    }
    /// <p>A unique identifier for this stack operation that can be used to track the operation's progress and events.</p>
    pub fn get_operation_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.operation_id
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`CreateStackOutput`](crate::operation::create_stack::CreateStackOutput).
    pub fn build(self) -> crate::operation::create_stack::CreateStackOutput {
        crate::operation::create_stack::CreateStackOutput {
            stack_id: self.stack_id,
            operation_id: self.operation_id,
            _request_id: self._request_id,
        }
    }
}