Class S3VersionSummary
- java.lang.Object
-
- com.amazonaws.services.s3.model.S3VersionSummary
-
- All Implemented Interfaces:
Serializable
public class S3VersionSummary extends Object implements Serializable
Contains the summary of a version stored in an Amazon S3 bucket. This object doesn't contain the version's full metadata or any of its contents.- See Also:
S3Object,S3ObjectSummary, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected StringbucketNameThe name of the bucket in which this version is stored
-
Constructor Summary
Constructors Constructor Description S3VersionSummary()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBucketName()Gets the name of the Amazon S3 bucket in which this version is stored.StringgetETag()Gets the hex encoded 128-bit MD5 hash of this version's contents as computed by Amazon S3.StringgetKey()Gets the key under which this version is stored in Amazon S3.DategetLastModified()Gets the date according to Amazon S3 at which this version was last modified.OwnergetOwner()Gets the owner of this version.longgetSize()Gets the size of this version in bytes.StringgetStorageClass()Gets the storage class used by Amazon S3 for this version.StringgetVersionId()Gets the version ID which uniquely identifies this version of an object.booleanisDeleteMarker()Returns whether or not this version represents a delete marker.booleanisLatest()Returns whether or not this version is the latest version for the associated object.voidsetBucketName(String bucketName)Sets the name of the Amazon S3 bucket in which this version is stored.voidsetETag(String eTag)Sets the hex encoded 128-bit MD5 hash of this version's contents as computed by Amazon S3.voidsetIsDeleteMarker(boolean isDeleteMarker)Intended for internal use only in the Amazon S3 client code.voidsetIsLatest(boolean isLatest)For internal use only.voidsetKey(String key)Sets the key under which this version is stored in Amazon S3.voidsetLastModified(Date lastModified)Sets the date according to Amazon S3 at which this version was last modified.voidsetOwner(Owner owner)For internal use only.voidsetSize(long size)Sets the size of this version in bytes.voidsetStorageClass(String storageClass)Sets the storage class used by Amazon S3 for this version.voidsetVersionId(String id)Sets the version ID which uniquely identifies this version of an object.
-
-
-
Field Detail
-
bucketName
protected String bucketName
The name of the bucket in which this version is stored
-
-
Method Detail
-
getBucketName
public String getBucketName()
Gets the name of the Amazon S3 bucket in which this version is stored.- Returns:
- The name of the Amazon S3 bucket in which this version is stored.
- See Also:
setBucketName(String)
-
setBucketName
public void setBucketName(String bucketName)
Sets the name of the Amazon S3 bucket in which this version is stored.- Parameters:
bucketName- The name of the Amazon S3 bucket in which this version is stored.- See Also:
getBucketName()
-
getKey
public String getKey()
Gets the key under which this version is stored in Amazon S3.- Returns:
- The key under which this version is stored in Amazon S3.
- See Also:
setKey(String)
-
setKey
public void setKey(String key)
Sets the key under which this version is stored in Amazon S3.- Parameters:
key- The key under which this version is stored in Amazon S3.- See Also:
getKey()
-
getVersionId
public String getVersionId()
Gets the version ID which uniquely identifies this version of an object.Objects created before versioning was enabled or when versioning is suspended will be given the default/null version ID (see
Constants.NULL_VERSION_ID). Note that theConstants.NULL_VERSION_IDis a valid version ID and is not the same as not having a version ID.- Returns:
- The version ID which uniquely identifies this version of an object.
- See Also:
setVersionId(String)
-
setVersionId
public void setVersionId(String id)
Sets the version ID which uniquely identifies this version of an object.- Parameters:
id- The version ID which uniquely identifies this version of an object.- See Also:
getVersionId()
-
isLatest
public boolean isLatest()
Returns whether or not this version is the latest version for the associated object.- Returns:
- The value
trueif this version is the latest version for the associated object; returns the valuefalseif otherwise.
-
setIsLatest
public void setIsLatest(boolean isLatest)
For internal use only. Sets whether this version is the latest version for the associated object. This method is intended to be used only by the client internals and developers shouldn't need to use it.- Parameters:
isLatest- True if this version represents the latest version for the associated object in S3.
-
getLastModified
public Date getLastModified()
Gets the date according to Amazon S3 at which this version was last modified.- Returns:
- The date according to Amazon S3 at which this version was last modified.
- See Also:
setLastModified(Date)
-
setLastModified
public void setLastModified(Date lastModified)
Sets the date according to Amazon S3 at which this version was last modified.- Parameters:
lastModified- The date according to Amazon S3 at which this version was last modified.- See Also:
getLastModified()
-
getOwner
public Owner getOwner()
Gets the owner of this version. Returnsnullif the requester doesn't havePermission.ReadAcppermission for this version or owns the bucket in which it resides.- Returns:
- The owner of this version. Returns
nullif the requester doesn't have permission to see object ownership for this version. - See Also:
setOwner(Owner)
-
setOwner
public void setOwner(Owner owner)
For internal use only. Sets the owner of this version. This method is intended to be used only by the client internals and developers shouldn't need to use it.- Parameters:
owner- The owner of this version.- See Also:
getOwner()
-
isDeleteMarker
public boolean isDeleteMarker()
Returns whether or not this version represents a delete marker.Delete markers are special types of versions that have no data associated with them. When deleting a versioned object in Amazon S3 without specifying an explicit version ID, a new delete marker is created as the latest version of that object to mark that the object was deleted. This occurs even though the previous versions still exist in Amazon S3.
Delete markers have no data associated with them and therefore have no associated ACL, size or storage class. Only requesters with read access to a bucket can learn of their existence by listing the versions in a bucket.
- Returns:
- The value
trueif this version represents a delete marker. Returns the valuefalseif otherwise.
-
setIsDeleteMarker
public void setIsDeleteMarker(boolean isDeleteMarker)
Intended for internal use only in the Amazon S3 client code. Sets the value of theisDeleteMarkerproperty to record if this is a delete marker or not.- Parameters:
isDeleteMarker- Specifytrueif this version summary represents a delete marker, otherwisefalseif it is a regular version summary.
-
getETag
public String getETag()
Gets the hex encoded 128-bit MD5 hash of this version's contents as computed by Amazon S3.- Returns:
- The hex encoded 128-bit MD5 hash of this version's contents as computed by Amazon S3.
- See Also:
setETag(String)
-
setETag
public void setETag(String eTag)
Sets the hex encoded 128-bit MD5 hash of this version's contents as computed by Amazon S3.- Parameters:
eTag- The hex encoded 128-bit MD5 hash of this version's contents as computed by Amazon S3.- See Also:
getETag()
-
getStorageClass
public String getStorageClass()
Gets the storage class used by Amazon S3 for this version.- Returns:
- The storage class used by Amazon S3 for this version.
- See Also:
setStorageClass(String)
-
setStorageClass
public void setStorageClass(String storageClass)
Sets the storage class used by Amazon S3 for this version.- Parameters:
storageClass- The storage class used by Amazon S3 for this version.- See Also:
getStorageClass()
-
getSize
public long getSize()
Gets the size of this version in bytes.- Returns:
- The size of this version in bytes.
- See Also:
setSize(long)
-
setSize
public void setSize(long size)
Sets the size of this version in bytes.- Parameters:
size- The size of this version in bytes.- See Also:
getSize()
-
-