aws_sdk_iot/operation/create_thing/
_create_thing_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateThingOutput {
7 pub thing_name: ::std::option::Option<::std::string::String>,
9 pub thing_arn: ::std::option::Option<::std::string::String>,
11 pub thing_id: ::std::option::Option<::std::string::String>,
13 _request_id: Option<String>,
14}
15impl CreateThingOutput {
16 pub fn thing_name(&self) -> ::std::option::Option<&str> {
18 self.thing_name.as_deref()
19 }
20 pub fn thing_arn(&self) -> ::std::option::Option<&str> {
22 self.thing_arn.as_deref()
23 }
24 pub fn thing_id(&self) -> ::std::option::Option<&str> {
26 self.thing_id.as_deref()
27 }
28}
29impl ::aws_types::request_id::RequestId for CreateThingOutput {
30 fn request_id(&self) -> Option<&str> {
31 self._request_id.as_deref()
32 }
33}
34impl CreateThingOutput {
35 pub fn builder() -> crate::operation::create_thing::builders::CreateThingOutputBuilder {
37 crate::operation::create_thing::builders::CreateThingOutputBuilder::default()
38 }
39}
40
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct CreateThingOutputBuilder {
45 pub(crate) thing_name: ::std::option::Option<::std::string::String>,
46 pub(crate) thing_arn: ::std::option::Option<::std::string::String>,
47 pub(crate) thing_id: ::std::option::Option<::std::string::String>,
48 _request_id: Option<String>,
49}
50impl CreateThingOutputBuilder {
51 pub fn thing_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.thing_name = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_thing_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.thing_name = input;
59 self
60 }
61 pub fn get_thing_name(&self) -> &::std::option::Option<::std::string::String> {
63 &self.thing_name
64 }
65 pub fn thing_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67 self.thing_arn = ::std::option::Option::Some(input.into());
68 self
69 }
70 pub fn set_thing_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.thing_arn = input;
73 self
74 }
75 pub fn get_thing_arn(&self) -> &::std::option::Option<::std::string::String> {
77 &self.thing_arn
78 }
79 pub fn thing_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.thing_id = ::std::option::Option::Some(input.into());
82 self
83 }
84 pub fn set_thing_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.thing_id = input;
87 self
88 }
89 pub fn get_thing_id(&self) -> &::std::option::Option<::std::string::String> {
91 &self.thing_id
92 }
93 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
94 self._request_id = Some(request_id.into());
95 self
96 }
97
98 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
99 self._request_id = request_id;
100 self
101 }
102 pub fn build(self) -> crate::operation::create_thing::CreateThingOutput {
104 crate::operation::create_thing::CreateThingOutput {
105 thing_name: self.thing_name,
106 thing_arn: self.thing_arn,
107 thing_id: self.thing_id,
108 _request_id: self._request_id,
109 }
110 }
111}