From ca2574b0bafb6c9adbc541c1096b03d88f32b904 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Wed, 7 Feb 2024 17:19:04 +0200 Subject: [PATCH] fix: Generate Python Code from `plugin-pb` (#59) This PR was created by a scheduled workflow to regenerate the Python code from `plugin-pb`. --- cloudquery/plugin_v3/plugin_pb2.py | 120 +++++++++++++----------- cloudquery/plugin_v3/plugin_pb2.pyi | 12 +++ cloudquery/plugin_v3/plugin_pb2_grpc.py | 36 +++++++ 3 files changed, 111 insertions(+), 57 deletions(-) diff --git a/cloudquery/plugin_v3/plugin_pb2.py b/cloudquery/plugin_v3/plugin_pb2.py index 2586429..13b6048 100644 --- a/cloudquery/plugin_v3/plugin_pb2.py +++ b/cloudquery/plugin_v3/plugin_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!cloudquery/plugin_v3/plugin.proto\x12\x14\x63loudquery.plugin.v3\x1a\x1fgoogle/protobuf/timestamp.proto\".\n\x07GetName\x1a\t\n\x07Request\x1a\x18\n\x08Response\x12\x0c\n\x04name\x18\x01 \x01(\t\"4\n\nGetVersion\x1a\t\n\x07Request\x1a\x1b\n\x08Response\x12\x0f\n\x07version\x18\x01 \x01(\t\"B\n\x04Init\x1a.\n\x07Request\x12\x0c\n\x04spec\x18\x01 \x01(\x0c\x12\x15\n\rno_connection\x18\x02 \x01(\x08\x1a\n\n\x08Response\"v\n\tGetTables\x1aM\n\x07Request\x12\x0e\n\x06tables\x18\x01 \x03(\t\x12\x13\n\x0bskip_tables\x18\x02 \x03(\t\x12\x1d\n\x15skip_dependent_tables\x18\x03 \x01(\x08\x1a\x1a\n\x08Response\x12\x0e\n\x06tables\x18\x01 \x03(\x0c\"\xbd\x05\n\x04Sync\x1a\x1f\n\rMessageInsert\x12\x0e\n\x06record\x18\x01 \x01(\x0c\x1a$\n\x13MessageMigrateTable\x12\r\n\x05table\x18\x01 \x01(\x0c\x1a\xa4\x01\n\x13MessageDeleteRecord\x12\x12\n\ntable_name\x18\x01 \x01(\t\x12;\n\x0cwhere_clause\x18\x02 \x03(\x0b\x32%.cloudquery.plugin.v3.PredicatesGroup\x12<\n\x0ftable_relations\x18\x03 \x03(\x0b\x32#.cloudquery.plugin.v3.TableRelation\x1a\x38\n\x0e\x42\x61\x63kendOptions\x12\x12\n\ntable_name\x18\x01 \x01(\t\x12\x12\n\nconnection\x18\x02 \x01(\t\x1a\xa6\x01\n\x07Request\x12\x0e\n\x06tables\x18\x01 \x03(\t\x12\x13\n\x0bskip_tables\x18\x02 \x03(\t\x12\x1d\n\x15skip_dependent_tables\x18\x03 \x01(\x08\x12\x1b\n\x13\x64\x65terministic_cq_id\x18\x04 \x01(\x08\x12:\n\x07\x62\x61\x63kend\x18\x05 \x01(\x0b\x32).cloudquery.plugin.v3.Sync.BackendOptions\x1a\xe3\x01\n\x08Response\x12G\n\rmigrate_table\x18\x01 \x01(\x0b\x32..cloudquery.plugin.v3.Sync.MessageMigrateTableH\x00\x12:\n\x06insert\x18\x02 \x01(\x0b\x32(.cloudquery.plugin.v3.Sync.MessageInsertH\x00\x12G\n\rdelete_record\x18\x03 \x01(\x0b\x32..cloudquery.plugin.v3.Sync.MessageDeleteRecordH\x00\x42\t\n\x07message\"<\n\x04Read\x1a\x18\n\x07Request\x12\r\n\x05table\x18\x01 \x01(\x0c\x1a\x1a\n\x08Response\x12\x0e\n\x06record\x18\x01 \x01(\x0c\"9\n\rTableRelation\x12\x12\n\ntable_name\x18\x01 \x01(\t\x12\x14\n\x0cparent_table\x18\x02 \x01(\t\"{\n\tPredicate\x12:\n\x08operator\x18\x01 \x01(\x0e\x32(.cloudquery.plugin.v3.Predicate.Operator\x12\x0e\n\x06\x63olumn\x18\x02 \x01(\t\x12\x0e\n\x06record\x18\x03 \x01(\x0c\"\x12\n\x08Operator\x12\x06\n\x02\x45Q\x10\x00\"\xb2\x01\n\x0fPredicatesGroup\x12I\n\rgrouping_type\x18\x01 \x01(\x0e\x32\x32.cloudquery.plugin.v3.PredicatesGroup.GroupingType\x12\x33\n\npredicates\x18\x02 \x03(\x0b\x32\x1f.cloudquery.plugin.v3.Predicate\"\x1f\n\x0cGroupingType\x12\x07\n\x03\x41ND\x10\x00\x12\x06\n\x02OR\x10\x01\"\xc3\x05\n\x05Write\x1a;\n\x13MessageMigrateTable\x12\r\n\x05table\x18\x01 \x01(\x0c\x12\x15\n\rmigrate_force\x18\x02 \x01(\x08\x1a\x1f\n\rMessageInsert\x12\x0e\n\x06record\x18\x01 \x01(\x0c\x1a\x7f\n\x12MessageDeleteStale\x12\x11\n\x05table\x18\x01 \x01(\x0c\x42\x02\x18\x01\x12\x13\n\x0bsource_name\x18\x02 \x01(\t\x12-\n\tsync_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\ntable_name\x18\x04 \x01(\t\x1a\xa4\x01\n\x13MessageDeleteRecord\x12\x12\n\ntable_name\x18\x01 \x01(\t\x12;\n\x0cwhere_clause\x18\x02 \x03(\x0b\x32%.cloudquery.plugin.v3.PredicatesGroup\x12<\n\x0ftable_relations\x18\x03 \x03(\x0b\x32#.cloudquery.plugin.v3.TableRelation\x1a\xa7\x02\n\x07Request\x12H\n\rmigrate_table\x18\x01 \x01(\x0b\x32/.cloudquery.plugin.v3.Write.MessageMigrateTableH\x00\x12;\n\x06insert\x18\x02 \x01(\x0b\x32).cloudquery.plugin.v3.Write.MessageInsertH\x00\x12@\n\x06\x64\x65lete\x18\x03 \x01(\x0b\x32..cloudquery.plugin.v3.Write.MessageDeleteStaleH\x00\x12H\n\rdelete_record\x18\x04 \x01(\x0b\x32/.cloudquery.plugin.v3.Write.MessageDeleteRecordH\x00\x42\t\n\x07message\x1a\n\n\x08Response\"\x1e\n\x05\x43lose\x1a\t\n\x07Request\x1a\n\n\x08Response2\xc6\x05\n\x06Plugin\x12X\n\x07GetName\x12%.cloudquery.plugin.v3.GetName.Request\x1a&.cloudquery.plugin.v3.GetName.Response\x12\x61\n\nGetVersion\x12(.cloudquery.plugin.v3.GetVersion.Request\x1a).cloudquery.plugin.v3.GetVersion.Response\x12O\n\x04Init\x12\".cloudquery.plugin.v3.Init.Request\x1a#.cloudquery.plugin.v3.Init.Response\x12^\n\tGetTables\x12\'.cloudquery.plugin.v3.GetTables.Request\x1a(.cloudquery.plugin.v3.GetTables.Response\x12Q\n\x04Sync\x12\".cloudquery.plugin.v3.Sync.Request\x1a#.cloudquery.plugin.v3.Sync.Response0\x01\x12Q\n\x04Read\x12\".cloudquery.plugin.v3.Read.Request\x1a#.cloudquery.plugin.v3.Read.Response0\x01\x12T\n\x05Write\x12#.cloudquery.plugin.v3.Write.Request\x1a$.cloudquery.plugin.v3.Write.Response(\x01\x12R\n\x05\x43lose\x12#.cloudquery.plugin.v3.Close.Request\x1a$.cloudquery.plugin.v3.Close.ResponseBS\n\x17io.cloudquery.plugin.v3P\x01Z6github.com/cloudquery/plugin-pb-go/pb/plugin/v3;pluginb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!cloudquery/plugin_v3/plugin.proto\x12\x14\x63loudquery.plugin.v3\x1a\x1fgoogle/protobuf/timestamp.proto\".\n\x07GetName\x1a\t\n\x07Request\x1a\x18\n\x08Response\x12\x0c\n\x04name\x18\x01 \x01(\t\"4\n\nGetVersion\x1a\t\n\x07Request\x1a\x1b\n\x08Response\x12\x0f\n\x07version\x18\x01 \x01(\t\"P\n\rGetSpecSchema\x1a\t\n\x07Request\x1a\x34\n\x08Response\x12\x18\n\x0bjson_schema\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_json_schema\"B\n\x04Init\x1a.\n\x07Request\x12\x0c\n\x04spec\x18\x01 \x01(\x0c\x12\x15\n\rno_connection\x18\x02 \x01(\x08\x1a\n\n\x08Response\"v\n\tGetTables\x1aM\n\x07Request\x12\x0e\n\x06tables\x18\x01 \x03(\t\x12\x13\n\x0bskip_tables\x18\x02 \x03(\t\x12\x1d\n\x15skip_dependent_tables\x18\x03 \x01(\x08\x1a\x1a\n\x08Response\x12\x0e\n\x06tables\x18\x01 \x03(\x0c\"\xbd\x05\n\x04Sync\x1a\x1f\n\rMessageInsert\x12\x0e\n\x06record\x18\x01 \x01(\x0c\x1a$\n\x13MessageMigrateTable\x12\r\n\x05table\x18\x01 \x01(\x0c\x1a\xa4\x01\n\x13MessageDeleteRecord\x12\x12\n\ntable_name\x18\x01 \x01(\t\x12;\n\x0cwhere_clause\x18\x02 \x03(\x0b\x32%.cloudquery.plugin.v3.PredicatesGroup\x12<\n\x0ftable_relations\x18\x03 \x03(\x0b\x32#.cloudquery.plugin.v3.TableRelation\x1a\x38\n\x0e\x42\x61\x63kendOptions\x12\x12\n\ntable_name\x18\x01 \x01(\t\x12\x12\n\nconnection\x18\x02 \x01(\t\x1a\xa6\x01\n\x07Request\x12\x0e\n\x06tables\x18\x01 \x03(\t\x12\x13\n\x0bskip_tables\x18\x02 \x03(\t\x12\x1d\n\x15skip_dependent_tables\x18\x03 \x01(\x08\x12\x1b\n\x13\x64\x65terministic_cq_id\x18\x04 \x01(\x08\x12:\n\x07\x62\x61\x63kend\x18\x05 \x01(\x0b\x32).cloudquery.plugin.v3.Sync.BackendOptions\x1a\xe3\x01\n\x08Response\x12G\n\rmigrate_table\x18\x01 \x01(\x0b\x32..cloudquery.plugin.v3.Sync.MessageMigrateTableH\x00\x12:\n\x06insert\x18\x02 \x01(\x0b\x32(.cloudquery.plugin.v3.Sync.MessageInsertH\x00\x12G\n\rdelete_record\x18\x03 \x01(\x0b\x32..cloudquery.plugin.v3.Sync.MessageDeleteRecordH\x00\x42\t\n\x07message\"<\n\x04Read\x1a\x18\n\x07Request\x12\r\n\x05table\x18\x01 \x01(\x0c\x1a\x1a\n\x08Response\x12\x0e\n\x06record\x18\x01 \x01(\x0c\"9\n\rTableRelation\x12\x12\n\ntable_name\x18\x01 \x01(\t\x12\x14\n\x0cparent_table\x18\x02 \x01(\t\"{\n\tPredicate\x12:\n\x08operator\x18\x01 \x01(\x0e\x32(.cloudquery.plugin.v3.Predicate.Operator\x12\x0e\n\x06\x63olumn\x18\x02 \x01(\t\x12\x0e\n\x06record\x18\x03 \x01(\x0c\"\x12\n\x08Operator\x12\x06\n\x02\x45Q\x10\x00\"\xb2\x01\n\x0fPredicatesGroup\x12I\n\rgrouping_type\x18\x01 \x01(\x0e\x32\x32.cloudquery.plugin.v3.PredicatesGroup.GroupingType\x12\x33\n\npredicates\x18\x02 \x03(\x0b\x32\x1f.cloudquery.plugin.v3.Predicate\"\x1f\n\x0cGroupingType\x12\x07\n\x03\x41ND\x10\x00\x12\x06\n\x02OR\x10\x01\"\xc3\x05\n\x05Write\x1a;\n\x13MessageMigrateTable\x12\r\n\x05table\x18\x01 \x01(\x0c\x12\x15\n\rmigrate_force\x18\x02 \x01(\x08\x1a\x1f\n\rMessageInsert\x12\x0e\n\x06record\x18\x01 \x01(\x0c\x1a\x7f\n\x12MessageDeleteStale\x12\x11\n\x05table\x18\x01 \x01(\x0c\x42\x02\x18\x01\x12\x13\n\x0bsource_name\x18\x02 \x01(\t\x12-\n\tsync_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\ntable_name\x18\x04 \x01(\t\x1a\xa4\x01\n\x13MessageDeleteRecord\x12\x12\n\ntable_name\x18\x01 \x01(\t\x12;\n\x0cwhere_clause\x18\x02 \x03(\x0b\x32%.cloudquery.plugin.v3.PredicatesGroup\x12<\n\x0ftable_relations\x18\x03 \x03(\x0b\x32#.cloudquery.plugin.v3.TableRelation\x1a\xa7\x02\n\x07Request\x12H\n\rmigrate_table\x18\x01 \x01(\x0b\x32/.cloudquery.plugin.v3.Write.MessageMigrateTableH\x00\x12;\n\x06insert\x18\x02 \x01(\x0b\x32).cloudquery.plugin.v3.Write.MessageInsertH\x00\x12@\n\x06\x64\x65lete\x18\x03 \x01(\x0b\x32..cloudquery.plugin.v3.Write.MessageDeleteStaleH\x00\x12H\n\rdelete_record\x18\x04 \x01(\x0b\x32/.cloudquery.plugin.v3.Write.MessageDeleteRecordH\x00\x42\t\n\x07message\x1a\n\n\x08Response\"\x1e\n\x05\x43lose\x1a\t\n\x07Request\x1a\n\n\x08Response2\xb2\x06\n\x06Plugin\x12X\n\x07GetName\x12%.cloudquery.plugin.v3.GetName.Request\x1a&.cloudquery.plugin.v3.GetName.Response\x12\x61\n\nGetVersion\x12(.cloudquery.plugin.v3.GetVersion.Request\x1a).cloudquery.plugin.v3.GetVersion.Response\x12j\n\rGetSpecSchema\x12+.cloudquery.plugin.v3.GetSpecSchema.Request\x1a,.cloudquery.plugin.v3.GetSpecSchema.Response\x12O\n\x04Init\x12\".cloudquery.plugin.v3.Init.Request\x1a#.cloudquery.plugin.v3.Init.Response\x12^\n\tGetTables\x12\'.cloudquery.plugin.v3.GetTables.Request\x1a(.cloudquery.plugin.v3.GetTables.Response\x12Q\n\x04Sync\x12\".cloudquery.plugin.v3.Sync.Request\x1a#.cloudquery.plugin.v3.Sync.Response0\x01\x12Q\n\x04Read\x12\".cloudquery.plugin.v3.Read.Request\x1a#.cloudquery.plugin.v3.Read.Response0\x01\x12T\n\x05Write\x12#.cloudquery.plugin.v3.Write.Request\x1a$.cloudquery.plugin.v3.Write.Response(\x01\x12R\n\x05\x43lose\x12#.cloudquery.plugin.v3.Close.Request\x1a$.cloudquery.plugin.v3.Close.ResponseBS\n\x17io.cloudquery.plugin.v3P\x01Z6github.com/cloudquery/plugin-pb-go/pb/plugin/v3;pluginb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -37,68 +37,74 @@ _globals['_GETVERSION_REQUEST']._serialized_end=112 _globals['_GETVERSION_RESPONSE']._serialized_start=165 _globals['_GETVERSION_RESPONSE']._serialized_end=192 - _globals['_INIT']._serialized_start=194 - _globals['_INIT']._serialized_end=260 - _globals['_INIT_REQUEST']._serialized_start=202 - _globals['_INIT_REQUEST']._serialized_end=248 + _globals['_GETSPECSCHEMA']._serialized_start=194 + _globals['_GETSPECSCHEMA']._serialized_end=274 + _globals['_GETSPECSCHEMA_REQUEST']._serialized_start=103 + _globals['_GETSPECSCHEMA_REQUEST']._serialized_end=112 + _globals['_GETSPECSCHEMA_RESPONSE']._serialized_start=222 + _globals['_GETSPECSCHEMA_RESPONSE']._serialized_end=274 + _globals['_INIT']._serialized_start=276 + _globals['_INIT']._serialized_end=342 + _globals['_INIT_REQUEST']._serialized_start=284 + _globals['_INIT_REQUEST']._serialized_end=330 _globals['_INIT_RESPONSE']._serialized_start=114 _globals['_INIT_RESPONSE']._serialized_end=124 - _globals['_GETTABLES']._serialized_start=262 - _globals['_GETTABLES']._serialized_end=380 - _globals['_GETTABLES_REQUEST']._serialized_start=275 - _globals['_GETTABLES_REQUEST']._serialized_end=352 - _globals['_GETTABLES_RESPONSE']._serialized_start=354 - _globals['_GETTABLES_RESPONSE']._serialized_end=380 - _globals['_SYNC']._serialized_start=383 - _globals['_SYNC']._serialized_end=1084 - _globals['_SYNC_MESSAGEINSERT']._serialized_start=391 - _globals['_SYNC_MESSAGEINSERT']._serialized_end=422 - _globals['_SYNC_MESSAGEMIGRATETABLE']._serialized_start=424 - _globals['_SYNC_MESSAGEMIGRATETABLE']._serialized_end=460 - _globals['_SYNC_MESSAGEDELETERECORD']._serialized_start=463 - _globals['_SYNC_MESSAGEDELETERECORD']._serialized_end=627 - _globals['_SYNC_BACKENDOPTIONS']._serialized_start=629 - _globals['_SYNC_BACKENDOPTIONS']._serialized_end=685 - _globals['_SYNC_REQUEST']._serialized_start=688 - _globals['_SYNC_REQUEST']._serialized_end=854 - _globals['_SYNC_RESPONSE']._serialized_start=857 - _globals['_SYNC_RESPONSE']._serialized_end=1084 - _globals['_READ']._serialized_start=1086 - _globals['_READ']._serialized_end=1146 - _globals['_READ_REQUEST']._serialized_start=1094 - _globals['_READ_REQUEST']._serialized_end=1118 - _globals['_READ_RESPONSE']._serialized_start=1120 - _globals['_READ_RESPONSE']._serialized_end=1146 - _globals['_TABLERELATION']._serialized_start=1148 - _globals['_TABLERELATION']._serialized_end=1205 - _globals['_PREDICATE']._serialized_start=1207 - _globals['_PREDICATE']._serialized_end=1330 - _globals['_PREDICATE_OPERATOR']._serialized_start=1312 - _globals['_PREDICATE_OPERATOR']._serialized_end=1330 - _globals['_PREDICATESGROUP']._serialized_start=1333 - _globals['_PREDICATESGROUP']._serialized_end=1511 - _globals['_PREDICATESGROUP_GROUPINGTYPE']._serialized_start=1480 - _globals['_PREDICATESGROUP_GROUPINGTYPE']._serialized_end=1511 - _globals['_WRITE']._serialized_start=1514 - _globals['_WRITE']._serialized_end=2221 - _globals['_WRITE_MESSAGEMIGRATETABLE']._serialized_start=1523 - _globals['_WRITE_MESSAGEMIGRATETABLE']._serialized_end=1582 - _globals['_WRITE_MESSAGEINSERT']._serialized_start=391 - _globals['_WRITE_MESSAGEINSERT']._serialized_end=422 - _globals['_WRITE_MESSAGEDELETESTALE']._serialized_start=1617 - _globals['_WRITE_MESSAGEDELETESTALE']._serialized_end=1744 - _globals['_WRITE_MESSAGEDELETERECORD']._serialized_start=463 - _globals['_WRITE_MESSAGEDELETERECORD']._serialized_end=627 - _globals['_WRITE_REQUEST']._serialized_start=1914 - _globals['_WRITE_REQUEST']._serialized_end=2209 + _globals['_GETTABLES']._serialized_start=344 + _globals['_GETTABLES']._serialized_end=462 + _globals['_GETTABLES_REQUEST']._serialized_start=357 + _globals['_GETTABLES_REQUEST']._serialized_end=434 + _globals['_GETTABLES_RESPONSE']._serialized_start=436 + _globals['_GETTABLES_RESPONSE']._serialized_end=462 + _globals['_SYNC']._serialized_start=465 + _globals['_SYNC']._serialized_end=1166 + _globals['_SYNC_MESSAGEINSERT']._serialized_start=473 + _globals['_SYNC_MESSAGEINSERT']._serialized_end=504 + _globals['_SYNC_MESSAGEMIGRATETABLE']._serialized_start=506 + _globals['_SYNC_MESSAGEMIGRATETABLE']._serialized_end=542 + _globals['_SYNC_MESSAGEDELETERECORD']._serialized_start=545 + _globals['_SYNC_MESSAGEDELETERECORD']._serialized_end=709 + _globals['_SYNC_BACKENDOPTIONS']._serialized_start=711 + _globals['_SYNC_BACKENDOPTIONS']._serialized_end=767 + _globals['_SYNC_REQUEST']._serialized_start=770 + _globals['_SYNC_REQUEST']._serialized_end=936 + _globals['_SYNC_RESPONSE']._serialized_start=939 + _globals['_SYNC_RESPONSE']._serialized_end=1166 + _globals['_READ']._serialized_start=1168 + _globals['_READ']._serialized_end=1228 + _globals['_READ_REQUEST']._serialized_start=1176 + _globals['_READ_REQUEST']._serialized_end=1200 + _globals['_READ_RESPONSE']._serialized_start=1202 + _globals['_READ_RESPONSE']._serialized_end=1228 + _globals['_TABLERELATION']._serialized_start=1230 + _globals['_TABLERELATION']._serialized_end=1287 + _globals['_PREDICATE']._serialized_start=1289 + _globals['_PREDICATE']._serialized_end=1412 + _globals['_PREDICATE_OPERATOR']._serialized_start=1394 + _globals['_PREDICATE_OPERATOR']._serialized_end=1412 + _globals['_PREDICATESGROUP']._serialized_start=1415 + _globals['_PREDICATESGROUP']._serialized_end=1593 + _globals['_PREDICATESGROUP_GROUPINGTYPE']._serialized_start=1562 + _globals['_PREDICATESGROUP_GROUPINGTYPE']._serialized_end=1593 + _globals['_WRITE']._serialized_start=1596 + _globals['_WRITE']._serialized_end=2303 + _globals['_WRITE_MESSAGEMIGRATETABLE']._serialized_start=1605 + _globals['_WRITE_MESSAGEMIGRATETABLE']._serialized_end=1664 + _globals['_WRITE_MESSAGEINSERT']._serialized_start=473 + _globals['_WRITE_MESSAGEINSERT']._serialized_end=504 + _globals['_WRITE_MESSAGEDELETESTALE']._serialized_start=1699 + _globals['_WRITE_MESSAGEDELETESTALE']._serialized_end=1826 + _globals['_WRITE_MESSAGEDELETERECORD']._serialized_start=545 + _globals['_WRITE_MESSAGEDELETERECORD']._serialized_end=709 + _globals['_WRITE_REQUEST']._serialized_start=1996 + _globals['_WRITE_REQUEST']._serialized_end=2291 _globals['_WRITE_RESPONSE']._serialized_start=114 _globals['_WRITE_RESPONSE']._serialized_end=124 - _globals['_CLOSE']._serialized_start=2223 - _globals['_CLOSE']._serialized_end=2253 + _globals['_CLOSE']._serialized_start=2305 + _globals['_CLOSE']._serialized_end=2335 _globals['_CLOSE_REQUEST']._serialized_start=103 _globals['_CLOSE_REQUEST']._serialized_end=112 _globals['_CLOSE_RESPONSE']._serialized_start=114 _globals['_CLOSE_RESPONSE']._serialized_end=124 - _globals['_PLUGIN']._serialized_start=2256 - _globals['_PLUGIN']._serialized_end=2966 + _globals['_PLUGIN']._serialized_start=2338 + _globals['_PLUGIN']._serialized_end=3156 # @@protoc_insertion_point(module_scope) diff --git a/cloudquery/plugin_v3/plugin_pb2.pyi b/cloudquery/plugin_v3/plugin_pb2.pyi index d1bd2d4..0102326 100644 --- a/cloudquery/plugin_v3/plugin_pb2.pyi +++ b/cloudquery/plugin_v3/plugin_pb2.pyi @@ -31,6 +31,18 @@ class GetVersion(_message.Message): def __init__(self, version: _Optional[str] = ...) -> None: ... def __init__(self) -> None: ... +class GetSpecSchema(_message.Message): + __slots__ = () + class Request(_message.Message): + __slots__ = () + def __init__(self) -> None: ... + class Response(_message.Message): + __slots__ = ("json_schema",) + JSON_SCHEMA_FIELD_NUMBER: _ClassVar[int] + json_schema: str + def __init__(self, json_schema: _Optional[str] = ...) -> None: ... + def __init__(self) -> None: ... + class Init(_message.Message): __slots__ = () class Request(_message.Message): diff --git a/cloudquery/plugin_v3/plugin_pb2_grpc.py b/cloudquery/plugin_v3/plugin_pb2_grpc.py index 20b88a2..5fe3d28 100644 --- a/cloudquery/plugin_v3/plugin_pb2_grpc.py +++ b/cloudquery/plugin_v3/plugin_pb2_grpc.py @@ -24,6 +24,11 @@ def __init__(self, channel): request_serializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.GetVersion.Request.SerializeToString, response_deserializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.GetVersion.Response.FromString, ) + self.GetSpecSchema = channel.unary_unary( + '/cloudquery.plugin.v3.Plugin/GetSpecSchema', + request_serializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.GetSpecSchema.Request.SerializeToString, + response_deserializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.GetSpecSchema.Response.FromString, + ) self.Init = channel.unary_unary( '/cloudquery.plugin.v3.Plugin/Init', request_serializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.Init.Request.SerializeToString, @@ -73,6 +78,15 @@ def GetVersion(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def GetSpecSchema(self, request, context): + """Get plugin spec schema. + This will allow validating the input even before calling Init. + Should be called before Init. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def Init(self, request, context): """Configure the plugin with the given credentials and mode """ @@ -129,6 +143,11 @@ def add_PluginServicer_to_server(servicer, server): request_deserializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.GetVersion.Request.FromString, response_serializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.GetVersion.Response.SerializeToString, ), + 'GetSpecSchema': grpc.unary_unary_rpc_method_handler( + servicer.GetSpecSchema, + request_deserializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.GetSpecSchema.Request.FromString, + response_serializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.GetSpecSchema.Response.SerializeToString, + ), 'Init': grpc.unary_unary_rpc_method_handler( servicer.Init, request_deserializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.Init.Request.FromString, @@ -203,6 +222,23 @@ def GetVersion(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def GetSpecSchema(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/cloudquery.plugin.v3.Plugin/GetSpecSchema', + cloudquery_dot_plugin__v3_dot_plugin__pb2.GetSpecSchema.Request.SerializeToString, + cloudquery_dot_plugin__v3_dot_plugin__pb2.GetSpecSchema.Response.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def Init(request, target,