import * as grpcWeb from 'grpc-web';

import * as moderation_pb from './moderation_pb'; // proto import: "moderation.proto"


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

  getModerationQueue(
    request: moderation_pb.GetModerationQueueReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: moderation_pb.GetModerationQueueRes) => void
  ): grpcWeb.ClientReadableStream<moderation_pb.GetModerationQueueRes>;

  getModerationState(
    request: moderation_pb.GetModerationStateReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: moderation_pb.GetModerationStateRes) => void
  ): grpcWeb.ClientReadableStream<moderation_pb.GetModerationStateRes>;

  getModerationLog(
    request: moderation_pb.GetModerationLogReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: moderation_pb.GetModerationLogRes) => void
  ): grpcWeb.ClientReadableStream<moderation_pb.GetModerationLogRes>;

  moderateContent(
    request: moderation_pb.ModerateContentReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: moderation_pb.ModerateContentRes) => void
  ): grpcWeb.ClientReadableStream<moderation_pb.ModerateContentRes>;

  setUserContentVisibility(
    request: moderation_pb.SetUserContentVisibilityReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: moderation_pb.SetUserContentVisibilityRes) => void
  ): grpcWeb.ClientReadableStream<moderation_pb.SetUserContentVisibilityRes>;

  listModerationStates(
    request: moderation_pb.ListModerationStatesReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: moderation_pb.ListModerationStatesRes) => void
  ): grpcWeb.ClientReadableStream<moderation_pb.ListModerationStatesRes>;

}

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

  getModerationQueue(
    request: moderation_pb.GetModerationQueueReq,
    metadata?: grpcWeb.Metadata
  ): Promise<moderation_pb.GetModerationQueueRes>;

  getModerationState(
    request: moderation_pb.GetModerationStateReq,
    metadata?: grpcWeb.Metadata
  ): Promise<moderation_pb.GetModerationStateRes>;

  getModerationLog(
    request: moderation_pb.GetModerationLogReq,
    metadata?: grpcWeb.Metadata
  ): Promise<moderation_pb.GetModerationLogRes>;

  moderateContent(
    request: moderation_pb.ModerateContentReq,
    metadata?: grpcWeb.Metadata
  ): Promise<moderation_pb.ModerateContentRes>;

  setUserContentVisibility(
    request: moderation_pb.SetUserContentVisibilityReq,
    metadata?: grpcWeb.Metadata
  ): Promise<moderation_pb.SetUserContentVisibilityRes>;

  listModerationStates(
    request: moderation_pb.ListModerationStatesReq,
    metadata?: grpcWeb.Metadata
  ): Promise<moderation_pb.ListModerationStatesRes>;

}

