com.zepben.protobuf.nm.SwitchStateServiceGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of evolve-grpc Show documentation
Show all versions of evolve-grpc Show documentation
Protobuf and gRPC definitions for the evolve platform
package com.zepben.protobuf.nm;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.59.1)",
comments = "Source: zepben/protobuf/nm/set-switch-state.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class SwitchStateServiceGrpc {
private SwitchStateServiceGrpc() {}
public static final java.lang.String SERVICE_NAME = "zepben.protobuf.nm.SwitchStateService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getSetCurrentSwitchStatesMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "setCurrentSwitchStates",
requestType = com.zepben.protobuf.nm.SetCurrentSwitchStatesRequest.class,
responseType = com.zepben.protobuf.nm.SetCurrentSwitchStatesResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getSetCurrentSwitchStatesMethod() {
io.grpc.MethodDescriptor getSetCurrentSwitchStatesMethod;
if ((getSetCurrentSwitchStatesMethod = SwitchStateServiceGrpc.getSetCurrentSwitchStatesMethod) == null) {
synchronized (SwitchStateServiceGrpc.class) {
if ((getSetCurrentSwitchStatesMethod = SwitchStateServiceGrpc.getSetCurrentSwitchStatesMethod) == null) {
SwitchStateServiceGrpc.getSetCurrentSwitchStatesMethod = getSetCurrentSwitchStatesMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "setCurrentSwitchStates"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.zepben.protobuf.nm.SetCurrentSwitchStatesRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.zepben.protobuf.nm.SetCurrentSwitchStatesResponse.getDefaultInstance()))
.setSchemaDescriptor(new SwitchStateServiceMethodDescriptorSupplier("setCurrentSwitchStates"))
.build();
}
}
}
return getSetCurrentSwitchStatesMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static SwitchStateServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public SwitchStateServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new SwitchStateServiceStub(channel, callOptions);
}
};
return SwitchStateServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static SwitchStateServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public SwitchStateServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new SwitchStateServiceBlockingStub(channel, callOptions);
}
};
return SwitchStateServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static SwitchStateServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public SwitchStateServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new SwitchStateServiceFutureStub(channel, callOptions);
}
};
return SwitchStateServiceFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*/
default void setCurrentSwitchStates(com.zepben.protobuf.nm.SetCurrentSwitchStatesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetCurrentSwitchStatesMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service SwitchStateService.
*/
public static abstract class SwitchStateServiceImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return SwitchStateServiceGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service SwitchStateService.
*/
public static final class SwitchStateServiceStub
extends io.grpc.stub.AbstractAsyncStub {
private SwitchStateServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SwitchStateServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new SwitchStateServiceStub(channel, callOptions);
}
/**
*/
public void setCurrentSwitchStates(com.zepben.protobuf.nm.SetCurrentSwitchStatesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getSetCurrentSwitchStatesMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service SwitchStateService.
*/
public static final class SwitchStateServiceBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private SwitchStateServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SwitchStateServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new SwitchStateServiceBlockingStub(channel, callOptions);
}
/**
*/
public com.zepben.protobuf.nm.SetCurrentSwitchStatesResponse setCurrentSwitchStates(com.zepben.protobuf.nm.SetCurrentSwitchStatesRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getSetCurrentSwitchStatesMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service SwitchStateService.
*/
public static final class SwitchStateServiceFutureStub
extends io.grpc.stub.AbstractFutureStub {
private SwitchStateServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SwitchStateServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new SwitchStateServiceFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture setCurrentSwitchStates(
com.zepben.protobuf.nm.SetCurrentSwitchStatesRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getSetCurrentSwitchStatesMethod(), getCallOptions()), request);
}
}
private static final int METHODID_SET_CURRENT_SWITCH_STATES = 0;
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_SET_CURRENT_SWITCH_STATES:
serviceImpl.setCurrentSwitchStates((com.zepben.protobuf.nm.SetCurrentSwitchStatesRequest) 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(
getSetCurrentSwitchStatesMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.zepben.protobuf.nm.SetCurrentSwitchStatesRequest,
com.zepben.protobuf.nm.SetCurrentSwitchStatesResponse>(
service, METHODID_SET_CURRENT_SWITCH_STATES)))
.build();
}
private static abstract class SwitchStateServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
SwitchStateServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.zepben.protobuf.nm.SetSwitchState.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("SwitchStateService");
}
}
private static final class SwitchStateServiceFileDescriptorSupplier
extends SwitchStateServiceBaseDescriptorSupplier {
SwitchStateServiceFileDescriptorSupplier() {}
}
private static final class SwitchStateServiceMethodDescriptorSupplier
extends SwitchStateServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
SwitchStateServiceMethodDescriptorSupplier(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 (SwitchStateServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new SwitchStateServiceFileDescriptorSupplier())
.addMethod(getSetCurrentSwitchStatesMethod())
.build();
}
}
}
return result;
}
}