Class: Google::Apis::DiscoveryV1::RestMethod
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryV1::RestMethod
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/discovery_v1/classes.rb,
generated/google/apis/discovery_v1/representations.rb,
generated/google/apis/discovery_v1/representations.rb
Defined Under Namespace
Classes: MediaUpload, Request, Response
Instance Attribute Summary collapse
-
#description ⇒ String
Description of this method.
-
#etag_required ⇒ Boolean
(also: #etag_required?)
Whether this method requires an ETag to be specified.
-
#http_method ⇒ String
HTTP method used by this method.
-
#id ⇒ String
A unique ID for this method.
-
#media_upload ⇒ Google::Apis::DiscoveryV1::RestMethod::MediaUpload
Media upload parameters.
-
#parameter_order ⇒ Array<String>
Ordered list of required parameters, serves as a hint to clients on how to structure their method signatures.
-
#parameters ⇒ Hash<String,Google::Apis::DiscoveryV1::JsonSchema>
Details for all parameters in this method.
-
#path ⇒ String
The URI path of this REST method.
-
#request ⇒ Google::Apis::DiscoveryV1::RestMethod::Request
The schema for the request.
-
#response ⇒ Google::Apis::DiscoveryV1::RestMethod::Response
The schema for the response.
-
#scopes ⇒ Array<String>
OAuth 2.0 scopes applicable to this method.
-
#supports_media_download ⇒ Boolean
(also: #supports_media_download?)
Whether this method supports media downloads.
-
#supports_media_upload ⇒ Boolean
(also: #supports_media_upload?)
Whether this method supports media uploads.
-
#supports_subscription ⇒ Boolean
(also: #supports_subscription?)
Whether this method supports subscriptions.
-
#use_media_download_service ⇒ Boolean
(also: #use_media_download_service?)
Indicates that downloads from this method should use the download service URL ( i.e. "/download").
Instance Method Summary collapse
-
#initialize(**args) ⇒ RestMethod
constructor
A new instance of RestMethod.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ RestMethod
Returns a new instance of RestMethod.
757 758 759 |
# File 'generated/google/apis/discovery_v1/classes.rb', line 757 def initialize(**args) update!(**args) end |
Instance Attribute Details
#description ⇒ String
Description of this method.
Corresponds to the JSON property description
674 675 676 |
# File 'generated/google/apis/discovery_v1/classes.rb', line 674 def description @description end |
#etag_required ⇒ Boolean 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
680 681 682 |
# File 'generated/google/apis/discovery_v1/classes.rb', line 680 def etag_required @etag_required end |
#http_method ⇒ String
HTTP method used by this method.
Corresponds to the JSON property httpMethod
686 687 688 |
# File 'generated/google/apis/discovery_v1/classes.rb', line 686 def http_method @http_method end |
#id ⇒ String
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
692 693 694 |
# File 'generated/google/apis/discovery_v1/classes.rb', line 692 def id @id end |
#media_upload ⇒ Google::Apis::DiscoveryV1::RestMethod::MediaUpload
Media upload parameters.
Corresponds to the JSON property mediaUpload
697 698 699 |
# File 'generated/google/apis/discovery_v1/classes.rb', line 697 def media_upload @media_upload end |
#parameter_order ⇒ Array<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
704 705 706 |
# File 'generated/google/apis/discovery_v1/classes.rb', line 704 def parameter_order @parameter_order end |
#parameters ⇒ Hash<String,Google::Apis::DiscoveryV1::JsonSchema>
Details for all parameters in this method.
Corresponds to the JSON property parameters
709 710 711 |
# File 'generated/google/apis/discovery_v1/classes.rb', line 709 def parameters @parameters end |
#path ⇒ String
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
715 716 717 |
# File 'generated/google/apis/discovery_v1/classes.rb', line 715 def path @path end |
#request ⇒ Google::Apis::DiscoveryV1::RestMethod::Request
The schema for the request.
Corresponds to the JSON property request
720 721 722 |
# File 'generated/google/apis/discovery_v1/classes.rb', line 720 def request @request end |
#response ⇒ Google::Apis::DiscoveryV1::RestMethod::Response
The schema for the response.
Corresponds to the JSON property response
725 726 727 |
# File 'generated/google/apis/discovery_v1/classes.rb', line 725 def response @response end |
#scopes ⇒ Array<String>
OAuth 2.0 scopes applicable to this method.
Corresponds to the JSON property scopes
730 731 732 |
# File 'generated/google/apis/discovery_v1/classes.rb', line 730 def scopes @scopes end |
#supports_media_download ⇒ Boolean Also known as: supports_media_download?
Whether this method supports media downloads.
Corresponds to the JSON property supportsMediaDownload
735 736 737 |
# File 'generated/google/apis/discovery_v1/classes.rb', line 735 def supports_media_download @supports_media_download end |
#supports_media_upload ⇒ Boolean Also known as: supports_media_upload?
Whether this method supports media uploads.
Corresponds to the JSON property supportsMediaUpload
741 742 743 |
# File 'generated/google/apis/discovery_v1/classes.rb', line 741 def supports_media_upload @supports_media_upload end |
#supports_subscription ⇒ Boolean Also known as: supports_subscription?
Whether this method supports subscriptions.
Corresponds to the JSON property supportsSubscription
747 748 749 |
# File 'generated/google/apis/discovery_v1/classes.rb', line 747 def supports_subscription @supports_subscription end |
#use_media_download_service ⇒ Boolean 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
754 755 756 |
# File 'generated/google/apis/discovery_v1/classes.rb', line 754 def use_media_download_service @use_media_download_service end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 |
# 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 |