aws_sdk_codecatalyst/operation/get_project/
_get_project_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetProjectOutput {
6 pub space_name: ::std::option::Option<::std::string::String>,
8 pub name: ::std::string::String,
10 pub display_name: ::std::option::Option<::std::string::String>,
12 pub description: ::std::option::Option<::std::string::String>,
14 _request_id: Option<String>,
15}
16impl GetProjectOutput {
17 pub fn space_name(&self) -> ::std::option::Option<&str> {
19 self.space_name.as_deref()
20 }
21 pub fn name(&self) -> &str {
23 use std::ops::Deref;
24 self.name.deref()
25 }
26 pub fn display_name(&self) -> ::std::option::Option<&str> {
28 self.display_name.as_deref()
29 }
30 pub fn description(&self) -> ::std::option::Option<&str> {
32 self.description.as_deref()
33 }
34}
35impl ::aws_types::request_id::RequestId for GetProjectOutput {
36 fn request_id(&self) -> Option<&str> {
37 self._request_id.as_deref()
38 }
39}
40impl GetProjectOutput {
41 pub fn builder() -> crate::operation::get_project::builders::GetProjectOutputBuilder {
43 crate::operation::get_project::builders::GetProjectOutputBuilder::default()
44 }
45}
46
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
49#[non_exhaustive]
50pub struct GetProjectOutputBuilder {
51 pub(crate) space_name: ::std::option::Option<::std::string::String>,
52 pub(crate) name: ::std::option::Option<::std::string::String>,
53 pub(crate) display_name: ::std::option::Option<::std::string::String>,
54 pub(crate) description: ::std::option::Option<::std::string::String>,
55 _request_id: Option<String>,
56}
57impl GetProjectOutputBuilder {
58 pub fn space_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60 self.space_name = ::std::option::Option::Some(input.into());
61 self
62 }
63 pub fn set_space_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.space_name = input;
66 self
67 }
68 pub fn get_space_name(&self) -> &::std::option::Option<::std::string::String> {
70 &self.space_name
71 }
72 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75 self.name = ::std::option::Option::Some(input.into());
76 self
77 }
78 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80 self.name = input;
81 self
82 }
83 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
85 &self.name
86 }
87 pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89 self.display_name = ::std::option::Option::Some(input.into());
90 self
91 }
92 pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94 self.display_name = input;
95 self
96 }
97 pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
99 &self.display_name
100 }
101 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103 self.description = ::std::option::Option::Some(input.into());
104 self
105 }
106 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108 self.description = input;
109 self
110 }
111 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
113 &self.description
114 }
115 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
116 self._request_id = Some(request_id.into());
117 self
118 }
119
120 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
121 self._request_id = request_id;
122 self
123 }
124 pub fn build(self) -> ::std::result::Result<crate::operation::get_project::GetProjectOutput, ::aws_smithy_types::error::operation::BuildError> {
128 ::std::result::Result::Ok(crate::operation::get_project::GetProjectOutput {
129 space_name: self.space_name,
130 name: self.name.ok_or_else(|| {
131 ::aws_smithy_types::error::operation::BuildError::missing_field(
132 "name",
133 "name was not specified but it is required when building GetProjectOutput",
134 )
135 })?,
136 display_name: self.display_name,
137 description: self.description,
138 _request_id: self._request_id,
139 })
140 }
141}