/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.S3.Model
{
///
/// Returns information about the CopyObject response and response metadata.
///
public class CopyObjectResponse : AmazonWebServiceResponse
{
// In the model these are properties of a CopyObjectResult shape,
// but here they've been hoisted up to this response class
private string eTag;
private string lastModified;
private string _checksumCRC32;
private string _checksumCRC32C;
private string _checksumSHA1;
private string _checksumSHA256;
private Expiration expiration;
private string srcVersionId;
private string versionId;
private ServerSideEncryptionMethod serverSideEncryption;
private ServerSideEncryptionCustomerMethod serverSideCustomerEncryption;
private string serverSideEncryptionCustomerProvidedKeyMD5;
private string serverSideEncryptionKeyManagementServiceKeyId;
private string serverSideEncryptionKeyManagementServiceEncryptionContext;
private RequestCharged requestCharged;
private bool? bucketKeyEnabled;
///
/// Gets and sets the property BucketKeyEnabled.
///
/// Indicates whether the copied object uses an S3 Bucket Key for server-side encryption
/// with Amazon Web Services KMS (SSE-KMS).
///
///
public bool BucketKeyEnabled
{
get { return this.bucketKeyEnabled.GetValueOrDefault(); }
set { this.bucketKeyEnabled = value; }
}
internal bool IsSetBucketKeyEnabled()
{
return bucketKeyEnabled.HasValue;
}
///
/// Gets and sets the SourceVersionId property.
/// This is the Version Id of the Source Object
///
public string SourceVersionId
{
get { return this.srcVersionId; }
set { this.srcVersionId = value; }
}
///
/// Gets and sets the Expiration property.
/// Specifies the expiration date for the object and the
/// rule governing the expiration.
/// Is null if expiration is not applicable.
///
public Expiration Expiration
{
get { return this.expiration; }
set { this.expiration = value; }
}
///
/// If present, indicates that the requester was successfully charged for the request.
///
public RequestCharged RequestCharged
{
get { return this.requestCharged; }
set { this.requestCharged = value; }
}
///
/// Checks to see if RequestCharged is set.
///
/// true, if RequestCharged property is set.
internal bool IsSetRequestCharged()
{
return requestCharged != null;
}
///
///
/// The server-side encryption algorithm used when storing this object in Amazon S3 (for
/// example, AES256, aws:kms
).
///
///
public ServerSideEncryptionMethod ServerSideEncryptionMethod
{
get { return this.serverSideEncryption; }
set { this.serverSideEncryption = value; }
}
///
/// The Server-side encryption algorithm to be used with the customer provided key.
///
public ServerSideEncryptionCustomerMethod ServerSideEncryptionCustomerMethod
{
get { return this.serverSideCustomerEncryption; }
set { this.serverSideCustomerEncryption = value; }
}
///
/// The MD5 of the customer encryption key specified in the ServerSideEncryptionCustomerProvidedKey property. The MD5 is
/// base 64 encoded. This field is optional, the SDK will calculate the MD5 if this is not set.
///
public string ServerSideEncryptionCustomerProvidedKeyMD5
{
get { return this.serverSideEncryptionCustomerProvidedKeyMD5; }
set { this.serverSideEncryptionCustomerProvidedKeyMD5 = value; }
}
///
/// Specifies the AWS 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.
///
/// If present, specifies 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.
///
///
[AWSProperty(Sensitive=true)]
public string ServerSideEncryptionKeyManagementServiceEncryptionContext
{
get { return this.serverSideEncryptionKeyManagementServiceEncryptionContext; }
set { this.serverSideEncryptionKeyManagementServiceEncryptionContext = value; }
}
///
/// The id of the AWS Key Management Service key that Amazon S3 uses to encrypt and decrypt the object.
///
/// If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon
/// Web Services KMS) symmetric encryption customer managed key that was used for the
/// object.
///
///
[AWSProperty(Sensitive=true)]
public string ServerSideEncryptionKeyManagementServiceKeyId
{
get { return this.serverSideEncryptionKeyManagementServiceKeyId; }
set { this.serverSideEncryptionKeyManagementServiceKeyId = value; }
}
///
/// Version ID of the newly created copy.
///
public string VersionId
{
get { return this.versionId; }
set { this.versionId = value; }
}
///
/// Gets and sets the ETag property.
///
public string ETag
{
get { return this.eTag; }
set { this.eTag = value; }
}
///
/// Gets and sets the LastModified property.
///
public string LastModified
{
get { return this.lastModified; }
set { this.lastModified = value; }
}
///
/// Gets and sets the property ChecksumCRC32.
///
/// The base64-encoded, 32-bit CRC32 checksum of the object.
///
///
public string ChecksumCRC32
{
get { return this._checksumCRC32; }
set { this._checksumCRC32 = value; }
}
// Check to see if ChecksumCRC32 property is set
internal bool IsSetChecksumCRC32()
{
return this._checksumCRC32 != null;
}
///
/// Gets and sets the property ChecksumCRC32C.
///
/// The base64-encoded, 32-bit CRC32C checksum of the object.
///
///
public string ChecksumCRC32C
{
get { return this._checksumCRC32C; }
set { this._checksumCRC32C = value; }
}
// Check to see if ChecksumCRC32C property is set
internal bool IsSetChecksumCRC32C()
{
return this._checksumCRC32C != null;
}
///
/// Gets and sets the property ChecksumSHA1.
///
/// The base64-encoded, 160-bit SHA-1 digest of the object.
///
///
public string ChecksumSHA1
{
get { return this._checksumSHA1; }
set { this._checksumSHA1 = value; }
}
// Check to see if ChecksumSHA1 property is set
internal bool IsSetChecksumSHA1()
{
return this._checksumSHA1 != null;
}
///
/// Gets and sets the property ChecksumSHA256.
///
/// The base64-encoded, 256-bit SHA-256 digest of the object.
///
///
public string ChecksumSHA256
{
get { return this._checksumSHA256; }
set { this._checksumSHA256 = value; }
}
// Check to see if ChecksumSHA256 property is set
internal bool IsSetChecksumSHA256()
{
return this._checksumSHA256 != null;
}
}
}