import * as grpcWeb from 'grpc-web';

import * as galleries_pb from './galleries_pb'; // proto import: "galleries.proto"


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

  getGallery(
    request: galleries_pb.GetGalleryReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: galleries_pb.PhotoGallery) => void
  ): grpcWeb.ClientReadableStream<galleries_pb.PhotoGallery>;

  addPhotoToGallery(
    request: galleries_pb.AddPhotoToGalleryReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: galleries_pb.PhotoGallery) => void
  ): grpcWeb.ClientReadableStream<galleries_pb.PhotoGallery>;

  removePhotoFromGallery(
    request: galleries_pb.RemovePhotoFromGalleryReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: galleries_pb.PhotoGallery) => void
  ): grpcWeb.ClientReadableStream<galleries_pb.PhotoGallery>;

  movePhoto(
    request: galleries_pb.MovePhotoReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: galleries_pb.PhotoGallery) => void
  ): grpcWeb.ClientReadableStream<galleries_pb.PhotoGallery>;

  updatePhotoCaption(
    request: galleries_pb.UpdatePhotoCaptionReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: galleries_pb.PhotoGallery) => void
  ): grpcWeb.ClientReadableStream<galleries_pb.PhotoGallery>;

  getGalleryEditInfo(
    request: galleries_pb.GetGalleryEditInfoReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: galleries_pb.GetGalleryEditInfoRes) => void
  ): grpcWeb.ClientReadableStream<galleries_pb.GetGalleryEditInfoRes>;

}

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

  getGallery(
    request: galleries_pb.GetGalleryReq,
    metadata?: grpcWeb.Metadata
  ): Promise<galleries_pb.PhotoGallery>;

  addPhotoToGallery(
    request: galleries_pb.AddPhotoToGalleryReq,
    metadata?: grpcWeb.Metadata
  ): Promise<galleries_pb.PhotoGallery>;

  removePhotoFromGallery(
    request: galleries_pb.RemovePhotoFromGalleryReq,
    metadata?: grpcWeb.Metadata
  ): Promise<galleries_pb.PhotoGallery>;

  movePhoto(
    request: galleries_pb.MovePhotoReq,
    metadata?: grpcWeb.Metadata
  ): Promise<galleries_pb.PhotoGallery>;

  updatePhotoCaption(
    request: galleries_pb.UpdatePhotoCaptionReq,
    metadata?: grpcWeb.Metadata
  ): Promise<galleries_pb.PhotoGallery>;

  getGalleryEditInfo(
    request: galleries_pb.GetGalleryEditInfoReq,
    metadata?: grpcWeb.Metadata
  ): Promise<galleries_pb.GetGalleryEditInfoRes>;

}

