aws_sdk_connectcases/operation/get_layout/
_get_layout_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetLayoutOutput {
6 pub layout_id: ::std::string::String,
8 pub layout_arn: ::std::string::String,
10 pub name: ::std::string::String,
12 pub content: ::std::option::Option<crate::types::LayoutContent>,
14 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::option::Option<::std::string::String>>>,
16 pub deleted: bool,
18 pub created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
20 pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
22 _request_id: Option<String>,
23}
24impl GetLayoutOutput {
25 pub fn layout_id(&self) -> &str {
27 use std::ops::Deref;
28 self.layout_id.deref()
29 }
30 pub fn layout_arn(&self) -> &str {
32 use std::ops::Deref;
33 self.layout_arn.deref()
34 }
35 pub fn name(&self) -> &str {
37 use std::ops::Deref;
38 self.name.deref()
39 }
40 pub fn content(&self) -> ::std::option::Option<&crate::types::LayoutContent> {
42 self.content.as_ref()
43 }
44 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::option::Option<::std::string::String>>> {
46 self.tags.as_ref()
47 }
48 pub fn deleted(&self) -> bool {
50 self.deleted
51 }
52 pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
54 self.created_time.as_ref()
55 }
56 pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
58 self.last_modified_time.as_ref()
59 }
60}
61impl ::aws_types::request_id::RequestId for GetLayoutOutput {
62 fn request_id(&self) -> Option<&str> {
63 self._request_id.as_deref()
64 }
65}
66impl GetLayoutOutput {
67 pub fn builder() -> crate::operation::get_layout::builders::GetLayoutOutputBuilder {
69 crate::operation::get_layout::builders::GetLayoutOutputBuilder::default()
70 }
71}
72
73#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
75#[non_exhaustive]
76pub struct GetLayoutOutputBuilder {
77 pub(crate) layout_id: ::std::option::Option<::std::string::String>,
78 pub(crate) layout_arn: ::std::option::Option<::std::string::String>,
79 pub(crate) name: ::std::option::Option<::std::string::String>,
80 pub(crate) content: ::std::option::Option<crate::types::LayoutContent>,
81 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::option::Option<::std::string::String>>>,
82 pub(crate) deleted: ::std::option::Option<bool>,
83 pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
84 pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
85 _request_id: Option<String>,
86}
87impl GetLayoutOutputBuilder {
88 pub fn layout_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91 self.layout_id = ::std::option::Option::Some(input.into());
92 self
93 }
94 pub fn set_layout_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96 self.layout_id = input;
97 self
98 }
99 pub fn get_layout_id(&self) -> &::std::option::Option<::std::string::String> {
101 &self.layout_id
102 }
103 pub fn layout_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
106 self.layout_arn = ::std::option::Option::Some(input.into());
107 self
108 }
109 pub fn set_layout_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
111 self.layout_arn = input;
112 self
113 }
114 pub fn get_layout_arn(&self) -> &::std::option::Option<::std::string::String> {
116 &self.layout_arn
117 }
118 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121 self.name = ::std::option::Option::Some(input.into());
122 self
123 }
124 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126 self.name = input;
127 self
128 }
129 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
131 &self.name
132 }
133 pub fn content(mut self, input: crate::types::LayoutContent) -> Self {
136 self.content = ::std::option::Option::Some(input);
137 self
138 }
139 pub fn set_content(mut self, input: ::std::option::Option<crate::types::LayoutContent>) -> Self {
141 self.content = input;
142 self
143 }
144 pub fn get_content(&self) -> &::std::option::Option<crate::types::LayoutContent> {
146 &self.content
147 }
148 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::option::Option<::std::string::String>) -> Self {
154 let mut hash_map = self.tags.unwrap_or_default();
155 hash_map.insert(k.into(), v);
156 self.tags = ::std::option::Option::Some(hash_map);
157 self
158 }
159 pub fn set_tags(
161 mut self,
162 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::option::Option<::std::string::String>>>,
163 ) -> Self {
164 self.tags = input;
165 self
166 }
167 pub fn get_tags(
169 &self,
170 ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::option::Option<::std::string::String>>> {
171 &self.tags
172 }
173 pub fn deleted(mut self, input: bool) -> Self {
175 self.deleted = ::std::option::Option::Some(input);
176 self
177 }
178 pub fn set_deleted(mut self, input: ::std::option::Option<bool>) -> Self {
180 self.deleted = input;
181 self
182 }
183 pub fn get_deleted(&self) -> &::std::option::Option<bool> {
185 &self.deleted
186 }
187 pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
189 self.created_time = ::std::option::Option::Some(input);
190 self
191 }
192 pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
194 self.created_time = input;
195 self
196 }
197 pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
199 &self.created_time
200 }
201 pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
203 self.last_modified_time = ::std::option::Option::Some(input);
204 self
205 }
206 pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
208 self.last_modified_time = input;
209 self
210 }
211 pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
213 &self.last_modified_time
214 }
215 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
216 self._request_id = Some(request_id.into());
217 self
218 }
219
220 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
221 self._request_id = request_id;
222 self
223 }
224 pub fn build(self) -> ::std::result::Result<crate::operation::get_layout::GetLayoutOutput, ::aws_smithy_types::error::operation::BuildError> {
230 ::std::result::Result::Ok(crate::operation::get_layout::GetLayoutOutput {
231 layout_id: self.layout_id.ok_or_else(|| {
232 ::aws_smithy_types::error::operation::BuildError::missing_field(
233 "layout_id",
234 "layout_id was not specified but it is required when building GetLayoutOutput",
235 )
236 })?,
237 layout_arn: self.layout_arn.ok_or_else(|| {
238 ::aws_smithy_types::error::operation::BuildError::missing_field(
239 "layout_arn",
240 "layout_arn was not specified but it is required when building GetLayoutOutput",
241 )
242 })?,
243 name: self.name.ok_or_else(|| {
244 ::aws_smithy_types::error::operation::BuildError::missing_field(
245 "name",
246 "name was not specified but it is required when building GetLayoutOutput",
247 )
248 })?,
249 content: self.content,
250 tags: self.tags,
251 deleted: self.deleted.unwrap_or_default(),
252 created_time: self.created_time,
253 last_modified_time: self.last_modified_time,
254 _request_id: self._request_id,
255 })
256 }
257}