aws_sdk_codestar/operation/update_project/
_update_project_input.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)]
5pub struct UpdateProjectInput {
6    /// <p>The ID of the project you want to update.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the project you want to update.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The description of the project, if any.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12}
13impl UpdateProjectInput {
14    /// <p>The ID of the project you want to update.</p>
15    pub fn id(&self) -> ::std::option::Option<&str> {
16        self.id.as_deref()
17    }
18    /// <p>The name of the project you want to update.</p>
19    pub fn name(&self) -> ::std::option::Option<&str> {
20        self.name.as_deref()
21    }
22    /// <p>The description of the project, if any.</p>
23    pub fn description(&self) -> ::std::option::Option<&str> {
24        self.description.as_deref()
25    }
26}
27impl ::std::fmt::Debug for UpdateProjectInput {
28    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29        let mut formatter = f.debug_struct("UpdateProjectInput");
30        formatter.field("id", &self.id);
31        formatter.field("name", &"*** Sensitive Data Redacted ***");
32        formatter.field("description", &"*** Sensitive Data Redacted ***");
33        formatter.finish()
34    }
35}
36impl UpdateProjectInput {
37    /// Creates a new builder-style object to manufacture [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
38    pub fn builder() -> crate::operation::update_project::builders::UpdateProjectInputBuilder {
39        crate::operation::update_project::builders::UpdateProjectInputBuilder::default()
40    }
41}
42
43/// A builder for [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
45#[non_exhaustive]
46pub struct UpdateProjectInputBuilder {
47    pub(crate) id: ::std::option::Option<::std::string::String>,
48    pub(crate) name: ::std::option::Option<::std::string::String>,
49    pub(crate) description: ::std::option::Option<::std::string::String>,
50}
51impl UpdateProjectInputBuilder {
52    /// <p>The ID of the project you want to update.</p>
53    /// This field is required.
54    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.id = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The ID of the project you want to update.</p>
59    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.id = input;
61        self
62    }
63    /// <p>The ID of the project you want to update.</p>
64    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
65        &self.id
66    }
67    /// <p>The name of the project you want to update.</p>
68    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.name = ::std::option::Option::Some(input.into());
70        self
71    }
72    /// <p>The name of the project you want to update.</p>
73    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.name = input;
75        self
76    }
77    /// <p>The name of the project you want to update.</p>
78    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
79        &self.name
80    }
81    /// <p>The description of the project, if any.</p>
82    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.description = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The description of the project, if any.</p>
87    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.description = input;
89        self
90    }
91    /// <p>The description of the project, if any.</p>
92    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
93        &self.description
94    }
95    /// Consumes the builder and constructs a [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
96    pub fn build(
97        self,
98    ) -> ::std::result::Result<crate::operation::update_project::UpdateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
99        ::std::result::Result::Ok(crate::operation::update_project::UpdateProjectInput {
100            id: self.id,
101            name: self.name,
102            description: self.description,
103        })
104    }
105}
106impl ::std::fmt::Debug for UpdateProjectInputBuilder {
107    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
108        let mut formatter = f.debug_struct("UpdateProjectInputBuilder");
109        formatter.field("id", &self.id);
110        formatter.field("name", &"*** Sensitive Data Redacted ***");
111        formatter.field("description", &"*** Sensitive Data Redacted ***");
112        formatter.finish()
113    }
114}