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 2e61783..2150e70 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 @@ -130,6 +130,11 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_cloudquery_plugin_v3_Sync_Request_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_cloudquery_plugin_v3_Sync_Request_Shard_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_cloudquery_plugin_v3_Sync_Request_Shard_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_cloudquery_plugin_v3_Sync_Response_descriptor; static final @@ -281,91 +286,94 @@ public static void registerAllExtensions( "ponse\"v\n\tGetTables\032M\n\007Request\022\016\n\006tables\030" + "\001 \003(\t\022\023\n\013skip_tables\030\002 \003(\t\022\035\n\025skip_depen" + "dent_tables\030\003 \001(\010\032\032\n\010Response\022\016\n\006tables\030" + - "\001 \003(\014\"\275\005\n\004Sync\032\037\n\rMessageInsert\022\016\n\006recor" + + "\001 \003(\014\"\252\006\n\004Sync\032\037\n\rMessageInsert\022\016\n\006recor" + "d\030\001 \001(\014\032$\n\023MessageMigrateTable\022\r\n\005table\030" + "\001 \001(\014\032\244\001\n\023MessageDeleteRecord\022\022\n\ntable_n" + "ame\030\001 \001(\t\022;\n\014where_clause\030\002 \003(\0132%.cloudq" + "uery.plugin.v3.PredicatesGroup\022<\n\017table_" + "relations\030\003 \003(\0132#.cloudquery.plugin.v3.T" + "ableRelation\0328\n\016BackendOptions\022\022\n\ntable_" + - "name\030\001 \001(\t\022\022\n\nconnection\030\002 \001(\t\032\246\001\n\007Reque" + + "name\030\001 \001(\t\022\022\n\nconnection\030\002 \001(\t\032\223\002\n\007Reque" + "st\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\022\033\n\023determ" + "inistic_cq_id\030\004 \001(\010\022:\n\007backend\030\005 \001(\0132).c" + - "loudquery.plugin.v3.Sync.BackendOptions\032" + - "\343\001\n\010Response\022G\n\rmigrate_table\030\001 \001(\0132..cl" + - "oudquery.plugin.v3.Sync.MessageMigrateTa" + - "bleH\000\022:\n\006insert\030\002 \001(\0132(.cloudquery.plugi" + - "n.v3.Sync.MessageInsertH\000\022G\n\rdelete_reco" + - "rd\030\003 \001(\0132..cloudquery.plugin.v3.Sync.Mes" + - "sageDeleteRecordH\000B\t\n\007message\"<\n\004Read\032\030\n" + - "\007Request\022\r\n\005table\030\001 \001(\014\032\032\n\010Response\022\016\n\006r" + - "ecord\030\001 \001(\014\"9\n\rTableRelation\022\022\n\ntable_na" + - "me\030\001 \001(\t\022\024\n\014parent_table\030\002 \001(\t\"{\n\tPredic" + - "ate\022:\n\010operator\030\001 \001(\0162(.cloudquery.plugi" + - "n.v3.Predicate.Operator\022\016\n\006column\030\002 \001(\t\022" + - "\016\n\006record\030\003 \001(\014\"\022\n\010Operator\022\006\n\002EQ\020\000\"\262\001\n\017" + - "PredicatesGroup\022I\n\rgrouping_type\030\001 \001(\01622" + - ".cloudquery.plugin.v3.PredicatesGroup.Gr" + - "oupingType\0223\n\npredicates\030\002 \003(\0132\037.cloudqu" + - "ery.plugin.v3.Predicate\"\037\n\014GroupingType\022" + - "\007\n\003AND\020\000\022\006\n\002OR\020\001\"\303\005\n\005Write\032;\n\023MessageMig" + - "rateTable\022\r\n\005table\030\001 \001(\014\022\025\n\rmigrate_forc" + - "e\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.Timestamp\022\022\n\ntable_n" + - "ame\030\004 \001(\t\032\244\001\n\023MessageDeleteRecord\022\022\n\ntab" + - "le_name\030\001 \001(\t\022;\n\014where_clause\030\002 \003(\0132%.cl" + - "oudquery.plugin.v3.PredicatesGroup\022<\n\017ta" + - "ble_relations\030\003 \003(\0132#.cloudquery.plugin." + - "v3.TableRelation\032\247\002\n\007Request\022H\n\rmigrate_" + - "table\030\001 \001(\0132/.cloudquery.plugin.v3.Write" + - ".MessageMigrateTableH\000\022;\n\006insert\030\002 \001(\0132)" + - ".cloudquery.plugin.v3.Write.MessageInser" + - "tH\000\022@\n\006delete\030\003 \001(\0132..cloudquery.plugin." + - "v3.Write.MessageDeleteStaleH\000\022H\n\rdelete_" + - "record\030\004 \001(\0132/.cloudquery.plugin.v3.Writ" + - "e.MessageDeleteRecordH\000B\t\n\007message\032\n\n\010Re" + - "sponse\"B\n\tTransform\032\031\n\007Request\022\016\n\006record" + - "\030\001 \001(\014\032\032\n\010Response\022\016\n\006record\030\001 \001(\014\"H\n\017Tr" + - "ansformSchema\032\031\n\007Request\022\016\n\006schema\030\001 \001(\014" + - "\032\032\n\010Response\022\016\n\006schema\030\001 \001(\014\"\036\n\005Close\032\t\n" + - "\007Request\032\n\n\010Response\"y\n\016TestConnection\032\027" + - "\n\007Request\022\014\n\004spec\030\001 \001(\014\032N\n\010Response\022\017\n\007s" + - "uccess\030\001 \001(\010\022\024\n\014failure_code\030\002 \001(\t\022\033\n\023fa" + - "ilure_description\030\003 \001(\t2\367\010\n\006Plugin\022X\n\007Ge" + - "tName\022%.cloudquery.plugin.v3.GetName.Req" + - "uest\032&.cloudquery.plugin.v3.GetName.Resp" + - "onse\022a\n\nGetVersion\022(.cloudquery.plugin.v" + - "3.GetVersion.Request\032).cloudquery.plugin" + - ".v3.GetVersion.Response\022j\n\rGetSpecSchema" + - "\022+.cloudquery.plugin.v3.GetSpecSchema.Re" + - "quest\032,.cloudquery.plugin.v3.GetSpecSche" + - "ma.Response\022O\n\004Init\022\".cloudquery.plugin." + - "v3.Init.Request\032#.cloudquery.plugin.v3.I" + - "nit.Response\022^\n\tGetTables\022\'.cloudquery.p" + - "lugin.v3.GetTables.Request\032(.cloudquery." + - "plugin.v3.GetTables.Response\022Q\n\004Sync\022\".c" + - "loudquery.plugin.v3.Sync.Request\032#.cloud" + - "query.plugin.v3.Sync.Response0\001\022Q\n\004Read\022" + - "\".cloudquery.plugin.v3.Read.Request\032#.cl" + - "oudquery.plugin.v3.Read.Response0\001\022T\n\005Wr" + - "ite\022#.cloudquery.plugin.v3.Write.Request" + - "\032$.cloudquery.plugin.v3.Write.Response(\001" + - "\022b\n\tTransform\022\'.cloudquery.plugin.v3.Tra" + - "nsform.Request\032(.cloudquery.plugin.v3.Tr" + - "ansform.Response(\0010\001\022p\n\017TransformSchema\022" + - "-.cloudquery.plugin.v3.TransformSchema.R" + - "equest\032..cloudquery.plugin.v3.TransformS" + - "chema.Response\022R\n\005Close\022#.cloudquery.plu" + - "gin.v3.Close.Request\032$.cloudquery.plugin" + - ".v3.Close.Response\022m\n\016TestConnection\022,.c" + - "loudquery.plugin.v3.TestConnection.Reque" + - "st\032-.cloudquery.plugin.v3.TestConnection" + - ".ResponseBS\n\027io.cloudquery.plugin.v3P\001Z6" + - "github.com/cloudquery/plugin-pb-go/pb/pl" + - "ugin/v3;pluginb\006proto3" + "loudquery.plugin.v3.Sync.BackendOptions\022" + + "<\n\005shard\030\006 \001(\0132(.cloudquery.plugin.v3.Sy" + + "nc.Request.ShardH\000\210\001\001\032#\n\005Shard\022\013\n\003num\030\001 " + + "\001(\005\022\r\n\005total\030\002 \001(\005B\010\n\006_shard\032\343\001\n\010Respons" + + "e\022G\n\rmigrate_table\030\001 \001(\0132..cloudquery.pl" + + "ugin.v3.Sync.MessageMigrateTableH\000\022:\n\006in" + + "sert\030\002 \001(\0132(.cloudquery.plugin.v3.Sync.M" + + "essageInsertH\000\022G\n\rdelete_record\030\003 \001(\0132.." + + "cloudquery.plugin.v3.Sync.MessageDeleteR" + + "ecordH\000B\t\n\007message\"<\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\rTableRelation\022\022\n\ntable_name\030\001 \001(\t\022\024\n" + + "\014parent_table\030\002 \001(\t\"{\n\tPredicate\022:\n\010oper" + + "ator\030\001 \001(\0162(.cloudquery.plugin.v3.Predic" + + "ate.Operator\022\016\n\006column\030\002 \001(\t\022\016\n\006record\030\003" + + " \001(\014\"\022\n\010Operator\022\006\n\002EQ\020\000\"\262\001\n\017PredicatesG" + + "roup\022I\n\rgrouping_type\030\001 \001(\01622.cloudquery" + + ".plugin.v3.PredicatesGroup.GroupingType\022" + + "3\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\005Write\032;\n\023MessageMigrateTable\022\r" + + "\n\005table\030\001 \001(\014\022\025\n\rmigrate_force\030\002 \001(\010\032\037\n\r" + + "MessageInsert\022\016\n\006record\030\001 \001(\014\032\177\n\022Message" + + "DeleteStale\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.Timestamp\022\022\n\ntable_name\030\004 \001(\t\032\244" + + "\001\n\023MessageDeleteRecord\022\022\n\ntable_name\030\001 \001" + + "(\t\022;\n\014where_clause\030\002 \003(\0132%.cloudquery.pl" + + "ugin.v3.PredicatesGroup\022<\n\017table_relatio" + + "ns\030\003 \003(\0132#.cloudquery.plugin.v3.TableRel" + + "ation\032\247\002\n\007Request\022H\n\rmigrate_table\030\001 \001(\013" + + "2/.cloudquery.plugin.v3.Write.MessageMig" + + "rateTableH\000\022;\n\006insert\030\002 \001(\0132).cloudquery" + + ".plugin.v3.Write.MessageInsertH\000\022@\n\006dele" + + "te\030\003 \001(\0132..cloudquery.plugin.v3.Write.Me" + + "ssageDeleteStaleH\000\022H\n\rdelete_record\030\004 \001(" + + "\0132/.cloudquery.plugin.v3.Write.MessageDe" + + "leteRecordH\000B\t\n\007message\032\n\n\010Response\"B\n\tT" + + "ransform\032\031\n\007Request\022\016\n\006record\030\001 \001(\014\032\032\n\010R" + + "esponse\022\016\n\006record\030\001 \001(\014\"H\n\017TransformSche" + + "ma\032\031\n\007Request\022\016\n\006schema\030\001 \001(\014\032\032\n\010Respons" + + "e\022\016\n\006schema\030\001 \001(\014\"\036\n\005Close\032\t\n\007Request\032\n\n" + + "\010Response\"y\n\016TestConnection\032\027\n\007Request\022\014" + + "\n\004spec\030\001 \001(\014\032N\n\010Response\022\017\n\007success\030\001 \001(" + + "\010\022\024\n\014failure_code\030\002 \001(\t\022\033\n\023failure_descr" + + "iption\030\003 \001(\t2\367\010\n\006Plugin\022X\n\007GetName\022%.clo" + + "udquery.plugin.v3.GetName.Request\032&.clou" + + "dquery.plugin.v3.GetName.Response\022a\n\nGet" + + "Version\022(.cloudquery.plugin.v3.GetVersio" + + "n.Request\032).cloudquery.plugin.v3.GetVers" + + "ion.Response\022j\n\rGetSpecSchema\022+.cloudque" + + "ry.plugin.v3.GetSpecSchema.Request\032,.clo" + + "udquery.plugin.v3.GetSpecSchema.Response" + + "\022O\n\004Init\022\".cloudquery.plugin.v3.Init.Req" + + "uest\032#.cloudquery.plugin.v3.Init.Respons" + + "e\022^\n\tGetTables\022\'.cloudquery.plugin.v3.Ge" + + "tTables.Request\032(.cloudquery.plugin.v3.G" + + "etTables.Response\022Q\n\004Sync\022\".cloudquery.p" + + "lugin.v3.Sync.Request\032#.cloudquery.plugi" + + "n.v3.Sync.Response0\001\022Q\n\004Read\022\".cloudquer" + + "y.plugin.v3.Read.Request\032#.cloudquery.pl" + + "ugin.v3.Read.Response0\001\022T\n\005Write\022#.cloud" + + "query.plugin.v3.Write.Request\032$.cloudque" + + "ry.plugin.v3.Write.Response(\001\022b\n\tTransfo" + + "rm\022\'.cloudquery.plugin.v3.Transform.Requ" + + "est\032(.cloudquery.plugin.v3.Transform.Res" + + "ponse(\0010\001\022p\n\017TransformSchema\022-.cloudquer" + + "y.plugin.v3.TransformSchema.Request\032..cl" + + "oudquery.plugin.v3.TransformSchema.Respo" + + "nse\022R\n\005Close\022#.cloudquery.plugin.v3.Clos" + + "e.Request\032$.cloudquery.plugin.v3.Close.R" + + "esponse\022m\n\016TestConnection\022,.cloudquery.p" + + "lugin.v3.TestConnection.Request\032-.cloudq" + + "uery.plugin.v3.TestConnection.ResponseBS" + + "\n\027io.cloudquery.plugin.v3P\001Z6github.com/" + + "cloudquery/plugin-pb-go/pb/plugin/v3;plu" + + "ginb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -497,7 +505,13 @@ public static void registerAllExtensions( internal_static_cloudquery_plugin_v3_Sync_Request_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_cloudquery_plugin_v3_Sync_Request_descriptor, - new java.lang.String[] { "Tables", "SkipTables", "SkipDependentTables", "DeterministicCqId", "Backend", }); + new java.lang.String[] { "Tables", "SkipTables", "SkipDependentTables", "DeterministicCqId", "Backend", "Shard", }); + internal_static_cloudquery_plugin_v3_Sync_Request_Shard_descriptor = + internal_static_cloudquery_plugin_v3_Sync_Request_descriptor.getNestedTypes().get(0); + internal_static_cloudquery_plugin_v3_Sync_Request_Shard_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_cloudquery_plugin_v3_Sync_Request_Shard_descriptor, + new java.lang.String[] { "Num", "Total", }); internal_static_cloudquery_plugin_v3_Sync_Response_descriptor = internal_static_cloudquery_plugin_v3_Sync_descriptor.getNestedTypes().get(5); internal_static_cloudquery_plugin_v3_Sync_Response_fieldAccessorTable = new diff --git a/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/Sync.java b/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/Sync.java index 21ba448..3544f40 100644 --- a/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/Sync.java +++ b/build/generated/source/proto/main/java/io/cloudquery/plugin/v3/Sync.java @@ -3024,6 +3024,21 @@ public interface RequestOrBuilder extends * .cloudquery.plugin.v3.Sync.BackendOptions backend = 5; */ io.cloudquery.plugin.v3.Sync.BackendOptionsOrBuilder getBackendOrBuilder(); + + /** + * optional .cloudquery.plugin.v3.Sync.Request.Shard shard = 6; + * @return Whether the shard field is set. + */ + boolean hasShard(); + /** + * optional .cloudquery.plugin.v3.Sync.Request.Shard shard = 6; + * @return The shard. + */ + io.cloudquery.plugin.v3.Sync.Request.Shard getShard(); + /** + * optional .cloudquery.plugin.v3.Sync.Request.Shard shard = 6; + */ + io.cloudquery.plugin.v3.Sync.Request.ShardOrBuilder getShardOrBuilder(); } /** * Protobuf type {@code cloudquery.plugin.v3.Sync.Request} @@ -3066,6 +3081,512 @@ private Request() { io.cloudquery.plugin.v3.Sync.Request.class, io.cloudquery.plugin.v3.Sync.Request.Builder.class); } + public interface ShardOrBuilder extends + // @@protoc_insertion_point(interface_extends:cloudquery.plugin.v3.Sync.Request.Shard) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 num = 1; + * @return The num. + */ + int getNum(); + + /** + * int32 total = 2; + * @return The total. + */ + int getTotal(); + } + /** + * Protobuf type {@code cloudquery.plugin.v3.Sync.Request.Shard} + */ + public static final class Shard extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:cloudquery.plugin.v3.Sync.Request.Shard) + ShardOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 0, + /* suffix= */ "", + Shard.class.getName()); + } + // Use Shard.newBuilder() to construct. + private Shard(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Shard() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_Sync_Request_Shard_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_Sync_Request_Shard_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.cloudquery.plugin.v3.Sync.Request.Shard.class, io.cloudquery.plugin.v3.Sync.Request.Shard.Builder.class); + } + + public static final int NUM_FIELD_NUMBER = 1; + private int num_ = 0; + /** + * int32 num = 1; + * @return The num. + */ + @java.lang.Override + public int getNum() { + return num_; + } + + public static final int TOTAL_FIELD_NUMBER = 2; + private int total_ = 0; + /** + * int32 total = 2; + * @return The total. + */ + @java.lang.Override + public int getTotal() { + return total_; + } + + 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 (num_ != 0) { + output.writeInt32(1, num_); + } + if (total_ != 0) { + output.writeInt32(2, total_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (num_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, num_); + } + if (total_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, total_); + } + 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.Sync.Request.Shard)) { + return super.equals(obj); + } + io.cloudquery.plugin.v3.Sync.Request.Shard other = (io.cloudquery.plugin.v3.Sync.Request.Shard) obj; + + if (getNum() + != other.getNum()) return false; + if (getTotal() + != other.getTotal()) 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(); + hash = (37 * hash) + NUM_FIELD_NUMBER; + hash = (53 * hash) + getNum(); + hash = (37 * hash) + TOTAL_FIELD_NUMBER; + hash = (53 * hash) + getTotal(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.cloudquery.plugin.v3.Sync.Request.Shard parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.cloudquery.plugin.v3.Sync.Request.Shard 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.Sync.Request.Shard parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.cloudquery.plugin.v3.Sync.Request.Shard 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.Sync.Request.Shard parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.cloudquery.plugin.v3.Sync.Request.Shard parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.cloudquery.plugin.v3.Sync.Request.Shard parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static io.cloudquery.plugin.v3.Sync.Request.Shard parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.cloudquery.plugin.v3.Sync.Request.Shard parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.cloudquery.plugin.v3.Sync.Request.Shard parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.cloudquery.plugin.v3.Sync.Request.Shard parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static io.cloudquery.plugin.v3.Sync.Request.Shard parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .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.Sync.Request.Shard 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cloudquery.plugin.v3.Sync.Request.Shard} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:cloudquery.plugin.v3.Sync.Request.Shard) + io.cloudquery.plugin.v3.Sync.Request.ShardOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_Sync_Request_Shard_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_Sync_Request_Shard_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.cloudquery.plugin.v3.Sync.Request.Shard.class, io.cloudquery.plugin.v3.Sync.Request.Shard.Builder.class); + } + + // Construct using io.cloudquery.plugin.v3.Sync.Request.Shard.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + num_ = 0; + total_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.cloudquery.plugin.v3.PluginOuterClass.internal_static_cloudquery_plugin_v3_Sync_Request_Shard_descriptor; + } + + @java.lang.Override + public io.cloudquery.plugin.v3.Sync.Request.Shard getDefaultInstanceForType() { + return io.cloudquery.plugin.v3.Sync.Request.Shard.getDefaultInstance(); + } + + @java.lang.Override + public io.cloudquery.plugin.v3.Sync.Request.Shard build() { + io.cloudquery.plugin.v3.Sync.Request.Shard result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.cloudquery.plugin.v3.Sync.Request.Shard buildPartial() { + io.cloudquery.plugin.v3.Sync.Request.Shard result = new io.cloudquery.plugin.v3.Sync.Request.Shard(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.cloudquery.plugin.v3.Sync.Request.Shard result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.num_ = num_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.total_ = total_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.cloudquery.plugin.v3.Sync.Request.Shard) { + return mergeFrom((io.cloudquery.plugin.v3.Sync.Request.Shard)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.cloudquery.plugin.v3.Sync.Request.Shard other) { + if (other == io.cloudquery.plugin.v3.Sync.Request.Shard.getDefaultInstance()) return this; + if (other.getNum() != 0) { + setNum(other.getNum()); + } + if (other.getTotal() != 0) { + setTotal(other.getTotal()); + } + 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 8: { + num_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + total_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + 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 int num_ ; + /** + * int32 num = 1; + * @return The num. + */ + @java.lang.Override + public int getNum() { + return num_; + } + /** + * int32 num = 1; + * @param value The num to set. + * @return This builder for chaining. + */ + public Builder setNum(int value) { + + num_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int32 num = 1; + * @return This builder for chaining. + */ + public Builder clearNum() { + bitField0_ = (bitField0_ & ~0x00000001); + num_ = 0; + onChanged(); + return this; + } + + private int total_ ; + /** + * int32 total = 2; + * @return The total. + */ + @java.lang.Override + public int getTotal() { + return total_; + } + /** + * int32 total = 2; + * @param value The total to set. + * @return This builder for chaining. + */ + public Builder setTotal(int value) { + + total_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int32 total = 2; + * @return This builder for chaining. + */ + public Builder clearTotal() { + bitField0_ = (bitField0_ & ~0x00000002); + total_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:cloudquery.plugin.v3.Sync.Request.Shard) + } + + // @@protoc_insertion_point(class_scope:cloudquery.plugin.v3.Sync.Request.Shard) + private static final io.cloudquery.plugin.v3.Sync.Request.Shard DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.cloudquery.plugin.v3.Sync.Request.Shard(); + } + + public static io.cloudquery.plugin.v3.Sync.Request.Shard getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Shard 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.Sync.Request.Shard getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + private int bitField0_; public static final int TABLES_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -3189,6 +3710,32 @@ public io.cloudquery.plugin.v3.Sync.BackendOptionsOrBuilder getBackendOrBuilder( return backend_ == null ? io.cloudquery.plugin.v3.Sync.BackendOptions.getDefaultInstance() : backend_; } + public static final int SHARD_FIELD_NUMBER = 6; + private io.cloudquery.plugin.v3.Sync.Request.Shard shard_; + /** + * optional .cloudquery.plugin.v3.Sync.Request.Shard shard = 6; + * @return Whether the shard field is set. + */ + @java.lang.Override + public boolean hasShard() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * optional .cloudquery.plugin.v3.Sync.Request.Shard shard = 6; + * @return The shard. + */ + @java.lang.Override + public io.cloudquery.plugin.v3.Sync.Request.Shard getShard() { + return shard_ == null ? io.cloudquery.plugin.v3.Sync.Request.Shard.getDefaultInstance() : shard_; + } + /** + * optional .cloudquery.plugin.v3.Sync.Request.Shard shard = 6; + */ + @java.lang.Override + public io.cloudquery.plugin.v3.Sync.Request.ShardOrBuilder getShardOrBuilder() { + return shard_ == null ? io.cloudquery.plugin.v3.Sync.Request.Shard.getDefaultInstance() : shard_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -3218,6 +3765,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getBackend()); } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getShard()); + } getUnknownFields().writeTo(output); } @@ -3255,6 +3805,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getBackend()); } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getShard()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -3283,6 +3837,11 @@ public boolean equals(final java.lang.Object obj) { if (!getBackend() .equals(other.getBackend())) return false; } + if (hasShard() != other.hasShard()) return false; + if (hasShard()) { + if (!getShard() + .equals(other.getShard())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3312,6 +3871,10 @@ public int hashCode() { hash = (37 * hash) + BACKEND_FIELD_NUMBER; hash = (53 * hash) + getBackend().hashCode(); } + if (hasShard()) { + hash = (37 * hash) + SHARD_FIELD_NUMBER; + hash = (53 * hash) + getShard().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -3443,6 +4006,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getBackendFieldBuilder(); + getShardFieldBuilder(); } } @java.lang.Override @@ -3460,6 +4024,11 @@ public Builder clear() { backendBuilder_.dispose(); backendBuilder_ = null; } + shard_ = null; + if (shardBuilder_ != null) { + shardBuilder_.dispose(); + shardBuilder_ = null; + } return this; } @@ -3514,6 +4083,12 @@ private void buildPartial0(io.cloudquery.plugin.v3.Sync.Request result) { : backendBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.shard_ = shardBuilder_ == null + ? shard_ + : shardBuilder_.build(); + to_bitField0_ |= 0x00000002; + } result.bitField0_ |= to_bitField0_; } @@ -3558,6 +4133,9 @@ public Builder mergeFrom(io.cloudquery.plugin.v3.Sync.Request other) { if (other.hasBackend()) { mergeBackend(other.getBackend()); } + if (other.hasShard()) { + mergeShard(other.getShard()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3613,6 +4191,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000010; break; } // case 42 + case 50: { + input.readMessage( + getShardFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -4037,6 +4622,127 @@ public io.cloudquery.plugin.v3.Sync.BackendOptionsOrBuilder getBackendOrBuilder( return backendBuilder_; } + private io.cloudquery.plugin.v3.Sync.Request.Shard shard_; + private com.google.protobuf.SingleFieldBuilder< + io.cloudquery.plugin.v3.Sync.Request.Shard, io.cloudquery.plugin.v3.Sync.Request.Shard.Builder, io.cloudquery.plugin.v3.Sync.Request.ShardOrBuilder> shardBuilder_; + /** + * optional .cloudquery.plugin.v3.Sync.Request.Shard shard = 6; + * @return Whether the shard field is set. + */ + public boolean hasShard() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * optional .cloudquery.plugin.v3.Sync.Request.Shard shard = 6; + * @return The shard. + */ + public io.cloudquery.plugin.v3.Sync.Request.Shard getShard() { + if (shardBuilder_ == null) { + return shard_ == null ? io.cloudquery.plugin.v3.Sync.Request.Shard.getDefaultInstance() : shard_; + } else { + return shardBuilder_.getMessage(); + } + } + /** + * optional .cloudquery.plugin.v3.Sync.Request.Shard shard = 6; + */ + public Builder setShard(io.cloudquery.plugin.v3.Sync.Request.Shard value) { + if (shardBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shard_ = value; + } else { + shardBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * optional .cloudquery.plugin.v3.Sync.Request.Shard shard = 6; + */ + public Builder setShard( + io.cloudquery.plugin.v3.Sync.Request.Shard.Builder builderForValue) { + if (shardBuilder_ == null) { + shard_ = builderForValue.build(); + } else { + shardBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * optional .cloudquery.plugin.v3.Sync.Request.Shard shard = 6; + */ + public Builder mergeShard(io.cloudquery.plugin.v3.Sync.Request.Shard value) { + if (shardBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + shard_ != null && + shard_ != io.cloudquery.plugin.v3.Sync.Request.Shard.getDefaultInstance()) { + getShardBuilder().mergeFrom(value); + } else { + shard_ = value; + } + } else { + shardBuilder_.mergeFrom(value); + } + if (shard_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * optional .cloudquery.plugin.v3.Sync.Request.Shard shard = 6; + */ + public Builder clearShard() { + bitField0_ = (bitField0_ & ~0x00000020); + shard_ = null; + if (shardBuilder_ != null) { + shardBuilder_.dispose(); + shardBuilder_ = null; + } + onChanged(); + return this; + } + /** + * optional .cloudquery.plugin.v3.Sync.Request.Shard shard = 6; + */ + public io.cloudquery.plugin.v3.Sync.Request.Shard.Builder getShardBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getShardFieldBuilder().getBuilder(); + } + /** + * optional .cloudquery.plugin.v3.Sync.Request.Shard shard = 6; + */ + public io.cloudquery.plugin.v3.Sync.Request.ShardOrBuilder getShardOrBuilder() { + if (shardBuilder_ != null) { + return shardBuilder_.getMessageOrBuilder(); + } else { + return shard_ == null ? + io.cloudquery.plugin.v3.Sync.Request.Shard.getDefaultInstance() : shard_; + } + } + /** + * optional .cloudquery.plugin.v3.Sync.Request.Shard shard = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + io.cloudquery.plugin.v3.Sync.Request.Shard, io.cloudquery.plugin.v3.Sync.Request.Shard.Builder, io.cloudquery.plugin.v3.Sync.Request.ShardOrBuilder> + getShardFieldBuilder() { + if (shardBuilder_ == null) { + shardBuilder_ = new com.google.protobuf.SingleFieldBuilder< + io.cloudquery.plugin.v3.Sync.Request.Shard, io.cloudquery.plugin.v3.Sync.Request.Shard.Builder, io.cloudquery.plugin.v3.Sync.Request.ShardOrBuilder>( + getShard(), + getParentForChildren(), + isClean()); + shard_ = null; + } + return shardBuilder_; + } + // @@protoc_insertion_point(builder_scope:cloudquery.plugin.v3.Sync.Request) } 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 a1657d4..7972667 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 @@ -1036,7 +1036,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=175 + * See cloudquery/plugin/v3/plugin.proto;l=180 * @return The table. */ @java.lang.Deprecated com.google.protobuf.ByteString getTable(); @@ -1130,7 +1130,7 @@ private MessageDeleteStale() { * * bytes table = 1 [deprecated = true]; * @deprecated cloudquery.plugin.v3.Write.MessageDeleteStale.table is deprecated. - * See cloudquery/plugin/v3/plugin.proto;l=175 + * See cloudquery/plugin/v3/plugin.proto;l=180 * @return The table. */ @java.lang.Override @@ -1636,7 +1636,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=175 + * See cloudquery/plugin/v3/plugin.proto;l=180 * @return The table. */ @java.lang.Override @@ -1650,7 +1650,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=175 + * See cloudquery/plugin/v3/plugin.proto;l=180 * @param value The table to set. * @return This builder for chaining. */ @@ -1668,7 +1668,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=175 + * See cloudquery/plugin/v3/plugin.proto;l=180 * @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 3dd5189..62050ed 100644 --- a/src/main/proto/cloudquery/plugin/v3/plugin.proto +++ b/src/main/proto/cloudquery/plugin/v3/plugin.proto @@ -103,11 +103,16 @@ message Sync { string connection = 2; } message Request { + message Shard { + int32 num = 1; + int32 total = 2; + } repeated string tables = 1; repeated string skip_tables = 2; bool skip_dependent_tables = 3; bool deterministic_cq_id = 4; BackendOptions backend = 5; + optional Shard shard = 6; } message Response { oneof message {