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

tech.figure.objectstore.gateway.admin.GatewayAdminGrpc Maven / Gradle / Ivy

The newest version!
package tech.figure.objectstore.gateway.admin;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.57.2)",
    comments = "Source: tech/figure/objectstore/gateway/admin/admin.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class GatewayAdminGrpc {

  private GatewayAdminGrpc() {}

  public static final java.lang.String SERVICE_NAME = "tech.figure.objectstore.gateway.admin.GatewayAdmin";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "PutDataStorageAccount",
      requestType = tech.figure.objectstore.gateway.admin.Admin.PutDataStorageAccountRequest.class,
      responseType = tech.figure.objectstore.gateway.admin.Admin.PutDataStorageAccountResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getPutDataStorageAccountMethod() {
    io.grpc.MethodDescriptor getPutDataStorageAccountMethod;
    if ((getPutDataStorageAccountMethod = GatewayAdminGrpc.getPutDataStorageAccountMethod) == null) {
      synchronized (GatewayAdminGrpc.class) {
        if ((getPutDataStorageAccountMethod = GatewayAdminGrpc.getPutDataStorageAccountMethod) == null) {
          GatewayAdminGrpc.getPutDataStorageAccountMethod = getPutDataStorageAccountMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PutDataStorageAccount"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  tech.figure.objectstore.gateway.admin.Admin.PutDataStorageAccountRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  tech.figure.objectstore.gateway.admin.Admin.PutDataStorageAccountResponse.getDefaultInstance()))
              .setSchemaDescriptor(new GatewayAdminMethodDescriptorSupplier("PutDataStorageAccount"))
              .build();
        }
      }
    }
    return getPutDataStorageAccountMethod;
  }

  private static volatile io.grpc.MethodDescriptor getFetchDataStorageAccountMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "FetchDataStorageAccount",
      requestType = tech.figure.objectstore.gateway.admin.Admin.FetchDataStorageAccountRequest.class,
      responseType = tech.figure.objectstore.gateway.admin.Admin.FetchDataStorageAccountResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getFetchDataStorageAccountMethod() {
    io.grpc.MethodDescriptor getFetchDataStorageAccountMethod;
    if ((getFetchDataStorageAccountMethod = GatewayAdminGrpc.getFetchDataStorageAccountMethod) == null) {
      synchronized (GatewayAdminGrpc.class) {
        if ((getFetchDataStorageAccountMethod = GatewayAdminGrpc.getFetchDataStorageAccountMethod) == null) {
          GatewayAdminGrpc.getFetchDataStorageAccountMethod = getFetchDataStorageAccountMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "FetchDataStorageAccount"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  tech.figure.objectstore.gateway.admin.Admin.FetchDataStorageAccountRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  tech.figure.objectstore.gateway.admin.Admin.FetchDataStorageAccountResponse.getDefaultInstance()))
              .setSchemaDescriptor(new GatewayAdminMethodDescriptorSupplier("FetchDataStorageAccount"))
              .build();
        }
      }
    }
    return getFetchDataStorageAccountMethod;
  }

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

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

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

  /**
   */
  public interface AsyncService {

    /**
     */
    default void putDataStorageAccount(tech.figure.objectstore.gateway.admin.Admin.PutDataStorageAccountRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPutDataStorageAccountMethod(), responseObserver);
    }

    /**
     */
    default void fetchDataStorageAccount(tech.figure.objectstore.gateway.admin.Admin.FetchDataStorageAccountRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getFetchDataStorageAccountMethod(), responseObserver);
    }
  }

  /**
   * Base class for the server implementation of the service GatewayAdmin.
   */
  public static abstract class GatewayAdminImplBase
      implements io.grpc.BindableService, AsyncService {

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return GatewayAdminGrpc.bindService(this);
    }
  }

  /**
   * A stub to allow clients to do asynchronous rpc calls to service GatewayAdmin.
   */
  public static final class GatewayAdminStub
      extends io.grpc.stub.AbstractAsyncStub {
    private GatewayAdminStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected GatewayAdminStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new GatewayAdminStub(channel, callOptions);
    }

    /**
     */
    public void putDataStorageAccount(tech.figure.objectstore.gateway.admin.Admin.PutDataStorageAccountRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getPutDataStorageAccountMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void fetchDataStorageAccount(tech.figure.objectstore.gateway.admin.Admin.FetchDataStorageAccountRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getFetchDataStorageAccountMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   * A stub to allow clients to do synchronous rpc calls to service GatewayAdmin.
   */
  public static final class GatewayAdminBlockingStub
      extends io.grpc.stub.AbstractBlockingStub {
    private GatewayAdminBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected GatewayAdminBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new GatewayAdminBlockingStub(channel, callOptions);
    }

    /**
     */
    public tech.figure.objectstore.gateway.admin.Admin.PutDataStorageAccountResponse putDataStorageAccount(tech.figure.objectstore.gateway.admin.Admin.PutDataStorageAccountRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getPutDataStorageAccountMethod(), getCallOptions(), request);
    }

    /**
     */
    public tech.figure.objectstore.gateway.admin.Admin.FetchDataStorageAccountResponse fetchDataStorageAccount(tech.figure.objectstore.gateway.admin.Admin.FetchDataStorageAccountRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getFetchDataStorageAccountMethod(), getCallOptions(), request);
    }
  }

  /**
   * A stub to allow clients to do ListenableFuture-style rpc calls to service GatewayAdmin.
   */
  public static final class GatewayAdminFutureStub
      extends io.grpc.stub.AbstractFutureStub {
    private GatewayAdminFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected GatewayAdminFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new GatewayAdminFutureStub(channel, callOptions);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture putDataStorageAccount(
        tech.figure.objectstore.gateway.admin.Admin.PutDataStorageAccountRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getPutDataStorageAccountMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture fetchDataStorageAccount(
        tech.figure.objectstore.gateway.admin.Admin.FetchDataStorageAccountRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getFetchDataStorageAccountMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_PUT_DATA_STORAGE_ACCOUNT = 0;
  private static final int METHODID_FETCH_DATA_STORAGE_ACCOUNT = 1;

  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 AsyncService serviceImpl;
    private final int methodId;

    MethodHandlers(AsyncService 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_PUT_DATA_STORAGE_ACCOUNT:
          serviceImpl.putDataStorageAccount((tech.figure.objectstore.gateway.admin.Admin.PutDataStorageAccountRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_FETCH_DATA_STORAGE_ACCOUNT:
          serviceImpl.fetchDataStorageAccount((tech.figure.objectstore.gateway.admin.Admin.FetchDataStorageAccountRequest) 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();
      }
    }
  }

  public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
    return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
        .addMethod(
          getPutDataStorageAccountMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              tech.figure.objectstore.gateway.admin.Admin.PutDataStorageAccountRequest,
              tech.figure.objectstore.gateway.admin.Admin.PutDataStorageAccountResponse>(
                service, METHODID_PUT_DATA_STORAGE_ACCOUNT)))
        .addMethod(
          getFetchDataStorageAccountMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              tech.figure.objectstore.gateway.admin.Admin.FetchDataStorageAccountRequest,
              tech.figure.objectstore.gateway.admin.Admin.FetchDataStorageAccountResponse>(
                service, METHODID_FETCH_DATA_STORAGE_ACCOUNT)))
        .build();
  }

  private static abstract class GatewayAdminBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    GatewayAdminBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return tech.figure.objectstore.gateway.admin.Admin.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("GatewayAdmin");
    }
  }

  private static final class GatewayAdminFileDescriptorSupplier
      extends GatewayAdminBaseDescriptorSupplier {
    GatewayAdminFileDescriptorSupplier() {}
  }

  private static final class GatewayAdminMethodDescriptorSupplier
      extends GatewayAdminBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final java.lang.String methodName;

    GatewayAdminMethodDescriptorSupplier(java.lang.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 (GatewayAdminGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new GatewayAdminFileDescriptorSupplier())
              .addMethod(getPutDataStorageAccountMethod())
              .addMethod(getFetchDataStorageAccountMethod())
              .build();
        }
      }
    }
    return result;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy