aws_sdk_cloudextensions/operation/get_profile/
_get_profile_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetProfileOutput {
7 pub id: ::std::string::String,
9 pub name: ::std::string::String,
11 pub arn: ::std::string::String,
13 pub entry_count: i32,
15 pub created_at: ::aws_smithy_types::DateTime,
17 pub updated_at: ::aws_smithy_types::DateTime,
19 pub description: ::std::option::Option<::std::string::String>,
21 pub extension_defaults: ::std::option::Option<crate::types::ExtensionDefaults>,
23 _request_id: Option<String>,
24}
25impl GetProfileOutput {
26 pub fn id(&self) -> &str {
28 use std::ops::Deref;
29 self.id.deref()
30 }
31 pub fn name(&self) -> &str {
33 use std::ops::Deref;
34 self.name.deref()
35 }
36 pub fn arn(&self) -> &str {
38 use std::ops::Deref;
39 self.arn.deref()
40 }
41 pub fn entry_count(&self) -> i32 {
43 self.entry_count
44 }
45 pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
47 &self.created_at
48 }
49 pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
51 &self.updated_at
52 }
53 pub fn description(&self) -> ::std::option::Option<&str> {
55 self.description.as_deref()
56 }
57 pub fn extension_defaults(&self) -> ::std::option::Option<&crate::types::ExtensionDefaults> {
59 self.extension_defaults.as_ref()
60 }
61}
62impl ::aws_types::request_id::RequestId for GetProfileOutput {
63 fn request_id(&self) -> Option<&str> {
64 self._request_id.as_deref()
65 }
66}
67impl GetProfileOutput {
68 pub fn builder() -> crate::operation::get_profile::builders::GetProfileOutputBuilder {
70 crate::operation::get_profile::builders::GetProfileOutputBuilder::default()
71 }
72}
73
74#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
76#[non_exhaustive]
77pub struct GetProfileOutputBuilder {
78 pub(crate) id: ::std::option::Option<::std::string::String>,
79 pub(crate) name: ::std::option::Option<::std::string::String>,
80 pub(crate) arn: ::std::option::Option<::std::string::String>,
81 pub(crate) entry_count: ::std::option::Option<i32>,
82 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
83 pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
84 pub(crate) description: ::std::option::Option<::std::string::String>,
85 pub(crate) extension_defaults: ::std::option::Option<crate::types::ExtensionDefaults>,
86 _request_id: Option<String>,
87}
88impl GetProfileOutputBuilder {
89 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
92 self.id = ::std::option::Option::Some(input.into());
93 self
94 }
95 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
97 self.id = input;
98 self
99 }
100 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
102 &self.id
103 }
104 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107 self.name = ::std::option::Option::Some(input.into());
108 self
109 }
110 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112 self.name = input;
113 self
114 }
115 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
117 &self.name
118 }
119 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122 self.arn = ::std::option::Option::Some(input.into());
123 self
124 }
125 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.arn = input;
128 self
129 }
130 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
132 &self.arn
133 }
134 pub fn entry_count(mut self, input: i32) -> Self {
137 self.entry_count = ::std::option::Option::Some(input);
138 self
139 }
140 pub fn set_entry_count(mut self, input: ::std::option::Option<i32>) -> Self {
142 self.entry_count = input;
143 self
144 }
145 pub fn get_entry_count(&self) -> &::std::option::Option<i32> {
147 &self.entry_count
148 }
149 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
152 self.created_at = ::std::option::Option::Some(input);
153 self
154 }
155 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
157 self.created_at = input;
158 self
159 }
160 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
162 &self.created_at
163 }
164 pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
167 self.updated_at = ::std::option::Option::Some(input);
168 self
169 }
170 pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
172 self.updated_at = input;
173 self
174 }
175 pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
177 &self.updated_at
178 }
179 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
181 self.description = ::std::option::Option::Some(input.into());
182 self
183 }
184 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186 self.description = input;
187 self
188 }
189 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
191 &self.description
192 }
193 pub fn extension_defaults(mut self, input: crate::types::ExtensionDefaults) -> Self {
195 self.extension_defaults = ::std::option::Option::Some(input);
196 self
197 }
198 pub fn set_extension_defaults(mut self, input: ::std::option::Option<crate::types::ExtensionDefaults>) -> Self {
200 self.extension_defaults = input;
201 self
202 }
203 pub fn get_extension_defaults(&self) -> &::std::option::Option<crate::types::ExtensionDefaults> {
205 &self.extension_defaults
206 }
207 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
208 self._request_id = Some(request_id.into());
209 self
210 }
211
212 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
213 self._request_id = request_id;
214 self
215 }
216 pub fn build(self) -> ::std::result::Result<crate::operation::get_profile::GetProfileOutput, ::aws_smithy_types::error::operation::BuildError> {
225 ::std::result::Result::Ok(crate::operation::get_profile::GetProfileOutput {
226 id: self.id.ok_or_else(|| {
227 ::aws_smithy_types::error::operation::BuildError::missing_field(
228 "id",
229 "id was not specified but it is required when building GetProfileOutput",
230 )
231 })?,
232 name: self.name.ok_or_else(|| {
233 ::aws_smithy_types::error::operation::BuildError::missing_field(
234 "name",
235 "name was not specified but it is required when building GetProfileOutput",
236 )
237 })?,
238 arn: self.arn.ok_or_else(|| {
239 ::aws_smithy_types::error::operation::BuildError::missing_field(
240 "arn",
241 "arn was not specified but it is required when building GetProfileOutput",
242 )
243 })?,
244 entry_count: self.entry_count.ok_or_else(|| {
245 ::aws_smithy_types::error::operation::BuildError::missing_field(
246 "entry_count",
247 "entry_count was not specified but it is required when building GetProfileOutput",
248 )
249 })?,
250 created_at: self.created_at.ok_or_else(|| {
251 ::aws_smithy_types::error::operation::BuildError::missing_field(
252 "created_at",
253 "created_at was not specified but it is required when building GetProfileOutput",
254 )
255 })?,
256 updated_at: self.updated_at.ok_or_else(|| {
257 ::aws_smithy_types::error::operation::BuildError::missing_field(
258 "updated_at",
259 "updated_at was not specified but it is required when building GetProfileOutput",
260 )
261 })?,
262 description: self.description,
263 extension_defaults: self.extension_defaults,
264 _request_id: self._request_id,
265 })
266 }
267}