v2 (revision 9)



com.google.api.services.oauth2
Class Oauth2Request

java.lang.Object
  extended by java.util.AbstractMap<String,Object>
      extended by com.google.api.client.util.GenericData
          extended by com.google.api.client.http.json.JsonHttpRequest
              extended by com.google.api.services.oauth2.Oauth2Request
All Implemented Interfaces:
Cloneable, Map<String,Object>
Direct Known Subclasses:
Oauth2.Tokeninfo, Oauth2.Userinfo.Get, Oauth2.Userinfo.V2.Me.Get

public class Oauth2Request
extends JsonHttpRequest

Generated Oauth2 request.

Since:
1.3.0

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
Oauth2Request(JsonHttpClient client, HttpMethod method, String uriTemplate, Object content)
          Builds an instance of Oauth2Request.
 
Method Summary
 String getAlt()
          Data format for the response.
 String getFields()
          Selector specifying which fields to include in a partial response.
 String getKey()
          API key.
 String getOauthToken()
          OAuth 2.0 token for the current user.
 Boolean getPrettyPrint()
          Returns response with indentations and line breaks.
 String getQuotaUser()
          Available to use for quota purposes for server-side applications.
 String getUserIp()
          IP address of the site where the request originates.
 Oauth2Request setAlt(String alt)
          Data format for the response.
 Oauth2Request setFields(String fields)
          Selector specifying which fields to include in a partial response.
 Oauth2Request setKey(String key)
          API key.
 Oauth2Request setOauthToken(String oauthToken)
          OAuth 2.0 token for the current user.
 Oauth2Request setPrettyPrint(Boolean prettyPrint)
          Returns response with indentations and line breaks.
 Oauth2Request setQuotaUser(String quotaUser)
          Available to use for quota purposes for server-side applications.
 Oauth2Request setUserIp(String userIp)
          IP address of the site where the request originates.
 
Methods inherited from class com.google.api.client.http.json.JsonHttpRequest
buildHttpRequest, buildHttpRequestUrl, download, executeAsInputStream, executeUnparsed, getClient, getEnableGZipContent, getJsonContent, getLastResponseHeaders, getMethod, getRequestHeaders, getUriTemplate, setEnableGZipContent, setRequestHeaders
 
Methods inherited from class com.google.api.client.util.GenericData
clone, entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, set, setUnknownKeys
 
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Oauth2Request

public Oauth2Request(JsonHttpClient client,
                     HttpMethod method,
                     String uriTemplate,
                     Object content)
Builds an instance of Oauth2Request.

Parameters:
client - The JSON HTTP client which handles this request
method - HTTP Method type
uriTemplate - URI template
content - A POJO that can be serialized into JSON or null for none
Method Detail

getPrettyPrint

public Boolean getPrettyPrint()
Returns response with indentations and line breaks. [default: true]


setPrettyPrint

public Oauth2Request setPrettyPrint(Boolean prettyPrint)
Returns response with indentations and line breaks.


getFields

public String getFields()
Selector specifying which fields to include in a partial response.


setFields

public Oauth2Request setFields(String fields)
Selector specifying which fields to include in a partial response.


getQuotaUser

public String getQuotaUser()
Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.


setQuotaUser

public Oauth2Request setQuotaUser(String quotaUser)
Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.


getOauthToken

public String getOauthToken()
OAuth 2.0 token for the current user.


setOauthToken

public Oauth2Request setOauthToken(String oauthToken)
OAuth 2.0 token for the current user.


getKey

public String getKey()
API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.


setKey

public Oauth2Request setKey(String key)
API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.


getUserIp

public String getUserIp()
IP address of the site where the request originates. Use this if you want to enforce per-user limits.


setUserIp

public Oauth2Request setUserIp(String userIp)
IP address of the site where the request originates. Use this if you want to enforce per-user limits.


getAlt

public String getAlt()
Data format for the response. [default: json]


setAlt

public Oauth2Request setAlt(String alt)
Data format for the response.