aws_sdk_codestar/operation/create_project/
_create_project_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateProjectOutput {
6 pub id: ::std::string::String,
8 pub arn: ::std::string::String,
10 pub client_request_token: ::std::option::Option<::std::string::String>,
12 pub project_template_id: ::std::option::Option<::std::string::String>,
14 _request_id: Option<String>,
15}
16impl CreateProjectOutput {
17 pub fn id(&self) -> &str {
19 use std::ops::Deref;
20 self.id.deref()
21 }
22 pub fn arn(&self) -> &str {
24 use std::ops::Deref;
25 self.arn.deref()
26 }
27 pub fn client_request_token(&self) -> ::std::option::Option<&str> {
29 self.client_request_token.as_deref()
30 }
31 pub fn project_template_id(&self) -> ::std::option::Option<&str> {
33 self.project_template_id.as_deref()
34 }
35}
36impl ::aws_types::request_id::RequestId for CreateProjectOutput {
37 fn request_id(&self) -> Option<&str> {
38 self._request_id.as_deref()
39 }
40}
41impl CreateProjectOutput {
42 pub fn builder() -> crate::operation::create_project::builders::CreateProjectOutputBuilder {
44 crate::operation::create_project::builders::CreateProjectOutputBuilder::default()
45 }
46}
47
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct CreateProjectOutputBuilder {
52 pub(crate) id: ::std::option::Option<::std::string::String>,
53 pub(crate) arn: ::std::option::Option<::std::string::String>,
54 pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
55 pub(crate) project_template_id: ::std::option::Option<::std::string::String>,
56 _request_id: Option<String>,
57}
58impl CreateProjectOutputBuilder {
59 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.id = ::std::option::Option::Some(input.into());
63 self
64 }
65 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.id = input;
68 self
69 }
70 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
72 &self.id
73 }
74 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
77 self.arn = ::std::option::Option::Some(input.into());
78 self
79 }
80 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
82 self.arn = input;
83 self
84 }
85 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
87 &self.arn
88 }
89 pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91 self.client_request_token = ::std::option::Option::Some(input.into());
92 self
93 }
94 pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96 self.client_request_token = input;
97 self
98 }
99 pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
101 &self.client_request_token
102 }
103 pub fn project_template_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105 self.project_template_id = ::std::option::Option::Some(input.into());
106 self
107 }
108 pub fn set_project_template_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110 self.project_template_id = input;
111 self
112 }
113 pub fn get_project_template_id(&self) -> &::std::option::Option<::std::string::String> {
115 &self.project_template_id
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(
131 self,
132 ) -> ::std::result::Result<crate::operation::create_project::CreateProjectOutput, ::aws_smithy_types::error::operation::BuildError> {
133 ::std::result::Result::Ok(crate::operation::create_project::CreateProjectOutput {
134 id: self.id.ok_or_else(|| {
135 ::aws_smithy_types::error::operation::BuildError::missing_field(
136 "id",
137 "id was not specified but it is required when building CreateProjectOutput",
138 )
139 })?,
140 arn: self.arn.ok_or_else(|| {
141 ::aws_smithy_types::error::operation::BuildError::missing_field(
142 "arn",
143 "arn was not specified but it is required when building CreateProjectOutput",
144 )
145 })?,
146 client_request_token: self.client_request_token,
147 project_template_id: self.project_template_id,
148 _request_id: self._request_id,
149 })
150 }
151}