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

main.grpc.com.streamlayer.interactive.game.InteractiveGameGrpc Maven / Gradle / Ivy

There is a newer version: 5.133.1
Show newest version
package com.streamlayer.interactive.game;

import static io.grpc.MethodDescriptor.generateFullMethodName;

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

  private InteractiveGameGrpc() {}

  public static final java.lang.String SERVICE_NAME = "streamlayer.interactive.game.InteractiveGame";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "StartGame",
      requestType = com.streamlayer.interactive.game.StartRequest.class,
      responseType = com.streamlayer.interactive.game.StartResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getStartGameMethod() {
    io.grpc.MethodDescriptor getStartGameMethod;
    if ((getStartGameMethod = InteractiveGameGrpc.getStartGameMethod) == null) {
      synchronized (InteractiveGameGrpc.class) {
        if ((getStartGameMethod = InteractiveGameGrpc.getStartGameMethod) == null) {
          InteractiveGameGrpc.getStartGameMethod = getStartGameMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartGame"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.interactive.game.StartRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.interactive.game.StartResponse.getDefaultInstance()))
              .build();
        }
      }
    }
    return getStartGameMethod;
  }

  private static volatile io.grpc.MethodDescriptor getEndGameMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "EndGame",
      requestType = com.streamlayer.interactive.game.EndRequest.class,
      responseType = com.streamlayer.interactive.game.EndResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getEndGameMethod() {
    io.grpc.MethodDescriptor getEndGameMethod;
    if ((getEndGameMethod = InteractiveGameGrpc.getEndGameMethod) == null) {
      synchronized (InteractiveGameGrpc.class) {
        if ((getEndGameMethod = InteractiveGameGrpc.getEndGameMethod) == null) {
          InteractiveGameGrpc.getEndGameMethod = getEndGameMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "EndGame"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.interactive.game.EndRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.interactive.game.EndResponse.getDefaultInstance()))
              .build();
        }
      }
    }
    return getEndGameMethod;
  }

  private static volatile io.grpc.MethodDescriptor getSetAutoPostMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "SetAutoPost",
      requestType = com.streamlayer.interactive.game.SetAutoPostRequest.class,
      responseType = com.streamlayer.interactive.game.SetAutoPostResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getSetAutoPostMethod() {
    io.grpc.MethodDescriptor getSetAutoPostMethod;
    if ((getSetAutoPostMethod = InteractiveGameGrpc.getSetAutoPostMethod) == null) {
      synchronized (InteractiveGameGrpc.class) {
        if ((getSetAutoPostMethod = InteractiveGameGrpc.getSetAutoPostMethod) == null) {
          InteractiveGameGrpc.getSetAutoPostMethod = getSetAutoPostMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetAutoPost"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.interactive.game.SetAutoPostRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
                  com.streamlayer.interactive.game.SetAutoPostResponse.getDefaultInstance()))
              .build();
        }
      }
    }
    return getSetAutoPostMethod;
  }

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

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

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

  /**
   */
  public interface AsyncService {

    /**
     */
    default void startGame(com.streamlayer.interactive.game.StartRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStartGameMethod(), responseObserver);
    }

    /**
     */
    default void endGame(com.streamlayer.interactive.game.EndRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getEndGameMethod(), responseObserver);
    }

    /**
     */
    default void setAutoPost(com.streamlayer.interactive.game.SetAutoPostRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetAutoPostMethod(), responseObserver);
    }
  }

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

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

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

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

    /**
     */
    public void startGame(com.streamlayer.interactive.game.StartRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getStartGameMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void endGame(com.streamlayer.interactive.game.EndRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getEndGameMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void setAutoPost(com.streamlayer.interactive.game.SetAutoPostRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getSetAutoPostMethod(), getCallOptions()), request, responseObserver);
    }
  }

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

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

    /**
     */
    public com.streamlayer.interactive.game.StartResponse startGame(com.streamlayer.interactive.game.StartRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getStartGameMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.streamlayer.interactive.game.EndResponse endGame(com.streamlayer.interactive.game.EndRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getEndGameMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.streamlayer.interactive.game.SetAutoPostResponse setAutoPost(com.streamlayer.interactive.game.SetAutoPostRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getSetAutoPostMethod(), getCallOptions(), request);
    }
  }

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

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

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture startGame(
        com.streamlayer.interactive.game.StartRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getStartGameMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture endGame(
        com.streamlayer.interactive.game.EndRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getEndGameMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture setAutoPost(
        com.streamlayer.interactive.game.SetAutoPostRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getSetAutoPostMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_START_GAME = 0;
  private static final int METHODID_END_GAME = 1;
  private static final int METHODID_SET_AUTO_POST = 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 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_START_GAME:
          serviceImpl.startGame((com.streamlayer.interactive.game.StartRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_END_GAME:
          serviceImpl.endGame((com.streamlayer.interactive.game.EndRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_SET_AUTO_POST:
          serviceImpl.setAutoPost((com.streamlayer.interactive.game.SetAutoPostRequest) 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(
          getStartGameMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.streamlayer.interactive.game.StartRequest,
              com.streamlayer.interactive.game.StartResponse>(
                service, METHODID_START_GAME)))
        .addMethod(
          getEndGameMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.streamlayer.interactive.game.EndRequest,
              com.streamlayer.interactive.game.EndResponse>(
                service, METHODID_END_GAME)))
        .addMethod(
          getSetAutoPostMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.streamlayer.interactive.game.SetAutoPostRequest,
              com.streamlayer.interactive.game.SetAutoPostResponse>(
                service, METHODID_SET_AUTO_POST)))
        .build();
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (InteractiveGameGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .addMethod(getStartGameMethod())
              .addMethod(getEndGameMethod())
              .addMethod(getSetAutoPostMethod())
              .build();
        }
      }
    }
    return result;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy