aws_sdk_iottwinmaker/operation/update_scene/
_update_scene_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateSceneOutput {
6    /// <p>The date and time when the scene was last updated.</p>
7    pub update_date_time: ::aws_smithy_types::DateTime,
8    _request_id: Option<String>,
9}
10impl UpdateSceneOutput {
11    /// <p>The date and time when the scene was last updated.</p>
12    pub fn update_date_time(&self) -> &::aws_smithy_types::DateTime {
13        &self.update_date_time
14    }
15}
16impl ::aws_types::request_id::RequestId for UpdateSceneOutput {
17    fn request_id(&self) -> Option<&str> {
18        self._request_id.as_deref()
19    }
20}
21impl UpdateSceneOutput {
22    /// Creates a new builder-style object to manufacture [`UpdateSceneOutput`](crate::operation::update_scene::UpdateSceneOutput).
23    pub fn builder() -> crate::operation::update_scene::builders::UpdateSceneOutputBuilder {
24        crate::operation::update_scene::builders::UpdateSceneOutputBuilder::default()
25    }
26}
27
28/// A builder for [`UpdateSceneOutput`](crate::operation::update_scene::UpdateSceneOutput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct UpdateSceneOutputBuilder {
32    pub(crate) update_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
33    _request_id: Option<String>,
34}
35impl UpdateSceneOutputBuilder {
36    /// <p>The date and time when the scene was last updated.</p>
37    /// This field is required.
38    pub fn update_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
39        self.update_date_time = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>The date and time when the scene was last updated.</p>
43    pub fn set_update_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
44        self.update_date_time = input;
45        self
46    }
47    /// <p>The date and time when the scene was last updated.</p>
48    pub fn get_update_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
49        &self.update_date_time
50    }
51    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
52        self._request_id = Some(request_id.into());
53        self
54    }
55
56    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
57        self._request_id = request_id;
58        self
59    }
60    /// Consumes the builder and constructs a [`UpdateSceneOutput`](crate::operation::update_scene::UpdateSceneOutput).
61    /// This method will fail if any of the following fields are not set:
62    /// - [`update_date_time`](crate::operation::update_scene::builders::UpdateSceneOutputBuilder::update_date_time)
63    pub fn build(self) -> ::std::result::Result<crate::operation::update_scene::UpdateSceneOutput, ::aws_smithy_types::error::operation::BuildError> {
64        ::std::result::Result::Ok(crate::operation::update_scene::UpdateSceneOutput {
65            update_date_time: self.update_date_time.ok_or_else(|| {
66                ::aws_smithy_types::error::operation::BuildError::missing_field(
67                    "update_date_time",
68                    "update_date_time was not specified but it is required when building UpdateSceneOutput",
69                )
70            })?,
71            _request_id: self._request_id,
72        })
73    }
74}