aws-sdk-iotdataplane 1.99.0

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

/// <p>The input for the GetThingShadow operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetThingShadowInput {
    /// <p>The name of the thing.</p>
    pub thing_name: ::std::option::Option<::std::string::String>,
    /// <p>The name of the shadow.</p>
    pub shadow_name: ::std::option::Option<::std::string::String>,
}
impl GetThingShadowInput {
    /// <p>The name of the thing.</p>
    pub fn thing_name(&self) -> ::std::option::Option<&str> {
        self.thing_name.as_deref()
    }
    /// <p>The name of the shadow.</p>
    pub fn shadow_name(&self) -> ::std::option::Option<&str> {
        self.shadow_name.as_deref()
    }
}
impl GetThingShadowInput {
    /// Creates a new builder-style object to manufacture [`GetThingShadowInput`](crate::operation::get_thing_shadow::GetThingShadowInput).
    pub fn builder() -> crate::operation::get_thing_shadow::builders::GetThingShadowInputBuilder {
        crate::operation::get_thing_shadow::builders::GetThingShadowInputBuilder::default()
    }
}

/// A builder for [`GetThingShadowInput`](crate::operation::get_thing_shadow::GetThingShadowInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetThingShadowInputBuilder {
    pub(crate) thing_name: ::std::option::Option<::std::string::String>,
    pub(crate) shadow_name: ::std::option::Option<::std::string::String>,
}
impl GetThingShadowInputBuilder {
    /// <p>The name of the thing.</p>
    /// This field is required.
    pub fn thing_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.thing_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the thing.</p>
    pub fn set_thing_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.thing_name = input;
        self
    }
    /// <p>The name of the thing.</p>
    pub fn get_thing_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.thing_name
    }
    /// <p>The name of the shadow.</p>
    pub fn shadow_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.shadow_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the shadow.</p>
    pub fn set_shadow_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.shadow_name = input;
        self
    }
    /// <p>The name of the shadow.</p>
    pub fn get_shadow_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.shadow_name
    }
    /// Consumes the builder and constructs a [`GetThingShadowInput`](crate::operation::get_thing_shadow::GetThingShadowInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_thing_shadow::GetThingShadowInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_thing_shadow::GetThingShadowInput {
            thing_name: self.thing_name,
            shadow_name: self.shadow_name,
        })
    }
}