aws_sdk_codecatalyst/operation/delete_space/
_delete_space_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteSpaceOutput {
6 pub name: ::std::string::String,
8 pub display_name: ::std::option::Option<::std::string::String>,
10 _request_id: Option<String>,
11}
12impl DeleteSpaceOutput {
13 pub fn name(&self) -> &str {
15 use std::ops::Deref;
16 self.name.deref()
17 }
18 pub fn display_name(&self) -> ::std::option::Option<&str> {
20 self.display_name.as_deref()
21 }
22}
23impl ::aws_types::request_id::RequestId for DeleteSpaceOutput {
24 fn request_id(&self) -> Option<&str> {
25 self._request_id.as_deref()
26 }
27}
28impl DeleteSpaceOutput {
29 pub fn builder() -> crate::operation::delete_space::builders::DeleteSpaceOutputBuilder {
31 crate::operation::delete_space::builders::DeleteSpaceOutputBuilder::default()
32 }
33}
34
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct DeleteSpaceOutputBuilder {
39 pub(crate) name: ::std::option::Option<::std::string::String>,
40 pub(crate) display_name: ::std::option::Option<::std::string::String>,
41 _request_id: Option<String>,
42}
43impl DeleteSpaceOutputBuilder {
44 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47 self.name = ::std::option::Option::Some(input.into());
48 self
49 }
50 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.name = input;
53 self
54 }
55 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
57 &self.name
58 }
59 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(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
74 self._request_id = Some(request_id.into());
75 self
76 }
77
78 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
79 self._request_id = request_id;
80 self
81 }
82 pub fn build(self) -> ::std::result::Result<crate::operation::delete_space::DeleteSpaceOutput, ::aws_smithy_types::error::operation::BuildError> {
86 ::std::result::Result::Ok(crate::operation::delete_space::DeleteSpaceOutput {
87 name: self.name.ok_or_else(|| {
88 ::aws_smithy_types::error::operation::BuildError::missing_field(
89 "name",
90 "name was not specified but it is required when building DeleteSpaceOutput",
91 )
92 })?,
93 display_name: self.display_name,
94 _request_id: self._request_id,
95 })
96 }
97}