aws_sdk_codecatalyst/operation/create_project/
_create_project_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateProjectInput {
6 pub space_name: ::std::option::Option<::std::string::String>,
8 pub display_name: ::std::option::Option<::std::string::String>,
10 pub description: ::std::option::Option<::std::string::String>,
12}
13impl CreateProjectInput {
14 pub fn space_name(&self) -> ::std::option::Option<&str> {
16 self.space_name.as_deref()
17 }
18 pub fn display_name(&self) -> ::std::option::Option<&str> {
20 self.display_name.as_deref()
21 }
22 pub fn description(&self) -> ::std::option::Option<&str> {
24 self.description.as_deref()
25 }
26}
27impl CreateProjectInput {
28 pub fn builder() -> crate::operation::create_project::builders::CreateProjectInputBuilder {
30 crate::operation::create_project::builders::CreateProjectInputBuilder::default()
31 }
32}
33
34#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct CreateProjectInputBuilder {
38 pub(crate) space_name: ::std::option::Option<::std::string::String>,
39 pub(crate) display_name: ::std::option::Option<::std::string::String>,
40 pub(crate) description: ::std::option::Option<::std::string::String>,
41}
42impl CreateProjectInputBuilder {
43 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 pub fn set_space_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.space_name = input;
52 self
53 }
54 pub fn get_space_name(&self) -> &::std::option::Option<::std::string::String> {
56 &self.space_name
57 }
58 pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61 self.display_name = ::std::option::Option::Some(input.into());
62 self
63 }
64 pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.display_name = input;
67 self
68 }
69 pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
71 &self.display_name
72 }
73 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80 self.description = input;
81 self
82 }
83 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
85 &self.description
86 }
87 pub fn build(
89 self,
90 ) -> ::std::result::Result<crate::operation::create_project::CreateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
91 ::std::result::Result::Ok(crate::operation::create_project::CreateProjectInput {
92 space_name: self.space_name,
93 display_name: self.display_name,
94 description: self.description,
95 })
96 }
97}