1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/s3-crt/S3Crt_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/s3-crt/model/ServerSideEncryption.h> 10 #include <aws/s3-crt/model/RequestCharged.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 template<typename RESULT_TYPE> 16 class AmazonWebServiceResult; 17 18 namespace Utils 19 { 20 namespace Xml 21 { 22 class XmlDocument; 23 } // namespace Xml 24 } // namespace Utils 25 namespace S3Crt 26 { 27 namespace Model 28 { 29 class AWS_S3CRT_API PutObjectResult 30 { 31 public: 32 PutObjectResult(); 33 PutObjectResult(const Aws::AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result); 34 PutObjectResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result); 35 36 37 /** 38 * <p> If the expiration is configured for the object (see <a 39 * href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>), 40 * the response includes this header. It includes the expiry-date and rule-id 41 * key-value pairs that provide information about object expiration. The value of 42 * the rule-id is URL encoded.</p> 43 */ GetExpiration()44 inline const Aws::String& GetExpiration() const{ return m_expiration; } 45 46 /** 47 * <p> If the expiration is configured for the object (see <a 48 * href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>), 49 * the response includes this header. It includes the expiry-date and rule-id 50 * key-value pairs that provide information about object expiration. The value of 51 * the rule-id is URL encoded.</p> 52 */ SetExpiration(const Aws::String & value)53 inline void SetExpiration(const Aws::String& value) { m_expiration = value; } 54 55 /** 56 * <p> If the expiration is configured for the object (see <a 57 * href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>), 58 * the response includes this header. It includes the expiry-date and rule-id 59 * key-value pairs that provide information about object expiration. The value of 60 * the rule-id is URL encoded.</p> 61 */ SetExpiration(Aws::String && value)62 inline void SetExpiration(Aws::String&& value) { m_expiration = std::move(value); } 63 64 /** 65 * <p> If the expiration is configured for the object (see <a 66 * href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>), 67 * the response includes this header. It includes the expiry-date and rule-id 68 * key-value pairs that provide information about object expiration. The value of 69 * the rule-id is URL encoded.</p> 70 */ SetExpiration(const char * value)71 inline void SetExpiration(const char* value) { m_expiration.assign(value); } 72 73 /** 74 * <p> If the expiration is configured for the object (see <a 75 * href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>), 76 * the response includes this header. It includes the expiry-date and rule-id 77 * key-value pairs that provide information about object expiration. The value of 78 * the rule-id is URL encoded.</p> 79 */ WithExpiration(const Aws::String & value)80 inline PutObjectResult& WithExpiration(const Aws::String& value) { SetExpiration(value); return *this;} 81 82 /** 83 * <p> If the expiration is configured for the object (see <a 84 * href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>), 85 * the response includes this header. It includes the expiry-date and rule-id 86 * key-value pairs that provide information about object expiration. The value of 87 * the rule-id is URL encoded.</p> 88 */ WithExpiration(Aws::String && value)89 inline PutObjectResult& WithExpiration(Aws::String&& value) { SetExpiration(std::move(value)); return *this;} 90 91 /** 92 * <p> If the expiration is configured for the object (see <a 93 * href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a>), 94 * the response includes this header. It includes the expiry-date and rule-id 95 * key-value pairs that provide information about object expiration. The value of 96 * the rule-id is URL encoded.</p> 97 */ WithExpiration(const char * value)98 inline PutObjectResult& WithExpiration(const char* value) { SetExpiration(value); return *this;} 99 100 101 /** 102 * <p>Entity tag for the uploaded object.</p> 103 */ GetETag()104 inline const Aws::String& GetETag() const{ return m_eTag; } 105 106 /** 107 * <p>Entity tag for the uploaded object.</p> 108 */ SetETag(const Aws::String & value)109 inline void SetETag(const Aws::String& value) { m_eTag = value; } 110 111 /** 112 * <p>Entity tag for the uploaded object.</p> 113 */ SetETag(Aws::String && value)114 inline void SetETag(Aws::String&& value) { m_eTag = std::move(value); } 115 116 /** 117 * <p>Entity tag for the uploaded object.</p> 118 */ SetETag(const char * value)119 inline void SetETag(const char* value) { m_eTag.assign(value); } 120 121 /** 122 * <p>Entity tag for the uploaded object.</p> 123 */ WithETag(const Aws::String & value)124 inline PutObjectResult& WithETag(const Aws::String& value) { SetETag(value); return *this;} 125 126 /** 127 * <p>Entity tag for the uploaded object.</p> 128 */ WithETag(Aws::String && value)129 inline PutObjectResult& WithETag(Aws::String&& value) { SetETag(std::move(value)); return *this;} 130 131 /** 132 * <p>Entity tag for the uploaded object.</p> 133 */ WithETag(const char * value)134 inline PutObjectResult& WithETag(const char* value) { SetETag(value); return *this;} 135 136 137 /** 138 * <p>If you specified server-side encryption either with an Amazon Web Services 139 * KMS key or Amazon S3-managed encryption key in your PUT request, the response 140 * includes this header. It confirms the encryption algorithm that Amazon S3 used 141 * to encrypt the object.</p> 142 */ GetServerSideEncryption()143 inline const ServerSideEncryption& GetServerSideEncryption() const{ return m_serverSideEncryption; } 144 145 /** 146 * <p>If you specified server-side encryption either with an Amazon Web Services 147 * KMS key or Amazon S3-managed encryption key in your PUT request, the response 148 * includes this header. It confirms the encryption algorithm that Amazon S3 used 149 * to encrypt the object.</p> 150 */ SetServerSideEncryption(const ServerSideEncryption & value)151 inline void SetServerSideEncryption(const ServerSideEncryption& value) { m_serverSideEncryption = value; } 152 153 /** 154 * <p>If you specified server-side encryption either with an Amazon Web Services 155 * KMS key or Amazon S3-managed encryption key in your PUT request, the response 156 * includes this header. It confirms the encryption algorithm that Amazon S3 used 157 * to encrypt the object.</p> 158 */ SetServerSideEncryption(ServerSideEncryption && value)159 inline void SetServerSideEncryption(ServerSideEncryption&& value) { m_serverSideEncryption = std::move(value); } 160 161 /** 162 * <p>If you specified server-side encryption either with an Amazon Web Services 163 * KMS key or Amazon S3-managed encryption key in your PUT request, the response 164 * includes this header. It confirms the encryption algorithm that Amazon S3 used 165 * to encrypt the object.</p> 166 */ WithServerSideEncryption(const ServerSideEncryption & value)167 inline PutObjectResult& WithServerSideEncryption(const ServerSideEncryption& value) { SetServerSideEncryption(value); return *this;} 168 169 /** 170 * <p>If you specified server-side encryption either with an Amazon Web Services 171 * KMS key or Amazon S3-managed encryption key in your PUT request, the response 172 * includes this header. It confirms the encryption algorithm that Amazon S3 used 173 * to encrypt the object.</p> 174 */ WithServerSideEncryption(ServerSideEncryption && value)175 inline PutObjectResult& WithServerSideEncryption(ServerSideEncryption&& value) { SetServerSideEncryption(std::move(value)); return *this;} 176 177 178 /** 179 * <p>Version of the object.</p> 180 */ GetVersionId()181 inline const Aws::String& GetVersionId() const{ return m_versionId; } 182 183 /** 184 * <p>Version of the object.</p> 185 */ SetVersionId(const Aws::String & value)186 inline void SetVersionId(const Aws::String& value) { m_versionId = value; } 187 188 /** 189 * <p>Version of the object.</p> 190 */ SetVersionId(Aws::String && value)191 inline void SetVersionId(Aws::String&& value) { m_versionId = std::move(value); } 192 193 /** 194 * <p>Version of the object.</p> 195 */ SetVersionId(const char * value)196 inline void SetVersionId(const char* value) { m_versionId.assign(value); } 197 198 /** 199 * <p>Version of the object.</p> 200 */ WithVersionId(const Aws::String & value)201 inline PutObjectResult& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;} 202 203 /** 204 * <p>Version of the object.</p> 205 */ WithVersionId(Aws::String && value)206 inline PutObjectResult& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;} 207 208 /** 209 * <p>Version of the object.</p> 210 */ WithVersionId(const char * value)211 inline PutObjectResult& WithVersionId(const char* value) { SetVersionId(value); return *this;} 212 213 214 /** 215 * <p>If server-side encryption with a customer-provided encryption key was 216 * requested, the response will include this header confirming the encryption 217 * algorithm used.</p> 218 */ GetSSECustomerAlgorithm()219 inline const Aws::String& GetSSECustomerAlgorithm() const{ return m_sSECustomerAlgorithm; } 220 221 /** 222 * <p>If server-side encryption with a customer-provided encryption key was 223 * requested, the response will include this header confirming the encryption 224 * algorithm used.</p> 225 */ SetSSECustomerAlgorithm(const Aws::String & value)226 inline void SetSSECustomerAlgorithm(const Aws::String& value) { m_sSECustomerAlgorithm = value; } 227 228 /** 229 * <p>If server-side encryption with a customer-provided encryption key was 230 * requested, the response will include this header confirming the encryption 231 * algorithm used.</p> 232 */ SetSSECustomerAlgorithm(Aws::String && value)233 inline void SetSSECustomerAlgorithm(Aws::String&& value) { m_sSECustomerAlgorithm = std::move(value); } 234 235 /** 236 * <p>If server-side encryption with a customer-provided encryption key was 237 * requested, the response will include this header confirming the encryption 238 * algorithm used.</p> 239 */ SetSSECustomerAlgorithm(const char * value)240 inline void SetSSECustomerAlgorithm(const char* value) { m_sSECustomerAlgorithm.assign(value); } 241 242 /** 243 * <p>If server-side encryption with a customer-provided encryption key was 244 * requested, the response will include this header confirming the encryption 245 * algorithm used.</p> 246 */ WithSSECustomerAlgorithm(const Aws::String & value)247 inline PutObjectResult& WithSSECustomerAlgorithm(const Aws::String& value) { SetSSECustomerAlgorithm(value); return *this;} 248 249 /** 250 * <p>If server-side encryption with a customer-provided encryption key was 251 * requested, the response will include this header confirming the encryption 252 * algorithm used.</p> 253 */ WithSSECustomerAlgorithm(Aws::String && value)254 inline PutObjectResult& WithSSECustomerAlgorithm(Aws::String&& value) { SetSSECustomerAlgorithm(std::move(value)); return *this;} 255 256 /** 257 * <p>If server-side encryption with a customer-provided encryption key was 258 * requested, the response will include this header confirming the encryption 259 * algorithm used.</p> 260 */ WithSSECustomerAlgorithm(const char * value)261 inline PutObjectResult& WithSSECustomerAlgorithm(const char* value) { SetSSECustomerAlgorithm(value); return *this;} 262 263 264 /** 265 * <p>If server-side encryption with a customer-provided encryption key was 266 * requested, the response will include this header to provide round-trip message 267 * integrity verification of the customer-provided encryption key.</p> 268 */ GetSSECustomerKeyMD5()269 inline const Aws::String& GetSSECustomerKeyMD5() const{ return m_sSECustomerKeyMD5; } 270 271 /** 272 * <p>If server-side encryption with a customer-provided encryption key was 273 * requested, the response will include this header to provide round-trip message 274 * integrity verification of the customer-provided encryption key.</p> 275 */ SetSSECustomerKeyMD5(const Aws::String & value)276 inline void SetSSECustomerKeyMD5(const Aws::String& value) { m_sSECustomerKeyMD5 = value; } 277 278 /** 279 * <p>If server-side encryption with a customer-provided encryption key was 280 * requested, the response will include this header to provide round-trip message 281 * integrity verification of the customer-provided encryption key.</p> 282 */ SetSSECustomerKeyMD5(Aws::String && value)283 inline void SetSSECustomerKeyMD5(Aws::String&& value) { m_sSECustomerKeyMD5 = std::move(value); } 284 285 /** 286 * <p>If server-side encryption with a customer-provided encryption key was 287 * requested, the response will include this header to provide round-trip message 288 * integrity verification of the customer-provided encryption key.</p> 289 */ SetSSECustomerKeyMD5(const char * value)290 inline void SetSSECustomerKeyMD5(const char* value) { m_sSECustomerKeyMD5.assign(value); } 291 292 /** 293 * <p>If server-side encryption with a customer-provided encryption key was 294 * requested, the response will include this header to provide round-trip message 295 * integrity verification of the customer-provided encryption key.</p> 296 */ WithSSECustomerKeyMD5(const Aws::String & value)297 inline PutObjectResult& WithSSECustomerKeyMD5(const Aws::String& value) { SetSSECustomerKeyMD5(value); return *this;} 298 299 /** 300 * <p>If server-side encryption with a customer-provided encryption key was 301 * requested, the response will include this header to provide round-trip message 302 * integrity verification of the customer-provided encryption key.</p> 303 */ WithSSECustomerKeyMD5(Aws::String && value)304 inline PutObjectResult& WithSSECustomerKeyMD5(Aws::String&& value) { SetSSECustomerKeyMD5(std::move(value)); return *this;} 305 306 /** 307 * <p>If server-side encryption with a customer-provided encryption key was 308 * requested, the response will include this header to provide round-trip message 309 * integrity verification of the customer-provided encryption key.</p> 310 */ WithSSECustomerKeyMD5(const char * value)311 inline PutObjectResult& WithSSECustomerKeyMD5(const char* value) { SetSSECustomerKeyMD5(value); return *this;} 312 313 314 /** 315 * <p>If <code>x-amz-server-side-encryption</code> is present and has the value of 316 * <code>aws:kms</code>, this header specifies the ID of the Amazon Web Services 317 * Key Management Service (Amazon Web Services KMS) symmetric customer managed key 318 * that was used for the object. </p> 319 */ GetSSEKMSKeyId()320 inline const Aws::String& GetSSEKMSKeyId() const{ return m_sSEKMSKeyId; } 321 322 /** 323 * <p>If <code>x-amz-server-side-encryption</code> is present and has the value of 324 * <code>aws:kms</code>, this header specifies the ID of the Amazon Web Services 325 * Key Management Service (Amazon Web Services KMS) symmetric customer managed key 326 * that was used for the object. </p> 327 */ SetSSEKMSKeyId(const Aws::String & value)328 inline void SetSSEKMSKeyId(const Aws::String& value) { m_sSEKMSKeyId = value; } 329 330 /** 331 * <p>If <code>x-amz-server-side-encryption</code> is present and has the value of 332 * <code>aws:kms</code>, this header specifies the ID of the Amazon Web Services 333 * Key Management Service (Amazon Web Services KMS) symmetric customer managed key 334 * that was used for the object. </p> 335 */ SetSSEKMSKeyId(Aws::String && value)336 inline void SetSSEKMSKeyId(Aws::String&& value) { m_sSEKMSKeyId = std::move(value); } 337 338 /** 339 * <p>If <code>x-amz-server-side-encryption</code> is present and has the value of 340 * <code>aws:kms</code>, this header specifies the ID of the Amazon Web Services 341 * Key Management Service (Amazon Web Services KMS) symmetric customer managed key 342 * that was used for the object. </p> 343 */ SetSSEKMSKeyId(const char * value)344 inline void SetSSEKMSKeyId(const char* value) { m_sSEKMSKeyId.assign(value); } 345 346 /** 347 * <p>If <code>x-amz-server-side-encryption</code> is present and has the value of 348 * <code>aws:kms</code>, this header specifies the ID of the Amazon Web Services 349 * Key Management Service (Amazon Web Services KMS) symmetric customer managed key 350 * that was used for the object. </p> 351 */ WithSSEKMSKeyId(const Aws::String & value)352 inline PutObjectResult& WithSSEKMSKeyId(const Aws::String& value) { SetSSEKMSKeyId(value); return *this;} 353 354 /** 355 * <p>If <code>x-amz-server-side-encryption</code> is present and has the value of 356 * <code>aws:kms</code>, this header specifies the ID of the Amazon Web Services 357 * Key Management Service (Amazon Web Services KMS) symmetric customer managed key 358 * that was used for the object. </p> 359 */ WithSSEKMSKeyId(Aws::String && value)360 inline PutObjectResult& WithSSEKMSKeyId(Aws::String&& value) { SetSSEKMSKeyId(std::move(value)); return *this;} 361 362 /** 363 * <p>If <code>x-amz-server-side-encryption</code> is present and has the value of 364 * <code>aws:kms</code>, this header specifies the ID of the Amazon Web Services 365 * Key Management Service (Amazon Web Services KMS) symmetric customer managed key 366 * that was used for the object. </p> 367 */ WithSSEKMSKeyId(const char * value)368 inline PutObjectResult& WithSSEKMSKeyId(const char* value) { SetSSEKMSKeyId(value); return *this;} 369 370 371 /** 372 * <p>If present, specifies the Amazon Web Services KMS Encryption Context to use 373 * for object encryption. The value of this header is a base64-encoded UTF-8 string 374 * holding JSON with the encryption context key-value pairs.</p> 375 */ GetSSEKMSEncryptionContext()376 inline const Aws::String& GetSSEKMSEncryptionContext() const{ return m_sSEKMSEncryptionContext; } 377 378 /** 379 * <p>If present, specifies the Amazon Web Services KMS Encryption Context to use 380 * for object encryption. The value of this header is a base64-encoded UTF-8 string 381 * holding JSON with the encryption context key-value pairs.</p> 382 */ SetSSEKMSEncryptionContext(const Aws::String & value)383 inline void SetSSEKMSEncryptionContext(const Aws::String& value) { m_sSEKMSEncryptionContext = value; } 384 385 /** 386 * <p>If present, specifies the Amazon Web Services KMS Encryption Context to use 387 * for object encryption. The value of this header is a base64-encoded UTF-8 string 388 * holding JSON with the encryption context key-value pairs.</p> 389 */ SetSSEKMSEncryptionContext(Aws::String && value)390 inline void SetSSEKMSEncryptionContext(Aws::String&& value) { m_sSEKMSEncryptionContext = std::move(value); } 391 392 /** 393 * <p>If present, specifies the Amazon Web Services KMS Encryption Context to use 394 * for object encryption. The value of this header is a base64-encoded UTF-8 string 395 * holding JSON with the encryption context key-value pairs.</p> 396 */ SetSSEKMSEncryptionContext(const char * value)397 inline void SetSSEKMSEncryptionContext(const char* value) { m_sSEKMSEncryptionContext.assign(value); } 398 399 /** 400 * <p>If present, specifies the Amazon Web Services KMS Encryption Context to use 401 * for object encryption. The value of this header is a base64-encoded UTF-8 string 402 * holding JSON with the encryption context key-value pairs.</p> 403 */ WithSSEKMSEncryptionContext(const Aws::String & value)404 inline PutObjectResult& WithSSEKMSEncryptionContext(const Aws::String& value) { SetSSEKMSEncryptionContext(value); return *this;} 405 406 /** 407 * <p>If present, specifies the Amazon Web Services KMS Encryption Context to use 408 * for object encryption. The value of this header is a base64-encoded UTF-8 string 409 * holding JSON with the encryption context key-value pairs.</p> 410 */ WithSSEKMSEncryptionContext(Aws::String && value)411 inline PutObjectResult& WithSSEKMSEncryptionContext(Aws::String&& value) { SetSSEKMSEncryptionContext(std::move(value)); return *this;} 412 413 /** 414 * <p>If present, specifies the Amazon Web Services KMS Encryption Context to use 415 * for object encryption. The value of this header is a base64-encoded UTF-8 string 416 * holding JSON with the encryption context key-value pairs.</p> 417 */ WithSSEKMSEncryptionContext(const char * value)418 inline PutObjectResult& WithSSEKMSEncryptionContext(const char* value) { SetSSEKMSEncryptionContext(value); return *this;} 419 420 421 /** 422 * <p>Indicates whether the uploaded object uses an S3 Bucket Key for server-side 423 * encryption with Amazon Web Services KMS (SSE-KMS).</p> 424 */ GetBucketKeyEnabled()425 inline bool GetBucketKeyEnabled() const{ return m_bucketKeyEnabled; } 426 427 /** 428 * <p>Indicates whether the uploaded object uses an S3 Bucket Key for server-side 429 * encryption with Amazon Web Services KMS (SSE-KMS).</p> 430 */ SetBucketKeyEnabled(bool value)431 inline void SetBucketKeyEnabled(bool value) { m_bucketKeyEnabled = value; } 432 433 /** 434 * <p>Indicates whether the uploaded object uses an S3 Bucket Key for server-side 435 * encryption with Amazon Web Services KMS (SSE-KMS).</p> 436 */ WithBucketKeyEnabled(bool value)437 inline PutObjectResult& WithBucketKeyEnabled(bool value) { SetBucketKeyEnabled(value); return *this;} 438 439 440 GetRequestCharged()441 inline const RequestCharged& GetRequestCharged() const{ return m_requestCharged; } 442 443 SetRequestCharged(const RequestCharged & value)444 inline void SetRequestCharged(const RequestCharged& value) { m_requestCharged = value; } 445 446 SetRequestCharged(RequestCharged && value)447 inline void SetRequestCharged(RequestCharged&& value) { m_requestCharged = std::move(value); } 448 449 WithRequestCharged(const RequestCharged & value)450 inline PutObjectResult& WithRequestCharged(const RequestCharged& value) { SetRequestCharged(value); return *this;} 451 452 WithRequestCharged(RequestCharged && value)453 inline PutObjectResult& WithRequestCharged(RequestCharged&& value) { SetRequestCharged(std::move(value)); return *this;} 454 455 private: 456 457 Aws::String m_expiration; 458 459 Aws::String m_eTag; 460 461 ServerSideEncryption m_serverSideEncryption; 462 463 Aws::String m_versionId; 464 465 Aws::String m_sSECustomerAlgorithm; 466 467 Aws::String m_sSECustomerKeyMD5; 468 469 Aws::String m_sSEKMSKeyId; 470 471 Aws::String m_sSEKMSEncryptionContext; 472 473 bool m_bucketKeyEnabled; 474 475 RequestCharged m_requestCharged; 476 }; 477 478 } // namespace Model 479 } // namespace S3Crt 480 } // namespace Aws 481