Drive API v2 (revision 1)



com.google.api.services.drive.model
Class Permission

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.drive.model.Permission
All Implemented Interfaces:
Cloneable, Map<String,Object>

public final class Permission
extends GenericJson

A single permission for a file.

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 Drive API. For a detailed explanation see: http://code.google.com/p/google-api-java-client/wiki/Json

Author:
Google, Inc.

Nested Class Summary
 
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
Permission()
           
 
Method Summary
 List<String> getAdditionalRoles()
          Additional roles for this user.
 String getAuthKey()
          The authkey parameter required for this permission.
 String getEtag()
          The ETag of the permission.
 String getId()
          The ID of the permission.
 String getKind()
          This is always drive#permission.
 String getName()
          The name for this permission.
 String getPhotoLink()
          A link to the profile photo, if available.
 HttpHeaders getResponseHeaders()
          Returns the HTTP headers that were returned with the server response, or null.
 String getRole()
          The primary role for this user.
 String getSelfLink()
          A link back to this permission.
 String getType()
          The account type.
 String getValue()
          The email address or domain name for the entity.
 Boolean getWithLink()
          Whether the link is required for this permission.
 Permission setAdditionalRoles(List<String> additionalRoles)
          Additional roles for this user.
 Permission setAuthKey(String authKey)
          The authkey parameter required for this permission.
 Permission setEtag(String etag)
          The ETag of the permission.
 Permission setId(String id)
          The ID of the permission.
 Permission setKind(String kind)
          This is always drive#permission.
 Permission setName(String name)
          The name for this permission.
 Permission setPhotoLink(String photoLink)
          A link to the profile photo, if available.
 void setResponseHeaders(HttpHeaders responseHeaders)
          Sets the HTTP headers returned with the server response, or null.
 Permission setRole(String role)
          The primary role for this user.
 Permission setSelfLink(String selfLink)
          A link back to this permission.
 Permission setType(String type)
          The account type.
 Permission setValue(String value)
          The email address or domain name for the entity.
 Permission setWithLink(Boolean withLink)
          Whether the link is required for this permission.
 
Methods inherited from class com.google.api.client.json.GenericJson
clone, getFactory, setFactory, toPrettyString, toString
 
Methods inherited from class com.google.api.client.util.GenericData
entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, set, 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

Permission

public Permission()
Method Detail

getWithLink

public Boolean getWithLink()
Whether the link is required for this permission. The value returned may be null.


setWithLink

public Permission setWithLink(Boolean withLink)
Whether the link is required for this permission. The value set may be null.


getKind

public String getKind()
This is always drive#permission. The value returned may be null.


setKind

public Permission setKind(String kind)
This is always drive#permission. The value set may be null.


getName

public String getName()
The name for this permission. The value returned may be null.


setName

public Permission setName(String name)
The name for this permission. The value set may be null.


getValue

public String getValue()
The email address or domain name for the entity. This is not populated in responses. The value returned may be null.


setValue

public Permission setValue(String value)
The email address or domain name for the entity. This is not populated in responses. The value set may be null.


getId

public String getId()
The ID of the permission. The value returned may be null.


setId

public Permission setId(String id)
The ID of the permission. The value set may be null.


getAuthKey

public String getAuthKey()
The authkey parameter required for this permission. The value returned may be null.


setAuthKey

public Permission setAuthKey(String authKey)
The authkey parameter required for this permission. The value set may be null.


getEtag

public String getEtag()
The ETag of the permission. The value returned may be null.


setEtag

public Permission setEtag(String etag)
The ETag of the permission. The value set may be null.


getRole

public String getRole()
The primary role for this user. Allowed values are: - owner - reader - writer The value returned may be null.


setRole

public Permission setRole(String role)
The primary role for this user. Allowed values are: - owner - reader - writer The value set may be null.


getPhotoLink

public String getPhotoLink()
A link to the profile photo, if available. The value returned may be null.


setPhotoLink

public Permission setPhotoLink(String photoLink)
A link to the profile photo, if available. The value set may be null.


getType

public String getType()
The account type. Allowed values are: - user - group - domain - anyone The value returned may be null.


setType

public Permission setType(String type)
The account type. Allowed values are: - user - group - domain - anyone The value set may be null.


getAdditionalRoles

public List<String> getAdditionalRoles()
Additional roles for this user. Only commenter is currently allowed. The value returned may be null.


setAdditionalRoles

public Permission setAdditionalRoles(List<String> additionalRoles)
Additional roles for this user. Only commenter is currently allowed. The value set may be null.


getSelfLink

public String getSelfLink()
A link back to this permission. The value returned may be null.


setSelfLink

public Permission setSelfLink(String selfLink)
A link back to this permission. The value set may be null.


setResponseHeaders

public void setResponseHeaders(HttpHeaders responseHeaders)
Sets the HTTP headers returned with the server response, or null. This member should only be non-null if this object was the top level element of a response. For example, a request that returns a single Permission would include the response headers, while a request which returns an array of Permission, would have a non-null response header in the enclosing object only.


getResponseHeaders

public HttpHeaders getResponseHeaders()
Returns the HTTP headers that were returned with the server response, or null.