Class RestMethod
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.discovery.model.RestMethod
-
public final class RestMethod extends com.google.api.client.json.GenericJsonModel definition for RestMethod.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 APIs Discovery Service. For a detailed explanation see: http://code.google.com/p/google-http-java-client/wiki/JSON
- Author:
- Google, Inc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRestMethod.MediaUploadMedia upload parameters.static classRestMethod.RequestThe schema for the request.static classRestMethod.ResponseThe schema for the response.-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description RestMethod()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RestMethodclone()StringgetDescription()Description of this method.BooleangetEtagRequired()Whether this method requires an ETag to be specified.StringgetHttpMethod()HTTP method used by this method.StringgetId()A unique ID for this method.RestMethod.MediaUploadgetMediaUpload()Media upload parameters.List<String>getParameterOrder()Ordered list of required parameters, serves as a hint to clients on how to structure their method signatures.Map<String,JsonSchema>getParameters()Details for all parameters in this method.StringgetPath()The URI path of this REST method.RestMethod.RequestgetRequest()The schema for the request.RestMethod.ResponsegetResponse()The schema for the response.List<String>getScopes()OAuth 2.0 scopes applicable to this method.BooleangetSupportsMediaDownload()Whether this method supports media downloads.BooleangetSupportsMediaUpload()Whether this method supports media uploads.BooleangetSupportsSubscription()Whether this method supports subscriptions.BooleangetUseMediaDownloadService()Indicates that downloads from this method should use the download service URL (i.e.RestMethodset(String fieldName, Object value)RestMethodsetDescription(String description)Description of this method.RestMethodsetEtagRequired(Boolean etagRequired)Whether this method requires an ETag to be specified.RestMethodsetHttpMethod(String httpMethod)HTTP method used by this method.RestMethodsetId(String id)A unique ID for this method.RestMethodsetMediaUpload(RestMethod.MediaUpload mediaUpload)Media upload parameters.RestMethodsetParameterOrder(List<String> parameterOrder)Ordered list of required parameters, serves as a hint to clients on how to structure their method signatures.RestMethodsetParameters(Map<String,JsonSchema> parameters)Details for all parameters in this method.RestMethodsetPath(String path)The URI path of this REST method.RestMethodsetRequest(RestMethod.Request request)The schema for the request.RestMethodsetResponse(RestMethod.Response response)The schema for the response.RestMethodsetScopes(List<String> scopes)OAuth 2.0 scopes applicable to this method.RestMethodsetSupportsMediaDownload(Boolean supportsMediaDownload)Whether this method supports media downloads.RestMethodsetSupportsMediaUpload(Boolean supportsMediaUpload)Whether this method supports media uploads.RestMethodsetSupportsSubscription(Boolean supportsSubscription)Whether this method supports subscriptions.RestMethodsetUseMediaDownloadService(Boolean useMediaDownloadService)Indicates that downloads from this method should use the download service URL (i.e.-
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, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
getDescription
public String getDescription()
Description of this method.- Returns:
- value or
nullfor none
-
setDescription
public RestMethod setDescription(String description)
Description of this method.- Parameters:
description- description ornullfor none
-
getEtagRequired
public Boolean getEtagRequired()
Whether this method requires an ETag to be specified. The ETag is sent as an HTTP If-Match or If-None-Match header.- Returns:
- value or
nullfor none
-
setEtagRequired
public RestMethod setEtagRequired(Boolean etagRequired)
Whether this method requires an ETag to be specified. The ETag is sent as an HTTP If-Match or If-None-Match header.- Parameters:
etagRequired- etagRequired ornullfor none
-
getHttpMethod
public String getHttpMethod()
HTTP method used by this method.- Returns:
- value or
nullfor none
-
setHttpMethod
public RestMethod setHttpMethod(String httpMethod)
HTTP method used by this method.- Parameters:
httpMethod- httpMethod ornullfor none
-
getId
public String getId()
A unique ID for this method. This property can be used to match methods between different versions of Discovery.- Returns:
- value or
nullfor none
-
setId
public RestMethod setId(String id)
A unique ID for this method. This property can be used to match methods between different versions of Discovery.- Parameters:
id- id ornullfor none
-
getMediaUpload
public RestMethod.MediaUpload getMediaUpload()
Media upload parameters.- Returns:
- value or
nullfor none
-
setMediaUpload
public RestMethod setMediaUpload(RestMethod.MediaUpload mediaUpload)
Media upload parameters.- Parameters:
mediaUpload- mediaUpload ornullfor none
-
getParameterOrder
public List<String> getParameterOrder()
Ordered list of required parameters, serves as a hint to clients on how to structure their method signatures. The array is ordered such that the "most-significant" parameter appears first.- Returns:
- value or
nullfor none
-
setParameterOrder
public RestMethod setParameterOrder(List<String> parameterOrder)
Ordered list of required parameters, serves as a hint to clients on how to structure their method signatures. The array is ordered such that the "most-significant" parameter appears first.- Parameters:
parameterOrder- parameterOrder ornullfor none
-
getParameters
public Map<String,JsonSchema> getParameters()
Details for all parameters in this method.- Returns:
- value or
nullfor none
-
setParameters
public RestMethod setParameters(Map<String,JsonSchema> parameters)
Details for all parameters in this method.- Parameters:
parameters- parameters ornullfor none
-
getPath
public String getPath()
The URI path of this REST method. Should be used in conjunction with the basePath property at the api-level.- Returns:
- value or
nullfor none
-
setPath
public RestMethod setPath(String path)
The URI path of this REST method. Should be used in conjunction with the basePath property at the api-level.- Parameters:
path- path ornullfor none
-
getRequest
public RestMethod.Request getRequest()
The schema for the request.- Returns:
- value or
nullfor none
-
setRequest
public RestMethod setRequest(RestMethod.Request request)
The schema for the request.- Parameters:
request- request ornullfor none
-
getResponse
public RestMethod.Response getResponse()
The schema for the response.- Returns:
- value or
nullfor none
-
setResponse
public RestMethod setResponse(RestMethod.Response response)
The schema for the response.- Parameters:
response- response ornullfor none
-
getScopes
public List<String> getScopes()
OAuth 2.0 scopes applicable to this method.- Returns:
- value or
nullfor none
-
setScopes
public RestMethod setScopes(List<String> scopes)
OAuth 2.0 scopes applicable to this method.- Parameters:
scopes- scopes ornullfor none
-
getSupportsMediaDownload
public Boolean getSupportsMediaDownload()
Whether this method supports media downloads.- Returns:
- value or
nullfor none
-
setSupportsMediaDownload
public RestMethod setSupportsMediaDownload(Boolean supportsMediaDownload)
Whether this method supports media downloads.- Parameters:
supportsMediaDownload- supportsMediaDownload ornullfor none
-
getSupportsMediaUpload
public Boolean getSupportsMediaUpload()
Whether this method supports media uploads.- Returns:
- value or
nullfor none
-
setSupportsMediaUpload
public RestMethod setSupportsMediaUpload(Boolean supportsMediaUpload)
Whether this method supports media uploads.- Parameters:
supportsMediaUpload- supportsMediaUpload ornullfor none
-
getSupportsSubscription
public Boolean getSupportsSubscription()
Whether this method supports subscriptions.- Returns:
- value or
nullfor none
-
setSupportsSubscription
public RestMethod setSupportsSubscription(Boolean supportsSubscription)
Whether this method supports subscriptions.- Parameters:
supportsSubscription- supportsSubscription ornullfor none
-
getUseMediaDownloadService
public Boolean getUseMediaDownloadService()
Indicates that downloads from this method should use the download service URL (i.e. "/download"). Only applies if the method supports media download.- Returns:
- value or
nullfor none
-
setUseMediaDownloadService
public RestMethod setUseMediaDownloadService(Boolean useMediaDownloadService)
Indicates that downloads from this method should use the download service URL (i.e. "/download"). Only applies if the method supports media download.- Parameters:
useMediaDownloadService- useMediaDownloadService ornullfor none
-
set
public RestMethod set(String fieldName, Object value)
- Overrides:
setin classcom.google.api.client.json.GenericJson
-
clone
public RestMethod clone()
- Overrides:
clonein classcom.google.api.client.json.GenericJson
-
-