aws_sdk_codecatalyst/operation/delete_project/
_delete_project_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 DeleteProjectOutput {
6    /// <p>The name of the space.</p>
7    pub space_name: ::std::string::String,
8    /// <p>The name of the project in the space.</p>
9    pub name: ::std::string::String,
10    /// <p>The friendly name displayed to users of the project in Amazon CodeCatalyst.</p>
11    pub display_name: ::std::option::Option<::std::string::String>,
12    _request_id: Option<String>,
13}
14impl DeleteProjectOutput {
15    /// <p>The name of the space.</p>
16    pub fn space_name(&self) -> &str {
17        use std::ops::Deref;
18        self.space_name.deref()
19    }
20    /// <p>The name of the project in the space.</p>
21    pub fn name(&self) -> &str {
22        use std::ops::Deref;
23        self.name.deref()
24    }
25    /// <p>The friendly name displayed to users of the project in Amazon CodeCatalyst.</p>
26    pub fn display_name(&self) -> ::std::option::Option<&str> {
27        self.display_name.as_deref()
28    }
29}
30impl ::aws_types::request_id::RequestId for DeleteProjectOutput {
31    fn request_id(&self) -> Option<&str> {
32        self._request_id.as_deref()
33    }
34}
35impl DeleteProjectOutput {
36    /// Creates a new builder-style object to manufacture [`DeleteProjectOutput`](crate::operation::delete_project::DeleteProjectOutput).
37    pub fn builder() -> crate::operation::delete_project::builders::DeleteProjectOutputBuilder {
38        crate::operation::delete_project::builders::DeleteProjectOutputBuilder::default()
39    }
40}
41
42/// A builder for [`DeleteProjectOutput`](crate::operation::delete_project::DeleteProjectOutput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct DeleteProjectOutputBuilder {
46    pub(crate) space_name: ::std::option::Option<::std::string::String>,
47    pub(crate) name: ::std::option::Option<::std::string::String>,
48    pub(crate) display_name: ::std::option::Option<::std::string::String>,
49    _request_id: Option<String>,
50}
51impl DeleteProjectOutputBuilder {
52    /// <p>The name of the space.</p>
53    /// This field is required.
54    pub fn space_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.space_name = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The name of the space.</p>
59    pub fn set_space_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.space_name = input;
61        self
62    }
63    /// <p>The name of the space.</p>
64    pub fn get_space_name(&self) -> &::std::option::Option<::std::string::String> {
65        &self.space_name
66    }
67    /// <p>The name of the project in the space.</p>
68    /// This field is required.
69    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70        self.name = ::std::option::Option::Some(input.into());
71        self
72    }
73    /// <p>The name of the project in the space.</p>
74    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75        self.name = input;
76        self
77    }
78    /// <p>The name of the project in the space.</p>
79    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
80        &self.name
81    }
82    /// <p>The friendly name displayed to users of the project in Amazon CodeCatalyst.</p>
83    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84        self.display_name = ::std::option::Option::Some(input.into());
85        self
86    }
87    /// <p>The friendly name displayed to users of the project in Amazon CodeCatalyst.</p>
88    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89        self.display_name = input;
90        self
91    }
92    /// <p>The friendly name displayed to users of the project in Amazon CodeCatalyst.</p>
93    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
94        &self.display_name
95    }
96    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
97        self._request_id = Some(request_id.into());
98        self
99    }
100
101    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
102        self._request_id = request_id;
103        self
104    }
105    /// Consumes the builder and constructs a [`DeleteProjectOutput`](crate::operation::delete_project::DeleteProjectOutput).
106    /// This method will fail if any of the following fields are not set:
107    /// - [`space_name`](crate::operation::delete_project::builders::DeleteProjectOutputBuilder::space_name)
108    /// - [`name`](crate::operation::delete_project::builders::DeleteProjectOutputBuilder::name)
109    pub fn build(
110        self,
111    ) -> ::std::result::Result<crate::operation::delete_project::DeleteProjectOutput, ::aws_smithy_types::error::operation::BuildError> {
112        ::std::result::Result::Ok(crate::operation::delete_project::DeleteProjectOutput {
113            space_name: self.space_name.ok_or_else(|| {
114                ::aws_smithy_types::error::operation::BuildError::missing_field(
115                    "space_name",
116                    "space_name was not specified but it is required when building DeleteProjectOutput",
117                )
118            })?,
119            name: self.name.ok_or_else(|| {
120                ::aws_smithy_types::error::operation::BuildError::missing_field(
121                    "name",
122                    "name was not specified but it is required when building DeleteProjectOutput",
123                )
124            })?,
125            display_name: self.display_name,
126            _request_id: self._request_id,
127        })
128    }
129}