aws_sdk_codecatalyst/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, ::std::fmt::Debug)]
5pub struct UpdateProjectInput {
6    /// <p>The name of the space.</p>
7    pub space_name: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the project.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The description of the project.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12}
13impl UpdateProjectInput {
14    /// <p>The name of the space.</p>
15    pub fn space_name(&self) -> ::std::option::Option<&str> {
16        self.space_name.as_deref()
17    }
18    /// <p>The name of the project.</p>
19    pub fn name(&self) -> ::std::option::Option<&str> {
20        self.name.as_deref()
21    }
22    /// <p>The description of the project.</p>
23    pub fn description(&self) -> ::std::option::Option<&str> {
24        self.description.as_deref()
25    }
26}
27impl UpdateProjectInput {
28    /// Creates a new builder-style object to manufacture [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
29    pub fn builder() -> crate::operation::update_project::builders::UpdateProjectInputBuilder {
30        crate::operation::update_project::builders::UpdateProjectInputBuilder::default()
31    }
32}
33
34/// A builder for [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateProjectInputBuilder {
38    pub(crate) space_name: ::std::option::Option<::std::string::String>,
39    pub(crate) name: ::std::option::Option<::std::string::String>,
40    pub(crate) description: ::std::option::Option<::std::string::String>,
41}
42impl UpdateProjectInputBuilder {
43    /// <p>The name of the space.</p>
44    /// This field is required.
45    pub fn space_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.space_name = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The name of the space.</p>
50    pub fn set_space_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.space_name = input;
52        self
53    }
54    /// <p>The name of the space.</p>
55    pub fn get_space_name(&self) -> &::std::option::Option<::std::string::String> {
56        &self.space_name
57    }
58    /// <p>The name of the project.</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.</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.</p>
70    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
71        &self.name
72    }
73    /// <p>The description of the project.</p>
74    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.description = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The description of the project.</p>
79    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.description = input;
81        self
82    }
83    /// <p>The description of the project.</p>
84    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
85        &self.description
86    }
87    /// Consumes the builder and constructs a [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<crate::operation::update_project::UpdateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
91        ::std::result::Result::Ok(crate::operation::update_project::UpdateProjectInput {
92            space_name: self.space_name,
93            name: self.name,
94            description: self.description,
95        })
96    }
97}