From df1e2e1d8f94a1c363a9ed09f49d4531aabf2cb8 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 7 Feb 2024 17:19:20 +0200 Subject: [PATCH] fix: Generate Java Code from `plugin-pb` (#80) This PR was created by a scheduled workflow to regenerate the Java code from `plugin-pb`. --- .../io/cloudquery/plugin/v3/PluginGrpc.java | 106 +- .../cloudquery/plugin/v3/GetSpecSchema.java | 1437 +++++++++++++++++ .../plugin/v3/GetSpecSchemaOrBuilder.java | 10 + .../plugin/v3/PluginOuterClass.java | 202 ++- .../java/io/cloudquery/plugin/v3/Write.java | 10 +- .../proto/cloudquery/plugin/v3/plugin.proto | 13 + 6 files changed, 1685 insertions(+), 93 deletions(-) create mode 100644 build/generated/source/proto/main/java/io/cloudquery/plugin/v3/GetSpecSchema.java create mode 100644 build/generated/source/proto/main/java/io/cloudquery/plugin/v3/GetSpecSchemaOrBuilder.java diff --git a/build/generated/source/proto/main/grpc/io/cloudquery/plugin/v3/PluginGrpc.java b/build/generated/source/proto/main/grpc/io/cloudquery/plugin/v3/PluginGrpc.java index a5b9419..343b8d4 100644 --- a/build/generated/source/proto/main/grpc/io/cloudquery/plugin/v3/PluginGrpc.java +++ b/build/generated/source/proto/main/grpc/io/cloudquery/plugin/v3/PluginGrpc.java @@ -77,6 +77,37 @@ io.cloudquery.plugin.v3.GetVersion.Response> getGetVersionMethod() { return getGetVersionMethod; } + private static volatile io.grpc.MethodDescriptor 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 getGetSpecSchemaMethod() { + io.grpc.MethodDescriptor getGetSpecSchemaMethod; + if ((getGetSpecSchemaMethod = PluginGrpc.getGetSpecSchemaMethod) == null) { + synchronized (PluginGrpc.class) { + if ((getGetSpecSchemaMethod = PluginGrpc.getGetSpecSchemaMethod) == null) { + PluginGrpc.getGetSpecSchemaMethod = getGetSpecSchemaMethod = + io.grpc.MethodDescriptor.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 getInitMethod; @@ -331,6 +362,18 @@ default void getVersion(io.cloudquery.plugin.v3.GetVersion.Request request, io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetVersionMethod(), responseObserver); } + /** + *
+     * Get plugin spec schema.
+     * This will allow validating the input even before calling Init.
+     * Should be called before Init.
+     * 
+ */ + default void getSpecSchema(io.cloudquery.plugin.v3.GetSpecSchema.Request request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSpecSchemaMethod(), responseObserver); + } + /** *
      * Configure the plugin with the given credentials and mode
@@ -442,6 +485,19 @@ public void getVersion(io.cloudquery.plugin.v3.GetVersion.Request request,
           getChannel().newCall(getGetVersionMethod(), getCallOptions()), request, responseObserver);
     }
 
+    /**
+     * 
+     * Get plugin spec schema.
+     * This will allow validating the input even before calling Init.
+     * Should be called before Init.
+     * 
+ */ + public void getSpecSchema(io.cloudquery.plugin.v3.GetSpecSchema.Request request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSpecSchemaMethod(), getCallOptions()), request, responseObserver); + } + /** *
      * Configure the plugin with the given credentials and mode
@@ -546,6 +602,18 @@ public io.cloudquery.plugin.v3.GetVersion.Response getVersion(io.cloudquery.plug
           getChannel(), getGetVersionMethod(), getCallOptions(), request);
     }
 
+    /**
+     * 
+     * Get plugin spec schema.
+     * This will allow validating the input even before calling Init.
+     * Should be called before Init.
+     * 
+ */ + 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); + } + /** *
      * Configure the plugin with the given credentials and mode
@@ -638,6 +706,19 @@ public com.google.common.util.concurrent.ListenableFuture
+     * Get plugin spec schema.
+     * This will allow validating the input even before calling Init.
+     * Should be called before Init.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getSpecSchema( + io.cloudquery.plugin.v3.GetSpecSchema.Request request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSpecSchemaMethod(), getCallOptions()), request); + } + /** *
      * Configure the plugin with the given credentials and mode
@@ -674,12 +755,13 @@ public com.google.common.util.concurrent.ListenableFuture implements
       io.grpc.stub.ServerCalls.UnaryMethod,
@@ -706,6 +788,10 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv
           serviceImpl.getVersion((io.cloudquery.plugin.v3.GetVersion.Request) request,
               (io.grpc.stub.StreamObserver) responseObserver);
           break;
+        case METHODID_GET_SPEC_SCHEMA:
+          serviceImpl.getSpecSchema((io.cloudquery.plugin.v3.GetSpecSchema.Request) request,
+              (io.grpc.stub.StreamObserver) responseObserver);
+          break;
         case METHODID_INIT:
           serviceImpl.init((io.cloudquery.plugin.v3.Init.Request) request,
               (io.grpc.stub.StreamObserver) responseObserver);
@@ -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(
@@ -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())
diff --git a/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/GetSpecSchema.java b/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/GetSpecSchema.java
new file mode 100644
index 0000000..32d9f6f
--- /dev/null
+++ b/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/GetSpecSchema.java
@@ -0,0 +1,1437 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: cloudquery/plugin/v3/plugin.proto
+
+// Protobuf Java Version: 3.25.2
+package io.cloudquery.plugin.v3;
+
+/**
+ * Protobuf type {@code cloudquery.plugin.v3.GetSpecSchema}
+ */
+public final class GetSpecSchema extends
+    com.google.protobuf.GeneratedMessageV3 implements
+    // @@protoc_insertion_point(message_implements:cloudquery.plugin.v3.GetSpecSchema)
+    GetSpecSchemaOrBuilder {
+private static final long serialVersionUID = 0L;
+  // Use GetSpecSchema.newBuilder() to construct.
+  private GetSpecSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    super(builder);
+  }
+  private GetSpecSchema() {
+  }
+
+  @java.lang.Override
+  @SuppressWarnings({"unused"})
+  protected java.lang.Object newInstance(
+      UnusedPrivateParameter unused) {
+    return new GetSpecSchema();
+  }
+
+  public static final com.google.protobuf.Descriptors.Descriptor
+      getDescriptor() {
+    return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_GetSpecSchema_descriptor;
+  }
+
+  @java.lang.Override
+  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internalGetFieldAccessorTable() {
+    return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_GetSpecSchema_fieldAccessorTable
+        .ensureFieldAccessorsInitialized(
+            io.cloudquery.plugin.v3.GetSpecSchema.class, io.cloudquery.plugin.v3.GetSpecSchema.Builder.class);
+  }
+
+  public interface RequestOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:cloudquery.plugin.v3.GetSpecSchema.Request)
+      com.google.protobuf.MessageOrBuilder {
+  }
+  /**
+   * Protobuf type {@code cloudquery.plugin.v3.GetSpecSchema.Request}
+   */
+  public static final class Request extends
+      com.google.protobuf.GeneratedMessageV3 implements
+      // @@protoc_insertion_point(message_implements:cloudquery.plugin.v3.GetSpecSchema.Request)
+      RequestOrBuilder {
+  private static final long serialVersionUID = 0L;
+    // Use Request.newBuilder() to construct.
+    private Request(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+      super(builder);
+    }
+    private Request() {
+    }
+
+    @java.lang.Override
+    @SuppressWarnings({"unused"})
+    protected java.lang.Object newInstance(
+        UnusedPrivateParameter unused) {
+      return new Request();
+    }
+
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_GetSpecSchema_Request_descriptor;
+    }
+
+    @java.lang.Override
+    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_GetSpecSchema_Request_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              io.cloudquery.plugin.v3.GetSpecSchema.Request.class, io.cloudquery.plugin.v3.GetSpecSchema.Request.Builder.class);
+    }
+
+    private byte memoizedIsInitialized = -1;
+    @java.lang.Override
+    public final boolean isInitialized() {
+      byte isInitialized = memoizedIsInitialized;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
+      memoizedIsInitialized = 1;
+      return true;
+    }
+
+    @java.lang.Override
+    public void writeTo(com.google.protobuf.CodedOutputStream output)
+                        throws java.io.IOException {
+      getUnknownFields().writeTo(output);
+    }
+
+    @java.lang.Override
+    public int getSerializedSize() {
+      int size = memoizedSize;
+      if (size != -1) return size;
+
+      size = 0;
+      size += getUnknownFields().getSerializedSize();
+      memoizedSize = size;
+      return size;
+    }
+
+    @java.lang.Override
+    public boolean equals(final java.lang.Object obj) {
+      if (obj == this) {
+       return true;
+      }
+      if (!(obj instanceof io.cloudquery.plugin.v3.GetSpecSchema.Request)) {
+        return super.equals(obj);
+      }
+      io.cloudquery.plugin.v3.GetSpecSchema.Request other = (io.cloudquery.plugin.v3.GetSpecSchema.Request) obj;
+
+      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      return true;
+    }
+
+    @java.lang.Override
+    public int hashCode() {
+      if (memoizedHashCode != 0) {
+        return memoizedHashCode;
+      }
+      int hash = 41;
+      hash = (19 * hash) + getDescriptor().hashCode();
+      hash = (29 * hash) + getUnknownFields().hashCode();
+      memoizedHashCode = hash;
+      return hash;
+    }
+
+    public static io.cloudquery.plugin.v3.GetSpecSchema.Request parseFrom(
+        java.nio.ByteBuffer data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static io.cloudquery.plugin.v3.GetSpecSchema.Request parseFrom(
+        java.nio.ByteBuffer data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static io.cloudquery.plugin.v3.GetSpecSchema.Request parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static io.cloudquery.plugin.v3.GetSpecSchema.Request parseFrom(
+        com.google.protobuf.ByteString data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static io.cloudquery.plugin.v3.GetSpecSchema.Request parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static io.cloudquery.plugin.v3.GetSpecSchema.Request parseFrom(
+        byte[] data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static io.cloudquery.plugin.v3.GetSpecSchema.Request parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseWithIOException(PARSER, input);
+    }
+    public static io.cloudquery.plugin.v3.GetSpecSchema.Request parseFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseWithIOException(PARSER, input, extensionRegistry);
+    }
+
+    public static io.cloudquery.plugin.v3.GetSpecSchema.Request parseDelimitedFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseDelimitedWithIOException(PARSER, input);
+    }
+
+    public static io.cloudquery.plugin.v3.GetSpecSchema.Request parseDelimitedFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+    }
+    public static io.cloudquery.plugin.v3.GetSpecSchema.Request parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseWithIOException(PARSER, input);
+    }
+    public static io.cloudquery.plugin.v3.GetSpecSchema.Request parseFrom(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseWithIOException(PARSER, input, extensionRegistry);
+    }
+
+    @java.lang.Override
+    public Builder newBuilderForType() { return newBuilder(); }
+    public static Builder newBuilder() {
+      return DEFAULT_INSTANCE.toBuilder();
+    }
+    public static Builder newBuilder(io.cloudquery.plugin.v3.GetSpecSchema.Request prototype) {
+      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+    }
+    @java.lang.Override
+    public Builder toBuilder() {
+      return this == DEFAULT_INSTANCE
+          ? new Builder() : new Builder().mergeFrom(this);
+    }
+
+    @java.lang.Override
+    protected Builder newBuilderForType(
+        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+      Builder builder = new Builder(parent);
+      return builder;
+    }
+    /**
+     * Protobuf type {@code cloudquery.plugin.v3.GetSpecSchema.Request}
+     */
+    public static final class Builder extends
+        com.google.protobuf.GeneratedMessageV3.Builder implements
+        // @@protoc_insertion_point(builder_implements:cloudquery.plugin.v3.GetSpecSchema.Request)
+        io.cloudquery.plugin.v3.GetSpecSchema.RequestOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_GetSpecSchema_Request_descriptor;
+      }
+
+      @java.lang.Override
+      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_GetSpecSchema_Request_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                io.cloudquery.plugin.v3.GetSpecSchema.Request.class, io.cloudquery.plugin.v3.GetSpecSchema.Request.Builder.class);
+      }
+
+      // Construct using io.cloudquery.plugin.v3.GetSpecSchema.Request.newBuilder()
+      private Builder() {
+
+      }
+
+      private Builder(
+          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        super(parent);
+
+      }
+      @java.lang.Override
+      public Builder clear() {
+        super.clear();
+        return this;
+      }
+
+      @java.lang.Override
+      public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_GetSpecSchema_Request_descriptor;
+      }
+
+      @java.lang.Override
+      public io.cloudquery.plugin.v3.GetSpecSchema.Request getDefaultInstanceForType() {
+        return io.cloudquery.plugin.v3.GetSpecSchema.Request.getDefaultInstance();
+      }
+
+      @java.lang.Override
+      public io.cloudquery.plugin.v3.GetSpecSchema.Request build() {
+        io.cloudquery.plugin.v3.GetSpecSchema.Request result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(result);
+        }
+        return result;
+      }
+
+      @java.lang.Override
+      public io.cloudquery.plugin.v3.GetSpecSchema.Request buildPartial() {
+        io.cloudquery.plugin.v3.GetSpecSchema.Request result = new io.cloudquery.plugin.v3.GetSpecSchema.Request(this);
+        onBuilt();
+        return result;
+      }
+
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
+      }
+      @java.lang.Override
+      public Builder mergeFrom(com.google.protobuf.Message other) {
+        if (other instanceof io.cloudquery.plugin.v3.GetSpecSchema.Request) {
+          return mergeFrom((io.cloudquery.plugin.v3.GetSpecSchema.Request)other);
+        } else {
+          super.mergeFrom(other);
+          return this;
+        }
+      }
+
+      public Builder mergeFrom(io.cloudquery.plugin.v3.GetSpecSchema.Request other) {
+        if (other == io.cloudquery.plugin.v3.GetSpecSchema.Request.getDefaultInstance()) return this;
+        this.mergeUnknownFields(other.getUnknownFields());
+        onChanged();
+        return this;
+      }
+
+      @java.lang.Override
+      public final boolean isInitialized() {
+        return true;
+      }
+
+      @java.lang.Override
+      public Builder mergeFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        if (extensionRegistry == null) {
+          throw new java.lang.NullPointerException();
+        }
+        try {
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              default: {
+                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                  done = true; // was an endgroup tag
+                }
+                break;
+              } // default:
+            } // switch (tag)
+          } // while (!done)
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          throw e.unwrapIOException();
+        } finally {
+          onChanged();
+        } // finally
+        return this;
+      }
+      @java.lang.Override
+      public final Builder setUnknownFields(
+          final com.google.protobuf.UnknownFieldSet unknownFields) {
+        return super.setUnknownFields(unknownFields);
+      }
+
+      @java.lang.Override
+      public final Builder mergeUnknownFields(
+          final com.google.protobuf.UnknownFieldSet unknownFields) {
+        return super.mergeUnknownFields(unknownFields);
+      }
+
+
+      // @@protoc_insertion_point(builder_scope:cloudquery.plugin.v3.GetSpecSchema.Request)
+    }
+
+    // @@protoc_insertion_point(class_scope:cloudquery.plugin.v3.GetSpecSchema.Request)
+    private static final io.cloudquery.plugin.v3.GetSpecSchema.Request DEFAULT_INSTANCE;
+    static {
+      DEFAULT_INSTANCE = new io.cloudquery.plugin.v3.GetSpecSchema.Request();
+    }
+
+    public static io.cloudquery.plugin.v3.GetSpecSchema.Request getDefaultInstance() {
+      return DEFAULT_INSTANCE;
+    }
+
+    private static final com.google.protobuf.Parser
+        PARSER = new com.google.protobuf.AbstractParser() {
+      @java.lang.Override
+      public Request parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        Builder builder = newBuilder();
+        try {
+          builder.mergeFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          throw e.setUnfinishedMessage(builder.buildPartial());
+        } catch (com.google.protobuf.UninitializedMessageException e) {
+          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+        } catch (java.io.IOException e) {
+          throw new com.google.protobuf.InvalidProtocolBufferException(e)
+              .setUnfinishedMessage(builder.buildPartial());
+        }
+        return builder.buildPartial();
+      }
+    };
+
+    public static com.google.protobuf.Parser parser() {
+      return PARSER;
+    }
+
+    @java.lang.Override
+    public com.google.protobuf.Parser getParserForType() {
+      return PARSER;
+    }
+
+    @java.lang.Override
+    public io.cloudquery.plugin.v3.GetSpecSchema.Request getDefaultInstanceForType() {
+      return DEFAULT_INSTANCE;
+    }
+
+  }
+
+  public interface ResponseOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:cloudquery.plugin.v3.GetSpecSchema.Response)
+      com.google.protobuf.MessageOrBuilder {
+
+    /**
+     * 
+     * Should be a valid JSON schema for the plugin spec.
+     * See https://json-schema.org for more details.
+     * 
+ * + * optional string json_schema = 1; + * @return Whether the jsonSchema field is set. + */ + boolean hasJsonSchema(); + /** + *
+     * Should be a valid JSON schema for the plugin spec.
+     * See https://json-schema.org for more details.
+     * 
+ * + * optional string json_schema = 1; + * @return The jsonSchema. + */ + java.lang.String getJsonSchema(); + /** + *
+     * Should be a valid JSON schema for the plugin spec.
+     * See https://json-schema.org for more details.
+     * 
+ * + * optional string json_schema = 1; + * @return The bytes for jsonSchema. + */ + com.google.protobuf.ByteString + getJsonSchemaBytes(); + } + /** + * Protobuf type {@code cloudquery.plugin.v3.GetSpecSchema.Response} + */ + public static final class Response extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cloudquery.plugin.v3.GetSpecSchema.Response) + ResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use Response.newBuilder() to construct. + private Response(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Response() { + jsonSchema_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Response(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_GetSpecSchema_Response_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_GetSpecSchema_Response_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.cloudquery.plugin.v3.GetSpecSchema.Response.class, io.cloudquery.plugin.v3.GetSpecSchema.Response.Builder.class); + } + + private int bitField0_; + public static final int JSON_SCHEMA_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object jsonSchema_ = ""; + /** + *
+     * Should be a valid JSON schema for the plugin spec.
+     * See https://json-schema.org for more details.
+     * 
+ * + * optional string json_schema = 1; + * @return Whether the jsonSchema field is set. + */ + @java.lang.Override + public boolean hasJsonSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Should be a valid JSON schema for the plugin spec.
+     * See https://json-schema.org for more details.
+     * 
+ * + * optional string json_schema = 1; + * @return The jsonSchema. + */ + @java.lang.Override + public java.lang.String getJsonSchema() { + java.lang.Object ref = jsonSchema_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonSchema_ = s; + return s; + } + } + /** + *
+     * Should be a valid JSON schema for the plugin spec.
+     * See https://json-schema.org for more details.
+     * 
+ * + * optional string json_schema = 1; + * @return The bytes for jsonSchema. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getJsonSchemaBytes() { + java.lang.Object ref = jsonSchema_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jsonSchema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, jsonSchema_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, jsonSchema_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.cloudquery.plugin.v3.GetSpecSchema.Response)) { + return super.equals(obj); + } + io.cloudquery.plugin.v3.GetSpecSchema.Response other = (io.cloudquery.plugin.v3.GetSpecSchema.Response) obj; + + if (hasJsonSchema() != other.hasJsonSchema()) return false; + if (hasJsonSchema()) { + if (!getJsonSchema() + .equals(other.getJsonSchema())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasJsonSchema()) { + hash = (37 * hash) + JSON_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getJsonSchema().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.cloudquery.plugin.v3.GetSpecSchema.Response parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.cloudquery.plugin.v3.GetSpecSchema.Response parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.cloudquery.plugin.v3.GetSpecSchema.Response parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.cloudquery.plugin.v3.GetSpecSchema.Response parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.cloudquery.plugin.v3.GetSpecSchema.Response parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.cloudquery.plugin.v3.GetSpecSchema.Response parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.cloudquery.plugin.v3.GetSpecSchema.Response parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.cloudquery.plugin.v3.GetSpecSchema.Response parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.cloudquery.plugin.v3.GetSpecSchema.Response parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.cloudquery.plugin.v3.GetSpecSchema.Response parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.cloudquery.plugin.v3.GetSpecSchema.Response parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.cloudquery.plugin.v3.GetSpecSchema.Response parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.cloudquery.plugin.v3.GetSpecSchema.Response prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cloudquery.plugin.v3.GetSpecSchema.Response} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cloudquery.plugin.v3.GetSpecSchema.Response) + io.cloudquery.plugin.v3.GetSpecSchema.ResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_GetSpecSchema_Response_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_GetSpecSchema_Response_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.cloudquery.plugin.v3.GetSpecSchema.Response.class, io.cloudquery.plugin.v3.GetSpecSchema.Response.Builder.class); + } + + // Construct using io.cloudquery.plugin.v3.GetSpecSchema.Response.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + jsonSchema_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_GetSpecSchema_Response_descriptor; + } + + @java.lang.Override + public io.cloudquery.plugin.v3.GetSpecSchema.Response getDefaultInstanceForType() { + return io.cloudquery.plugin.v3.GetSpecSchema.Response.getDefaultInstance(); + } + + @java.lang.Override + public io.cloudquery.plugin.v3.GetSpecSchema.Response build() { + io.cloudquery.plugin.v3.GetSpecSchema.Response result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.cloudquery.plugin.v3.GetSpecSchema.Response buildPartial() { + io.cloudquery.plugin.v3.GetSpecSchema.Response result = new io.cloudquery.plugin.v3.GetSpecSchema.Response(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.cloudquery.plugin.v3.GetSpecSchema.Response result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.jsonSchema_ = jsonSchema_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.cloudquery.plugin.v3.GetSpecSchema.Response) { + return mergeFrom((io.cloudquery.plugin.v3.GetSpecSchema.Response)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.cloudquery.plugin.v3.GetSpecSchema.Response other) { + if (other == io.cloudquery.plugin.v3.GetSpecSchema.Response.getDefaultInstance()) return this; + if (other.hasJsonSchema()) { + jsonSchema_ = other.jsonSchema_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + jsonSchema_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object jsonSchema_ = ""; + /** + *
+       * Should be a valid JSON schema for the plugin spec.
+       * See https://json-schema.org for more details.
+       * 
+ * + * optional string json_schema = 1; + * @return Whether the jsonSchema field is set. + */ + public boolean hasJsonSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+       * Should be a valid JSON schema for the plugin spec.
+       * See https://json-schema.org for more details.
+       * 
+ * + * optional string json_schema = 1; + * @return The jsonSchema. + */ + public java.lang.String getJsonSchema() { + java.lang.Object ref = jsonSchema_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonSchema_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Should be a valid JSON schema for the plugin spec.
+       * See https://json-schema.org for more details.
+       * 
+ * + * optional string json_schema = 1; + * @return The bytes for jsonSchema. + */ + public com.google.protobuf.ByteString + getJsonSchemaBytes() { + java.lang.Object ref = jsonSchema_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jsonSchema_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Should be a valid JSON schema for the plugin spec.
+       * See https://json-schema.org for more details.
+       * 
+ * + * optional string json_schema = 1; + * @param value The jsonSchema to set. + * @return This builder for chaining. + */ + public Builder setJsonSchema( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + jsonSchema_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Should be a valid JSON schema for the plugin spec.
+       * See https://json-schema.org for more details.
+       * 
+ * + * optional string json_schema = 1; + * @return This builder for chaining. + */ + public Builder clearJsonSchema() { + jsonSchema_ = getDefaultInstance().getJsonSchema(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Should be a valid JSON schema for the plugin spec.
+       * See https://json-schema.org for more details.
+       * 
+ * + * optional string json_schema = 1; + * @param value The bytes for jsonSchema to set. + * @return This builder for chaining. + */ + public Builder setJsonSchemaBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + jsonSchema_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cloudquery.plugin.v3.GetSpecSchema.Response) + } + + // @@protoc_insertion_point(class_scope:cloudquery.plugin.v3.GetSpecSchema.Response) + private static final io.cloudquery.plugin.v3.GetSpecSchema.Response DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.cloudquery.plugin.v3.GetSpecSchema.Response(); + } + + public static io.cloudquery.plugin.v3.GetSpecSchema.Response getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Response parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.cloudquery.plugin.v3.GetSpecSchema.Response getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.cloudquery.plugin.v3.GetSpecSchema)) { + return super.equals(obj); + } + io.cloudquery.plugin.v3.GetSpecSchema other = (io.cloudquery.plugin.v3.GetSpecSchema) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.cloudquery.plugin.v3.GetSpecSchema parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.cloudquery.plugin.v3.GetSpecSchema parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.cloudquery.plugin.v3.GetSpecSchema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.cloudquery.plugin.v3.GetSpecSchema parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.cloudquery.plugin.v3.GetSpecSchema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.cloudquery.plugin.v3.GetSpecSchema parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.cloudquery.plugin.v3.GetSpecSchema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.cloudquery.plugin.v3.GetSpecSchema parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.cloudquery.plugin.v3.GetSpecSchema parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.cloudquery.plugin.v3.GetSpecSchema parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.cloudquery.plugin.v3.GetSpecSchema parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.cloudquery.plugin.v3.GetSpecSchema parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.cloudquery.plugin.v3.GetSpecSchema prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cloudquery.plugin.v3.GetSpecSchema} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cloudquery.plugin.v3.GetSpecSchema) + io.cloudquery.plugin.v3.GetSpecSchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_GetSpecSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_GetSpecSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.cloudquery.plugin.v3.GetSpecSchema.class, io.cloudquery.plugin.v3.GetSpecSchema.Builder.class); + } + + // Construct using io.cloudquery.plugin.v3.GetSpecSchema.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_GetSpecSchema_descriptor; + } + + @java.lang.Override + public io.cloudquery.plugin.v3.GetSpecSchema getDefaultInstanceForType() { + return io.cloudquery.plugin.v3.GetSpecSchema.getDefaultInstance(); + } + + @java.lang.Override + public io.cloudquery.plugin.v3.GetSpecSchema build() { + io.cloudquery.plugin.v3.GetSpecSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.cloudquery.plugin.v3.GetSpecSchema buildPartial() { + io.cloudquery.plugin.v3.GetSpecSchema result = new io.cloudquery.plugin.v3.GetSpecSchema(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.cloudquery.plugin.v3.GetSpecSchema) { + return mergeFrom((io.cloudquery.plugin.v3.GetSpecSchema)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.cloudquery.plugin.v3.GetSpecSchema other) { + if (other == io.cloudquery.plugin.v3.GetSpecSchema.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cloudquery.plugin.v3.GetSpecSchema) + } + + // @@protoc_insertion_point(class_scope:cloudquery.plugin.v3.GetSpecSchema) + private static final io.cloudquery.plugin.v3.GetSpecSchema DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.cloudquery.plugin.v3.GetSpecSchema(); + } + + public static io.cloudquery.plugin.v3.GetSpecSchema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSpecSchema parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.cloudquery.plugin.v3.GetSpecSchema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/GetSpecSchemaOrBuilder.java b/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/GetSpecSchemaOrBuilder.java new file mode 100644 index 0000000..4171d0d --- /dev/null +++ b/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/GetSpecSchemaOrBuilder.java @@ -0,0 +1,10 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cloudquery/plugin/v3/plugin.proto + +// Protobuf Java Version: 3.25.2 +package io.cloudquery.plugin.v3; + +public interface GetSpecSchemaOrBuilder extends + // @@protoc_insertion_point(interface_extends:cloudquery.plugin.v3.GetSpecSchema) + com.google.protobuf.MessageOrBuilder { +} diff --git a/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/PluginOuterClass.java b/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/PluginOuterClass.java index dafb645..46ec6bc 100644 --- a/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/PluginOuterClass.java +++ b/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/PluginOuterClass.java @@ -45,6 +45,21 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_cloudquery_plugin_v3_GetVersion_Response_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_cloudquery_plugin_v3_GetSpecSchema_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cloudquery_plugin_v3_GetSpecSchema_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_cloudquery_plugin_v3_GetSpecSchema_Request_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cloudquery_plugin_v3_GetSpecSchema_Request_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_cloudquery_plugin_v3_GetSpecSchema_Response_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cloudquery_plugin_v3_GetSpecSchema_Response_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_cloudquery_plugin_v3_Init_descriptor; static final @@ -203,79 +218,84 @@ public static void registerAllExtensions( "udquery.plugin.v3\032\037google/protobuf/times" + "tamp.proto\".\n\007GetName\032\t\n\007Request\032\030\n\010Resp" + "onse\022\014\n\004name\030\001 \001(\t\"4\n\nGetVersion\032\t\n\007Requ" + - "est\032\033\n\010Response\022\017\n\007version\030\001 \001(\t\"B\n\004Init" + - "\032.\n\007Request\022\014\n\004spec\030\001 \001(\014\022\025\n\rno_connecti" + - "on\030\002 \001(\010\032\n\n\010Response\"v\n\tGetTables\032M\n\007Req" + - "uest\022\016\n\006tables\030\001 \003(\t\022\023\n\013skip_tables\030\002 \003(" + - "\t\022\035\n\025skip_dependent_tables\030\003 \001(\010\032\032\n\010Resp" + - "onse\022\016\n\006tables\030\001 \003(\014\"\275\005\n\004Sync\032\037\n\rMessage" + - "Insert\022\016\n\006record\030\001 \001(\014\032$\n\023MessageMigrate" + - "Table\022\r\n\005table\030\001 \001(\014\032\244\001\n\023MessageDeleteRe" + - "cord\022\022\n\ntable_name\030\001 \001(\t\022;\n\014where_clause" + - "\030\002 \003(\0132%.cloudquery.plugin.v3.Predicates" + - "Group\022<\n\017table_relations\030\003 \003(\0132#.cloudqu" + - "ery.plugin.v3.TableRelation\0328\n\016BackendOp" + - "tions\022\022\n\ntable_name\030\001 \001(\t\022\022\n\nconnection\030" + - "\002 \001(\t\032\246\001\n\007Request\022\016\n\006tables\030\001 \003(\t\022\023\n\013ski" + - "p_tables\030\002 \003(\t\022\035\n\025skip_dependent_tables\030" + - "\003 \001(\010\022\033\n\023deterministic_cq_id\030\004 \001(\010\022:\n\007ba" + - "ckend\030\005 \001(\0132).cloudquery.plugin.v3.Sync." + - "BackendOptions\032\343\001\n\010Response\022G\n\rmigrate_t" + - "able\030\001 \001(\0132..cloudquery.plugin.v3.Sync.M" + - "essageMigrateTableH\000\022:\n\006insert\030\002 \001(\0132(.c" + - "loudquery.plugin.v3.Sync.MessageInsertH\000" + - "\022G\n\rdelete_record\030\003 \001(\0132..cloudquery.plu" + - "gin.v3.Sync.MessageDeleteRecordH\000B\t\n\007mes" + - "sage\"<\n\004Read\032\030\n\007Request\022\r\n\005table\030\001 \001(\014\032\032" + - "\n\010Response\022\016\n\006record\030\001 \001(\014\"9\n\rTableRelat" + - "ion\022\022\n\ntable_name\030\001 \001(\t\022\024\n\014parent_table\030" + - "\002 \001(\t\"{\n\tPredicate\022:\n\010operator\030\001 \001(\0162(.c" + - "loudquery.plugin.v3.Predicate.Operator\022\016" + - "\n\006column\030\002 \001(\t\022\016\n\006record\030\003 \001(\014\"\022\n\010Operat" + - "or\022\006\n\002EQ\020\000\"\262\001\n\017PredicatesGroup\022I\n\rgroupi" + - "ng_type\030\001 \001(\01622.cloudquery.plugin.v3.Pre" + - "dicatesGroup.GroupingType\0223\n\npredicates\030" + - "\002 \003(\0132\037.cloudquery.plugin.v3.Predicate\"\037" + - "\n\014GroupingType\022\007\n\003AND\020\000\022\006\n\002OR\020\001\"\303\005\n\005Writ" + - "e\032;\n\023MessageMigrateTable\022\r\n\005table\030\001 \001(\014\022" + - "\025\n\rmigrate_force\030\002 \001(\010\032\037\n\rMessageInsert\022" + - "\016\n\006record\030\001 \001(\014\032\177\n\022MessageDeleteStale\022\021\n" + - "\005table\030\001 \001(\014B\002\030\001\022\023\n\013source_name\030\002 \001(\t\022-\n" + - "\tsync_time\030\003 \001(\0132\032.google.protobuf.Times" + - "tamp\022\022\n\ntable_name\030\004 \001(\t\032\244\001\n\023MessageDele" + - "teRecord\022\022\n\ntable_name\030\001 \001(\t\022;\n\014where_cl" + - "ause\030\002 \003(\0132%.cloudquery.plugin.v3.Predic" + - "atesGroup\022<\n\017table_relations\030\003 \003(\0132#.clo" + - "udquery.plugin.v3.TableRelation\032\247\002\n\007Requ" + - "est\022H\n\rmigrate_table\030\001 \001(\0132/.cloudquery." + - "plugin.v3.Write.MessageMigrateTableH\000\022;\n" + - "\006insert\030\002 \001(\0132).cloudquery.plugin.v3.Wri" + - "te.MessageInsertH\000\022@\n\006delete\030\003 \001(\0132..clo" + - "udquery.plugin.v3.Write.MessageDeleteSta" + - "leH\000\022H\n\rdelete_record\030\004 \001(\0132/.cloudquery" + - ".plugin.v3.Write.MessageDeleteRecordH\000B\t" + - "\n\007message\032\n\n\010Response\"\036\n\005Close\032\t\n\007Reques" + - "t\032\n\n\010Response2\306\005\n\006Plugin\022X\n\007GetName\022%.cl" + - "oudquery.plugin.v3.GetName.Request\032&.clo" + - "udquery.plugin.v3.GetName.Response\022a\n\nGe" + - "tVersion\022(.cloudquery.plugin.v3.GetVersi" + - "on.Request\032).cloudquery.plugin.v3.GetVer" + - "sion.Response\022O\n\004Init\022\".cloudquery.plugi" + - "n.v3.Init.Request\032#.cloudquery.plugin.v3" + - ".Init.Response\022^\n\tGetTables\022\'.cloudquery" + - ".plugin.v3.GetTables.Request\032(.cloudquer" + - "y.plugin.v3.GetTables.Response\022Q\n\004Sync\022\"" + - ".cloudquery.plugin.v3.Sync.Request\032#.clo" + - "udquery.plugin.v3.Sync.Response0\001\022Q\n\004Rea" + - "d\022\".cloudquery.plugin.v3.Read.Request\032#." + - "cloudquery.plugin.v3.Read.Response0\001\022T\n\005" + - "Write\022#.cloudquery.plugin.v3.Write.Reque" + - "st\032$.cloudquery.plugin.v3.Write.Response" + - "(\001\022R\n\005Close\022#.cloudquery.plugin.v3.Close" + - ".Request\032$.cloudquery.plugin.v3.Close.Re" + - "sponseBS\n\027io.cloudquery.plugin.v3P\001Z6git" + - "hub.com/cloudquery/plugin-pb-go/pb/plugi" + - "n/v3;pluginb\006proto3" + "est\032\033\n\010Response\022\017\n\007version\030\001 \001(\t\"P\n\rGetS" + + "pecSchema\032\t\n\007Request\0324\n\010Response\022\030\n\013json" + + "_schema\030\001 \001(\tH\000\210\001\001B\016\n\014_json_schema\"B\n\004In" + + "it\032.\n\007Request\022\014\n\004spec\030\001 \001(\014\022\025\n\rno_connec" + + "tion\030\002 \001(\010\032\n\n\010Response\"v\n\tGetTables\032M\n\007R" + + "equest\022\016\n\006tables\030\001 \003(\t\022\023\n\013skip_tables\030\002 " + + "\003(\t\022\035\n\025skip_dependent_tables\030\003 \001(\010\032\032\n\010Re" + + "sponse\022\016\n\006tables\030\001 \003(\014\"\275\005\n\004Sync\032\037\n\rMessa" + + "geInsert\022\016\n\006record\030\001 \001(\014\032$\n\023MessageMigra" + + "teTable\022\r\n\005table\030\001 \001(\014\032\244\001\n\023MessageDelete" + + "Record\022\022\n\ntable_name\030\001 \001(\t\022;\n\014where_clau" + + "se\030\002 \003(\0132%.cloudquery.plugin.v3.Predicat" + + "esGroup\022<\n\017table_relations\030\003 \003(\0132#.cloud" + + "query.plugin.v3.TableRelation\0328\n\016Backend" + + "Options\022\022\n\ntable_name\030\001 \001(\t\022\022\n\nconnectio" + + "n\030\002 \001(\t\032\246\001\n\007Request\022\016\n\006tables\030\001 \003(\t\022\023\n\013s" + + "kip_tables\030\002 \003(\t\022\035\n\025skip_dependent_table" + + "s\030\003 \001(\010\022\033\n\023deterministic_cq_id\030\004 \001(\010\022:\n\007" + + "backend\030\005 \001(\0132).cloudquery.plugin.v3.Syn" + + "c.BackendOptions\032\343\001\n\010Response\022G\n\rmigrate" + + "_table\030\001 \001(\0132..cloudquery.plugin.v3.Sync" + + ".MessageMigrateTableH\000\022:\n\006insert\030\002 \001(\0132(" + + ".cloudquery.plugin.v3.Sync.MessageInsert" + + "H\000\022G\n\rdelete_record\030\003 \001(\0132..cloudquery.p" + + "lugin.v3.Sync.MessageDeleteRecordH\000B\t\n\007m" + + "essage\"<\n\004Read\032\030\n\007Request\022\r\n\005table\030\001 \001(\014" + + "\032\032\n\010Response\022\016\n\006record\030\001 \001(\014\"9\n\rTableRel" + + "ation\022\022\n\ntable_name\030\001 \001(\t\022\024\n\014parent_tabl" + + "e\030\002 \001(\t\"{\n\tPredicate\022:\n\010operator\030\001 \001(\0162(" + + ".cloudquery.plugin.v3.Predicate.Operator" + + "\022\016\n\006column\030\002 \001(\t\022\016\n\006record\030\003 \001(\014\"\022\n\010Oper" + + "ator\022\006\n\002EQ\020\000\"\262\001\n\017PredicatesGroup\022I\n\rgrou" + + "ping_type\030\001 \001(\01622.cloudquery.plugin.v3.P" + + "redicatesGroup.GroupingType\0223\n\npredicate" + + "s\030\002 \003(\0132\037.cloudquery.plugin.v3.Predicate" + + "\"\037\n\014GroupingType\022\007\n\003AND\020\000\022\006\n\002OR\020\001\"\303\005\n\005Wr" + + "ite\032;\n\023MessageMigrateTable\022\r\n\005table\030\001 \001(" + + "\014\022\025\n\rmigrate_force\030\002 \001(\010\032\037\n\rMessageInser" + + "t\022\016\n\006record\030\001 \001(\014\032\177\n\022MessageDeleteStale\022" + + "\021\n\005table\030\001 \001(\014B\002\030\001\022\023\n\013source_name\030\002 \001(\t\022" + + "-\n\tsync_time\030\003 \001(\0132\032.google.protobuf.Tim" + + "estamp\022\022\n\ntable_name\030\004 \001(\t\032\244\001\n\023MessageDe" + + "leteRecord\022\022\n\ntable_name\030\001 \001(\t\022;\n\014where_" + + "clause\030\002 \003(\0132%.cloudquery.plugin.v3.Pred" + + "icatesGroup\022<\n\017table_relations\030\003 \003(\0132#.c" + + "loudquery.plugin.v3.TableRelation\032\247\002\n\007Re" + + "quest\022H\n\rmigrate_table\030\001 \001(\0132/.cloudquer" + + "y.plugin.v3.Write.MessageMigrateTableH\000\022" + + ";\n\006insert\030\002 \001(\0132).cloudquery.plugin.v3.W" + + "rite.MessageInsertH\000\022@\n\006delete\030\003 \001(\0132..c" + + "loudquery.plugin.v3.Write.MessageDeleteS" + + "taleH\000\022H\n\rdelete_record\030\004 \001(\0132/.cloudque" + + "ry.plugin.v3.Write.MessageDeleteRecordH\000" + + "B\t\n\007message\032\n\n\010Response\"\036\n\005Close\032\t\n\007Requ" + + "est\032\n\n\010Response2\262\006\n\006Plugin\022X\n\007GetName\022%." + + "cloudquery.plugin.v3.GetName.Request\032&.c" + + "loudquery.plugin.v3.GetName.Response\022a\n\n" + + "GetVersion\022(.cloudquery.plugin.v3.GetVer" + + "sion.Request\032).cloudquery.plugin.v3.GetV" + + "ersion.Response\022j\n\rGetSpecSchema\022+.cloud" + + "query.plugin.v3.GetSpecSchema.Request\032,." + + "cloudquery.plugin.v3.GetSpecSchema.Respo" + + "nse\022O\n\004Init\022\".cloudquery.plugin.v3.Init." + + "Request\032#.cloudquery.plugin.v3.Init.Resp" + + "onse\022^\n\tGetTables\022\'.cloudquery.plugin.v3" + + ".GetTables.Request\032(.cloudquery.plugin.v" + + "3.GetTables.Response\022Q\n\004Sync\022\".cloudquer" + + "y.plugin.v3.Sync.Request\032#.cloudquery.pl" + + "ugin.v3.Sync.Response0\001\022Q\n\004Read\022\".cloudq" + + "uery.plugin.v3.Read.Request\032#.cloudquery" + + ".plugin.v3.Read.Response0\001\022T\n\005Write\022#.cl" + + "oudquery.plugin.v3.Write.Request\032$.cloud" + + "query.plugin.v3.Write.Response(\001\022R\n\005Clos" + + "e\022#.cloudquery.plugin.v3.Close.Request\032$" + + ".cloudquery.plugin.v3.Close.ResponseBS\n\027" + + "io.cloudquery.plugin.v3P\001Z6github.com/cl" + + "oudquery/plugin-pb-go/pb/plugin/v3;plugi" + + "nb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -318,8 +338,26 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cloudquery_plugin_v3_GetVersion_Response_descriptor, new java.lang.String[] { "Version", }); - internal_static_cloudquery_plugin_v3_Init_descriptor = + internal_static_cloudquery_plugin_v3_GetSpecSchema_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_cloudquery_plugin_v3_GetSpecSchema_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cloudquery_plugin_v3_GetSpecSchema_descriptor, + new java.lang.String[] { }); + internal_static_cloudquery_plugin_v3_GetSpecSchema_Request_descriptor = + internal_static_cloudquery_plugin_v3_GetSpecSchema_descriptor.getNestedTypes().get(0); + internal_static_cloudquery_plugin_v3_GetSpecSchema_Request_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cloudquery_plugin_v3_GetSpecSchema_Request_descriptor, + new java.lang.String[] { }); + internal_static_cloudquery_plugin_v3_GetSpecSchema_Response_descriptor = + internal_static_cloudquery_plugin_v3_GetSpecSchema_descriptor.getNestedTypes().get(1); + internal_static_cloudquery_plugin_v3_GetSpecSchema_Response_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cloudquery_plugin_v3_GetSpecSchema_Response_descriptor, + new java.lang.String[] { "JsonSchema", }); + internal_static_cloudquery_plugin_v3_Init_descriptor = + getDescriptor().getMessageTypes().get(3); internal_static_cloudquery_plugin_v3_Init_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cloudquery_plugin_v3_Init_descriptor, @@ -337,7 +375,7 @@ public static void registerAllExtensions( internal_static_cloudquery_plugin_v3_Init_Response_descriptor, new java.lang.String[] { }); internal_static_cloudquery_plugin_v3_GetTables_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(4); internal_static_cloudquery_plugin_v3_GetTables_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cloudquery_plugin_v3_GetTables_descriptor, @@ -355,7 +393,7 @@ public static void registerAllExtensions( internal_static_cloudquery_plugin_v3_GetTables_Response_descriptor, new java.lang.String[] { "Tables", }); internal_static_cloudquery_plugin_v3_Sync_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_cloudquery_plugin_v3_Sync_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cloudquery_plugin_v3_Sync_descriptor, @@ -397,7 +435,7 @@ public static void registerAllExtensions( internal_static_cloudquery_plugin_v3_Sync_Response_descriptor, new java.lang.String[] { "MigrateTable", "Insert", "DeleteRecord", "Message", }); internal_static_cloudquery_plugin_v3_Read_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_cloudquery_plugin_v3_Read_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cloudquery_plugin_v3_Read_descriptor, @@ -415,25 +453,25 @@ public static void registerAllExtensions( internal_static_cloudquery_plugin_v3_Read_Response_descriptor, new java.lang.String[] { "Record", }); internal_static_cloudquery_plugin_v3_TableRelation_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_cloudquery_plugin_v3_TableRelation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cloudquery_plugin_v3_TableRelation_descriptor, new java.lang.String[] { "TableName", "ParentTable", }); internal_static_cloudquery_plugin_v3_Predicate_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_cloudquery_plugin_v3_Predicate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cloudquery_plugin_v3_Predicate_descriptor, new java.lang.String[] { "Operator", "Column", "Record", }); internal_static_cloudquery_plugin_v3_PredicatesGroup_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_cloudquery_plugin_v3_PredicatesGroup_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cloudquery_plugin_v3_PredicatesGroup_descriptor, new java.lang.String[] { "GroupingType", "Predicates", }); internal_static_cloudquery_plugin_v3_Write_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_cloudquery_plugin_v3_Write_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cloudquery_plugin_v3_Write_descriptor, @@ -475,7 +513,7 @@ public static void registerAllExtensions( internal_static_cloudquery_plugin_v3_Write_Response_descriptor, new java.lang.String[] { }); internal_static_cloudquery_plugin_v3_Close_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_cloudquery_plugin_v3_Close_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cloudquery_plugin_v3_Close_descriptor, diff --git a/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/Write.java b/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/Write.java index fd5c018..0aec30a 100644 --- a/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/Write.java +++ b/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/Write.java @@ -1117,7 +1117,7 @@ public interface MessageDeleteStaleOrBuilder extends * * bytes table = 1 [deprecated = true]; * @deprecated cloudquery.plugin.v3.Write.MessageDeleteStale.table is deprecated. - * See cloudquery/plugin/v3/plugin.proto;l=155 + * See cloudquery/plugin/v3/plugin.proto;l=168 * @return The table. */ @java.lang.Deprecated com.google.protobuf.ByteString getTable(); @@ -1209,7 +1209,7 @@ protected java.lang.Object newInstance( * * bytes table = 1 [deprecated = true]; * @deprecated cloudquery.plugin.v3.Write.MessageDeleteStale.table is deprecated. - * See cloudquery/plugin/v3/plugin.proto;l=155 + * See cloudquery/plugin/v3/plugin.proto;l=168 * @return The table. */ @java.lang.Override @@ -1747,7 +1747,7 @@ public Builder mergeFrom( * * bytes table = 1 [deprecated = true]; * @deprecated cloudquery.plugin.v3.Write.MessageDeleteStale.table is deprecated. - * See cloudquery/plugin/v3/plugin.proto;l=155 + * See cloudquery/plugin/v3/plugin.proto;l=168 * @return The table. */ @java.lang.Override @@ -1761,7 +1761,7 @@ public Builder mergeFrom( * * bytes table = 1 [deprecated = true]; * @deprecated cloudquery.plugin.v3.Write.MessageDeleteStale.table is deprecated. - * See cloudquery/plugin/v3/plugin.proto;l=155 + * See cloudquery/plugin/v3/plugin.proto;l=168 * @param value The table to set. * @return This builder for chaining. */ @@ -1779,7 +1779,7 @@ public Builder mergeFrom( * * bytes table = 1 [deprecated = true]; * @deprecated cloudquery.plugin.v3.Write.MessageDeleteStale.table is deprecated. - * See cloudquery/plugin/v3/plugin.proto;l=155 + * See cloudquery/plugin/v3/plugin.proto;l=168 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearTable() { diff --git a/src/main/proto/cloudquery/plugin/v3/plugin.proto b/src/main/proto/cloudquery/plugin/v3/plugin.proto index 0916ecf..b823fb5 100644 --- a/src/main/proto/cloudquery/plugin/v3/plugin.proto +++ b/src/main/proto/cloudquery/plugin/v3/plugin.proto @@ -12,6 +12,10 @@ service Plugin { rpc GetName(GetName.Request) returns (GetName.Response); // Get the current version of the plugin rpc GetVersion(GetVersion.Request) returns (GetVersion.Response); + // Get plugin spec schema. + // This will allow validating the input even before calling Init. + // Should be called before Init. + rpc GetSpecSchema(GetSpecSchema.Request) returns (GetSpecSchema.Response); // Configure the plugin with the given credentials and mode rpc Init(Init.Request) returns (Init.Response); // Get all tables the source plugin supports. Must be called after Init @@ -41,6 +45,15 @@ message GetVersion { } } +message GetSpecSchema { + message Request {} + message Response { + // Should be a valid JSON schema for the plugin spec. + // See https://json-schema.org for more details. + optional string json_schema = 1; + } +} + message Init { message Request { bytes spec = 1; // Internal plugin-specific spec