// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: gateway.proto

package com.ywt.gapi.gateway;

/**
 * <pre>
 *授权服务          // 对应 go_base_core 项目 --&gt; common-gateway --&gt; service --&gt; auth.go 文件
 * </pre>
 *
 * Protobuf service {@code com.ywt.gapi.gateway.AuthService}
 */
public  abstract class AuthService
    implements com.google.protobuf.Service {
  protected AuthService() {}

  public interface Interface {
    /**
     * <code>rpc issueJWT(.com.ywt.gapi.gateway.IssueJWTRequest) returns (.com.ywt.gapi.gateway.IssueJWTResponse);</code>
     */
    public abstract void issueJWT(
        com.google.protobuf.RpcController controller,
        IssueJWTRequest request,
        com.google.protobuf.RpcCallback<IssueJWTResponse> done);

  }

  public static com.google.protobuf.Service newReflectiveService(
      final Interface impl) {
    return new AuthService() {
      @Override
      public  void issueJWT(
          com.google.protobuf.RpcController controller,
          IssueJWTRequest request,
          com.google.protobuf.RpcCallback<IssueJWTResponse> done) {
        impl.issueJWT(controller, request, done);
      }

    };
  }

  public static com.google.protobuf.BlockingService
      newReflectiveBlockingService(final BlockingInterface impl) {
    return new com.google.protobuf.BlockingService() {
      public final com.google.protobuf.Descriptors.ServiceDescriptor
          getDescriptorForType() {
        return getDescriptor();
      }

      public final com.google.protobuf.Message callBlockingMethod(
          com.google.protobuf.Descriptors.MethodDescriptor method,
          com.google.protobuf.RpcController controller,
          com.google.protobuf.Message request)
          throws com.google.protobuf.ServiceException {
        if (method.getService() != getDescriptor()) {
          throw new IllegalArgumentException(
            "Service.callBlockingMethod() given method descriptor for " +
            "wrong service type.");
        }
        switch(method.getIndex()) {
          case 0:
            return impl.issueJWT(controller, (IssueJWTRequest)request);
          default:
            throw new AssertionError("Can't get here.");
        }
      }

      public final com.google.protobuf.Message
          getRequestPrototype(
          com.google.protobuf.Descriptors.MethodDescriptor method) {
        if (method.getService() != getDescriptor()) {
          throw new IllegalArgumentException(
            "Service.getRequestPrototype() given method " +
            "descriptor for wrong service type.");
        }
        switch(method.getIndex()) {
          case 0:
            return IssueJWTRequest.getDefaultInstance();
          default:
            throw new AssertionError("Can't get here.");
        }
      }

      public final com.google.protobuf.Message
          getResponsePrototype(
          com.google.protobuf.Descriptors.MethodDescriptor method) {
        if (method.getService() != getDescriptor()) {
          throw new IllegalArgumentException(
            "Service.getResponsePrototype() given method " +
            "descriptor for wrong service type.");
        }
        switch(method.getIndex()) {
          case 0:
            return IssueJWTResponse.getDefaultInstance();
          default:
            throw new AssertionError("Can't get here.");
        }
      }

    };
  }

  /**
   * <code>rpc issueJWT(.com.ywt.gapi.gateway.IssueJWTRequest) returns (.com.ywt.gapi.gateway.IssueJWTResponse);</code>
   */
  public abstract void issueJWT(
      com.google.protobuf.RpcController controller,
      IssueJWTRequest request,
      com.google.protobuf.RpcCallback<IssueJWTResponse> done);

  public static final
      com.google.protobuf.Descriptors.ServiceDescriptor
      getDescriptor() {
    return Gateway.getDescriptor().getServices().get(0);
  }
  public final com.google.protobuf.Descriptors.ServiceDescriptor
      getDescriptorForType() {
    return getDescriptor();
  }

  public final void callMethod(
      com.google.protobuf.Descriptors.MethodDescriptor method,
      com.google.protobuf.RpcController controller,
      com.google.protobuf.Message request,
      com.google.protobuf.RpcCallback<
        com.google.protobuf.Message> done) {
    if (method.getService() != getDescriptor()) {
      throw new IllegalArgumentException(
        "Service.callMethod() given method descriptor for wrong " +
        "service type.");
    }
    switch(method.getIndex()) {
      case 0:
        this.issueJWT(controller, (IssueJWTRequest)request,
          com.google.protobuf.RpcUtil.<IssueJWTResponse>specializeCallback(
            done));
        return;
      default:
        throw new AssertionError("Can't get here.");
    }
  }

  public final com.google.protobuf.Message
      getRequestPrototype(
      com.google.protobuf.Descriptors.MethodDescriptor method) {
    if (method.getService() != getDescriptor()) {
      throw new IllegalArgumentException(
        "Service.getRequestPrototype() given method " +
        "descriptor for wrong service type.");
    }
    switch(method.getIndex()) {
      case 0:
        return IssueJWTRequest.getDefaultInstance();
      default:
        throw new AssertionError("Can't get here.");
    }
  }

  public final com.google.protobuf.Message
      getResponsePrototype(
      com.google.protobuf.Descriptors.MethodDescriptor method) {
    if (method.getService() != getDescriptor()) {
      throw new IllegalArgumentException(
        "Service.getResponsePrototype() given method " +
        "descriptor for wrong service type.");
    }
    switch(method.getIndex()) {
      case 0:
        return IssueJWTResponse.getDefaultInstance();
      default:
        throw new AssertionError("Can't get here.");
    }
  }

  public static Stub newStub(
      com.google.protobuf.RpcChannel channel) {
    return new Stub(channel);
  }

  public static final class Stub extends AuthService implements Interface {
    private Stub(com.google.protobuf.RpcChannel channel) {
      this.channel = channel;
    }

    private final com.google.protobuf.RpcChannel channel;

    public com.google.protobuf.RpcChannel getChannel() {
      return channel;
    }

    public  void issueJWT(
        com.google.protobuf.RpcController controller,
        IssueJWTRequest request,
        com.google.protobuf.RpcCallback<IssueJWTResponse> done) {
      channel.callMethod(
        getDescriptor().getMethods().get(0),
        controller,
        request,
        IssueJWTResponse.getDefaultInstance(),
        com.google.protobuf.RpcUtil.generalizeCallback(
          done,
          IssueJWTResponse.class,
          IssueJWTResponse.getDefaultInstance()));
    }
  }

  public static BlockingInterface newBlockingStub(
      com.google.protobuf.BlockingRpcChannel channel) {
    return new BlockingStub(channel);
  }

  public interface BlockingInterface {
    public IssueJWTResponse issueJWT(
        com.google.protobuf.RpcController controller,
        IssueJWTRequest request)
        throws com.google.protobuf.ServiceException;
  }

  private static final class BlockingStub implements BlockingInterface {
    private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) {
      this.channel = channel;
    }

    private final com.google.protobuf.BlockingRpcChannel channel;

    public IssueJWTResponse issueJWT(
        com.google.protobuf.RpcController controller,
        IssueJWTRequest request)
        throws com.google.protobuf.ServiceException {
      return (IssueJWTResponse) channel.callBlockingMethod(
        getDescriptor().getMethods().get(0),
        controller,
        request,
        IssueJWTResponse.getDefaultInstance());
    }

  }

  // @@protoc_insertion_point(class_scope:com.ywt.gapi.gateway.AuthService)
}

