aws_sdk_codecatalyst/operation/delete_space/
_delete_space_output.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 DeleteSpaceOutput {
6    /// <p>The name of the space.</p>
7    pub name: ::std::string::String,
8    /// <p>The friendly name of the space displayed to users of the space in Amazon CodeCatalyst.</p>
9    pub display_name: ::std::option::Option<::std::string::String>,
10    _request_id: Option<String>,
11}
12impl DeleteSpaceOutput {
13    /// <p>The name of the space.</p>
14    pub fn name(&self) -> &str {
15        use std::ops::Deref;
16        self.name.deref()
17    }
18    /// <p>The friendly name of the space displayed to users of the space in Amazon CodeCatalyst.</p>
19    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    /// Creates a new builder-style object to manufacture [`DeleteSpaceOutput`](crate::operation::delete_space::DeleteSpaceOutput).
30    pub fn builder() -> crate::operation::delete_space::builders::DeleteSpaceOutputBuilder {
31        crate::operation::delete_space::builders::DeleteSpaceOutputBuilder::default()
32    }
33}
34
35/// A builder for [`DeleteSpaceOutput`](crate::operation::delete_space::DeleteSpaceOutput).
36#[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    /// <p>The name of the space.</p>
45    /// This field is required.
46    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    /// <p>The name of the space.</p>
51    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.name = input;
53        self
54    }
55    /// <p>The name of the space.</p>
56    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
57        &self.name
58    }
59    /// <p>The friendly name of the space displayed to users of the space in Amazon CodeCatalyst.</p>
60    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    /// <p>The friendly name of the space displayed to users of the space in Amazon CodeCatalyst.</p>
65    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.display_name = input;
67        self
68    }
69    /// <p>The friendly name of the space displayed to users of the space in Amazon CodeCatalyst.</p>
70    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    /// Consumes the builder and constructs a [`DeleteSpaceOutput`](crate::operation::delete_space::DeleteSpaceOutput).
83    /// This method will fail if any of the following fields are not set:
84    /// - [`name`](crate::operation::delete_space::builders::DeleteSpaceOutputBuilder::name)
85    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}