class Google::Apis::DiscoveryV1::RestMethod

Attributes

description[RW]

Description of this method. Corresponds to the JSON property `description` @return [String]

etag_required[RW]

Whether this method requires an ETag to be specified. The ETag is sent as an HTTP If-Match or If-None-Match header. Corresponds to the JSON property `etagRequired` @return [Boolean]

etag_required?[RW]

Whether this method requires an ETag to be specified. The ETag is sent as an HTTP If-Match or If-None-Match header. Corresponds to the JSON property `etagRequired` @return [Boolean]

generated_name[RW]
http_method[RW]

HTTP method used by this method. Corresponds to the JSON property `httpMethod` @return [String]

id[RW]

A unique ID for this method. This property can be used to match methods between different versions of Discovery. Corresponds to the JSON property `id` @return [String]

media_upload[RW]

Media upload parameters. Corresponds to the JSON property `mediaUpload` @return [Google::Apis::DiscoveryV1::RestMethod::MediaUpload]

parameter_order[RW]

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. Corresponds to the JSON property `parameterOrder` @return [Array<String>]

parameters[RW]

Details for all parameters in this method. Corresponds to the JSON property `parameters` @return [Hash<String,Google::Apis::DiscoveryV1::JsonSchema>]

parent[RW]
path[RW]

The URI path of this REST method. Should be used in conjunction with the basePath property at the api-level. Corresponds to the JSON property `path` @return [String]

request[RW]

The schema for the request. Corresponds to the JSON property `request` @return [Google::Apis::DiscoveryV1::RestMethod::Request]

response[RW]

The schema for the response. Corresponds to the JSON property `response` @return [Google::Apis::DiscoveryV1::RestMethod::Response]

scopes[RW]

OAuth 2.0 scopes applicable to this method. Corresponds to the JSON property `scopes` @return [Array<String>]

supports_media_download[RW]

Whether this method supports media downloads. Corresponds to the JSON property `supportsMediaDownload` @return [Boolean]

supports_media_download?[RW]

Whether this method supports media downloads. Corresponds to the JSON property `supportsMediaDownload` @return [Boolean]

supports_media_upload[RW]

Whether this method supports media uploads. Corresponds to the JSON property `supportsMediaUpload` @return [Boolean]

supports_media_upload?[RW]

Whether this method supports media uploads. Corresponds to the JSON property `supportsMediaUpload` @return [Boolean]

supports_subscription[RW]

Whether this method supports subscriptions. Corresponds to the JSON property `supportsSubscription` @return [Boolean]

supports_subscription?[RW]

Whether this method supports subscriptions. Corresponds to the JSON property `supportsSubscription` @return [Boolean]

use_media_download_service[RW]

Indicates that downloads from this method should use the download service URL ( i.e. “/download”). Only applies if the method supports media download. Corresponds to the JSON property `useMediaDownloadService` @return [Boolean]

use_media_download_service?[RW]

Indicates that downloads from this method should use the download service URL ( i.e. “/download”). Only applies if the method supports media download. Corresponds to the JSON property `useMediaDownloadService` @return [Boolean]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/discovery_v1/classes.rb, line 757
def initialize(**args)
   update!(**args)
end

Public Instance Methods

optional_query_parameters() click to toggle source
# File lib/google/apis/generator/model.rb, line 84
def optional_query_parameters
  query_parameters.select { |param| param.required != true }
end
path_parameters() click to toggle source
# File lib/google/apis/generator/model.rb, line 69
def path_parameters
  return [] if parameter_order.nil? || parameters.nil?
  parameter_order.map { |name| parameters[name] }.select { |param| param.location == 'path' }
end
query_parameters() click to toggle source
# File lib/google/apis/generator/model.rb, line 74
def query_parameters
  return [] if parameters.nil?
  parameters.values.select { |param| param.location == 'query' }
end
required_parameters() click to toggle source
# File lib/google/apis/generator/model.rb, line 79
def required_parameters
  return [] if parameter_order.nil? || parameters.nil?
  parameter_order.map { |name| parameters[name] }.select { |param| param.location == 'path' || param.required }
end
update!(**args) click to toggle source

Update properties of this object

# File generated/google/apis/discovery_v1/classes.rb, line 762
def update!(**args)
  @description = args[:description] if args.key?(:description)
  @etag_required = args[:etag_required] if args.key?(:etag_required)
  @http_method = args[:http_method] if args.key?(:http_method)
  @id = args[:id] if args.key?(:id)
  @media_upload = args[:media_upload] if args.key?(:media_upload)
  @parameter_order = args[:parameter_order] if args.key?(:parameter_order)
  @parameters = args[:parameters] if args.key?(:parameters)
  @path = args[:path] if args.key?(:path)
  @request = args[:request] if args.key?(:request)
  @response = args[:response] if args.key?(:response)
  @scopes = args[:scopes] if args.key?(:scopes)
  @supports_media_download = args[:supports_media_download] if args.key?(:supports_media_download)
  @supports_media_upload = args[:supports_media_upload] if args.key?(:supports_media_upload)
  @supports_subscription = args[:supports_subscription] if args.key?(:supports_subscription)
  @use_media_download_service = args[:use_media_download_service] if args.key?(:use_media_download_service)
end