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

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


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



const grpc = {};
grpc.web = require('grpc-web');


var base_pb = require('./base_pb.js')
const proto = {};
proto.hiddifyrpc = require('./hiddify_pb.js');

/**
 * @param {string} hostname
 * @param {?Object} credentials
 * @param {?grpc.web.ClientOptions} options
 * @constructor
 * @struct
 * @final
 */
proto.hiddifyrpc.HelloClient =
    function(hostname, credentials, options) {
  if (!options) options = {};
  options.format = 'text';

  /**
   * @private @const {!grpc.web.GrpcWebClientBase} The client
   */
  this.client_ = new grpc.web.GrpcWebClientBase(options);

  /**
   * @private @const {string} The hostname
   */
  this.hostname_ = hostname.replace(/\/+$/, '');

};


/**
 * @param {string} hostname
 * @param {?Object} credentials
 * @param {?grpc.web.ClientOptions} options
 * @constructor
 * @struct
 * @final
 */
proto.hiddifyrpc.HelloPromiseClient =
    function(hostname, credentials, options) {
  if (!options) options = {};
  options.format = 'text';

  /**
   * @private @const {!grpc.web.GrpcWebClientBase} The client
   */
  this.client_ = new grpc.web.GrpcWebClientBase(options);

  /**
   * @private @const {string} The hostname
   */
  this.hostname_ = hostname.replace(/\/+$/, '');

};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.HelloRequest,
 *   !proto.hiddifyrpc.HelloResponse>}
 */
const methodDescriptor_Hello_SayHello = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Hello/SayHello',
  grpc.web.MethodType.UNARY,
  base_pb.HelloRequest,
  base_pb.HelloResponse,
  /**
   * @param {!proto.hiddifyrpc.HelloRequest} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  base_pb.HelloResponse.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.HelloRequest} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.HelloResponse)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.HelloResponse>|undefined}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.HelloClient.prototype.sayHello =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/hiddifyrpc.Hello/SayHello',
      request,
      metadata || {},
      methodDescriptor_Hello_SayHello,
      callback);
};


/**
 * @param {!proto.hiddifyrpc.HelloRequest} request The
 *     request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!Promise<!proto.hiddifyrpc.HelloResponse>}
 *     Promise that resolves to the response
 */
proto.hiddifyrpc.HelloPromiseClient.prototype.sayHello =
    function(request, metadata) {
  return this.client_.unaryCall(this.hostname_ +
      '/hiddifyrpc.Hello/SayHello',
      request,
      metadata || {},
      methodDescriptor_Hello_SayHello);
};


/**
 * @param {string} hostname
 * @param {?Object} credentials
 * @param {?grpc.web.ClientOptions} options
 * @constructor
 * @struct
 * @final
 */
proto.hiddifyrpc.CoreClient =
    function(hostname, credentials, options) {
  if (!options) options = {};
  options.format = 'text';

  /**
   * @private @const {!grpc.web.GrpcWebClientBase} The client
   */
  this.client_ = new grpc.web.GrpcWebClientBase(options);

  /**
   * @private @const {string} The hostname
   */
  this.hostname_ = hostname.replace(/\/+$/, '');

};


/**
 * @param {string} hostname
 * @param {?Object} credentials
 * @param {?grpc.web.ClientOptions} options
 * @constructor
 * @struct
 * @final
 */
proto.hiddifyrpc.CorePromiseClient =
    function(hostname, credentials, options) {
  if (!options) options = {};
  options.format = 'text';

  /**
   * @private @const {!grpc.web.GrpcWebClientBase} The client
   */
  this.client_ = new grpc.web.GrpcWebClientBase(options);

  /**
   * @private @const {string} The hostname
   */
  this.hostname_ = hostname.replace(/\/+$/, '');

};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.StartRequest,
 *   !proto.hiddifyrpc.CoreInfoResponse>}
 */
const methodDescriptor_Core_Start = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Core/Start',
  grpc.web.MethodType.UNARY,
  proto.hiddifyrpc.StartRequest,
  proto.hiddifyrpc.CoreInfoResponse,
  /**
   * @param {!proto.hiddifyrpc.StartRequest} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.CoreInfoResponse.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.StartRequest} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.CoreInfoResponse)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.CoreInfoResponse>|undefined}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CoreClient.prototype.start =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/hiddifyrpc.Core/Start',
      request,
      metadata || {},
      methodDescriptor_Core_Start,
      callback);
};


/**
 * @param {!proto.hiddifyrpc.StartRequest} request The
 *     request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!Promise<!proto.hiddifyrpc.CoreInfoResponse>}
 *     Promise that resolves to the response
 */
proto.hiddifyrpc.CorePromiseClient.prototype.start =
    function(request, metadata) {
  return this.client_.unaryCall(this.hostname_ +
      '/hiddifyrpc.Core/Start',
      request,
      metadata || {},
      methodDescriptor_Core_Start);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.Empty,
 *   !proto.hiddifyrpc.CoreInfoResponse>}
 */
const methodDescriptor_Core_CoreInfoListener = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Core/CoreInfoListener',
  grpc.web.MethodType.SERVER_STREAMING,
  base_pb.Empty,
  proto.hiddifyrpc.CoreInfoResponse,
  /**
   * @param {!proto.hiddifyrpc.Empty} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.CoreInfoResponse.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.Empty} request The request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.CoreInfoResponse>}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CoreClient.prototype.coreInfoListener =
    function(request, metadata) {
  return this.client_.serverStreaming(this.hostname_ +
      '/hiddifyrpc.Core/CoreInfoListener',
      request,
      metadata || {},
      methodDescriptor_Core_CoreInfoListener);
};


/**
 * @param {!proto.hiddifyrpc.Empty} request The request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.CoreInfoResponse>}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CorePromiseClient.prototype.coreInfoListener =
    function(request, metadata) {
  return this.client_.serverStreaming(this.hostname_ +
      '/hiddifyrpc.Core/CoreInfoListener',
      request,
      metadata || {},
      methodDescriptor_Core_CoreInfoListener);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.Empty,
 *   !proto.hiddifyrpc.OutboundGroupList>}
 */
const methodDescriptor_Core_OutboundsInfo = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Core/OutboundsInfo',
  grpc.web.MethodType.SERVER_STREAMING,
  base_pb.Empty,
  proto.hiddifyrpc.OutboundGroupList,
  /**
   * @param {!proto.hiddifyrpc.Empty} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.OutboundGroupList.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.Empty} request The request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.OutboundGroupList>}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CoreClient.prototype.outboundsInfo =
    function(request, metadata) {
  return this.client_.serverStreaming(this.hostname_ +
      '/hiddifyrpc.Core/OutboundsInfo',
      request,
      metadata || {},
      methodDescriptor_Core_OutboundsInfo);
};


/**
 * @param {!proto.hiddifyrpc.Empty} request The request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.OutboundGroupList>}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CorePromiseClient.prototype.outboundsInfo =
    function(request, metadata) {
  return this.client_.serverStreaming(this.hostname_ +
      '/hiddifyrpc.Core/OutboundsInfo',
      request,
      metadata || {},
      methodDescriptor_Core_OutboundsInfo);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.Empty,
 *   !proto.hiddifyrpc.OutboundGroupList>}
 */
const methodDescriptor_Core_MainOutboundsInfo = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Core/MainOutboundsInfo',
  grpc.web.MethodType.SERVER_STREAMING,
  base_pb.Empty,
  proto.hiddifyrpc.OutboundGroupList,
  /**
   * @param {!proto.hiddifyrpc.Empty} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.OutboundGroupList.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.Empty} request The request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.OutboundGroupList>}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CoreClient.prototype.mainOutboundsInfo =
    function(request, metadata) {
  return this.client_.serverStreaming(this.hostname_ +
      '/hiddifyrpc.Core/MainOutboundsInfo',
      request,
      metadata || {},
      methodDescriptor_Core_MainOutboundsInfo);
};


/**
 * @param {!proto.hiddifyrpc.Empty} request The request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.OutboundGroupList>}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CorePromiseClient.prototype.mainOutboundsInfo =
    function(request, metadata) {
  return this.client_.serverStreaming(this.hostname_ +
      '/hiddifyrpc.Core/MainOutboundsInfo',
      request,
      metadata || {},
      methodDescriptor_Core_MainOutboundsInfo);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.Empty,
 *   !proto.hiddifyrpc.SystemInfo>}
 */
const methodDescriptor_Core_GetSystemInfo = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Core/GetSystemInfo',
  grpc.web.MethodType.SERVER_STREAMING,
  base_pb.Empty,
  proto.hiddifyrpc.SystemInfo,
  /**
   * @param {!proto.hiddifyrpc.Empty} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.SystemInfo.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.Empty} request The request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.SystemInfo>}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CoreClient.prototype.getSystemInfo =
    function(request, metadata) {
  return this.client_.serverStreaming(this.hostname_ +
      '/hiddifyrpc.Core/GetSystemInfo',
      request,
      metadata || {},
      methodDescriptor_Core_GetSystemInfo);
};


/**
 * @param {!proto.hiddifyrpc.Empty} request The request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.SystemInfo>}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CorePromiseClient.prototype.getSystemInfo =
    function(request, metadata) {
  return this.client_.serverStreaming(this.hostname_ +
      '/hiddifyrpc.Core/GetSystemInfo',
      request,
      metadata || {},
      methodDescriptor_Core_GetSystemInfo);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.SetupRequest,
 *   !proto.hiddifyrpc.Response>}
 */
const methodDescriptor_Core_Setup = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Core/Setup',
  grpc.web.MethodType.UNARY,
  proto.hiddifyrpc.SetupRequest,
  proto.hiddifyrpc.Response,
  /**
   * @param {!proto.hiddifyrpc.SetupRequest} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.Response.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.SetupRequest} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.Response)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.Response>|undefined}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CoreClient.prototype.setup =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/hiddifyrpc.Core/Setup',
      request,
      metadata || {},
      methodDescriptor_Core_Setup,
      callback);
};


/**
 * @param {!proto.hiddifyrpc.SetupRequest} request The
 *     request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!Promise<!proto.hiddifyrpc.Response>}
 *     Promise that resolves to the response
 */
proto.hiddifyrpc.CorePromiseClient.prototype.setup =
    function(request, metadata) {
  return this.client_.unaryCall(this.hostname_ +
      '/hiddifyrpc.Core/Setup',
      request,
      metadata || {},
      methodDescriptor_Core_Setup);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.ParseRequest,
 *   !proto.hiddifyrpc.ParseResponse>}
 */
const methodDescriptor_Core_Parse = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Core/Parse',
  grpc.web.MethodType.UNARY,
  proto.hiddifyrpc.ParseRequest,
  proto.hiddifyrpc.ParseResponse,
  /**
   * @param {!proto.hiddifyrpc.ParseRequest} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.ParseResponse.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.ParseRequest} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.ParseResponse)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.ParseResponse>|undefined}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CoreClient.prototype.parse =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/hiddifyrpc.Core/Parse',
      request,
      metadata || {},
      methodDescriptor_Core_Parse,
      callback);
};


/**
 * @param {!proto.hiddifyrpc.ParseRequest} request The
 *     request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!Promise<!proto.hiddifyrpc.ParseResponse>}
 *     Promise that resolves to the response
 */
proto.hiddifyrpc.CorePromiseClient.prototype.parse =
    function(request, metadata) {
  return this.client_.unaryCall(this.hostname_ +
      '/hiddifyrpc.Core/Parse',
      request,
      metadata || {},
      methodDescriptor_Core_Parse);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.ChangeHiddifySettingsRequest,
 *   !proto.hiddifyrpc.CoreInfoResponse>}
 */
const methodDescriptor_Core_ChangeHiddifySettings = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Core/ChangeHiddifySettings',
  grpc.web.MethodType.UNARY,
  proto.hiddifyrpc.ChangeHiddifySettingsRequest,
  proto.hiddifyrpc.CoreInfoResponse,
  /**
   * @param {!proto.hiddifyrpc.ChangeHiddifySettingsRequest} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.CoreInfoResponse.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.ChangeHiddifySettingsRequest} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.CoreInfoResponse)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.CoreInfoResponse>|undefined}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CoreClient.prototype.changeHiddifySettings =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/hiddifyrpc.Core/ChangeHiddifySettings',
      request,
      metadata || {},
      methodDescriptor_Core_ChangeHiddifySettings,
      callback);
};


/**
 * @param {!proto.hiddifyrpc.ChangeHiddifySettingsRequest} request The
 *     request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!Promise<!proto.hiddifyrpc.CoreInfoResponse>}
 *     Promise that resolves to the response
 */
proto.hiddifyrpc.CorePromiseClient.prototype.changeHiddifySettings =
    function(request, metadata) {
  return this.client_.unaryCall(this.hostname_ +
      '/hiddifyrpc.Core/ChangeHiddifySettings',
      request,
      metadata || {},
      methodDescriptor_Core_ChangeHiddifySettings);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.StartRequest,
 *   !proto.hiddifyrpc.CoreInfoResponse>}
 */
const methodDescriptor_Core_StartService = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Core/StartService',
  grpc.web.MethodType.UNARY,
  proto.hiddifyrpc.StartRequest,
  proto.hiddifyrpc.CoreInfoResponse,
  /**
   * @param {!proto.hiddifyrpc.StartRequest} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.CoreInfoResponse.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.StartRequest} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.CoreInfoResponse)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.CoreInfoResponse>|undefined}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CoreClient.prototype.startService =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/hiddifyrpc.Core/StartService',
      request,
      metadata || {},
      methodDescriptor_Core_StartService,
      callback);
};


/**
 * @param {!proto.hiddifyrpc.StartRequest} request The
 *     request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!Promise<!proto.hiddifyrpc.CoreInfoResponse>}
 *     Promise that resolves to the response
 */
proto.hiddifyrpc.CorePromiseClient.prototype.startService =
    function(request, metadata) {
  return this.client_.unaryCall(this.hostname_ +
      '/hiddifyrpc.Core/StartService',
      request,
      metadata || {},
      methodDescriptor_Core_StartService);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.Empty,
 *   !proto.hiddifyrpc.CoreInfoResponse>}
 */
const methodDescriptor_Core_Stop = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Core/Stop',
  grpc.web.MethodType.UNARY,
  base_pb.Empty,
  proto.hiddifyrpc.CoreInfoResponse,
  /**
   * @param {!proto.hiddifyrpc.Empty} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.CoreInfoResponse.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.Empty} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.CoreInfoResponse)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.CoreInfoResponse>|undefined}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CoreClient.prototype.stop =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/hiddifyrpc.Core/Stop',
      request,
      metadata || {},
      methodDescriptor_Core_Stop,
      callback);
};


/**
 * @param {!proto.hiddifyrpc.Empty} request The
 *     request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!Promise<!proto.hiddifyrpc.CoreInfoResponse>}
 *     Promise that resolves to the response
 */
proto.hiddifyrpc.CorePromiseClient.prototype.stop =
    function(request, metadata) {
  return this.client_.unaryCall(this.hostname_ +
      '/hiddifyrpc.Core/Stop',
      request,
      metadata || {},
      methodDescriptor_Core_Stop);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.StartRequest,
 *   !proto.hiddifyrpc.CoreInfoResponse>}
 */
const methodDescriptor_Core_Restart = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Core/Restart',
  grpc.web.MethodType.UNARY,
  proto.hiddifyrpc.StartRequest,
  proto.hiddifyrpc.CoreInfoResponse,
  /**
   * @param {!proto.hiddifyrpc.StartRequest} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.CoreInfoResponse.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.StartRequest} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.CoreInfoResponse)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.CoreInfoResponse>|undefined}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CoreClient.prototype.restart =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/hiddifyrpc.Core/Restart',
      request,
      metadata || {},
      methodDescriptor_Core_Restart,
      callback);
};


/**
 * @param {!proto.hiddifyrpc.StartRequest} request The
 *     request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!Promise<!proto.hiddifyrpc.CoreInfoResponse>}
 *     Promise that resolves to the response
 */
proto.hiddifyrpc.CorePromiseClient.prototype.restart =
    function(request, metadata) {
  return this.client_.unaryCall(this.hostname_ +
      '/hiddifyrpc.Core/Restart',
      request,
      metadata || {},
      methodDescriptor_Core_Restart);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.SelectOutboundRequest,
 *   !proto.hiddifyrpc.Response>}
 */
const methodDescriptor_Core_SelectOutbound = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Core/SelectOutbound',
  grpc.web.MethodType.UNARY,
  proto.hiddifyrpc.SelectOutboundRequest,
  proto.hiddifyrpc.Response,
  /**
   * @param {!proto.hiddifyrpc.SelectOutboundRequest} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.Response.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.SelectOutboundRequest} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.Response)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.Response>|undefined}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CoreClient.prototype.selectOutbound =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/hiddifyrpc.Core/SelectOutbound',
      request,
      metadata || {},
      methodDescriptor_Core_SelectOutbound,
      callback);
};


/**
 * @param {!proto.hiddifyrpc.SelectOutboundRequest} request The
 *     request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!Promise<!proto.hiddifyrpc.Response>}
 *     Promise that resolves to the response
 */
proto.hiddifyrpc.CorePromiseClient.prototype.selectOutbound =
    function(request, metadata) {
  return this.client_.unaryCall(this.hostname_ +
      '/hiddifyrpc.Core/SelectOutbound',
      request,
      metadata || {},
      methodDescriptor_Core_SelectOutbound);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.UrlTestRequest,
 *   !proto.hiddifyrpc.Response>}
 */
const methodDescriptor_Core_UrlTest = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Core/UrlTest',
  grpc.web.MethodType.UNARY,
  proto.hiddifyrpc.UrlTestRequest,
  proto.hiddifyrpc.Response,
  /**
   * @param {!proto.hiddifyrpc.UrlTestRequest} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.Response.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.UrlTestRequest} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.Response)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.Response>|undefined}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CoreClient.prototype.urlTest =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/hiddifyrpc.Core/UrlTest',
      request,
      metadata || {},
      methodDescriptor_Core_UrlTest,
      callback);
};


/**
 * @param {!proto.hiddifyrpc.UrlTestRequest} request The
 *     request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!Promise<!proto.hiddifyrpc.Response>}
 *     Promise that resolves to the response
 */
proto.hiddifyrpc.CorePromiseClient.prototype.urlTest =
    function(request, metadata) {
  return this.client_.unaryCall(this.hostname_ +
      '/hiddifyrpc.Core/UrlTest',
      request,
      metadata || {},
      methodDescriptor_Core_UrlTest);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.GenerateWarpConfigRequest,
 *   !proto.hiddifyrpc.WarpGenerationResponse>}
 */
const methodDescriptor_Core_GenerateWarpConfig = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Core/GenerateWarpConfig',
  grpc.web.MethodType.UNARY,
  proto.hiddifyrpc.GenerateWarpConfigRequest,
  proto.hiddifyrpc.WarpGenerationResponse,
  /**
   * @param {!proto.hiddifyrpc.GenerateWarpConfigRequest} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.WarpGenerationResponse.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.GenerateWarpConfigRequest} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.WarpGenerationResponse)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.WarpGenerationResponse>|undefined}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CoreClient.prototype.generateWarpConfig =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/hiddifyrpc.Core/GenerateWarpConfig',
      request,
      metadata || {},
      methodDescriptor_Core_GenerateWarpConfig,
      callback);
};


/**
 * @param {!proto.hiddifyrpc.GenerateWarpConfigRequest} request The
 *     request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!Promise<!proto.hiddifyrpc.WarpGenerationResponse>}
 *     Promise that resolves to the response
 */
proto.hiddifyrpc.CorePromiseClient.prototype.generateWarpConfig =
    function(request, metadata) {
  return this.client_.unaryCall(this.hostname_ +
      '/hiddifyrpc.Core/GenerateWarpConfig',
      request,
      metadata || {},
      methodDescriptor_Core_GenerateWarpConfig);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.Empty,
 *   !proto.hiddifyrpc.SystemProxyStatus>}
 */
const methodDescriptor_Core_GetSystemProxyStatus = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Core/GetSystemProxyStatus',
  grpc.web.MethodType.UNARY,
  base_pb.Empty,
  proto.hiddifyrpc.SystemProxyStatus,
  /**
   * @param {!proto.hiddifyrpc.Empty} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.SystemProxyStatus.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.Empty} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.SystemProxyStatus)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.SystemProxyStatus>|undefined}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CoreClient.prototype.getSystemProxyStatus =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/hiddifyrpc.Core/GetSystemProxyStatus',
      request,
      metadata || {},
      methodDescriptor_Core_GetSystemProxyStatus,
      callback);
};


/**
 * @param {!proto.hiddifyrpc.Empty} request The
 *     request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!Promise<!proto.hiddifyrpc.SystemProxyStatus>}
 *     Promise that resolves to the response
 */
proto.hiddifyrpc.CorePromiseClient.prototype.getSystemProxyStatus =
    function(request, metadata) {
  return this.client_.unaryCall(this.hostname_ +
      '/hiddifyrpc.Core/GetSystemProxyStatus',
      request,
      metadata || {},
      methodDescriptor_Core_GetSystemProxyStatus);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.SetSystemProxyEnabledRequest,
 *   !proto.hiddifyrpc.Response>}
 */
const methodDescriptor_Core_SetSystemProxyEnabled = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Core/SetSystemProxyEnabled',
  grpc.web.MethodType.UNARY,
  proto.hiddifyrpc.SetSystemProxyEnabledRequest,
  proto.hiddifyrpc.Response,
  /**
   * @param {!proto.hiddifyrpc.SetSystemProxyEnabledRequest} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.Response.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.SetSystemProxyEnabledRequest} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.Response)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.Response>|undefined}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CoreClient.prototype.setSystemProxyEnabled =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/hiddifyrpc.Core/SetSystemProxyEnabled',
      request,
      metadata || {},
      methodDescriptor_Core_SetSystemProxyEnabled,
      callback);
};


/**
 * @param {!proto.hiddifyrpc.SetSystemProxyEnabledRequest} request The
 *     request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!Promise<!proto.hiddifyrpc.Response>}
 *     Promise that resolves to the response
 */
proto.hiddifyrpc.CorePromiseClient.prototype.setSystemProxyEnabled =
    function(request, metadata) {
  return this.client_.unaryCall(this.hostname_ +
      '/hiddifyrpc.Core/SetSystemProxyEnabled',
      request,
      metadata || {},
      methodDescriptor_Core_SetSystemProxyEnabled);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.Empty,
 *   !proto.hiddifyrpc.LogMessage>}
 */
const methodDescriptor_Core_LogListener = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.Core/LogListener',
  grpc.web.MethodType.SERVER_STREAMING,
  base_pb.Empty,
  proto.hiddifyrpc.LogMessage,
  /**
   * @param {!proto.hiddifyrpc.Empty} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.LogMessage.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.Empty} request The request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.LogMessage>}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CoreClient.prototype.logListener =
    function(request, metadata) {
  return this.client_.serverStreaming(this.hostname_ +
      '/hiddifyrpc.Core/LogListener',
      request,
      metadata || {},
      methodDescriptor_Core_LogListener);
};


/**
 * @param {!proto.hiddifyrpc.Empty} request The request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.LogMessage>}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.CorePromiseClient.prototype.logListener =
    function(request, metadata) {
  return this.client_.serverStreaming(this.hostname_ +
      '/hiddifyrpc.Core/LogListener',
      request,
      metadata || {},
      methodDescriptor_Core_LogListener);
};


/**
 * @param {string} hostname
 * @param {?Object} credentials
 * @param {?grpc.web.ClientOptions} options
 * @constructor
 * @struct
 * @final
 */
proto.hiddifyrpc.TunnelServiceClient =
    function(hostname, credentials, options) {
  if (!options) options = {};
  options.format = 'text';

  /**
   * @private @const {!grpc.web.GrpcWebClientBase} The client
   */
  this.client_ = new grpc.web.GrpcWebClientBase(options);

  /**
   * @private @const {string} The hostname
   */
  this.hostname_ = hostname.replace(/\/+$/, '');

};


/**
 * @param {string} hostname
 * @param {?Object} credentials
 * @param {?grpc.web.ClientOptions} options
 * @constructor
 * @struct
 * @final
 */
proto.hiddifyrpc.TunnelServicePromiseClient =
    function(hostname, credentials, options) {
  if (!options) options = {};
  options.format = 'text';

  /**
   * @private @const {!grpc.web.GrpcWebClientBase} The client
   */
  this.client_ = new grpc.web.GrpcWebClientBase(options);

  /**
   * @private @const {string} The hostname
   */
  this.hostname_ = hostname.replace(/\/+$/, '');

};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.TunnelStartRequest,
 *   !proto.hiddifyrpc.TunnelResponse>}
 */
const methodDescriptor_TunnelService_Start = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.TunnelService/Start',
  grpc.web.MethodType.UNARY,
  proto.hiddifyrpc.TunnelStartRequest,
  proto.hiddifyrpc.TunnelResponse,
  /**
   * @param {!proto.hiddifyrpc.TunnelStartRequest} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.TunnelResponse.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.TunnelStartRequest} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.TunnelResponse)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.TunnelResponse>|undefined}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.TunnelServiceClient.prototype.start =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/hiddifyrpc.TunnelService/Start',
      request,
      metadata || {},
      methodDescriptor_TunnelService_Start,
      callback);
};


/**
 * @param {!proto.hiddifyrpc.TunnelStartRequest} request The
 *     request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!Promise<!proto.hiddifyrpc.TunnelResponse>}
 *     Promise that resolves to the response
 */
proto.hiddifyrpc.TunnelServicePromiseClient.prototype.start =
    function(request, metadata) {
  return this.client_.unaryCall(this.hostname_ +
      '/hiddifyrpc.TunnelService/Start',
      request,
      metadata || {},
      methodDescriptor_TunnelService_Start);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.Empty,
 *   !proto.hiddifyrpc.TunnelResponse>}
 */
const methodDescriptor_TunnelService_Stop = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.TunnelService/Stop',
  grpc.web.MethodType.UNARY,
  base_pb.Empty,
  proto.hiddifyrpc.TunnelResponse,
  /**
   * @param {!proto.hiddifyrpc.Empty} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.TunnelResponse.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.Empty} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.TunnelResponse)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.TunnelResponse>|undefined}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.TunnelServiceClient.prototype.stop =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/hiddifyrpc.TunnelService/Stop',
      request,
      metadata || {},
      methodDescriptor_TunnelService_Stop,
      callback);
};


/**
 * @param {!proto.hiddifyrpc.Empty} request The
 *     request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!Promise<!proto.hiddifyrpc.TunnelResponse>}
 *     Promise that resolves to the response
 */
proto.hiddifyrpc.TunnelServicePromiseClient.prototype.stop =
    function(request, metadata) {
  return this.client_.unaryCall(this.hostname_ +
      '/hiddifyrpc.TunnelService/Stop',
      request,
      metadata || {},
      methodDescriptor_TunnelService_Stop);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.Empty,
 *   !proto.hiddifyrpc.TunnelResponse>}
 */
const methodDescriptor_TunnelService_Status = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.TunnelService/Status',
  grpc.web.MethodType.UNARY,
  base_pb.Empty,
  proto.hiddifyrpc.TunnelResponse,
  /**
   * @param {!proto.hiddifyrpc.Empty} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.TunnelResponse.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.Empty} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.TunnelResponse)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.TunnelResponse>|undefined}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.TunnelServiceClient.prototype.status =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/hiddifyrpc.TunnelService/Status',
      request,
      metadata || {},
      methodDescriptor_TunnelService_Status,
      callback);
};


/**
 * @param {!proto.hiddifyrpc.Empty} request The
 *     request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!Promise<!proto.hiddifyrpc.TunnelResponse>}
 *     Promise that resolves to the response
 */
proto.hiddifyrpc.TunnelServicePromiseClient.prototype.status =
    function(request, metadata) {
  return this.client_.unaryCall(this.hostname_ +
      '/hiddifyrpc.TunnelService/Status',
      request,
      metadata || {},
      methodDescriptor_TunnelService_Status);
};


/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.hiddifyrpc.Empty,
 *   !proto.hiddifyrpc.TunnelResponse>}
 */
const methodDescriptor_TunnelService_Exit = new grpc.web.MethodDescriptor(
  '/hiddifyrpc.TunnelService/Exit',
  grpc.web.MethodType.UNARY,
  base_pb.Empty,
  proto.hiddifyrpc.TunnelResponse,
  /**
   * @param {!proto.hiddifyrpc.Empty} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.hiddifyrpc.TunnelResponse.deserializeBinary
);


/**
 * @param {!proto.hiddifyrpc.Empty} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.hiddifyrpc.TunnelResponse)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.hiddifyrpc.TunnelResponse>|undefined}
 *     The XHR Node Readable Stream
 */
proto.hiddifyrpc.TunnelServiceClient.prototype.exit =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/hiddifyrpc.TunnelService/Exit',
      request,
      metadata || {},
      methodDescriptor_TunnelService_Exit,
      callback);
};


/**
 * @param {!proto.hiddifyrpc.Empty} request The
 *     request proto
 * @param {?Object<string, string>=} metadata User defined
 *     call metadata
 * @return {!Promise<!proto.hiddifyrpc.TunnelResponse>}
 *     Promise that resolves to the response
 */
proto.hiddifyrpc.TunnelServicePromiseClient.prototype.exit =
    function(request, metadata) {
  return this.client_.unaryCall(this.hostname_ +
      '/hiddifyrpc.TunnelService/Exit',
      request,
      metadata || {},
      methodDescriptor_TunnelService_Exit);
};


module.exports = proto.hiddifyrpc;

