Google OAuth2 API v2 (revision 32)



com.google.api.services.oauth2.model
Class Tokeninfo

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

public final class Tokeninfo
extends GenericJson

Model definition for Tokeninfo.

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 Google OAuth2 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
Tokeninfo()
           
 
Method Summary
 Tokeninfo clone()
           
 String getAccessType()
          The access type granted with this token.
 String getAudience()
          Who is the intended audience for this token.
 String getEmail()
          The email address of the user.
 Integer getExpiresIn()
          The expiry time of the token, as number of seconds left until expiry.
 String getIssuedTo()
          To whom was the token issued to.
 String getScope()
          The space separated list of scopes granted to this token.
 String getUserId()
          The Gaia obfuscated user id.
 Boolean getVerifiedEmail()
          Boolean flag which is true if the email address is verified.
 Tokeninfo set(String fieldName, Object value)
           
 Tokeninfo setAccessType(String accessType)
          The access type granted with this token.
 Tokeninfo setAudience(String audience)
          Who is the intended audience for this token.
 Tokeninfo setEmail(String email)
          The email address of the user.
 Tokeninfo setExpiresIn(Integer expiresIn)
          The expiry time of the token, as number of seconds left until expiry.
 Tokeninfo setIssuedTo(String issuedTo)
          To whom was the token issued to.
 Tokeninfo setScope(String scope)
          The space separated list of scopes granted to this token.
 Tokeninfo setUserId(String userId)
          The Gaia obfuscated user id.
 Tokeninfo setVerifiedEmail(Boolean verifiedEmail)
          Boolean flag which is true if the email address is verified.
 
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

Tokeninfo

public Tokeninfo()
Method Detail

getAccessType

public String getAccessType()
The access type granted with this token. It can be offline or online.

Returns:
value or null for none

setAccessType

public Tokeninfo setAccessType(String accessType)
The access type granted with this token. It can be offline or online.

Parameters:
accessType - accessType or null for none

getAudience

public String getAudience()
Who is the intended audience for this token. In general the same as issued_to.

Returns:
value or null for none

setAudience

public Tokeninfo setAudience(String audience)
Who is the intended audience for this token. In general the same as issued_to.

Parameters:
audience - audience or null for none

getEmail

public String getEmail()
The email address of the user. Present only if the email scope is present in the request.

Returns:
value or null for none

setEmail

public Tokeninfo setEmail(String email)
The email address of the user. Present only if the email scope is present in the request.

Parameters:
email - email or null for none

getExpiresIn

public Integer getExpiresIn()
The expiry time of the token, as number of seconds left until expiry.

Returns:
value or null for none

setExpiresIn

public Tokeninfo setExpiresIn(Integer expiresIn)
The expiry time of the token, as number of seconds left until expiry.

Parameters:
expiresIn - expiresIn or null for none

getIssuedTo

public String getIssuedTo()
To whom was the token issued to. In general the same as audience.

Returns:
value or null for none

setIssuedTo

public Tokeninfo setIssuedTo(String issuedTo)
To whom was the token issued to. In general the same as audience.

Parameters:
issuedTo - issuedTo or null for none

getScope

public String getScope()
The space separated list of scopes granted to this token.

Returns:
value or null for none

setScope

public Tokeninfo setScope(String scope)
The space separated list of scopes granted to this token.

Parameters:
scope - scope or null for none

getUserId

public String getUserId()
The Gaia obfuscated user id.

Returns:
value or null for none

setUserId

public Tokeninfo setUserId(String userId)
The Gaia obfuscated user id.

Parameters:
userId - userId or null for none

getVerifiedEmail

public Boolean getVerifiedEmail()
Boolean flag which is true if the email address is verified. Present only if the email scope is present in the request.

Returns:
value or null for none

setVerifiedEmail

public Tokeninfo setVerifiedEmail(Boolean verifiedEmail)
Boolean flag which is true if the email address is verified. Present only if the email scope is present in the request.

Parameters:
verifiedEmail - verifiedEmail or null for none

set

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

clone

public Tokeninfo clone()
Overrides:
clone in class GenericJson