aws_sdk_s3/types/_copy_object_result.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Container for all response elements.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CopyObjectResult {
7 /// <p>Returns the ETag of the new object. The ETag reflects only changes to the contents of an object, not its metadata.</p>
8 pub e_tag: ::std::option::Option<::std::string::String>,
9 /// <p>Creation date of the object.</p>
10 pub last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
11 /// <p>The checksum type that is used to calculate the object’s checksum value. 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>
12 pub checksum_type: ::std::option::Option<crate::types::ChecksumType>,
13 /// <p>The Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. This checksum is only present if the object was uploaded with 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>
14 pub checksum_crc32: ::std::option::Option<::std::string::String>,
15 /// <p>The Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. This checksum is only present if the checksum was uploaded with 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>
16 pub checksum_crc32_c: ::std::option::Option<::std::string::String>,
17 /// <p>The Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. This checksum is present if the object being copied was uploaded with the <code>CRC64NVME</code> checksum algorithm, or if the object was uploaded without a checksum (and Amazon S3 added the default checksum, <code>CRC64NVME</code>, to the uploaded 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>
18 pub checksum_crc64_nvme: ::std::option::Option<::std::string::String>,
19 /// <p>The Base64 encoded, 160-bit <code>SHA1</code> digest of the object. This checksum is only present if the checksum was uploaded with 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>
20 pub checksum_sha1: ::std::option::Option<::std::string::String>,
21 /// <p>The Base64 encoded, 256-bit <code>SHA256</code> digest of the object. This checksum is only present if the checksum was uploaded with 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>
22 pub checksum_sha256: ::std::option::Option<::std::string::String>,
23}
24impl CopyObjectResult {
25 /// <p>Returns the ETag of the new object. The ETag reflects only changes to the contents of an object, not its metadata.</p>
26 pub fn e_tag(&self) -> ::std::option::Option<&str> {
27 self.e_tag.as_deref()
28 }
29 /// <p>Creation date of the object.</p>
30 pub fn last_modified(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
31 self.last_modified.as_ref()
32 }
33 /// <p>The checksum type that is used to calculate the object’s checksum value. 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>
34 pub fn checksum_type(&self) -> ::std::option::Option<&crate::types::ChecksumType> {
35 self.checksum_type.as_ref()
36 }
37 /// <p>The Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. This checksum is only present if the object was uploaded with 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>
38 pub fn checksum_crc32(&self) -> ::std::option::Option<&str> {
39 self.checksum_crc32.as_deref()
40 }
41 /// <p>The Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. This checksum is only present if the checksum was uploaded with 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>
42 pub fn checksum_crc32_c(&self) -> ::std::option::Option<&str> {
43 self.checksum_crc32_c.as_deref()
44 }
45 /// <p>The Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. This checksum is present if the object being copied was uploaded with the <code>CRC64NVME</code> checksum algorithm, or if the object was uploaded without a checksum (and Amazon S3 added the default checksum, <code>CRC64NVME</code>, to the uploaded 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>
46 pub fn checksum_crc64_nvme(&self) -> ::std::option::Option<&str> {
47 self.checksum_crc64_nvme.as_deref()
48 }
49 /// <p>The Base64 encoded, 160-bit <code>SHA1</code> digest of the object. This checksum is only present if the checksum was uploaded with 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>
50 pub fn checksum_sha1(&self) -> ::std::option::Option<&str> {
51 self.checksum_sha1.as_deref()
52 }
53 /// <p>The Base64 encoded, 256-bit <code>SHA256</code> digest of the object. This checksum is only present if the checksum was uploaded with 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>
54 pub fn checksum_sha256(&self) -> ::std::option::Option<&str> {
55 self.checksum_sha256.as_deref()
56 }
57}
58impl CopyObjectResult {
59 /// Creates a new builder-style object to manufacture [`CopyObjectResult`](crate::types::CopyObjectResult).
60 pub fn builder() -> crate::types::builders::CopyObjectResultBuilder {
61 crate::types::builders::CopyObjectResultBuilder::default()
62 }
63}
64
65/// A builder for [`CopyObjectResult`](crate::types::CopyObjectResult).
66#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
67#[non_exhaustive]
68pub struct CopyObjectResultBuilder {
69 pub(crate) e_tag: ::std::option::Option<::std::string::String>,
70 pub(crate) last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
71 pub(crate) checksum_type: ::std::option::Option<crate::types::ChecksumType>,
72 pub(crate) checksum_crc32: ::std::option::Option<::std::string::String>,
73 pub(crate) checksum_crc32_c: ::std::option::Option<::std::string::String>,
74 pub(crate) checksum_crc64_nvme: ::std::option::Option<::std::string::String>,
75 pub(crate) checksum_sha1: ::std::option::Option<::std::string::String>,
76 pub(crate) checksum_sha256: ::std::option::Option<::std::string::String>,
77}
78impl CopyObjectResultBuilder {
79 /// <p>Returns the ETag of the new object. The ETag reflects only changes to the contents of an object, not its metadata.</p>
80 pub fn e_tag(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.e_tag = ::std::option::Option::Some(input.into());
82 self
83 }
84 /// <p>Returns the ETag of the new object. The ETag reflects only changes to the contents of an object, not its metadata.</p>
85 pub fn set_e_tag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.e_tag = input;
87 self
88 }
89 /// <p>Returns the ETag of the new object. The ETag reflects only changes to the contents of an object, not its metadata.</p>
90 pub fn get_e_tag(&self) -> &::std::option::Option<::std::string::String> {
91 &self.e_tag
92 }
93 /// <p>Creation date of the object.</p>
94 pub fn last_modified(mut self, input: ::aws_smithy_types::DateTime) -> Self {
95 self.last_modified = ::std::option::Option::Some(input);
96 self
97 }
98 /// <p>Creation date of the object.</p>
99 pub fn set_last_modified(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
100 self.last_modified = input;
101 self
102 }
103 /// <p>Creation date of the object.</p>
104 pub fn get_last_modified(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
105 &self.last_modified
106 }
107 /// <p>The checksum type that is used to calculate the object’s checksum value. 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>
108 pub fn checksum_type(mut self, input: crate::types::ChecksumType) -> Self {
109 self.checksum_type = ::std::option::Option::Some(input);
110 self
111 }
112 /// <p>The checksum type that is used to calculate the object’s checksum value. 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>
113 pub fn set_checksum_type(mut self, input: ::std::option::Option<crate::types::ChecksumType>) -> Self {
114 self.checksum_type = input;
115 self
116 }
117 /// <p>The checksum type that is used to calculate the object’s checksum value. 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>
118 pub fn get_checksum_type(&self) -> &::std::option::Option<crate::types::ChecksumType> {
119 &self.checksum_type
120 }
121 /// <p>The Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. This checksum is only present if the object was uploaded with 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>
122 pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.checksum_crc32 = ::std::option::Option::Some(input.into());
124 self
125 }
126 /// <p>The Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. This checksum is only present if the object was uploaded with 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>
127 pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.checksum_crc32 = input;
129 self
130 }
131 /// <p>The Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. This checksum is only present if the object was uploaded with 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>
132 pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
133 &self.checksum_crc32
134 }
135 /// <p>The Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. This checksum is only present if the checksum was uploaded with 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>
136 pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137 self.checksum_crc32_c = ::std::option::Option::Some(input.into());
138 self
139 }
140 /// <p>The Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. This checksum is only present if the checksum was uploaded with 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>
141 pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142 self.checksum_crc32_c = input;
143 self
144 }
145 /// <p>The Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. This checksum is only present if the checksum was uploaded with 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>
146 pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
147 &self.checksum_crc32_c
148 }
149 /// <p>The Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. This checksum is present if the object being copied was uploaded with the <code>CRC64NVME</code> checksum algorithm, or if the object was uploaded without a checksum (and Amazon S3 added the default checksum, <code>CRC64NVME</code>, to the uploaded 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>
150 pub fn checksum_crc64_nvme(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151 self.checksum_crc64_nvme = ::std::option::Option::Some(input.into());
152 self
153 }
154 /// <p>The Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. This checksum is present if the object being copied was uploaded with the <code>CRC64NVME</code> checksum algorithm, or if the object was uploaded without a checksum (and Amazon S3 added the default checksum, <code>CRC64NVME</code>, to the uploaded 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>
155 pub fn set_checksum_crc64_nvme(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156 self.checksum_crc64_nvme = input;
157 self
158 }
159 /// <p>The Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. This checksum is present if the object being copied was uploaded with the <code>CRC64NVME</code> checksum algorithm, or if the object was uploaded without a checksum (and Amazon S3 added the default checksum, <code>CRC64NVME</code>, to the uploaded 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>
160 pub fn get_checksum_crc64_nvme(&self) -> &::std::option::Option<::std::string::String> {
161 &self.checksum_crc64_nvme
162 }
163 /// <p>The Base64 encoded, 160-bit <code>SHA1</code> digest of the object. This checksum is only present if the checksum was uploaded with 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>
164 pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165 self.checksum_sha1 = ::std::option::Option::Some(input.into());
166 self
167 }
168 /// <p>The Base64 encoded, 160-bit <code>SHA1</code> digest of the object. This checksum is only present if the checksum was uploaded with 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>
169 pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170 self.checksum_sha1 = input;
171 self
172 }
173 /// <p>The Base64 encoded, 160-bit <code>SHA1</code> digest of the object. This checksum is only present if the checksum was uploaded with 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>
174 pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
175 &self.checksum_sha1
176 }
177 /// <p>The Base64 encoded, 256-bit <code>SHA256</code> digest of the object. This checksum is only present if the checksum was uploaded with 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>
178 pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179 self.checksum_sha256 = ::std::option::Option::Some(input.into());
180 self
181 }
182 /// <p>The Base64 encoded, 256-bit <code>SHA256</code> digest of the object. This checksum is only present if the checksum was uploaded with 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>
183 pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184 self.checksum_sha256 = input;
185 self
186 }
187 /// <p>The Base64 encoded, 256-bit <code>SHA256</code> digest of the object. This checksum is only present if the checksum was uploaded with 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>
188 pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
189 &self.checksum_sha256
190 }
191 /// Consumes the builder and constructs a [`CopyObjectResult`](crate::types::CopyObjectResult).
192 pub fn build(self) -> crate::types::CopyObjectResult {
193 crate::types::CopyObjectResult {
194 e_tag: self.e_tag,
195 last_modified: self.last_modified,
196 checksum_type: self.checksum_type,
197 checksum_crc32: self.checksum_crc32,
198 checksum_crc32_c: self.checksum_crc32_c,
199 checksum_crc64_nvme: self.checksum_crc64_nvme,
200 checksum_sha1: self.checksum_sha1,
201 checksum_sha256: self.checksum_sha256,
202 }
203 }
204}