1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// Response from GetAttachedFile API.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetAttachedFileOutput {
/// <p>The unique identifier of the attached file resource (ARN).</p>
pub file_arn: ::std::option::Option<::std::string::String>,
/// <p>The unique identifier of the attached file resource.</p>
pub file_id: ::std::option::Option<::std::string::String>,
/// <p>The time of Creation of the file resource as an ISO timestamp. It's specified in ISO 8601 format: <code>yyyy-MM-ddThh:mm:ss.SSSZ</code>. For example, <code>2024-05-03T02:41:28.172Z</code>.</p>
pub creation_time: ::std::option::Option<::std::string::String>,
/// <p>The current status of the attached file.</p>
pub file_status: ::std::option::Option<crate::types::FileStatusType>,
/// <p>A case-sensitive name of the attached file being uploaded.</p>
pub file_name: ::std::option::Option<::std::string::String>,
/// <p>The size of the attached file in bytes.</p>
pub file_size_in_bytes: i64,
/// <p>The resource to which the attached file is (being) uploaded to. The supported resources are <a href="https://docs.aws.amazon.com/connect/latest/adminguide/cases.html">Cases</a>, <a href="https://docs.aws.amazon.com/connect/latest/adminguide/setup-email-channel.html">Email</a>, and <a href="https://docs.aws.amazon.com/connect/latest/adminguide/concepts-getting-started-tasks.html">Task</a>.</p>
pub associated_resource_arn: ::std::option::Option<::std::string::String>,
/// <p>The use case for the file.</p>
pub file_use_case_type: ::std::option::Option<crate::types::FileUseCaseType>,
/// <p>Represents the identity that created the file.</p>
pub created_by: ::std::option::Option<crate::types::CreatedByInfo>,
/// <p>URL and expiry to be used when downloading the attached file.</p>
pub download_url_metadata: ::std::option::Option<crate::types::DownloadUrlMetadata>,
/// <p>The tags used to organize, track, or control access for this resource. For example, <code>{ "Tags": {"key1":"value1", "key2":"value2"} }</code>.</p>
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
_request_id: Option<String>,
}
impl GetAttachedFileOutput {
/// <p>The unique identifier of the attached file resource (ARN).</p>
pub fn file_arn(&self) -> ::std::option::Option<&str> {
self.file_arn.as_deref()
}
/// <p>The unique identifier of the attached file resource.</p>
pub fn file_id(&self) -> ::std::option::Option<&str> {
self.file_id.as_deref()
}
/// <p>The time of Creation of the file resource as an ISO timestamp. It's specified in ISO 8601 format: <code>yyyy-MM-ddThh:mm:ss.SSSZ</code>. For example, <code>2024-05-03T02:41:28.172Z</code>.</p>
pub fn creation_time(&self) -> ::std::option::Option<&str> {
self.creation_time.as_deref()
}
/// <p>The current status of the attached file.</p>
pub fn file_status(&self) -> ::std::option::Option<&crate::types::FileStatusType> {
self.file_status.as_ref()
}
/// <p>A case-sensitive name of the attached file being uploaded.</p>
pub fn file_name(&self) -> ::std::option::Option<&str> {
self.file_name.as_deref()
}
/// <p>The size of the attached file in bytes.</p>
pub fn file_size_in_bytes(&self) -> i64 {
self.file_size_in_bytes
}
/// <p>The resource to which the attached file is (being) uploaded to. The supported resources are <a href="https://docs.aws.amazon.com/connect/latest/adminguide/cases.html">Cases</a>, <a href="https://docs.aws.amazon.com/connect/latest/adminguide/setup-email-channel.html">Email</a>, and <a href="https://docs.aws.amazon.com/connect/latest/adminguide/concepts-getting-started-tasks.html">Task</a>.</p>
pub fn associated_resource_arn(&self) -> ::std::option::Option<&str> {
self.associated_resource_arn.as_deref()
}
/// <p>The use case for the file.</p>
pub fn file_use_case_type(&self) -> ::std::option::Option<&crate::types::FileUseCaseType> {
self.file_use_case_type.as_ref()
}
/// <p>Represents the identity that created the file.</p>
pub fn created_by(&self) -> ::std::option::Option<&crate::types::CreatedByInfo> {
self.created_by.as_ref()
}
/// <p>URL and expiry to be used when downloading the attached file.</p>
pub fn download_url_metadata(&self) -> ::std::option::Option<&crate::types::DownloadUrlMetadata> {
self.download_url_metadata.as_ref()
}
/// <p>The tags used to organize, track, or control access for this resource. For example, <code>{ "Tags": {"key1":"value1", "key2":"value2"} }</code>.</p>
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
}
impl ::aws_types::request_id::RequestId for GetAttachedFileOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetAttachedFileOutput {
/// Creates a new builder-style object to manufacture [`GetAttachedFileOutput`](crate::operation::get_attached_file::GetAttachedFileOutput).
pub fn builder() -> crate::operation::get_attached_file::builders::GetAttachedFileOutputBuilder {
crate::operation::get_attached_file::builders::GetAttachedFileOutputBuilder::default()
}
}
/// A builder for [`GetAttachedFileOutput`](crate::operation::get_attached_file::GetAttachedFileOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetAttachedFileOutputBuilder {
pub(crate) file_arn: ::std::option::Option<::std::string::String>,
pub(crate) file_id: ::std::option::Option<::std::string::String>,
pub(crate) creation_time: ::std::option::Option<::std::string::String>,
pub(crate) file_status: ::std::option::Option<crate::types::FileStatusType>,
pub(crate) file_name: ::std::option::Option<::std::string::String>,
pub(crate) file_size_in_bytes: ::std::option::Option<i64>,
pub(crate) associated_resource_arn: ::std::option::Option<::std::string::String>,
pub(crate) file_use_case_type: ::std::option::Option<crate::types::FileUseCaseType>,
pub(crate) created_by: ::std::option::Option<crate::types::CreatedByInfo>,
pub(crate) download_url_metadata: ::std::option::Option<crate::types::DownloadUrlMetadata>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
_request_id: Option<String>,
}
impl GetAttachedFileOutputBuilder {
/// <p>The unique identifier of the attached file resource (ARN).</p>
pub fn file_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.file_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier of the attached file resource (ARN).</p>
pub fn set_file_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.file_arn = input;
self
}
/// <p>The unique identifier of the attached file resource (ARN).</p>
pub fn get_file_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.file_arn
}
/// <p>The unique identifier of the attached file resource.</p>
pub fn file_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.file_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier of the attached file resource.</p>
pub fn set_file_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.file_id = input;
self
}
/// <p>The unique identifier of the attached file resource.</p>
pub fn get_file_id(&self) -> &::std::option::Option<::std::string::String> {
&self.file_id
}
/// <p>The time of Creation of the file resource as an ISO timestamp. It's specified in ISO 8601 format: <code>yyyy-MM-ddThh:mm:ss.SSSZ</code>. For example, <code>2024-05-03T02:41:28.172Z</code>.</p>
pub fn creation_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.creation_time = ::std::option::Option::Some(input.into());
self
}
/// <p>The time of Creation of the file resource as an ISO timestamp. It's specified in ISO 8601 format: <code>yyyy-MM-ddThh:mm:ss.SSSZ</code>. For example, <code>2024-05-03T02:41:28.172Z</code>.</p>
pub fn set_creation_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.creation_time = input;
self
}
/// <p>The time of Creation of the file resource as an ISO timestamp. It's specified in ISO 8601 format: <code>yyyy-MM-ddThh:mm:ss.SSSZ</code>. For example, <code>2024-05-03T02:41:28.172Z</code>.</p>
pub fn get_creation_time(&self) -> &::std::option::Option<::std::string::String> {
&self.creation_time
}
/// <p>The current status of the attached file.</p>
pub fn file_status(mut self, input: crate::types::FileStatusType) -> Self {
self.file_status = ::std::option::Option::Some(input);
self
}
/// <p>The current status of the attached file.</p>
pub fn set_file_status(mut self, input: ::std::option::Option<crate::types::FileStatusType>) -> Self {
self.file_status = input;
self
}
/// <p>The current status of the attached file.</p>
pub fn get_file_status(&self) -> &::std::option::Option<crate::types::FileStatusType> {
&self.file_status
}
/// <p>A case-sensitive name of the attached file being uploaded.</p>
pub fn file_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.file_name = ::std::option::Option::Some(input.into());
self
}
/// <p>A case-sensitive name of the attached file being uploaded.</p>
pub fn set_file_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.file_name = input;
self
}
/// <p>A case-sensitive name of the attached file being uploaded.</p>
pub fn get_file_name(&self) -> &::std::option::Option<::std::string::String> {
&self.file_name
}
/// <p>The size of the attached file in bytes.</p>
/// This field is required.
pub fn file_size_in_bytes(mut self, input: i64) -> Self {
self.file_size_in_bytes = ::std::option::Option::Some(input);
self
}
/// <p>The size of the attached file in bytes.</p>
pub fn set_file_size_in_bytes(mut self, input: ::std::option::Option<i64>) -> Self {
self.file_size_in_bytes = input;
self
}
/// <p>The size of the attached file in bytes.</p>
pub fn get_file_size_in_bytes(&self) -> &::std::option::Option<i64> {
&self.file_size_in_bytes
}
/// <p>The resource to which the attached file is (being) uploaded to. The supported resources are <a href="https://docs.aws.amazon.com/connect/latest/adminguide/cases.html">Cases</a>, <a href="https://docs.aws.amazon.com/connect/latest/adminguide/setup-email-channel.html">Email</a>, and <a href="https://docs.aws.amazon.com/connect/latest/adminguide/concepts-getting-started-tasks.html">Task</a>.</p>
pub fn associated_resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.associated_resource_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The resource to which the attached file is (being) uploaded to. The supported resources are <a href="https://docs.aws.amazon.com/connect/latest/adminguide/cases.html">Cases</a>, <a href="https://docs.aws.amazon.com/connect/latest/adminguide/setup-email-channel.html">Email</a>, and <a href="https://docs.aws.amazon.com/connect/latest/adminguide/concepts-getting-started-tasks.html">Task</a>.</p>
pub fn set_associated_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.associated_resource_arn = input;
self
}
/// <p>The resource to which the attached file is (being) uploaded to. The supported resources are <a href="https://docs.aws.amazon.com/connect/latest/adminguide/cases.html">Cases</a>, <a href="https://docs.aws.amazon.com/connect/latest/adminguide/setup-email-channel.html">Email</a>, and <a href="https://docs.aws.amazon.com/connect/latest/adminguide/concepts-getting-started-tasks.html">Task</a>.</p>
pub fn get_associated_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.associated_resource_arn
}
/// <p>The use case for the file.</p>
pub fn file_use_case_type(mut self, input: crate::types::FileUseCaseType) -> Self {
self.file_use_case_type = ::std::option::Option::Some(input);
self
}
/// <p>The use case for the file.</p>
pub fn set_file_use_case_type(mut self, input: ::std::option::Option<crate::types::FileUseCaseType>) -> Self {
self.file_use_case_type = input;
self
}
/// <p>The use case for the file.</p>
pub fn get_file_use_case_type(&self) -> &::std::option::Option<crate::types::FileUseCaseType> {
&self.file_use_case_type
}
/// <p>Represents the identity that created the file.</p>
pub fn created_by(mut self, input: crate::types::CreatedByInfo) -> Self {
self.created_by = ::std::option::Option::Some(input);
self
}
/// <p>Represents the identity that created the file.</p>
pub fn set_created_by(mut self, input: ::std::option::Option<crate::types::CreatedByInfo>) -> Self {
self.created_by = input;
self
}
/// <p>Represents the identity that created the file.</p>
pub fn get_created_by(&self) -> &::std::option::Option<crate::types::CreatedByInfo> {
&self.created_by
}
/// <p>URL and expiry to be used when downloading the attached file.</p>
pub fn download_url_metadata(mut self, input: crate::types::DownloadUrlMetadata) -> Self {
self.download_url_metadata = ::std::option::Option::Some(input);
self
}
/// <p>URL and expiry to be used when downloading the attached file.</p>
pub fn set_download_url_metadata(mut self, input: ::std::option::Option<crate::types::DownloadUrlMetadata>) -> Self {
self.download_url_metadata = input;
self
}
/// <p>URL and expiry to be used when downloading the attached file.</p>
pub fn get_download_url_metadata(&self) -> &::std::option::Option<crate::types::DownloadUrlMetadata> {
&self.download_url_metadata
}
/// Adds a key-value pair to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The tags used to organize, track, or control access for this resource. For example, <code>{ "Tags": {"key1":"value1", "key2":"value2"} }</code>.</p>
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
/// <p>The tags used to organize, track, or control access for this resource. For example, <code>{ "Tags": {"key1":"value1", "key2":"value2"} }</code>.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
/// <p>The tags used to organize, track, or control access for this resource. For example, <code>{ "Tags": {"key1":"value1", "key2":"value2"} }</code>.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`GetAttachedFileOutput`](crate::operation::get_attached_file::GetAttachedFileOutput).
/// This method will fail if any of the following fields are not set:
/// - [`file_size_in_bytes`](crate::operation::get_attached_file::builders::GetAttachedFileOutputBuilder::file_size_in_bytes)
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_attached_file::GetAttachedFileOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_attached_file::GetAttachedFileOutput {
file_arn: self.file_arn,
file_id: self.file_id,
creation_time: self.creation_time,
file_status: self.file_status,
file_name: self.file_name,
file_size_in_bytes: self.file_size_in_bytes.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"file_size_in_bytes",
"file_size_in_bytes was not specified but it is required when building GetAttachedFileOutput",
)
})?,
associated_resource_arn: self.associated_resource_arn,
file_use_case_type: self.file_use_case_type,
created_by: self.created_by,
download_url_metadata: self.download_url_metadata,
tags: self.tags,
_request_id: self._request_id,
})
}
}