aws_sdk_codecatalyst/operation/delete_project/
_delete_project_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteProjectOutput {
6 pub space_name: ::std::string::String,
8 pub name: ::std::string::String,
10 pub display_name: ::std::option::Option<::std::string::String>,
12 _request_id: Option<String>,
13}
14impl DeleteProjectOutput {
15 pub fn space_name(&self) -> &str {
17 use std::ops::Deref;
18 self.space_name.deref()
19 }
20 pub fn name(&self) -> &str {
22 use std::ops::Deref;
23 self.name.deref()
24 }
25 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 pub fn builder() -> crate::operation::delete_project::builders::DeleteProjectOutputBuilder {
38 crate::operation::delete_project::builders::DeleteProjectOutputBuilder::default()
39 }
40}
41
42#[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 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 pub fn set_space_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60 self.space_name = input;
61 self
62 }
63 pub fn get_space_name(&self) -> &::std::option::Option<::std::string::String> {
65 &self.space_name
66 }
67 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75 self.name = input;
76 self
77 }
78 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
80 &self.name
81 }
82 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 pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89 self.display_name = input;
90 self
91 }
92 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 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}