All Downloads are FREE. Search and download functionalities are using the official Maven repository.

momento.auth.AuthGrpc Maven / Gradle / Ivy

There is a newer version: 0.119.4
Show newest version
package momento.auth;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.53.0)",
    comments = "Source: auth.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class AuthGrpc {

  private AuthGrpc() {}

  public static final String SERVICE_NAME = "auth.Auth";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor getLoginMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "Login",
      requestType = momento.auth._LoginRequest.class,
      responseType = momento.auth._LoginResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
  public static io.grpc.MethodDescriptor getLoginMethod() {
    io.grpc.MethodDescriptor getLoginMethod;
    if ((getLoginMethod = AuthGrpc.getLoginMethod) == null) {
      synchronized (AuthGrpc.class) {
        if ((getLoginMethod = AuthGrpc.getLoginMethod) == null) {
          AuthGrpc.getLoginMethod = getLoginMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Login"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  momento.auth._LoginRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  momento.auth._LoginResponse.getDefaultInstance()))
              .setSchemaDescriptor(new AuthMethodDescriptorSupplier("Login"))
              .build();
        }
      }
    }
    return getLoginMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGenerateApiTokenMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GenerateApiToken",
      requestType = momento.auth._GenerateApiTokenRequest.class,
      responseType = momento.auth._GenerateApiTokenResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGenerateApiTokenMethod() {
    io.grpc.MethodDescriptor getGenerateApiTokenMethod;
    if ((getGenerateApiTokenMethod = AuthGrpc.getGenerateApiTokenMethod) == null) {
      synchronized (AuthGrpc.class) {
        if ((getGenerateApiTokenMethod = AuthGrpc.getGenerateApiTokenMethod) == null) {
          AuthGrpc.getGenerateApiTokenMethod = getGenerateApiTokenMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GenerateApiToken"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  momento.auth._GenerateApiTokenRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  momento.auth._GenerateApiTokenResponse.getDefaultInstance()))
              .setSchemaDescriptor(new AuthMethodDescriptorSupplier("GenerateApiToken"))
              .build();
        }
      }
    }
    return getGenerateApiTokenMethod;
  }

  private static volatile io.grpc.MethodDescriptor getRefreshApiTokenMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "RefreshApiToken",
      requestType = momento.auth._RefreshApiTokenRequest.class,
      responseType = momento.auth._RefreshApiTokenResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getRefreshApiTokenMethod() {
    io.grpc.MethodDescriptor getRefreshApiTokenMethod;
    if ((getRefreshApiTokenMethod = AuthGrpc.getRefreshApiTokenMethod) == null) {
      synchronized (AuthGrpc.class) {
        if ((getRefreshApiTokenMethod = AuthGrpc.getRefreshApiTokenMethod) == null) {
          AuthGrpc.getRefreshApiTokenMethod = getRefreshApiTokenMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RefreshApiToken"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  momento.auth._RefreshApiTokenRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  momento.auth._RefreshApiTokenResponse.getDefaultInstance()))
              .setSchemaDescriptor(new AuthMethodDescriptorSupplier("RefreshApiToken"))
              .build();
        }
      }
    }
    return getRefreshApiTokenMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static AuthStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public AuthStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new AuthStub(channel, callOptions);
        }
      };
    return AuthStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static AuthBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public AuthBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new AuthBlockingStub(channel, callOptions);
        }
      };
    return AuthBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static AuthFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public AuthFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new AuthFutureStub(channel, callOptions);
        }
      };
    return AuthFutureStub.newStub(factory, channel);
  }

  /**
   */
  public static abstract class AuthImplBase implements io.grpc.BindableService {

    /**
     */
    public void login(momento.auth._LoginRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLoginMethod(), responseObserver);
    }

    /**
     * 
     * api for initially generating api and refresh tokens
     * 
*/ public void generateApiToken(momento.auth._GenerateApiTokenRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGenerateApiTokenMethod(), responseObserver); } /** *
     * api for programmatically refreshing api and refresh tokens
     * 
*/ public void refreshApiToken(momento.auth._RefreshApiTokenRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRefreshApiTokenMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getLoginMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall( new MethodHandlers< momento.auth._LoginRequest, momento.auth._LoginResponse>( this, METHODID_LOGIN))) .addMethod( getGenerateApiTokenMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< momento.auth._GenerateApiTokenRequest, momento.auth._GenerateApiTokenResponse>( this, METHODID_GENERATE_API_TOKEN))) .addMethod( getRefreshApiTokenMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< momento.auth._RefreshApiTokenRequest, momento.auth._RefreshApiTokenResponse>( this, METHODID_REFRESH_API_TOKEN))) .build(); } } /** */ public static final class AuthStub extends io.grpc.stub.AbstractAsyncStub { private AuthStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AuthStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AuthStub(channel, callOptions); } /** */ public void login(momento.auth._LoginRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncServerStreamingCall( getChannel().newCall(getLoginMethod(), getCallOptions()), request, responseObserver); } /** *
     * api for initially generating api and refresh tokens
     * 
*/ public void generateApiToken(momento.auth._GenerateApiTokenRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGenerateApiTokenMethod(), getCallOptions()), request, responseObserver); } /** *
     * api for programmatically refreshing api and refresh tokens
     * 
*/ public void refreshApiToken(momento.auth._RefreshApiTokenRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getRefreshApiTokenMethod(), getCallOptions()), request, responseObserver); } } /** */ public static final class AuthBlockingStub extends io.grpc.stub.AbstractBlockingStub { private AuthBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AuthBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AuthBlockingStub(channel, callOptions); } /** */ public java.util.Iterator login( momento.auth._LoginRequest request) { return io.grpc.stub.ClientCalls.blockingServerStreamingCall( getChannel(), getLoginMethod(), getCallOptions(), request); } /** *
     * api for initially generating api and refresh tokens
     * 
*/ public momento.auth._GenerateApiTokenResponse generateApiToken(momento.auth._GenerateApiTokenRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGenerateApiTokenMethod(), getCallOptions(), request); } /** *
     * api for programmatically refreshing api and refresh tokens
     * 
*/ public momento.auth._RefreshApiTokenResponse refreshApiToken(momento.auth._RefreshApiTokenRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getRefreshApiTokenMethod(), getCallOptions(), request); } } /** */ public static final class AuthFutureStub extends io.grpc.stub.AbstractFutureStub { private AuthFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AuthFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AuthFutureStub(channel, callOptions); } /** *
     * api for initially generating api and refresh tokens
     * 
*/ public com.google.common.util.concurrent.ListenableFuture generateApiToken( momento.auth._GenerateApiTokenRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGenerateApiTokenMethod(), getCallOptions()), request); } /** *
     * api for programmatically refreshing api and refresh tokens
     * 
*/ public com.google.common.util.concurrent.ListenableFuture refreshApiToken( momento.auth._RefreshApiTokenRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getRefreshApiTokenMethod(), getCallOptions()), request); } } private static final int METHODID_LOGIN = 0; private static final int METHODID_GENERATE_API_TOKEN = 1; private static final int METHODID_REFRESH_API_TOKEN = 2; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { private final AuthImplBase serviceImpl; private final int methodId; MethodHandlers(AuthImplBase serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @java.lang.Override @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_LOGIN: serviceImpl.login((momento.auth._LoginRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GENERATE_API_TOKEN: serviceImpl.generateApiToken((momento.auth._GenerateApiTokenRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_REFRESH_API_TOKEN: serviceImpl.refreshApiToken((momento.auth._RefreshApiTokenRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; default: throw new AssertionError(); } } @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke( io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { default: throw new AssertionError(); } } } private static abstract class AuthBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { AuthBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return momento.auth.AuthOuterClass.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("Auth"); } } private static final class AuthFileDescriptorSupplier extends AuthBaseDescriptorSupplier { AuthFileDescriptorSupplier() {} } private static final class AuthMethodDescriptorSupplier extends AuthBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; AuthMethodDescriptorSupplier(String methodName) { this.methodName = methodName; } @java.lang.Override public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { return getServiceDescriptor().findMethodByName(methodName); } } private static volatile io.grpc.ServiceDescriptor serviceDescriptor; public static io.grpc.ServiceDescriptor getServiceDescriptor() { io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { synchronized (AuthGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new AuthFileDescriptorSupplier()) .addMethod(getLoginMethod()) .addMethod(getGenerateApiTokenMethod()) .addMethod(getRefreshApiTokenMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy