Class RestMethod

  • All Implemented Interfaces:
    Cloneable, Map<String,​Object>

    public final class RestMethod
    extends com.google.api.client.json.GenericJson
    Model 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.
    • Constructor Detail

      • RestMethod

        public RestMethod()
    • Method Detail

      • getDescription

        public String getDescription()
        Description of this method.
        Returns:
        value or null for none
      • setDescription

        public RestMethod setDescription​(String description)
        Description of this method.
        Parameters:
        description - description or null for 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 null for 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 or null for none
      • getHttpMethod

        public String getHttpMethod()
        HTTP method used by this method.
        Returns:
        value or null for none
      • setHttpMethod

        public RestMethod setHttpMethod​(String httpMethod)
        HTTP method used by this method.
        Parameters:
        httpMethod - httpMethod or null for 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 null for 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 or null for none
      • getMediaUpload

        public RestMethod.MediaUpload getMediaUpload()
        Media upload parameters.
        Returns:
        value or null for none
      • setMediaUpload

        public RestMethod setMediaUpload​(RestMethod.MediaUpload mediaUpload)
        Media upload parameters.
        Parameters:
        mediaUpload - mediaUpload or null for 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 null for 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 or null for none
      • getParameters

        public Map<String,​JsonSchema> getParameters()
        Details for all parameters in this method.
        Returns:
        value or null for none
      • setParameters

        public RestMethod setParameters​(Map<String,​JsonSchema> parameters)
        Details for all parameters in this method.
        Parameters:
        parameters - parameters or null for 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 null for 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 or null for none
      • getRequest

        public RestMethod.Request getRequest()
        The schema for the request.
        Returns:
        value or null for none
      • setRequest

        public RestMethod setRequest​(RestMethod.Request request)
        The schema for the request.
        Parameters:
        request - request or null for none
      • getResponse

        public RestMethod.Response getResponse()
        The schema for the response.
        Returns:
        value or null for none
      • setResponse

        public RestMethod setResponse​(RestMethod.Response response)
        The schema for the response.
        Parameters:
        response - response or null for none
      • getScopes

        public List<String> getScopes()
        OAuth 2.0 scopes applicable to this method.
        Returns:
        value or null for none
      • setScopes

        public RestMethod setScopes​(List<String> scopes)
        OAuth 2.0 scopes applicable to this method.
        Parameters:
        scopes - scopes or null for none
      • getSupportsMediaDownload

        public Boolean getSupportsMediaDownload()
        Whether this method supports media downloads.
        Returns:
        value or null for none
      • setSupportsMediaDownload

        public RestMethod setSupportsMediaDownload​(Boolean supportsMediaDownload)
        Whether this method supports media downloads.
        Parameters:
        supportsMediaDownload - supportsMediaDownload or null for none
      • getSupportsMediaUpload

        public Boolean getSupportsMediaUpload()
        Whether this method supports media uploads.
        Returns:
        value or null for none
      • setSupportsMediaUpload

        public RestMethod setSupportsMediaUpload​(Boolean supportsMediaUpload)
        Whether this method supports media uploads.
        Parameters:
        supportsMediaUpload - supportsMediaUpload or null for none
      • getSupportsSubscription

        public Boolean getSupportsSubscription()
        Whether this method supports subscriptions.
        Returns:
        value or null for none
      • setSupportsSubscription

        public RestMethod setSupportsSubscription​(Boolean supportsSubscription)
        Whether this method supports subscriptions.
        Parameters:
        supportsSubscription - supportsSubscription or null for 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 null for 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 or null for none
      • set

        public RestMethod set​(String fieldName,
                              Object value)
        Overrides:
        set in class com.google.api.client.json.GenericJson
      • clone

        public RestMethod clone()
        Overrides:
        clone in class com.google.api.client.json.GenericJson