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.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartInstanceInput {
    /// <p>The instance ID.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
}
impl StartInstanceInput {
    /// <p>The instance ID.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
}
impl StartInstanceInput {
    /// Creates a new builder-style object to manufacture [`StartInstanceInput`](crate::operation::start_instance::StartInstanceInput).
    pub fn builder() -> crate::operation::start_instance::builders::StartInstanceInputBuilder {
        crate::operation::start_instance::builders::StartInstanceInputBuilder::default()
    }
}

/// A builder for [`StartInstanceInput`](crate::operation::start_instance::StartInstanceInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct StartInstanceInputBuilder {
    pub(crate) instance_id: std::option::Option<std::string::String>,
}
impl StartInstanceInputBuilder {
    /// <p>The instance ID.</p>
    pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.instance_id = Some(input.into());
        self
    }
    /// <p>The instance ID.</p>
    pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.instance_id = input;
        self
    }
    /// Consumes the builder and constructs a [`StartInstanceInput`](crate::operation::start_instance::StartInstanceInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::start_instance::StartInstanceInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::start_instance::StartInstanceInput {
            instance_id: self.instance_id,
        })
    }
}