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.



834
835
836
# File 'lib/google/apis/discovery_v1/classes.rb', line 834

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

Instance Attribute Details

#api_versionString

The API Version of this method, as passed in via the X-Goog-Api-Version header or $apiVersion query parameter. Corresponds to the JSON property apiVersion

Returns:

  • (String)


734
735
736
# File 'lib/google/apis/discovery_v1/classes.rb', line 734

def api_version
  @api_version
end

#deprecatedBoolean Also known as: deprecated?

Whether this method is deprecated. Corresponds to the JSON property deprecated

Returns:

  • (Boolean)


739
740
741
# File 'lib/google/apis/discovery_v1/classes.rb', line 739

def deprecated
  @deprecated
end

#descriptionString

Description of this method. Corresponds to the JSON property description

Returns:

  • (String)


745
746
747
# File 'lib/google/apis/discovery_v1/classes.rb', line 745

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)


751
752
753
# File 'lib/google/apis/discovery_v1/classes.rb', line 751

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)


758
759
760
# File 'lib/google/apis/discovery_v1/classes.rb', line 758

def flat_path
  @flat_path
end

#http_methodString

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

Returns:

  • (String)


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

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)


769
770
771
# File 'lib/google/apis/discovery_v1/classes.rb', line 769

def id
  @id
end

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

Media upload parameters. Corresponds to the JSON property mediaUpload



774
775
776
# File 'lib/google/apis/discovery_v1/classes.rb', line 774

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>)


781
782
783
# File 'lib/google/apis/discovery_v1/classes.rb', line 781

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:



786
787
788
# File 'lib/google/apis/discovery_v1/classes.rb', line 786

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)


792
793
794
# File 'lib/google/apis/discovery_v1/classes.rb', line 792

def path
  @path
end

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

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



797
798
799
# File 'lib/google/apis/discovery_v1/classes.rb', line 797

def request
  @request
end

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

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



802
803
804
# File 'lib/google/apis/discovery_v1/classes.rb', line 802

def response
  @response
end

#scopesArray<String>

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

Returns:

  • (Array<String>)


807
808
809
# File 'lib/google/apis/discovery_v1/classes.rb', line 807

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)


812
813
814
# File 'lib/google/apis/discovery_v1/classes.rb', line 812

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)


818
819
820
# File 'lib/google/apis/discovery_v1/classes.rb', line 818

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)


824
825
826
# File 'lib/google/apis/discovery_v1/classes.rb', line 824

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)


831
832
833
# File 'lib/google/apis/discovery_v1/classes.rb', line 831

def use_media_download_service
  @use_media_download_service
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
# File 'lib/google/apis/discovery_v1/classes.rb', line 839

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