aws_sdk_databrew/operation/update_project/
_update_project_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateProjectOutput {
6 pub last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
8 pub name: ::std::string::String,
10 _request_id: Option<String>,
11}
12impl UpdateProjectOutput {
13 pub fn last_modified_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
15 self.last_modified_date.as_ref()
16 }
17 pub fn name(&self) -> &str {
19 use std::ops::Deref;
20 self.name.deref()
21 }
22}
23impl ::aws_types::request_id::RequestId for UpdateProjectOutput {
24 fn request_id(&self) -> Option<&str> {
25 self._request_id.as_deref()
26 }
27}
28impl UpdateProjectOutput {
29 pub fn builder() -> crate::operation::update_project::builders::UpdateProjectOutputBuilder {
31 crate::operation::update_project::builders::UpdateProjectOutputBuilder::default()
32 }
33}
34
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct UpdateProjectOutputBuilder {
39 pub(crate) last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
40 pub(crate) name: ::std::option::Option<::std::string::String>,
41 _request_id: Option<String>,
42}
43impl UpdateProjectOutputBuilder {
44 pub fn last_modified_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
46 self.last_modified_date = ::std::option::Option::Some(input);
47 self
48 }
49 pub fn set_last_modified_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
51 self.last_modified_date = input;
52 self
53 }
54 pub fn get_last_modified_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
56 &self.last_modified_date
57 }
58 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61 self.name = ::std::option::Option::Some(input.into());
62 self
63 }
64 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.name = input;
67 self
68 }
69 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
71 &self.name
72 }
73 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
74 self._request_id = Some(request_id.into());
75 self
76 }
77
78 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
79 self._request_id = request_id;
80 self
81 }
82 pub fn build(
86 self,
87 ) -> ::std::result::Result<crate::operation::update_project::UpdateProjectOutput, ::aws_smithy_types::error::operation::BuildError> {
88 ::std::result::Result::Ok(crate::operation::update_project::UpdateProjectOutput {
89 last_modified_date: self.last_modified_date,
90 name: self.name.ok_or_else(|| {
91 ::aws_smithy_types::error::operation::BuildError::missing_field(
92 "name",
93 "name was not specified but it is required when building UpdateProjectOutput",
94 )
95 })?,
96 _request_id: self._request_id,
97 })
98 }
99}