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 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct PutObjectOutput {
/// <p>If the expiration is configured for the object (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>) in the <i>Amazon S3 User Guide</i>, the response includes this header. It includes the <code>expiry-date</code> and <code>rule-id</code> key-value pairs that provide information about object expiration. The value of the <code>rule-id</code> is URL-encoded.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub expiration: ::std::option::Option<::std::string::String>,
/// <p>Entity tag for the uploaded object.</p>
/// <p><b>General purpose buckets </b> - To ensure that data is not corrupted traversing the network, for objects where the ETag is the MD5 digest of the object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.</p>
/// <p><b>Directory buckets </b> - The ETag for the object in a directory bucket isn't the MD5 digest of the object.</p>
pub e_tag: ::std::option::Option<::std::string::String>,
/// <p>The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub checksum_crc32: ::std::option::Option<::std::string::String>,
/// <p>The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub checksum_crc32_c: ::std::option::Option<::std::string::String>,
/// <p>The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub checksum_sha1: ::std::option::Option<::std::string::String>,
/// <p>The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub checksum_sha256: ::std::option::Option<::std::string::String>,
/// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p><note>
/// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
/// </note>
pub server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
/// <p>Version ID of the object.</p>
/// <p>If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object being stored. Amazon S3 returns this ID in the response. When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects. For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html">Adding Objects to Versioning-Enabled Buckets</a> in the <i>Amazon S3 User Guide</i>. For information about returning the versioning state of a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">GetBucketVersioning</a>.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub version_id: ::std::option::Option<::std::string::String>,
/// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub sse_customer_algorithm: ::std::option::Option<::std::string::String>,
/// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub sse_customer_key_md5: ::std::option::Option<::std::string::String>,
/// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header indicates the ID of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub ssekms_key_id: ::std::option::Option<::std::string::String>,
/// <p>If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> or <code>CopyObject</code> operations on this object.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub ssekms_encryption_context: ::std::option::Option<::std::string::String>,
/// <p>Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub bucket_key_enabled: ::std::option::Option<bool>,
/// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub request_charged: ::std::option::Option<crate::types::RequestCharged>,
_extended_request_id: Option<String>,
_request_id: Option<String>,
}
impl PutObjectOutput {
/// <p>If the expiration is configured for the object (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>) in the <i>Amazon S3 User Guide</i>, the response includes this header. It includes the <code>expiry-date</code> and <code>rule-id</code> key-value pairs that provide information about object expiration. The value of the <code>rule-id</code> is URL-encoded.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn expiration(&self) -> ::std::option::Option<&str> {
self.expiration.as_deref()
}
/// <p>Entity tag for the uploaded object.</p>
/// <p><b>General purpose buckets </b> - To ensure that data is not corrupted traversing the network, for objects where the ETag is the MD5 digest of the object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.</p>
/// <p><b>Directory buckets </b> - The ETag for the object in a directory bucket isn't the MD5 digest of the object.</p>
pub fn e_tag(&self) -> ::std::option::Option<&str> {
self.e_tag.as_deref()
}
/// <p>The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn checksum_crc32(&self) -> ::std::option::Option<&str> {
self.checksum_crc32.as_deref()
}
/// <p>The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn checksum_crc32_c(&self) -> ::std::option::Option<&str> {
self.checksum_crc32_c.as_deref()
}
/// <p>The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn checksum_sha1(&self) -> ::std::option::Option<&str> {
self.checksum_sha1.as_deref()
}
/// <p>The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn checksum_sha256(&self) -> ::std::option::Option<&str> {
self.checksum_sha256.as_deref()
}
/// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p><note>
/// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
/// </note>
pub fn server_side_encryption(&self) -> ::std::option::Option<&crate::types::ServerSideEncryption> {
self.server_side_encryption.as_ref()
}
/// <p>Version ID of the object.</p>
/// <p>If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object being stored. Amazon S3 returns this ID in the response. When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects. For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html">Adding Objects to Versioning-Enabled Buckets</a> in the <i>Amazon S3 User Guide</i>. For information about returning the versioning state of a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">GetBucketVersioning</a>.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn version_id(&self) -> ::std::option::Option<&str> {
self.version_id.as_deref()
}
/// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
self.sse_customer_algorithm.as_deref()
}
/// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
self.sse_customer_key_md5.as_deref()
}
/// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header indicates the ID of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn ssekms_key_id(&self) -> ::std::option::Option<&str> {
self.ssekms_key_id.as_deref()
}
/// <p>If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> or <code>CopyObject</code> operations on this object.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn ssekms_encryption_context(&self) -> ::std::option::Option<&str> {
self.ssekms_encryption_context.as_deref()
}
/// <p>Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn bucket_key_enabled(&self) -> ::std::option::Option<bool> {
self.bucket_key_enabled
}
/// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn request_charged(&self) -> ::std::option::Option<&crate::types::RequestCharged> {
self.request_charged.as_ref()
}
}
impl ::std::fmt::Debug for PutObjectOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("PutObjectOutput");
formatter.field("expiration", &self.expiration);
formatter.field("e_tag", &self.e_tag);
formatter.field("checksum_crc32", &self.checksum_crc32);
formatter.field("checksum_crc32_c", &self.checksum_crc32_c);
formatter.field("checksum_sha1", &self.checksum_sha1);
formatter.field("checksum_sha256", &self.checksum_sha256);
formatter.field("server_side_encryption", &self.server_side_encryption);
formatter.field("version_id", &self.version_id);
formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
formatter.field("request_charged", &self.request_charged);
formatter.field("_extended_request_id", &self._extended_request_id);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl crate::s3_request_id::RequestIdExt for PutObjectOutput {
fn extended_request_id(&self) -> Option<&str> {
self._extended_request_id.as_deref()
}
}
impl ::aws_types::request_id::RequestId for PutObjectOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl PutObjectOutput {
/// Creates a new builder-style object to manufacture [`PutObjectOutput`](crate::operation::put_object::PutObjectOutput).
pub fn builder() -> crate::operation::put_object::builders::PutObjectOutputBuilder {
crate::operation::put_object::builders::PutObjectOutputBuilder::default()
}
}
/// A builder for [`PutObjectOutput`](crate::operation::put_object::PutObjectOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct PutObjectOutputBuilder {
pub(crate) expiration: ::std::option::Option<::std::string::String>,
pub(crate) e_tag: ::std::option::Option<::std::string::String>,
pub(crate) checksum_crc32: ::std::option::Option<::std::string::String>,
pub(crate) checksum_crc32_c: ::std::option::Option<::std::string::String>,
pub(crate) checksum_sha1: ::std::option::Option<::std::string::String>,
pub(crate) checksum_sha256: ::std::option::Option<::std::string::String>,
pub(crate) server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
pub(crate) version_id: ::std::option::Option<::std::string::String>,
pub(crate) sse_customer_algorithm: ::std::option::Option<::std::string::String>,
pub(crate) sse_customer_key_md5: ::std::option::Option<::std::string::String>,
pub(crate) ssekms_key_id: ::std::option::Option<::std::string::String>,
pub(crate) ssekms_encryption_context: ::std::option::Option<::std::string::String>,
pub(crate) bucket_key_enabled: ::std::option::Option<bool>,
pub(crate) request_charged: ::std::option::Option<crate::types::RequestCharged>,
_extended_request_id: Option<String>,
_request_id: Option<String>,
}
impl PutObjectOutputBuilder {
/// <p>If the expiration is configured for the object (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>) in the <i>Amazon S3 User Guide</i>, the response includes this header. It includes the <code>expiry-date</code> and <code>rule-id</code> key-value pairs that provide information about object expiration. The value of the <code>rule-id</code> is URL-encoded.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn expiration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.expiration = ::std::option::Option::Some(input.into());
self
}
/// <p>If the expiration is configured for the object (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>) in the <i>Amazon S3 User Guide</i>, the response includes this header. It includes the <code>expiry-date</code> and <code>rule-id</code> key-value pairs that provide information about object expiration. The value of the <code>rule-id</code> is URL-encoded.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn set_expiration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.expiration = input;
self
}
/// <p>If the expiration is configured for the object (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>) in the <i>Amazon S3 User Guide</i>, the response includes this header. It includes the <code>expiry-date</code> and <code>rule-id</code> key-value pairs that provide information about object expiration. The value of the <code>rule-id</code> is URL-encoded.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn get_expiration(&self) -> &::std::option::Option<::std::string::String> {
&self.expiration
}
/// <p>Entity tag for the uploaded object.</p>
/// <p><b>General purpose buckets </b> - To ensure that data is not corrupted traversing the network, for objects where the ETag is the MD5 digest of the object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.</p>
/// <p><b>Directory buckets </b> - The ETag for the object in a directory bucket isn't the MD5 digest of the object.</p>
pub fn e_tag(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.e_tag = ::std::option::Option::Some(input.into());
self
}
/// <p>Entity tag for the uploaded object.</p>
/// <p><b>General purpose buckets </b> - To ensure that data is not corrupted traversing the network, for objects where the ETag is the MD5 digest of the object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.</p>
/// <p><b>Directory buckets </b> - The ETag for the object in a directory bucket isn't the MD5 digest of the object.</p>
pub fn set_e_tag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.e_tag = input;
self
}
/// <p>Entity tag for the uploaded object.</p>
/// <p><b>General purpose buckets </b> - To ensure that data is not corrupted traversing the network, for objects where the ETag is the MD5 digest of the object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.</p>
/// <p><b>Directory buckets </b> - The ETag for the object in a directory bucket isn't the MD5 digest of the object.</p>
pub fn get_e_tag(&self) -> &::std::option::Option<::std::string::String> {
&self.e_tag
}
/// <p>The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.checksum_crc32 = ::std::option::Option::Some(input.into());
self
}
/// <p>The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.checksum_crc32 = input;
self
}
/// <p>The base64-encoded, 32-bit CRC32 checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
&self.checksum_crc32
}
/// <p>The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.checksum_crc32_c = ::std::option::Option::Some(input.into());
self
}
/// <p>The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.checksum_crc32_c = input;
self
}
/// <p>The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
&self.checksum_crc32_c
}
/// <p>The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.checksum_sha1 = ::std::option::Option::Some(input.into());
self
}
/// <p>The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.checksum_sha1 = input;
self
}
/// <p>The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
&self.checksum_sha1
}
/// <p>The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.checksum_sha256 = ::std::option::Option::Some(input.into());
self
}
/// <p>The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.checksum_sha256 = input;
self
}
/// <p>The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
&self.checksum_sha256
}
/// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p><note>
/// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
/// </note>
pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
self.server_side_encryption = ::std::option::Option::Some(input);
self
}
/// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p><note>
/// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
/// </note>
pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
self.server_side_encryption = input;
self
}
/// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p><note>
/// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
/// </note>
pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
&self.server_side_encryption
}
/// <p>Version ID of the object.</p>
/// <p>If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object being stored. Amazon S3 returns this ID in the response. When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects. For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html">Adding Objects to Versioning-Enabled Buckets</a> in the <i>Amazon S3 User Guide</i>. For information about returning the versioning state of a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">GetBucketVersioning</a>.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.version_id = ::std::option::Option::Some(input.into());
self
}
/// <p>Version ID of the object.</p>
/// <p>If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object being stored. Amazon S3 returns this ID in the response. When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects. For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html">Adding Objects to Versioning-Enabled Buckets</a> in the <i>Amazon S3 User Guide</i>. For information about returning the versioning state of a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">GetBucketVersioning</a>.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.version_id = input;
self
}
/// <p>Version ID of the object.</p>
/// <p>If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object being stored. Amazon S3 returns this ID in the response. When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects. For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html">Adding Objects to Versioning-Enabled Buckets</a> in the <i>Amazon S3 User Guide</i>. For information about returning the versioning state of a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">GetBucketVersioning</a>.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
&self.version_id
}
/// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.sse_customer_algorithm = ::std::option::Option::Some(input.into());
self
}
/// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.sse_customer_algorithm = input;
self
}
/// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
&self.sse_customer_algorithm
}
/// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.sse_customer_key_md5 = ::std::option::Option::Some(input.into());
self
}
/// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.sse_customer_key_md5 = input;
self
}
/// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
&self.sse_customer_key_md5
}
/// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header indicates the ID of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ssekms_key_id = ::std::option::Option::Some(input.into());
self
}
/// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header indicates the ID of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ssekms_key_id = input;
self
}
/// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header indicates the ID of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
&self.ssekms_key_id
}
/// <p>If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> or <code>CopyObject</code> operations on this object.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ssekms_encryption_context = ::std::option::Option::Some(input.into());
self
}
/// <p>If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> or <code>CopyObject</code> operations on this object.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ssekms_encryption_context = input;
self
}
/// <p>If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> or <code>CopyObject</code> operations on this object.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
&self.ssekms_encryption_context
}
/// <p>Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn bucket_key_enabled(mut self, input: bool) -> Self {
self.bucket_key_enabled = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
self.bucket_key_enabled = input;
self
}
/// <p>Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
&self.bucket_key_enabled
}
/// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn request_charged(mut self, input: crate::types::RequestCharged) -> Self {
self.request_charged = ::std::option::Option::Some(input);
self
}
/// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn set_request_charged(mut self, input: ::std::option::Option<crate::types::RequestCharged>) -> Self {
self.request_charged = input;
self
}
/// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
/// <p>This functionality is not supported for directory buckets.</p>
/// </note>
pub fn get_request_charged(&self) -> &::std::option::Option<crate::types::RequestCharged> {
&self.request_charged
}
pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
self._extended_request_id = Some(extended_request_id.into());
self
}
pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
self._extended_request_id = extended_request_id;
self
}
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 [`PutObjectOutput`](crate::operation::put_object::PutObjectOutput).
pub fn build(self) -> crate::operation::put_object::PutObjectOutput {
crate::operation::put_object::PutObjectOutput {
expiration: self.expiration,
e_tag: self.e_tag,
checksum_crc32: self.checksum_crc32,
checksum_crc32_c: self.checksum_crc32_c,
checksum_sha1: self.checksum_sha1,
checksum_sha256: self.checksum_sha256,
server_side_encryption: self.server_side_encryption,
version_id: self.version_id,
sse_customer_algorithm: self.sse_customer_algorithm,
sse_customer_key_md5: self.sse_customer_key_md5,
ssekms_key_id: self.ssekms_key_id,
ssekms_encryption_context: self.ssekms_encryption_context,
bucket_key_enabled: self.bucket_key_enabled,
request_charged: self.request_charged,
_extended_request_id: self._extended_request_id,
_request_id: self._request_id,
}
}
}
impl ::std::fmt::Debug for PutObjectOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("PutObjectOutputBuilder");
formatter.field("expiration", &self.expiration);
formatter.field("e_tag", &self.e_tag);
formatter.field("checksum_crc32", &self.checksum_crc32);
formatter.field("checksum_crc32_c", &self.checksum_crc32_c);
formatter.field("checksum_sha1", &self.checksum_sha1);
formatter.field("checksum_sha256", &self.checksum_sha256);
formatter.field("server_side_encryption", &self.server_side_encryption);
formatter.field("version_id", &self.version_id);
formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
formatter.field("request_charged", &self.request_charged);
formatter.field("_extended_request_id", &self._extended_request_id);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}