Skip to content

Commit

Permalink
fix: Generate Java Code from plugin-pb (#80)
Browse files Browse the repository at this point in the history
This PR was created by a scheduled workflow to regenerate the Java code from `plugin-pb`.
  • Loading branch information
cq-bot authored Feb 7, 2024
1 parent 2cbf8f3 commit df1e2e1
Show file tree
Hide file tree
Showing 6 changed files with 1,685 additions and 93 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,37 @@ io.cloudquery.plugin.v3.GetVersion.Response> getGetVersionMethod() {
return getGetVersionMethod;
}

private static volatile io.grpc.MethodDescriptor<io.cloudquery.plugin.v3.GetSpecSchema.Request,
io.cloudquery.plugin.v3.GetSpecSchema.Response> getGetSpecSchemaMethod;

@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetSpecSchema",
requestType = io.cloudquery.plugin.v3.GetSpecSchema.Request.class,
responseType = io.cloudquery.plugin.v3.GetSpecSchema.Response.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<io.cloudquery.plugin.v3.GetSpecSchema.Request,
io.cloudquery.plugin.v3.GetSpecSchema.Response> getGetSpecSchemaMethod() {
io.grpc.MethodDescriptor<io.cloudquery.plugin.v3.GetSpecSchema.Request, io.cloudquery.plugin.v3.GetSpecSchema.Response> getGetSpecSchemaMethod;
if ((getGetSpecSchemaMethod = PluginGrpc.getGetSpecSchemaMethod) == null) {
synchronized (PluginGrpc.class) {
if ((getGetSpecSchemaMethod = PluginGrpc.getGetSpecSchemaMethod) == null) {
PluginGrpc.getGetSpecSchemaMethod = getGetSpecSchemaMethod =
io.grpc.MethodDescriptor.<io.cloudquery.plugin.v3.GetSpecSchema.Request, io.cloudquery.plugin.v3.GetSpecSchema.Response>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSpecSchema"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.cloudquery.plugin.v3.GetSpecSchema.Request.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.cloudquery.plugin.v3.GetSpecSchema.Response.getDefaultInstance()))
.setSchemaDescriptor(new PluginMethodDescriptorSupplier("GetSpecSchema"))
.build();
}
}
}
return getGetSpecSchemaMethod;
}

private static volatile io.grpc.MethodDescriptor<io.cloudquery.plugin.v3.Init.Request,
io.cloudquery.plugin.v3.Init.Response> getInitMethod;

Expand Down Expand Up @@ -331,6 +362,18 @@ default void getVersion(io.cloudquery.plugin.v3.GetVersion.Request request,
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetVersionMethod(), responseObserver);
}

/**
* <pre>
* Get plugin spec schema.
* This will allow validating the input even before calling Init.
* Should be called before Init.
* </pre>
*/
default void getSpecSchema(io.cloudquery.plugin.v3.GetSpecSchema.Request request,
io.grpc.stub.StreamObserver<io.cloudquery.plugin.v3.GetSpecSchema.Response> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSpecSchemaMethod(), responseObserver);
}

/**
* <pre>
* Configure the plugin with the given credentials and mode
Expand Down Expand Up @@ -442,6 +485,19 @@ public void getVersion(io.cloudquery.plugin.v3.GetVersion.Request request,
getChannel().newCall(getGetVersionMethod(), getCallOptions()), request, responseObserver);
}

/**
* <pre>
* Get plugin spec schema.
* This will allow validating the input even before calling Init.
* Should be called before Init.
* </pre>
*/
public void getSpecSchema(io.cloudquery.plugin.v3.GetSpecSchema.Request request,
io.grpc.stub.StreamObserver<io.cloudquery.plugin.v3.GetSpecSchema.Response> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetSpecSchemaMethod(), getCallOptions()), request, responseObserver);
}

/**
* <pre>
* Configure the plugin with the given credentials and mode
Expand Down Expand Up @@ -546,6 +602,18 @@ public io.cloudquery.plugin.v3.GetVersion.Response getVersion(io.cloudquery.plug
getChannel(), getGetVersionMethod(), getCallOptions(), request);
}

/**
* <pre>
* Get plugin spec schema.
* This will allow validating the input even before calling Init.
* Should be called before Init.
* </pre>
*/
public io.cloudquery.plugin.v3.GetSpecSchema.Response getSpecSchema(io.cloudquery.plugin.v3.GetSpecSchema.Request request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetSpecSchemaMethod(), getCallOptions(), request);
}

/**
* <pre>
* Configure the plugin with the given credentials and mode
Expand Down Expand Up @@ -638,6 +706,19 @@ public com.google.common.util.concurrent.ListenableFuture<io.cloudquery.plugin.v
getChannel().newCall(getGetVersionMethod(), getCallOptions()), request);
}

/**
* <pre>
* Get plugin spec schema.
* This will allow validating the input even before calling Init.
* Should be called before Init.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<io.cloudquery.plugin.v3.GetSpecSchema.Response> getSpecSchema(
io.cloudquery.plugin.v3.GetSpecSchema.Request request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetSpecSchemaMethod(), getCallOptions()), request);
}

/**
* <pre>
* Configure the plugin with the given credentials and mode
Expand Down Expand Up @@ -674,12 +755,13 @@ public com.google.common.util.concurrent.ListenableFuture<io.cloudquery.plugin.v

private static final int METHODID_GET_NAME = 0;
private static final int METHODID_GET_VERSION = 1;
private static final int METHODID_INIT = 2;
private static final int METHODID_GET_TABLES = 3;
private static final int METHODID_SYNC = 4;
private static final int METHODID_READ = 5;
private static final int METHODID_CLOSE = 6;
private static final int METHODID_WRITE = 7;
private static final int METHODID_GET_SPEC_SCHEMA = 2;
private static final int METHODID_INIT = 3;
private static final int METHODID_GET_TABLES = 4;
private static final int METHODID_SYNC = 5;
private static final int METHODID_READ = 6;
private static final int METHODID_CLOSE = 7;
private static final int METHODID_WRITE = 8;

private static final class MethodHandlers<Req, Resp> implements
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
Expand All @@ -706,6 +788,10 @@ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserv
serviceImpl.getVersion((io.cloudquery.plugin.v3.GetVersion.Request) request,
(io.grpc.stub.StreamObserver<io.cloudquery.plugin.v3.GetVersion.Response>) responseObserver);
break;
case METHODID_GET_SPEC_SCHEMA:
serviceImpl.getSpecSchema((io.cloudquery.plugin.v3.GetSpecSchema.Request) request,
(io.grpc.stub.StreamObserver<io.cloudquery.plugin.v3.GetSpecSchema.Response>) responseObserver);
break;
case METHODID_INIT:
serviceImpl.init((io.cloudquery.plugin.v3.Init.Request) request,
(io.grpc.stub.StreamObserver<io.cloudquery.plugin.v3.Init.Response>) responseObserver);
Expand Down Expand Up @@ -761,6 +847,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser
io.cloudquery.plugin.v3.GetVersion.Request,
io.cloudquery.plugin.v3.GetVersion.Response>(
service, METHODID_GET_VERSION)))
.addMethod(
getGetSpecSchemaMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.cloudquery.plugin.v3.GetSpecSchema.Request,
io.cloudquery.plugin.v3.GetSpecSchema.Response>(
service, METHODID_GET_SPEC_SCHEMA)))
.addMethod(
getInitMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
Expand Down Expand Up @@ -853,6 +946,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
.setSchemaDescriptor(new PluginFileDescriptorSupplier())
.addMethod(getGetNameMethod())
.addMethod(getGetVersionMethod())
.addMethod(getGetSpecSchemaMethod())
.addMethod(getInitMethod())
.addMethod(getGetTablesMethod())
.addMethod(getSyncMethod())
Expand Down
Loading

0 comments on commit df1e2e1

Please sign in to comment.