aws_sdk_iottwinmaker/operation/create_scene/
_create_scene_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateSceneOutput {
6 pub arn: ::std::string::String,
8 pub creation_date_time: ::aws_smithy_types::DateTime,
10 _request_id: Option<String>,
11}
12impl CreateSceneOutput {
13 pub fn arn(&self) -> &str {
15 use std::ops::Deref;
16 self.arn.deref()
17 }
18 pub fn creation_date_time(&self) -> &::aws_smithy_types::DateTime {
20 &self.creation_date_time
21 }
22}
23impl ::aws_types::request_id::RequestId for CreateSceneOutput {
24 fn request_id(&self) -> Option<&str> {
25 self._request_id.as_deref()
26 }
27}
28impl CreateSceneOutput {
29 pub fn builder() -> crate::operation::create_scene::builders::CreateSceneOutputBuilder {
31 crate::operation::create_scene::builders::CreateSceneOutputBuilder::default()
32 }
33}
34
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct CreateSceneOutputBuilder {
39 pub(crate) arn: ::std::option::Option<::std::string::String>,
40 pub(crate) creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
41 _request_id: Option<String>,
42}
43impl CreateSceneOutputBuilder {
44 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47 self.arn = ::std::option::Option::Some(input.into());
48 self
49 }
50 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.arn = input;
53 self
54 }
55 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
57 &self.arn
58 }
59 pub fn creation_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
62 self.creation_date_time = ::std::option::Option::Some(input);
63 self
64 }
65 pub fn set_creation_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
67 self.creation_date_time = input;
68 self
69 }
70 pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
72 &self.creation_date_time
73 }
74 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
75 self._request_id = Some(request_id.into());
76 self
77 }
78
79 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
80 self._request_id = request_id;
81 self
82 }
83 pub fn build(self) -> ::std::result::Result<crate::operation::create_scene::CreateSceneOutput, ::aws_smithy_types::error::operation::BuildError> {
88 ::std::result::Result::Ok(crate::operation::create_scene::CreateSceneOutput {
89 arn: self.arn.ok_or_else(|| {
90 ::aws_smithy_types::error::operation::BuildError::missing_field(
91 "arn",
92 "arn was not specified but it is required when building CreateSceneOutput",
93 )
94 })?,
95 creation_date_time: self.creation_date_time.ok_or_else(|| {
96 ::aws_smithy_types::error::operation::BuildError::missing_field(
97 "creation_date_time",
98 "creation_date_time was not specified but it is required when building CreateSceneOutput",
99 )
100 })?,
101 _request_id: self._request_id,
102 })
103 }
104}