/*
* 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 System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.S3.Model
{
///
/// Returns information about the InitiateMultipartUpload response and response metadata.
///
public class InitiateMultipartUploadResponse : AmazonWebServiceResponse
{
private DateTime? abortDate;
private string abortRuleId;
private bool? bucketKeyEnabled;
private string bucketName;
private ChecksumAlgorithm _checksumAlgorithm;
private string key;
private RequestCharged requestCharged;
private ServerSideEncryptionMethod serverSideEncryption;
private ServerSideEncryptionCustomerMethod serverSideCustomerEncryption;
private string serverSideEncryptionCustomerProvidedKeyMD5;
private string serverSideEncryptionKeyManagementServiceKeyId;
private string serverSideEncryptionKeyManagementServiceEncryptionContext;
private string uploadId;
///
/// Gets and sets the property AbortDate.
///
/// If the bucket has a lifecycle rule configured with an action to abort incomplete multipart
/// uploads and the prefix in the lifecycle rule matches the object name in the request,
/// the response includes this header. The header indicates when the initiated multipart
/// upload becomes eligible for an abort operation. For more information, see
/// Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy.
///
///
///
/// The response also includes the x-amz-abort-rule-id
header that provides
/// the ID of the lifecycle configuration rule that defines this action.
///
///
public DateTime AbortDate
{
get { return this.abortDate.GetValueOrDefault(); }
set { this.abortDate = value; }
}
// Check to see if AbortDate property is set
internal bool IsSetAbortDate()
{
return this.abortDate.HasValue;
}
///
/// Gets and sets the property AbortRuleId.
///
/// This header is returned along with the x-amz-abort-date
header. It identifies
/// the applicable lifecycle configuration rule that defines the action to abort incomplete
/// multipart uploads.
///
///
public string AbortRuleId
{
get { return this.abortRuleId; }
set { this.abortRuleId = value; }
}
// Check to see if AbortRuleId property is set
internal bool IsSetAbortRuleId()
{
return this.abortRuleId != null;
}
///
/// Gets and sets the property BucketKeyEnabled.
///
/// Indicates whether the multipart upload 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; }
}
// Check to see if BucketKeyEnabled property is set
internal bool IsSetBucketKeyEnabled()
{
return bucketKeyEnabled.HasValue;
}
///
/// Gets and sets the property BucketName.
///
/// The name of the bucket to which the multipart upload was initiated. Does not return
/// the access point ARN or access point alias if used.
///
///
///
/// When using this action with an access point, you must direct requests to the access
/// point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
/// When using this action with an access point through the Amazon Web Services SDKs,
/// you provide the access point ARN in place of the bucket name. For more information
/// about access point ARNs, see Using
/// access points in the Amazon S3 User Guide.
///
///
///
/// When you use this action with Amazon S3 on Outposts, you must direct requests to the
/// S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
.
/// When you use this action with S3 on Outposts through the Amazon Web Services SDKs,
/// you provide the Outposts access point ARN in place of the bucket name. For more information
/// about S3 on Outposts ARNs, see What
/// is S3 on Outposts? in the Amazon S3 User Guide.
///
///
public string BucketName
{
get { return this.bucketName; }
set { this.bucketName = value; }
}
// Check to see if BucketName property is set
internal bool IsSetBucketName()
{
return this.bucketName != null;
}
///
/// Gets and sets the property ChecksumAlgorithm.
///
/// The algorithm that was used to create a checksum of the object.
///
///
public ChecksumAlgorithm ChecksumAlgorithm
{
get { return this._checksumAlgorithm; }
set { this._checksumAlgorithm = value; }
}
// Check to see if ChecksumAlgorithm property is set
internal bool IsSetChecksumAlgorithm()
{
return this._checksumAlgorithm != null;
}
///
/// Gets and sets the property Key.
///
/// Object key for which the multipart upload was initiated.
///
///
public string Key
{
get { return this.key; }
set { this.key = value; }
}
// Check to see if Key property is set
internal bool IsSetKey()
{
return this.key != null;
}
///
/// 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; }
}
///
/// 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; }
}
///
/// Checks if ServerSideEncryptionKeyManagementServiceKeyId property is set.
///
/// true if ServerSideEncryptionKeyManagementServiceKeyId property is set.
internal bool IsSetServerSideEncryptionKeyManagementServiceKeyId()
{
return !System.String.IsNullOrEmpty(this.serverSideEncryptionKeyManagementServiceKeyId);
}
///
/// 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; }
}
///
/// Gets and sets the property UploadId.
///
/// ID for the initiated multipart upload.
///
///
public string UploadId
{
get { return this.uploadId; }
set { this.uploadId = value; }
}
// Check to see if UploadId property is set
internal bool IsSetUploadId()
{
return this.uploadId != null;
}
}
}