Class: Google::Apis::DiscoveryV1::RestMethod

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/discovery_v1/classes.rb,
lib/google/apis/discovery_v1/representations.rb,
lib/google/apis/discovery_v1/representations.rb

Defined Under Namespace

Classes: MediaUpload, Request, Response

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RestMethod

Returns a new instance of RestMethod.



763
764
765
# File 'lib/google/apis/discovery_v1/classes.rb', line 763

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#descriptionString

Description of this method. Corresponds to the JSON property description

Returns:

  • (String)


674
675
676
# File 'lib/google/apis/discovery_v1/classes.rb', line 674

def description
  @description
end

#etag_requiredBoolean Also known as: etag_required?

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

Returns:

  • (Boolean)


680
681
682
# File 'lib/google/apis/discovery_v1/classes.rb', line 680

def etag_required
  @etag_required
end

#flat_pathString

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

Returns:

  • (String)


687
688
689
# File 'lib/google/apis/discovery_v1/classes.rb', line 687

def flat_path
  @flat_path
end

#http_methodString

HTTP method used by this method. Corresponds to the JSON property httpMethod

Returns:

  • (String)


692
693
694
# File 'lib/google/apis/discovery_v1/classes.rb', line 692

def http_method
  @http_method
end

#idString

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

Returns:

  • (String)


698
699
700
# File 'lib/google/apis/discovery_v1/classes.rb', line 698

def id
  @id
end

#media_uploadGoogle::Apis::DiscoveryV1::RestMethod::MediaUpload

Media upload parameters. Corresponds to the JSON property mediaUpload



703
704
705
# File 'lib/google/apis/discovery_v1/classes.rb', line 703

def media_upload
  @media_upload
end

#parameter_orderArray<String>

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

Returns:

  • (Array<String>)


710
711
712
# File 'lib/google/apis/discovery_v1/classes.rb', line 710

def parameter_order
  @parameter_order
end

#parametersHash<String,Google::Apis::DiscoveryV1::JsonSchema>

Details for all parameters in this method. Corresponds to the JSON property parameters

Returns:



715
716
717
# File 'lib/google/apis/discovery_v1/classes.rb', line 715

def parameters
  @parameters
end

#pathString

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

Returns:

  • (String)


721
722
723
# File 'lib/google/apis/discovery_v1/classes.rb', line 721

def path
  @path
end

#requestGoogle::Apis::DiscoveryV1::RestMethod::Request

The schema for the request. Corresponds to the JSON property request



726
727
728
# File 'lib/google/apis/discovery_v1/classes.rb', line 726

def request
  @request
end

#responseGoogle::Apis::DiscoveryV1::RestMethod::Response

The schema for the response. Corresponds to the JSON property response



731
732
733
# File 'lib/google/apis/discovery_v1/classes.rb', line 731

def response
  @response
end

#scopesArray<String>

OAuth 2.0 scopes applicable to this method. Corresponds to the JSON property scopes

Returns:

  • (Array<String>)


736
737
738
# File 'lib/google/apis/discovery_v1/classes.rb', line 736

def scopes
  @scopes
end

#supports_media_downloadBoolean Also known as: supports_media_download?

Whether this method supports media downloads. Corresponds to the JSON property supportsMediaDownload

Returns:

  • (Boolean)


741
742
743
# File 'lib/google/apis/discovery_v1/classes.rb', line 741

def supports_media_download
  @supports_media_download
end

#supports_media_uploadBoolean Also known as: supports_media_upload?

Whether this method supports media uploads. Corresponds to the JSON property supportsMediaUpload

Returns:

  • (Boolean)


747
748
749
# File 'lib/google/apis/discovery_v1/classes.rb', line 747

def supports_media_upload
  @supports_media_upload
end

#supports_subscriptionBoolean Also known as: supports_subscription?

Whether this method supports subscriptions. Corresponds to the JSON property supportsSubscription

Returns:

  • (Boolean)


753
754
755
# File 'lib/google/apis/discovery_v1/classes.rb', line 753

def supports_subscription
  @supports_subscription
end

#use_media_download_serviceBoolean Also known as: use_media_download_service?

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

Returns:

  • (Boolean)


760
761
762
# File 'lib/google/apis/discovery_v1/classes.rb', line 760

def use_media_download_service
  @use_media_download_service
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
# File 'lib/google/apis/discovery_v1/classes.rb', line 768

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @etag_required = args[:etag_required] if args.key?(:etag_required)
  @flat_path = args[:flat_path] if args.key?(:flat_path)
  @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