/*
* Copyright 2010-2013 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 System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using Amazon.Runtime;
namespace Amazon.S3.Model
{
///
/// Returns information about the PutObject response and response metadata.
///
public class PutObjectResponse : AmazonWebServiceResponse
{
private Expiration expiration;
private ServerSideEncryptionMethod serverSideEncryption;
private string eTag;
private string versionId;
private string serverSideEncryptionKeyManagementServiceKeyId;
private ServerSideEncryptionCustomerMethod serverSideCustomerEncryption;
private string serverSideEncryptionCustomerProvidedKeyMD5;
private string serverSideEncryptionKeyManagementServiceEncryptionContext;
private RequestCharged requestCharged;
///
/// 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; }
}
///
/// The Server-side encryption algorithm used when storing this object in S3.
///
///
public ServerSideEncryptionMethod ServerSideEncryptionMethod
{
get { return this.serverSideEncryption; }
set { this.serverSideEncryption = value; }
}
///
/// Entity tag for the uploaded object.
///
///
public string ETag
{
get { return this.eTag; }
set { this.eTag = value; }
}
// Check to see if ETag property is set
internal bool IsSetETag()
{
return this.eTag != null;
}
///
/// Version of the object.
///
///
public string VersionId
{
get { return this.versionId; }
set { this.versionId = value; }
}
// Check to see if VersionId property is set
internal bool IsSetVersionId()
{
return this.versionId != null;
}
///
/// The id of the AWS Key Management Service key that Amazon S3 uses to encrypt and decrypt the object.
///
public string ServerSideEncryptionKeyManagementServiceKeyId
{
get { return this.serverSideEncryptionKeyManagementServiceKeyId; }
set { this.serverSideEncryptionKeyManagementServiceKeyId = value; }
}
///
/// Checks if ServerSideEncryptionKeyManagementServiceKeyId property is set.
///
/// true if ServerSideEncryptionKeyManagementServiceKeyId property is set.
internal bool IsSetServerSideEncryptionKeyManagementServiceKeyId()
{
return !System.String.IsNullOrEmpty(this.serverSideEncryptionKeyManagementServiceKeyId);
}
///
/// 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.
///
public string ServerSideEncryptionKeyManagementServiceEncryptionContext
{
get { return this.serverSideEncryptionKeyManagementServiceEncryptionContext; }
set { this.serverSideEncryptionKeyManagementServiceEncryptionContext = 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;
}
}
}