aws_sdk_databrew/operation/update_project/
_update_project_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 UpdateProjectOutput {
6    /// <p>The date and time that the project was last modified.</p>
7    pub last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
8    /// <p>The name of the project that you updated.</p>
9    pub name: ::std::string::String,
10    _request_id: Option<String>,
11}
12impl UpdateProjectOutput {
13    /// <p>The date and time that the project was last modified.</p>
14    pub fn last_modified_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
15        self.last_modified_date.as_ref()
16    }
17    /// <p>The name of the project that you updated.</p>
18    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    /// Creates a new builder-style object to manufacture [`UpdateProjectOutput`](crate::operation::update_project::UpdateProjectOutput).
30    pub fn builder() -> crate::operation::update_project::builders::UpdateProjectOutputBuilder {
31        crate::operation::update_project::builders::UpdateProjectOutputBuilder::default()
32    }
33}
34
35/// A builder for [`UpdateProjectOutput`](crate::operation::update_project::UpdateProjectOutput).
36#[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    /// <p>The date and time that the project was last modified.</p>
45    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    /// <p>The date and time that the project was last modified.</p>
50    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    /// <p>The date and time that the project was last modified.</p>
55    pub fn get_last_modified_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
56        &self.last_modified_date
57    }
58    /// <p>The name of the project that you updated.</p>
59    /// This field is required.
60    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    /// <p>The name of the project that you updated.</p>
65    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.name = input;
67        self
68    }
69    /// <p>The name of the project that you updated.</p>
70    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    /// Consumes the builder and constructs a [`UpdateProjectOutput`](crate::operation::update_project::UpdateProjectOutput).
83    /// This method will fail if any of the following fields are not set:
84    /// - [`name`](crate::operation::update_project::builders::UpdateProjectOutputBuilder::name)
85    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}