aws_sdk_s3/types/_part.rs
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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Container for elements related to a part.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Part {
/// <p>Part number identifying the part. This is a positive integer between 1 and 10,000.</p>
pub part_number: ::std::option::Option<i32>,
/// <p>Date and time at which the part was uploaded.</p>
pub last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>Entity tag returned when the part was uploaded.</p>
pub e_tag: ::std::option::Option<::std::string::String>,
/// <p>Size in bytes of the uploaded part data.</p>
pub size: ::std::option::Option<i64>,
/// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">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 CRC-32C 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>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
pub checksum_sha256: ::std::option::Option<::std::string::String>,
}
impl Part {
/// <p>Part number identifying the part. This is a positive integer between 1 and 10,000.</p>
pub fn part_number(&self) -> ::std::option::Option<i32> {
self.part_number
}
/// <p>Date and time at which the part was uploaded.</p>
pub fn last_modified(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_modified.as_ref()
}
/// <p>Entity tag returned when the part was uploaded.</p>
pub fn e_tag(&self) -> ::std::option::Option<&str> {
self.e_tag.as_deref()
}
/// <p>Size in bytes of the uploaded part data.</p>
pub fn size(&self) -> ::std::option::Option<i64> {
self.size
}
/// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">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 CRC-32C 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>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">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()
}
}
impl Part {
/// Creates a new builder-style object to manufacture [`Part`](crate::types::Part).
pub fn builder() -> crate::types::builders::PartBuilder {
crate::types::builders::PartBuilder::default()
}
}
/// A builder for [`Part`](crate::types::Part).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PartBuilder {
pub(crate) part_number: ::std::option::Option<i32>,
pub(crate) last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) e_tag: ::std::option::Option<::std::string::String>,
pub(crate) size: ::std::option::Option<i64>,
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>,
}
impl PartBuilder {
/// <p>Part number identifying the part. This is a positive integer between 1 and 10,000.</p>
pub fn part_number(mut self, input: i32) -> Self {
self.part_number = ::std::option::Option::Some(input);
self
}
/// <p>Part number identifying the part. This is a positive integer between 1 and 10,000.</p>
pub fn set_part_number(mut self, input: ::std::option::Option<i32>) -> Self {
self.part_number = input;
self
}
/// <p>Part number identifying the part. This is a positive integer between 1 and 10,000.</p>
pub fn get_part_number(&self) -> &::std::option::Option<i32> {
&self.part_number
}
/// <p>Date and time at which the part was uploaded.</p>
pub fn last_modified(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_modified = ::std::option::Option::Some(input);
self
}
/// <p>Date and time at which the part was uploaded.</p>
pub fn set_last_modified(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_modified = input;
self
}
/// <p>Date and time at which the part was uploaded.</p>
pub fn get_last_modified(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_modified
}
/// <p>Entity tag returned when the part was uploaded.</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 returned when the part was uploaded.</p>
pub fn set_e_tag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.e_tag = input;
self
}
/// <p>Entity tag returned when the part was uploaded.</p>
pub fn get_e_tag(&self) -> &::std::option::Option<::std::string::String> {
&self.e_tag
}
/// <p>Size in bytes of the uploaded part data.</p>
pub fn size(mut self, input: i64) -> Self {
self.size = ::std::option::Option::Some(input);
self
}
/// <p>Size in bytes of the uploaded part data.</p>
pub fn set_size(mut self, input: ::std::option::Option<i64>) -> Self {
self.size = input;
self
}
/// <p>Size in bytes of the uploaded part data.</p>
pub fn get_size(&self) -> &::std::option::Option<i64> {
&self.size
}
/// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">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>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">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>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">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 CRC-32C 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 CRC-32C 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 CRC-32C 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>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">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>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">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>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">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
}
/// Consumes the builder and constructs a [`Part`](crate::types::Part).
pub fn build(self) -> crate::types::Part {
crate::types::Part {
part_number: self.part_number,
last_modified: self.last_modified,
e_tag: self.e_tag,
size: self.size,
checksum_crc32: self.checksum_crc32,
checksum_crc32_c: self.checksum_crc32_c,
checksum_sha1: self.checksum_sha1,
checksum_sha256: self.checksum_sha256,
}
}
}