/**
 * @fileoverview gRPC-Web generated client stub for system
 * @enhanceable
 * @public
 */

// Code generated by protoc-gen-grpc-web. DO NOT EDIT.
// versions:
// 	protoc-gen-grpc-web v1.5.0
// 	protoc              v5.27.1
// source: System.proto


/* eslint-disable */
// @ts-nocheck


import * as grpcWeb from 'grpc-web';

import * as System_pb from './System_pb'; // proto import: "System.proto"


export class ISystemServiceClient {
  client_: grpcWeb.AbstractClientBase;
  hostname_: string;
  credentials_: null | { [index: string]: string; };
  options_: null | { [index: string]: any; };

  constructor (hostname: string,
               credentials?: null | { [index: string]: string; },
               options?: null | { [index: string]: any; }) {
    if (!options) options = {};
    if (!credentials) credentials = {};
    options['format'] = 'text';

    this.client_ = new grpcWeb.GrpcWebClientBase(options);
    this.hostname_ = hostname.replace(/\/+$/, '');
    this.credentials_ = credentials;
    this.options_ = options;
  }

  methodDescriptorloginIn = new grpcWeb.MethodDescriptor(
    '/system.ISystemService/loginIn',
    grpcWeb.MethodType.UNARY,
    System_pb.LoginRequest,
    System_pb.LoginRespond,
    (request: System_pb.LoginRequest) => {
      return request.serializeBinary();
    },
    System_pb.LoginRespond.deserializeBinary
  );

  loginIn(
    request: System_pb.LoginRequest,
    metadata?: grpcWeb.Metadata | null): Promise<System_pb.LoginRespond>;

  loginIn(
    request: System_pb.LoginRequest,
    metadata: grpcWeb.Metadata | null,
    callback: (err: grpcWeb.RpcError,
               response: System_pb.LoginRespond) => void): grpcWeb.ClientReadableStream<System_pb.LoginRespond>;

  loginIn(
    request: System_pb.LoginRequest,
    metadata?: grpcWeb.Metadata | null,
    callback?: (err: grpcWeb.RpcError,
               response: System_pb.LoginRespond) => void) {
    if (callback !== undefined) {
      return this.client_.rpcCall(
        this.hostname_ +
          '/system.ISystemService/loginIn',
        request,
        metadata || {},
        this.methodDescriptorloginIn,
        callback);
    }
    return this.client_.unaryCall(
    this.hostname_ +
      '/system.ISystemService/loginIn',
    request,
    metadata || {},
    this.methodDescriptorloginIn);
  }

  methodDescriptorgetVerifyCode = new grpcWeb.MethodDescriptor(
    '/system.ISystemService/getVerifyCode',
    grpcWeb.MethodType.UNARY,
    System_pb.CommonRequest,
    System_pb.VerifyCodeRespond,
    (request: System_pb.CommonRequest) => {
      return request.serializeBinary();
    },
    System_pb.VerifyCodeRespond.deserializeBinary
  );

  getVerifyCode(
    request: System_pb.CommonRequest,
    metadata?: grpcWeb.Metadata | null): Promise<System_pb.VerifyCodeRespond>;

  getVerifyCode(
    request: System_pb.CommonRequest,
    metadata: grpcWeb.Metadata | null,
    callback: (err: grpcWeb.RpcError,
               response: System_pb.VerifyCodeRespond) => void): grpcWeb.ClientReadableStream<System_pb.VerifyCodeRespond>;

  getVerifyCode(
    request: System_pb.CommonRequest,
    metadata?: grpcWeb.Metadata | null,
    callback?: (err: grpcWeb.RpcError,
               response: System_pb.VerifyCodeRespond) => void) {
    if (callback !== undefined) {
      return this.client_.rpcCall(
        this.hostname_ +
          '/system.ISystemService/getVerifyCode',
        request,
        metadata || {},
        this.methodDescriptorgetVerifyCode,
        callback);
    }
    return this.client_.unaryCall(
    this.hostname_ +
      '/system.ISystemService/getVerifyCode',
    request,
    metadata || {},
    this.methodDescriptorgetVerifyCode);
  }

  methodDescriptorquery = new grpcWeb.MethodDescriptor(
    '/system.ISystemService/query',
    grpcWeb.MethodType.UNARY,
    System_pb.SystemUserReqParam,
    System_pb.SystemResultRespond,
    (request: System_pb.SystemUserReqParam) => {
      return request.serializeBinary();
    },
    System_pb.SystemResultRespond.deserializeBinary
  );

  query(
    request: System_pb.SystemUserReqParam,
    metadata?: grpcWeb.Metadata | null): Promise<System_pb.SystemResultRespond>;

  query(
    request: System_pb.SystemUserReqParam,
    metadata: grpcWeb.Metadata | null,
    callback: (err: grpcWeb.RpcError,
               response: System_pb.SystemResultRespond) => void): grpcWeb.ClientReadableStream<System_pb.SystemResultRespond>;

  query(
    request: System_pb.SystemUserReqParam,
    metadata?: grpcWeb.Metadata | null,
    callback?: (err: grpcWeb.RpcError,
               response: System_pb.SystemResultRespond) => void) {
    if (callback !== undefined) {
      return this.client_.rpcCall(
        this.hostname_ +
          '/system.ISystemService/query',
        request,
        metadata || {},
        this.methodDescriptorquery,
        callback);
    }
    return this.client_.unaryCall(
    this.hostname_ +
      '/system.ISystemService/query',
    request,
    metadata || {},
    this.methodDescriptorquery);
  }

}

