import * as grpcWeb from 'grpc-web';

import * as google_protobuf_empty_pb from 'google-protobuf/google/protobuf/empty_pb'; // proto import: "google/protobuf/empty.proto"
import * as discussions_pb from './discussions_pb'; // proto import: "discussions.proto"


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

  createDiscussion(
    request: discussions_pb.CreateDiscussionReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: discussions_pb.Discussion) => void
  ): grpcWeb.ClientReadableStream<discussions_pb.Discussion>;

  getDiscussion(
    request: discussions_pb.GetDiscussionReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: discussions_pb.Discussion) => void
  ): grpcWeb.ClientReadableStream<discussions_pb.Discussion>;

  listMyCommunitiesDiscussions(
    request: discussions_pb.ListMyCommunitiesDiscussionsReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: discussions_pb.ListMyCommunitiesDiscussionsRes) => void
  ): grpcWeb.ClientReadableStream<discussions_pb.ListMyCommunitiesDiscussionsRes>;

  updateDiscussion(
    request: discussions_pb.UpdateDiscussionReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: discussions_pb.Discussion) => void
  ): grpcWeb.ClientReadableStream<discussions_pb.Discussion>;

  deleteDiscussion(
    request: discussions_pb.DeleteDiscussionReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: google_protobuf_empty_pb.Empty) => void
  ): grpcWeb.ClientReadableStream<google_protobuf_empty_pb.Empty>;

}

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

  createDiscussion(
    request: discussions_pb.CreateDiscussionReq,
    metadata?: grpcWeb.Metadata
  ): Promise<discussions_pb.Discussion>;

  getDiscussion(
    request: discussions_pb.GetDiscussionReq,
    metadata?: grpcWeb.Metadata
  ): Promise<discussions_pb.Discussion>;

  listMyCommunitiesDiscussions(
    request: discussions_pb.ListMyCommunitiesDiscussionsReq,
    metadata?: grpcWeb.Metadata
  ): Promise<discussions_pb.ListMyCommunitiesDiscussionsRes>;

  updateDiscussion(
    request: discussions_pb.UpdateDiscussionReq,
    metadata?: grpcWeb.Metadata
  ): Promise<discussions_pb.Discussion>;

  deleteDiscussion(
    request: discussions_pb.DeleteDiscussionReq,
    metadata?: grpcWeb.Metadata
  ): Promise<google_protobuf_empty_pb.Empty>;

}

