All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.routeguide.GrpcRouteGuideClient.kt Maven / Gradle / Ivy

There is a newer version: 2024.09.17.200749-4708422
Show newest version
// Code generated by Wire protocol buffer compiler, do not edit.
// Source: routeguide.RouteGuide in routeguide/RouteGuideProto.proto
@file:Suppress("DEPRECATION")

package routeguide

import com.squareup.wire.GrpcCall
import com.squareup.wire.GrpcClient
import com.squareup.wire.GrpcMethod
import com.squareup.wire.GrpcStreamingCall
import kotlin.Suppress

/**
 * Interface exported by the server.
 */
public class GrpcRouteGuideClient(
  private val client: GrpcClient,
) : RouteGuideClient {
  /**
   * A simple RPC.
   *
   * Obtains the feature at a given position.
   *
   * A feature with an empty name is returned if there's no feature at the given
   * position.
   */
  override fun GetFeature(): GrpcCall = client.newCall(GrpcMethod(
      path = "/routeguide.RouteGuide/GetFeature",
      requestAdapter = Point.ADAPTER,
      responseAdapter = Feature.ADAPTER
  ))

  /**
   * A server-to-client streaming RPC.
   *
   * Obtains the Features available within the given Rectangle.  Results are
   * streamed rather than returned at once (e.g. in a response message with a
   * repeated field), as the rectangle may cover a large area and contain a
   * huge number of features.
   */
  override fun ListFeatures(): GrpcStreamingCall =
      client.newStreamingCall(GrpcMethod(
      path = "/routeguide.RouteGuide/ListFeatures",
      requestAdapter = Rectangle.ADAPTER,
      responseAdapter = Feature.ADAPTER
  ))

  /**
   * A client-to-server streaming RPC.
   *
   * Accepts a stream of Points on a route being traversed, returning a
   * RouteSummary when traversal is completed.
   */
  override fun RecordRoute(): GrpcStreamingCall =
      client.newStreamingCall(GrpcMethod(
      path = "/routeguide.RouteGuide/RecordRoute",
      requestAdapter = Point.ADAPTER,
      responseAdapter = RouteSummary.ADAPTER
  ))

  /**
   * A Bidirectional streaming RPC.
   *
   * Accepts a stream of RouteNotes sent while a route is being traversed,
   * while receiving other RouteNotes (e.g. from other users).
   */
  override fun RouteChat(): GrpcStreamingCall =
      client.newStreamingCall(GrpcMethod(
      path = "/routeguide.RouteGuide/RouteChat",
      requestAdapter = RouteNote.ADAPTER,
      responseAdapter = RouteNote.ADAPTER
  ))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy