Cloud Storage API v1beta2 (revision 2)



com.google.api.services.storage.model
Class StorageObject

java.lang.Object
  extended by java.util.AbstractMap<String,Object>
      extended by com.google.api.client.util.GenericData
          extended by com.google.api.client.json.GenericJson
              extended by com.google.api.services.storage.model.StorageObject
All Implemented Interfaces:
Cloneable, Map<String,Object>

public final class StorageObject
extends GenericJson

An object.

This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Cloud Storage API. For a detailed explanation see: http://code.google.com/p/google-http-java-client/wiki/JSON

Author:
Google, Inc.

Nested Class Summary
static class StorageObject.Owner
          The owner of the object.
 
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
GenericData.Flags
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
StorageObject()
           
 
Method Summary
 StorageObject clone()
           
 List<ObjectAccessControl> getAcl()
          Access controls on the object.
 String getBucket()
          The bucket containing this object.
 String getCacheControl()
          Cache-Control directive for the object data.
 Integer getComponentCount()
          Number of underlying components that make up this object.
 String getContentDisposition()
          Content-Disposition of the object data.
 String getContentEncoding()
          Content-Encoding of the object data.
 String getContentLanguage()
          Content-Language of the object data.
 String getContentType()
          Content-Type of the object data.
 String getCrc32c()
          CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64.
 String getEtag()
          HTTP 1.1 Entity tag for the object.
 Long getGeneration()
          The content generation of this object.
 String getId()
          The ID of the object.
 String getKind()
          The kind of item this is.
 String getMd5Hash()
          MD5 hash of the data; encoded using base64.
 String getMediaLink()
          Media download link.
 Map<String,String> getMetadata()
          User-provided metadata, in key/value pairs.
 Long getMetageneration()
          The generation of the metadata for this object at this generation.
 String getName()
          The name of this object.
 StorageObject.Owner getOwner()
          The owner of the object.
 String getSelfLink()
          The link to this object.
 BigInteger getSize()
          Content-Length of the data in bytes.
 DateTime getTimeDeleted()
          Deletion time of the object in RFC 3339 format.
 DateTime getUpdated()
          Modification time of the object metadata in RFC 3339 format.
 StorageObject set(String fieldName, Object value)
           
 StorageObject setAcl(List<ObjectAccessControl> acl)
          Access controls on the object.
 StorageObject setBucket(String bucket)
          The bucket containing this object.
 StorageObject setCacheControl(String cacheControl)
          Cache-Control directive for the object data.
 StorageObject setComponentCount(Integer componentCount)
          Number of underlying components that make up this object.
 StorageObject setContentDisposition(String contentDisposition)
          Content-Disposition of the object data.
 StorageObject setContentEncoding(String contentEncoding)
          Content-Encoding of the object data.
 StorageObject setContentLanguage(String contentLanguage)
          Content-Language of the object data.
 StorageObject setContentType(String contentType)
          Content-Type of the object data.
 StorageObject setCrc32c(String crc32c)
          CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64.
 StorageObject setEtag(String etag)
          HTTP 1.1 Entity tag for the object.
 StorageObject setGeneration(Long generation)
          The content generation of this object.
 StorageObject setId(String id)
          The ID of the object.
 StorageObject setKind(String kind)
          The kind of item this is.
 StorageObject setMd5Hash(String md5Hash)
          MD5 hash of the data; encoded using base64.
 StorageObject setMediaLink(String mediaLink)
          Media download link.
 StorageObject setMetadata(Map<String,String> metadata)
          User-provided metadata, in key/value pairs.
 StorageObject setMetageneration(Long metageneration)
          The generation of the metadata for this object at this generation.
 StorageObject setName(String name)
          The name of this object.
 StorageObject setOwner(StorageObject.Owner owner)
          The owner of the object.
 StorageObject setSelfLink(String selfLink)
          The link to this object.
 StorageObject setSize(BigInteger size)
          Content-Length of the data in bytes.
 StorageObject setTimeDeleted(DateTime timeDeleted)
          Deletion time of the object in RFC 3339 format.
 StorageObject setUpdated(DateTime updated)
          Modification time of the object metadata in RFC 3339 format.
 
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
 
Methods inherited from class com.google.api.client.util.GenericData
entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeys
 
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StorageObject

public StorageObject()
Method Detail

getAcl

public List<ObjectAccessControl> getAcl()
Access controls on the object.

Returns:
value or null for none

setAcl

public StorageObject setAcl(List<ObjectAccessControl> acl)
Access controls on the object.

Parameters:
acl - acl or null for none

getBucket

public String getBucket()
The bucket containing this object.

Returns:
value or null for none

setBucket

public StorageObject setBucket(String bucket)
The bucket containing this object.

Parameters:
bucket - bucket or null for none

getCacheControl

public String getCacheControl()
Cache-Control directive for the object data.

Returns:
value or null for none

setCacheControl

public StorageObject setCacheControl(String cacheControl)
Cache-Control directive for the object data.

Parameters:
cacheControl - cacheControl or null for none

getComponentCount

public Integer getComponentCount()
Number of underlying components that make up this object. Components are accumulated by compose operations and are limited to a count of 32.

Returns:
value or null for none

setComponentCount

public StorageObject setComponentCount(Integer componentCount)
Number of underlying components that make up this object. Components are accumulated by compose operations and are limited to a count of 32.

Parameters:
componentCount - componentCount or null for none

getContentDisposition

public String getContentDisposition()
Content-Disposition of the object data.

Returns:
value or null for none

setContentDisposition

public StorageObject setContentDisposition(String contentDisposition)
Content-Disposition of the object data.

Parameters:
contentDisposition - contentDisposition or null for none

getContentEncoding

public String getContentEncoding()
Content-Encoding of the object data.

Returns:
value or null for none

setContentEncoding

public StorageObject setContentEncoding(String contentEncoding)
Content-Encoding of the object data.

Parameters:
contentEncoding - contentEncoding or null for none

getContentLanguage

public String getContentLanguage()
Content-Language of the object data.

Returns:
value or null for none

setContentLanguage

public StorageObject setContentLanguage(String contentLanguage)
Content-Language of the object data.

Parameters:
contentLanguage - contentLanguage or null for none

getContentType

public String getContentType()
Content-Type of the object data.

Returns:
value or null for none

setContentType

public StorageObject setContentType(String contentType)
Content-Type of the object data.

Parameters:
contentType - contentType or null for none

getCrc32c

public String getCrc32c()
CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64.

Returns:
value or null for none

setCrc32c

public StorageObject setCrc32c(String crc32c)
CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64.

Parameters:
crc32c - crc32c or null for none

getEtag

public String getEtag()
HTTP 1.1 Entity tag for the object.

Returns:
value or null for none

setEtag

public StorageObject setEtag(String etag)
HTTP 1.1 Entity tag for the object.

Parameters:
etag - etag or null for none

getGeneration

public Long getGeneration()
The content generation of this object. Used for object versioning.

Returns:
value or null for none

setGeneration

public StorageObject setGeneration(Long generation)
The content generation of this object. Used for object versioning.

Parameters:
generation - generation or null for none

getId

public String getId()
The ID of the object.

Returns:
value or null for none

setId

public StorageObject setId(String id)
The ID of the object.

Parameters:
id - id or null for none

getKind

public String getKind()
The kind of item this is. For objects, this is always storage#object.

Returns:
value or null for none

setKind

public StorageObject setKind(String kind)
The kind of item this is. For objects, this is always storage#object.

Parameters:
kind - kind or null for none

getMd5Hash

public String getMd5Hash()
MD5 hash of the data; encoded using base64.

Returns:
value or null for none

setMd5Hash

public StorageObject setMd5Hash(String md5Hash)
MD5 hash of the data; encoded using base64.

Parameters:
md5Hash - md5Hash or null for none

getMediaLink

public String getMediaLink()
Media download link.

Returns:
value or null for none

setMediaLink

public StorageObject setMediaLink(String mediaLink)
Media download link.

Parameters:
mediaLink - mediaLink or null for none

getMetadata

public Map<String,String> getMetadata()
User-provided metadata, in key/value pairs.

Returns:
value or null for none

setMetadata

public StorageObject setMetadata(Map<String,String> metadata)
User-provided metadata, in key/value pairs.

Parameters:
metadata - metadata or null for none

getMetageneration

public Long getMetageneration()
The generation of the metadata for this object at this generation. Used for metadata versioning. Has no meaning outside of the context of this generation.

Returns:
value or null for none

setMetageneration

public StorageObject setMetageneration(Long metageneration)
The generation of the metadata for this object at this generation. Used for metadata versioning. Has no meaning outside of the context of this generation.

Parameters:
metageneration - metageneration or null for none

getName

public String getName()
The name of this object. Required if not specified by URL parameter.

Returns:
value or null for none

setName

public StorageObject setName(String name)
The name of this object. Required if not specified by URL parameter.

Parameters:
name - name or null for none

getOwner

public StorageObject.Owner getOwner()
The owner of the object. This will always be the uploader of the object.

Returns:
value or null for none

setOwner

public StorageObject setOwner(StorageObject.Owner owner)
The owner of the object. This will always be the uploader of the object.

Parameters:
owner - owner or null for none

getSelfLink

public String getSelfLink()
The link to this object.

Returns:
value or null for none

setSelfLink

public StorageObject setSelfLink(String selfLink)
The link to this object.

Parameters:
selfLink - selfLink or null for none

getSize

public BigInteger getSize()
Content-Length of the data in bytes.

Returns:
value or null for none

setSize

public StorageObject setSize(BigInteger size)
Content-Length of the data in bytes.

Parameters:
size - size or null for none

getTimeDeleted

public DateTime getTimeDeleted()
Deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.

Returns:
value or null for none

setTimeDeleted

public StorageObject setTimeDeleted(DateTime timeDeleted)
Deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.

Parameters:
timeDeleted - timeDeleted or null for none

getUpdated

public DateTime getUpdated()
Modification time of the object metadata in RFC 3339 format.

Returns:
value or null for none

setUpdated

public StorageObject setUpdated(DateTime updated)
Modification time of the object metadata in RFC 3339 format.

Parameters:
updated - updated or null for none

set

public StorageObject set(String fieldName,
                         Object value)
Overrides:
set in class GenericJson

clone

public StorageObject clone()
Overrides:
clone in class GenericJson