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

main.grpc.com.streamlayer.sdkSettings.stream.StreamGrpc Maven / Gradle / Ivy

There is a newer version: 5.133.1
Show newest version
package com.streamlayer.sdkSettings.stream;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.65.1)",
    comments = "Source: streamlayer/sdkSettings/stream/stream.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class StreamGrpc {

  private StreamGrpc() {}

  public static final java.lang.String SERVICE_NAME = "streamlayer.sdkSettings.stream.Stream";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "Get",
      requestType = com.streamlayer.sdkSettings.stream.GetRequest.class,
      responseType = com.streamlayer.sdkSettings.stream.GetResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetMethod() {
    io.grpc.MethodDescriptor getGetMethod;
    if ((getGetMethod = StreamGrpc.getGetMethod) == null) {
      synchronized (StreamGrpc.class) {
        if ((getGetMethod = StreamGrpc.getGetMethod) == null) {
          StreamGrpc.getGetMethod = getGetMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Get"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.sdkSettings.stream.GetRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.sdkSettings.stream.GetResponse.getDefaultInstance()))
              .build();
        }
      }
    }
    return getGetMethod;
  }

  private static volatile io.grpc.MethodDescriptor getListMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "List",
      requestType = com.streamlayer.sdkSettings.stream.ListRequest.class,
      responseType = com.streamlayer.sdkSettings.stream.ListResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getListMethod() {
    io.grpc.MethodDescriptor getListMethod;
    if ((getListMethod = StreamGrpc.getListMethod) == null) {
      synchronized (StreamGrpc.class) {
        if ((getListMethod = StreamGrpc.getListMethod) == null) {
          StreamGrpc.getListMethod = getListMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "List"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.sdkSettings.stream.ListRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.sdkSettings.stream.ListResponse.getDefaultInstance()))
              .build();
        }
      }
    }
    return getListMethod;
  }

  private static volatile io.grpc.MethodDescriptor getUpdateMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "Update",
      requestType = com.streamlayer.sdkSettings.stream.UpdateRequest.class,
      responseType = com.streamlayer.sdkSettings.stream.UpdateResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getUpdateMethod() {
    io.grpc.MethodDescriptor getUpdateMethod;
    if ((getUpdateMethod = StreamGrpc.getUpdateMethod) == null) {
      synchronized (StreamGrpc.class) {
        if ((getUpdateMethod = StreamGrpc.getUpdateMethod) == null) {
          StreamGrpc.getUpdateMethod = getUpdateMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Update"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.sdkSettings.stream.UpdateRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.sdkSettings.stream.UpdateResponse.getDefaultInstance()))
              .build();
        }
      }
    }
    return getUpdateMethod;
  }

  private static volatile io.grpc.MethodDescriptor getResetAllStreamsMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "ResetAllStreams",
      requestType = com.streamlayer.sdkSettings.stream.ResetAllStreamsRequest.class,
      responseType = com.streamlayer.sdkSettings.stream.ResetAllStreamsResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getResetAllStreamsMethod() {
    io.grpc.MethodDescriptor getResetAllStreamsMethod;
    if ((getResetAllStreamsMethod = StreamGrpc.getResetAllStreamsMethod) == null) {
      synchronized (StreamGrpc.class) {
        if ((getResetAllStreamsMethod = StreamGrpc.getResetAllStreamsMethod) == null) {
          StreamGrpc.getResetAllStreamsMethod = getResetAllStreamsMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ResetAllStreams"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.sdkSettings.stream.ResetAllStreamsRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.sdkSettings.stream.ResetAllStreamsResponse.getDefaultInstance()))
              .build();
        }
      }
    }
    return getResetAllStreamsMethod;
  }

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

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

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

  /**
   */
  public interface AsyncService {

    /**
     */
    default void get(com.streamlayer.sdkSettings.stream.GetRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetMethod(), responseObserver);
    }

    /**
     */
    default void list(com.streamlayer.sdkSettings.stream.ListRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListMethod(), responseObserver);
    }

    /**
     */
    default void update(com.streamlayer.sdkSettings.stream.UpdateRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateMethod(), responseObserver);
    }

    /**
     */
    default void resetAllStreams(com.streamlayer.sdkSettings.stream.ResetAllStreamsRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getResetAllStreamsMethod(), responseObserver);
    }
  }

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

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

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

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

    /**
     */
    public void get(com.streamlayer.sdkSettings.stream.GetRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getGetMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void list(com.streamlayer.sdkSettings.stream.ListRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getListMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void update(com.streamlayer.sdkSettings.stream.UpdateRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getUpdateMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void resetAllStreams(com.streamlayer.sdkSettings.stream.ResetAllStreamsRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getResetAllStreamsMethod(), getCallOptions()), request, responseObserver);
    }
  }

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

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

    /**
     */
    public com.streamlayer.sdkSettings.stream.GetResponse get(com.streamlayer.sdkSettings.stream.GetRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getGetMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.streamlayer.sdkSettings.stream.ListResponse list(com.streamlayer.sdkSettings.stream.ListRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getListMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.streamlayer.sdkSettings.stream.UpdateResponse update(com.streamlayer.sdkSettings.stream.UpdateRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getUpdateMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.streamlayer.sdkSettings.stream.ResetAllStreamsResponse resetAllStreams(com.streamlayer.sdkSettings.stream.ResetAllStreamsRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getResetAllStreamsMethod(), getCallOptions(), request);
    }
  }

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

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

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture get(
        com.streamlayer.sdkSettings.stream.GetRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getGetMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture list(
        com.streamlayer.sdkSettings.stream.ListRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getListMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture update(
        com.streamlayer.sdkSettings.stream.UpdateRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getUpdateMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture resetAllStreams(
        com.streamlayer.sdkSettings.stream.ResetAllStreamsRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getResetAllStreamsMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_GET = 0;
  private static final int METHODID_LIST = 1;
  private static final int METHODID_UPDATE = 2;
  private static final int METHODID_RESET_ALL_STREAMS = 3;

  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_GET:
          serviceImpl.get((com.streamlayer.sdkSettings.stream.GetRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_LIST:
          serviceImpl.list((com.streamlayer.sdkSettings.stream.ListRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_UPDATE:
          serviceImpl.update((com.streamlayer.sdkSettings.stream.UpdateRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_RESET_ALL_STREAMS:
          serviceImpl.resetAllStreams((com.streamlayer.sdkSettings.stream.ResetAllStreamsRequest) 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(
          getGetMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.streamlayer.sdkSettings.stream.GetRequest,
              com.streamlayer.sdkSettings.stream.GetResponse>(
                service, METHODID_GET)))
        .addMethod(
          getListMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.streamlayer.sdkSettings.stream.ListRequest,
              com.streamlayer.sdkSettings.stream.ListResponse>(
                service, METHODID_LIST)))
        .addMethod(
          getUpdateMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.streamlayer.sdkSettings.stream.UpdateRequest,
              com.streamlayer.sdkSettings.stream.UpdateResponse>(
                service, METHODID_UPDATE)))
        .addMethod(
          getResetAllStreamsMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.streamlayer.sdkSettings.stream.ResetAllStreamsRequest,
              com.streamlayer.sdkSettings.stream.ResetAllStreamsResponse>(
                service, METHODID_RESET_ALL_STREAMS)))
        .build();
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (StreamGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .addMethod(getGetMethod())
              .addMethod(getListMethod())
              .addMethod(getUpdateMethod())
              .addMethod(getResetAllStreamsMethod())
              .build();
        }
      }
    }
    return result;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy