import * as grpcWeb from 'grpc-web';

import * as public_trips_pb from './public_trips_pb'; // proto import: "public_trips.proto"


export class PublicTripsClient {
  constructor (hostname: string,
               credentials?: null | { [index: string]: string; },
               options?: null | { [index: string]: any; });

  createPublicTrip(
    request: public_trips_pb.CreatePublicTripReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: public_trips_pb.PublicTrip) => void
  ): grpcWeb.ClientReadableStream<public_trips_pb.PublicTrip>;

  getPublicTrip(
    request: public_trips_pb.GetPublicTripReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: public_trips_pb.PublicTrip) => void
  ): grpcWeb.ClientReadableStream<public_trips_pb.PublicTrip>;

  listPublicTrips(
    request: public_trips_pb.ListPublicTripsReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: public_trips_pb.ListPublicTripsRes) => void
  ): grpcWeb.ClientReadableStream<public_trips_pb.ListPublicTripsRes>;

  listPublicTripsByUser(
    request: public_trips_pb.ListPublicTripsByUserReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: public_trips_pb.ListPublicTripsByUserRes) => void
  ): grpcWeb.ClientReadableStream<public_trips_pb.ListPublicTripsByUserRes>;

  updatePublicTrip(
    request: public_trips_pb.UpdatePublicTripReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: public_trips_pb.PublicTrip) => void
  ): grpcWeb.ClientReadableStream<public_trips_pb.PublicTrip>;

}

export class PublicTripsPromiseClient {
  constructor (hostname: string,
               credentials?: null | { [index: string]: string; },
               options?: null | { [index: string]: any; });

  createPublicTrip(
    request: public_trips_pb.CreatePublicTripReq,
    metadata?: grpcWeb.Metadata
  ): Promise<public_trips_pb.PublicTrip>;

  getPublicTrip(
    request: public_trips_pb.GetPublicTripReq,
    metadata?: grpcWeb.Metadata
  ): Promise<public_trips_pb.PublicTrip>;

  listPublicTrips(
    request: public_trips_pb.ListPublicTripsReq,
    metadata?: grpcWeb.Metadata
  ): Promise<public_trips_pb.ListPublicTripsRes>;

  listPublicTripsByUser(
    request: public_trips_pb.ListPublicTripsByUserReq,
    metadata?: grpcWeb.Metadata
  ): Promise<public_trips_pb.ListPublicTripsByUserRes>;

  updatePublicTrip(
    request: public_trips_pb.UpdatePublicTripReq,
    metadata?: grpcWeb.Metadata
  ): Promise<public_trips_pb.PublicTrip>;

}

