class Google::Cloud::Location::Locations::Rest::ServiceStub

def get_location request_pb, options = nil, bindings_override: nil

Returns:
  • (::Google::Cloud::Location::Location) -

Other tags:
    Yieldparam: response -
    Yieldparam: result -

Other tags:
    Yield: - Access the result along with the Faraday response object

Parameters:
  • bindings_override (::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>, nil) --
  • options (::Gapic::CallOptions) --
  • request_pb (::Google::Cloud::Location::GetLocationRequest) --
def get_location request_pb, options = nil, bindings_override: nil
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
  verb, uri, query_string_params, body = ServiceStub.transcode_get_location_request request_pb, bindings_override: bindings_override
  query_string_params = if query_string_params.any?
                          query_string_params.to_h { |p| p.split("=", 2) }
                        else
                          {}
                        end
  response = @client_stub.make_http_request(
    verb,
    uri:     uri,
    body:    body || "",
    params:  query_string_params,
    options: options
  )
  result = ::Google::Cloud::Location::Location.decode_json response.body, ignore_unknown_fields: true
  yield result, response if block_given?
  result
end