aws-sdk-opsworks 0.27.0

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

/// <p>Contains the response to a <code>CloneStack</code> request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CloneStackOutput {
    /// <p>The cloned stack ID.</p>
    #[doc(hidden)]
    pub stack_id: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl CloneStackOutput {
    /// <p>The cloned stack ID.</p>
    pub fn stack_id(&self) -> std::option::Option<&str> {
        self.stack_id.as_deref()
    }
}
impl aws_http::request_id::RequestId for CloneStackOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CloneStackOutput {
    /// Creates a new builder-style object to manufacture [`CloneStackOutput`](crate::operation::clone_stack::CloneStackOutput).
    pub fn builder() -> crate::operation::clone_stack::builders::CloneStackOutputBuilder {
        crate::operation::clone_stack::builders::CloneStackOutputBuilder::default()
    }
}

/// A builder for [`CloneStackOutput`](crate::operation::clone_stack::CloneStackOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CloneStackOutputBuilder {
    pub(crate) stack_id: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl CloneStackOutputBuilder {
    /// <p>The cloned stack ID.</p>
    pub fn stack_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.stack_id = Some(input.into());
        self
    }
    /// <p>The cloned stack ID.</p>
    pub fn set_stack_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.stack_id = input;
        self
    }
    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 [`CloneStackOutput`](crate::operation::clone_stack::CloneStackOutput).
    pub fn build(self) -> crate::operation::clone_stack::CloneStackOutput {
        crate::operation::clone_stack::CloneStackOutput {
            stack_id: self.stack_id,
            _request_id: self._request_id,
        }
    }
}