/* * 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 System.IO; namespace Amazon.S3.Model { /// /// Represents an S3 Object. Contains all attributes that an S3 Object has. /// For more information about S3 Objects refer: /// /// public class S3Object { private string eTag; private string key; private DateTime? lastModified; private Owner owner; private long? size; private S3StorageClass storageClass; private string bucketName; /// /// Any ETag set on the 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; } /// /// The name of the bucket containing this object. /// public string BucketName { get { return this.bucketName; } set { this.bucketName = value; } } // check to see if the BucketName property is set internal bool IsSetBucketName() { return this.bucketName != null; } /// /// The key of the object. /// 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; } /// /// The date and time the object was last modified. /// /// The date retrieved from S3 is in ISO8601 format. A GMT formatted date is passed back to the user. /// /// public DateTime LastModified { get { return this.lastModified ?? default(DateTime); } set { this.lastModified = value; } } // Check to see if LastModified property is set internal bool IsSetLastModified() { return this.lastModified.HasValue; } /// /// The owner of the object. /// public Owner Owner { get { return this.owner; } set { this.owner = value; } } // Check to see if Owner property is set internal bool IsSetOwner() { return this.owner != null; } /// /// The size of the object. /// public long Size { get { return this.size ?? default(long); } set { this.size = value; } } // Check to see if Size property is set internal bool IsSetSize() { return this.size.HasValue; } /// /// The class of storage used to store the object. /// /// public S3StorageClass StorageClass { get { return this.storageClass; } set { this.storageClass = value; } } // Check to see if StorageClass property is set internal bool IsSetStorageClass() { return this.storageClass != null; } } }