aws_sdk_codecatalyst/operation/get_space/
_get_space_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetSpaceOutput {
6 pub name: ::std::string::String,
8 pub region_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 GetSpaceOutput {
17 pub fn name(&self) -> &str {
19 use std::ops::Deref;
20 self.name.deref()
21 }
22 pub fn region_name(&self) -> &str {
24 use std::ops::Deref;
25 self.region_name.deref()
26 }
27 pub fn display_name(&self) -> ::std::option::Option<&str> {
29 self.display_name.as_deref()
30 }
31 pub fn description(&self) -> ::std::option::Option<&str> {
33 self.description.as_deref()
34 }
35}
36impl ::aws_types::request_id::RequestId for GetSpaceOutput {
37 fn request_id(&self) -> Option<&str> {
38 self._request_id.as_deref()
39 }
40}
41impl GetSpaceOutput {
42 pub fn builder() -> crate::operation::get_space::builders::GetSpaceOutputBuilder {
44 crate::operation::get_space::builders::GetSpaceOutputBuilder::default()
45 }
46}
47
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct GetSpaceOutputBuilder {
52 pub(crate) name: ::std::option::Option<::std::string::String>,
53 pub(crate) region_name: ::std::option::Option<::std::string::String>,
54 pub(crate) display_name: ::std::option::Option<::std::string::String>,
55 pub(crate) description: ::std::option::Option<::std::string::String>,
56 _request_id: Option<String>,
57}
58impl GetSpaceOutputBuilder {
59 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.name = ::std::option::Option::Some(input.into());
63 self
64 }
65 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.name = input;
68 self
69 }
70 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
72 &self.name
73 }
74 pub fn region_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
77 self.region_name = ::std::option::Option::Some(input.into());
78 self
79 }
80 pub fn set_region_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
82 self.region_name = input;
83 self
84 }
85 pub fn get_region_name(&self) -> &::std::option::Option<::std::string::String> {
87 &self.region_name
88 }
89 pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91 self.display_name = ::std::option::Option::Some(input.into());
92 self
93 }
94 pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96 self.display_name = input;
97 self
98 }
99 pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
101 &self.display_name
102 }
103 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105 self.description = ::std::option::Option::Some(input.into());
106 self
107 }
108 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110 self.description = input;
111 self
112 }
113 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
115 &self.description
116 }
117 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
118 self._request_id = Some(request_id.into());
119 self
120 }
121
122 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
123 self._request_id = request_id;
124 self
125 }
126 pub fn build(self) -> ::std::result::Result<crate::operation::get_space::GetSpaceOutput, ::aws_smithy_types::error::operation::BuildError> {
131 ::std::result::Result::Ok(crate::operation::get_space::GetSpaceOutput {
132 name: self.name.ok_or_else(|| {
133 ::aws_smithy_types::error::operation::BuildError::missing_field(
134 "name",
135 "name was not specified but it is required when building GetSpaceOutput",
136 )
137 })?,
138 region_name: self.region_name.ok_or_else(|| {
139 ::aws_smithy_types::error::operation::BuildError::missing_field(
140 "region_name",
141 "region_name was not specified but it is required when building GetSpaceOutput",
142 )
143 })?,
144 display_name: self.display_name,
145 description: self.description,
146 _request_id: self._request_id,
147 })
148 }
149}