aws-sdk-lightsail 1.107.0

AWS SDK for Amazon Lightsail
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 GetInstanceInput {
    /// <p>The name of the instance.</p>
    pub instance_name: ::std::option::Option<::std::string::String>,
}
impl GetInstanceInput {
    /// <p>The name of the instance.</p>
    pub fn instance_name(&self) -> ::std::option::Option<&str> {
        self.instance_name.as_deref()
    }
}
impl GetInstanceInput {
    /// Creates a new builder-style object to manufacture [`GetInstanceInput`](crate::operation::get_instance::GetInstanceInput).
    pub fn builder() -> crate::operation::get_instance::builders::GetInstanceInputBuilder {
        crate::operation::get_instance::builders::GetInstanceInputBuilder::default()
    }
}

/// A builder for [`GetInstanceInput`](crate::operation::get_instance::GetInstanceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetInstanceInputBuilder {
    pub(crate) instance_name: ::std::option::Option<::std::string::String>,
}
impl GetInstanceInputBuilder {
    /// <p>The name of the instance.</p>
    /// This field is required.
    pub fn instance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the instance.</p>
    pub fn set_instance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_name = input;
        self
    }
    /// <p>The name of the instance.</p>
    pub fn get_instance_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_name
    }
    /// Consumes the builder and constructs a [`GetInstanceInput`](crate::operation::get_instance::GetInstanceInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_instance::GetInstanceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_instance::GetInstanceInput {
            instance_name: self.instance_name,
        })
    }
}