Reference documentation and code samples for the Locations API class Google::Cloud::Location::Locations::Rest::ServiceStub.
REST service stub for the Locations service. Service stub contains baseline method implementations including transcoding, making the REST call, and deserialing the response.
Inherits
- Object
Methods
#get_location
def get_location(request_pb, options = nil, bindings_override: nil) { |result, response| ... } -> ::Google::Cloud::Location::Location
Baseline implementation for the get_location REST call
Parameters
- request_pb (::Google::Cloud::Location::GetLocationRequest) — A request object representing the call parameters. Required.
- options (::Gapic::CallOptions) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
- bindings_override (::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>, nil) (defaults to: nil) — Binding overrides for the transcoding. Only used internally.
Yields
- (result, response) — Access the result along with the Faraday response object
Yield Parameters
- result (::Google::Cloud::Location::Location)
- response (::Faraday::Response)
Returns
- (::Google::Cloud::Location::Location) — A result object deserialized from the server's reply
Raises
- (::ArgumentError)
#initialize
def initialize(endpoint:, credentials:) -> ServiceStub
Returns
- (ServiceStub) — a new instance of ServiceStub
#list_locations
def list_locations(request_pb, options = nil, bindings_override: nil) { |result, response| ... } -> ::Google::Cloud::Location::ListLocationsResponse
Baseline implementation for the list_locations REST call
Parameters
- request_pb (::Google::Cloud::Location::ListLocationsRequest) — A request object representing the call parameters. Required.
- options (::Gapic::CallOptions) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
- bindings_override (::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>, nil) (defaults to: nil) — Binding overrides for the transcoding. Only used internally.
Yields
- (result, response) — Access the result along with the Faraday response object
Yield Parameters
- result (::Google::Cloud::Location::ListLocationsResponse)
- response (::Faraday::Response)
Returns
- (::Google::Cloud::Location::ListLocationsResponse) — A result object deserialized from the server's reply
Raises
- (::ArgumentError)