RestMethod

data class RestMethod(val id: String? = null, val path: String? = null, val flatPath: String? = null, val httpMethod: HttpMethod? = null, val description: String? = null, val etagRequired: Boolean? = null, val parameters: RestParameters? = emptyMap(), val parameterOrder: List<String>? = emptyList(), val request: RestMethod.Request? = null, val response: RestMethod.Response? = null, val scopes: List<String>? = emptyList(), val supportsMediaDownload: Boolean? = null, val useMediaDownloadService: Boolean? = null, val supportsMediaUpload: Boolean? = null, val mediaUpload: RestMethod.MediaUpload? = null, val supportsSubscription: Boolean? = null)(source)

Data class to represent an individual method for RestDescription.methods.

Constructors

Link copied to clipboard
constructor(id: String? = null, path: String? = null, flatPath: String? = null, httpMethod: HttpMethod? = null, description: String? = null, etagRequired: Boolean? = null, parameters: RestParameters? = emptyMap(), parameterOrder: List<String>? = emptyList(), request: RestMethod.Request? = null, response: RestMethod.Response? = null, scopes: List<String>? = emptyList(), supportsMediaDownload: Boolean? = null, useMediaDownloadService: Boolean? = null, supportsMediaUpload: Boolean? = null, mediaUpload: RestMethod.MediaUpload? = null, supportsSubscription: Boolean? = null)

Types

Link copied to clipboard
data class MediaUpload(val accept: List<String>? = emptyList(), val maxSize: String? = null, val protocols: RestMethod.MediaUpload.Protocols? = null)

Data class to represent media upload parameters for RestMethod.mediaUpload.

Link copied to clipboard
data class Request(val metaRef: String? = null, val parameterName: String? = null)

Data class to represent request parameters for RestMethod.request.

Link copied to clipboard
data class Response(val metaRef: String? = null)

Data class to represent response parameters for RestMethod.response.

Properties

Link copied to clipboard
val description: String? = null

Description of this method.

Link copied to clipboard
val etagRequired: Boolean? = null

Whether this method requires an ETag to be specified. The ETag is sent as an HTTP If-Match or If-None-Match header.

Link copied to clipboard
val flatPath: String? = null

The URI path of this REST method in (RFC 6570) format without level 2 features ({+var}). Supplementary to the path property.

Link copied to clipboard
val httpMethod: HttpMethod? = null

HTTP method used by this method.

Link copied to clipboard
val id: String? = null

A unique ID for this method. This property can be used to match methods between different versions of Discovery.

Link copied to clipboard

Media upload parameters.

Link copied to clipboard

Ordered list of required parameters. This 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.

Link copied to clipboard

Details for all parameters in this method.

Link copied to clipboard
val path: String? = null

The URI path of this REST method. Should be used in conjunction with the servicePath property at the API-level.

Link copied to clipboard

The schema for the request.

Link copied to clipboard

The schema for the response.

Link copied to clipboard

OAuth 2.0 scopes applicable to this method.

Link copied to clipboard

Whether this method supports media downloads.

Link copied to clipboard

Whether this method supports media uploads.

Link copied to clipboard

Whether this method supports subscriptions.

Link copied to clipboard

Indicates that downloads from this method should use the download service URL (i.e. "/download"). Only applies if the method supports media download.