diff --git a/csst_dfs_proto/facility/level2/__init__.py b/csst_dfs_proto/facility/level2/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/csst_dfs_proto/facility/level2/level2_pb2.py b/csst_dfs_proto/facility/level2/level2_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..eb97ab2da30cb5bb2f92d6c4fced74ea32f87c23 --- /dev/null +++ b/csst_dfs_proto/facility/level2/level2_pb2.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: facility/level2/level2.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...common import error_pb2 as common_dot_error__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66\x61\x63ility/level2/level2.proto\x12\x13\x64\x66s.facility.level2\x1a\x12\x63ommon/error.proto\"\xd4\x02\n\x0cLevel2Record\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x11\n\tlevel0_id\x18\x02 \x01(\t\x12\x11\n\tlevel1_id\x18\x03 \x01(\x03\x12\x10\n\x08\x62rick_id\x18\x04 \x01(\x03\x12\x11\n\tmodule_id\x18\x05 \x01(\t\x12\x13\n\x0bobject_name\x18\x06 \x01(\t\x12\x11\n\tdata_type\x18\x07 \x01(\t\x12\x10\n\x08\x66ilename\x18\x08 \x01(\t\x12\x11\n\tfile_path\x18\t \x01(\t\x12\x12\n\nqc2_status\x18\n \x01(\x05\x12\x10\n\x08qc2_time\x18\x0b \x01(\t\x12\x12\n\nprc_status\x18\x0c \x01(\x05\x12\x10\n\x08prc_time\x18\r \x01(\t\x12\x13\n\x0b\x63reate_time\x18\x0e \x01(\t\x12\x13\n\x0bupdate_time\x18\x0f \x01(\t\x12\x13\n\x0bpipeline_id\x18\x10 \x01(\t\x12\x15\n\rimport_status\x18\x11 \x01(\x05\"\x9a\x03\n\rFindLevel2Req\x12\x11\n\tlevel0_id\x18\x01 \x01(\t\x12\x11\n\tlevel1_id\x18\x02 \x01(\x03\x12\x10\n\x08\x62rick_id\x18\x03 \x01(\x03\x12\x11\n\tdata_type\x18\x04 \x01(\t\x12\x11\n\tmodule_id\x18\x05 \x01(\t\x12\x19\n\x11\x63reate_time_start\x18\x06 \x01(\t\x12\x17\n\x0f\x63reate_time_end\x18\x07 \x01(\t\x12\x12\n\nqc2_status\x18\x08 \x01(\x05\x12\x12\n\nprc_status\x18\t \x01(\x05\x12\x15\n\rimport_status\x18\n \x01(\x05\x12\x10\n\x08\x66ilename\x18\x0b \x01(\t\x12\r\n\x05limit\x18\x0c \x01(\x05\x12\x0c\n\x04page\x18\r \x01(\x05\x12Q\n\x10other_conditions\x18\x0e \x03(\x0b\x32\x37.dfs.facility.level2.FindLevel2Req.OtherConditionsEntry\x1a\x36\n\x14OtherConditionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x87\x01\n\x0e\x46indLevel2Resp\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x12\n\ntotalCount\x18\x02 \x01(\x05\x12\x1c\n\x05\x65rror\x18\x03 \x01(\x0b\x32\r.common.Error\x12\x32\n\x07records\x18\x04 \x03(\x0b\x32!.dfs.facility.level2.Level2Record\"\x1a\n\x0cGetLevel2Req\x12\n\n\x02id\x18\x01 \x01(\x03\"B\n\rGetLevel2Resp\x12\x31\n\x06record\x18\x01 \x01(\x0b\x32!.dfs.facility.level2.Level2Record\"Q\n\x0eWriteLevel2Req\x12\x31\n\x06record\x18\x01 \x01(\x0b\x32!.dfs.facility.level2.Level2Record\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"s\n\x0fWriteLevel2Resp\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x1c\n\x05\x65rror\x18\x02 \x01(\x0b\x32\r.common.Error\x12\x31\n\x06record\x18\x03 \x01(\x0b\x32!.dfs.facility.level2.Level2Record\"0\n\x12UpdateQc2StatusReq\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0e\n\x06status\x18\x02 \x01(\x05\"D\n\x13UpdateQc2StatusResp\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x1c\n\x05\x65rror\x18\x02 \x01(\x0b\x32\r.common.Error\"1\n\x13UpdateProcStatusReq\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0e\n\x06status\x18\x02 \x01(\x05\"E\n\x14UpdateProcStatusResp\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x1c\n\x05\x65rror\x18\x02 \x01(\x0b\x32\r.common.Error\"2\n\x14\x46indLevel2CatalogReq\x12\x0b\n\x03sql\x18\x01 \x01(\t\x12\r\n\x05limit\x18\x02 \x01(\x05\"k\n\x15\x46indLevel2CatalogResp\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x12\n\ntotalCount\x18\x02 \x01(\x05\x12\x1c\n\x05\x65rror\x18\x03 \x01(\x0b\x32\r.common.Error\x12\x0f\n\x07records\x18\x04 \x01(\x0c\")\n\x14\x46indExistedBricksReq\x12\x11\n\tdata_type\x18\x01 \x01(\t\"Y\n\x15\x46indExistedBricksResp\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x1c\n\x05\x65rror\x18\x02 \x01(\x0b\x32\r.common.Error\x12\x11\n\tbrick_ids\x18\x03 \x03(\x05\"\x19\n\nExecSQLReq\x12\x0b\n\x03sql\x18\x01 \x01(\t\"P\n\x0b\x45xecSQLResp\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x12\n\ntotalCount\x18\x02 \x01(\x05\x12\x1c\n\x05\x65rror\x18\x03 \x01(\x0b\x32\r.common.Error2\x81\x06\n\tLevel2Srv\x12Q\n\x04\x46ind\x12\".dfs.facility.level2.FindLevel2Req\x1a#.dfs.facility.level2.FindLevel2Resp\"\x00\x12h\n\x0b\x46indCatalog\x12).dfs.facility.level2.FindLevel2CatalogReq\x1a*.dfs.facility.level2.FindLevel2CatalogResp\"\x00\x30\x01\x12l\n\x11\x46indExistedBricks\x12).dfs.facility.level2.FindExistedBricksReq\x1a*.dfs.facility.level2.FindExistedBricksResp\"\x00\x12N\n\x03Get\x12!.dfs.facility.level2.GetLevel2Req\x1a\".dfs.facility.level2.GetLevel2Resp\"\x00\x12V\n\x05Write\x12#.dfs.facility.level2.WriteLevel2Req\x1a$.dfs.facility.level2.WriteLevel2Resp\"\x00(\x01\x12\x66\n\x0fUpdateQc2Status\x12\'.dfs.facility.level2.UpdateQc2StatusReq\x1a(.dfs.facility.level2.UpdateQc2StatusResp\"\x00\x12i\n\x10UpdateProcStatus\x12(.dfs.facility.level2.UpdateProcStatusReq\x1a).dfs.facility.level2.UpdateProcStatusResp\"\x00\x12N\n\x07\x45xecSQL\x12\x1f.dfs.facility.level2.ExecSQLReq\x1a .dfs.facility.level2.ExecSQLResp\"\x00\x42&Z$cnlab.net/csst/proto/facility/level2b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'facility.level2.level2_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'Z$cnlab.net/csst/proto/facility/level2' + _FINDLEVEL2REQ_OTHERCONDITIONSENTRY._options = None + _FINDLEVEL2REQ_OTHERCONDITIONSENTRY._serialized_options = b'8\001' + _LEVEL2RECORD._serialized_start=74 + _LEVEL2RECORD._serialized_end=414 + _FINDLEVEL2REQ._serialized_start=417 + _FINDLEVEL2REQ._serialized_end=827 + _FINDLEVEL2REQ_OTHERCONDITIONSENTRY._serialized_start=773 + _FINDLEVEL2REQ_OTHERCONDITIONSENTRY._serialized_end=827 + _FINDLEVEL2RESP._serialized_start=830 + _FINDLEVEL2RESP._serialized_end=965 + _GETLEVEL2REQ._serialized_start=967 + _GETLEVEL2REQ._serialized_end=993 + _GETLEVEL2RESP._serialized_start=995 + _GETLEVEL2RESP._serialized_end=1061 + _WRITELEVEL2REQ._serialized_start=1063 + _WRITELEVEL2REQ._serialized_end=1144 + _WRITELEVEL2RESP._serialized_start=1146 + _WRITELEVEL2RESP._serialized_end=1261 + _UPDATEQC2STATUSREQ._serialized_start=1263 + _UPDATEQC2STATUSREQ._serialized_end=1311 + _UPDATEQC2STATUSRESP._serialized_start=1313 + _UPDATEQC2STATUSRESP._serialized_end=1381 + _UPDATEPROCSTATUSREQ._serialized_start=1383 + _UPDATEPROCSTATUSREQ._serialized_end=1432 + _UPDATEPROCSTATUSRESP._serialized_start=1434 + _UPDATEPROCSTATUSRESP._serialized_end=1503 + _FINDLEVEL2CATALOGREQ._serialized_start=1505 + _FINDLEVEL2CATALOGREQ._serialized_end=1555 + _FINDLEVEL2CATALOGRESP._serialized_start=1557 + _FINDLEVEL2CATALOGRESP._serialized_end=1664 + _FINDEXISTEDBRICKSREQ._serialized_start=1666 + _FINDEXISTEDBRICKSREQ._serialized_end=1707 + _FINDEXISTEDBRICKSRESP._serialized_start=1709 + _FINDEXISTEDBRICKSRESP._serialized_end=1798 + _EXECSQLREQ._serialized_start=1800 + _EXECSQLREQ._serialized_end=1825 + _EXECSQLRESP._serialized_start=1827 + _EXECSQLRESP._serialized_end=1907 + _LEVEL2SRV._serialized_start=1910 + _LEVEL2SRV._serialized_end=2679 +# @@protoc_insertion_point(module_scope) diff --git a/csst_dfs_proto/facility/level2/level2_pb2_grpc.py b/csst_dfs_proto/facility/level2/level2_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..8bc5a0dd45ecfc6e27baf2ca8c50e5873edec0e9 --- /dev/null +++ b/csst_dfs_proto/facility/level2/level2_pb2_grpc.py @@ -0,0 +1,297 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import level2_pb2 as facility_dot_level2_dot_level2__pb2 + + +class Level2SrvStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Find = channel.unary_unary( + '/dfs.facility.level2.Level2Srv/Find', + request_serializer=facility_dot_level2_dot_level2__pb2.FindLevel2Req.SerializeToString, + response_deserializer=facility_dot_level2_dot_level2__pb2.FindLevel2Resp.FromString, + ) + self.FindCatalog = channel.unary_stream( + '/dfs.facility.level2.Level2Srv/FindCatalog', + request_serializer=facility_dot_level2_dot_level2__pb2.FindLevel2CatalogReq.SerializeToString, + response_deserializer=facility_dot_level2_dot_level2__pb2.FindLevel2CatalogResp.FromString, + ) + self.FindExistedBricks = channel.unary_unary( + '/dfs.facility.level2.Level2Srv/FindExistedBricks', + request_serializer=facility_dot_level2_dot_level2__pb2.FindExistedBricksReq.SerializeToString, + response_deserializer=facility_dot_level2_dot_level2__pb2.FindExistedBricksResp.FromString, + ) + self.Get = channel.unary_unary( + '/dfs.facility.level2.Level2Srv/Get', + request_serializer=facility_dot_level2_dot_level2__pb2.GetLevel2Req.SerializeToString, + response_deserializer=facility_dot_level2_dot_level2__pb2.GetLevel2Resp.FromString, + ) + self.Write = channel.stream_unary( + '/dfs.facility.level2.Level2Srv/Write', + request_serializer=facility_dot_level2_dot_level2__pb2.WriteLevel2Req.SerializeToString, + response_deserializer=facility_dot_level2_dot_level2__pb2.WriteLevel2Resp.FromString, + ) + self.UpdateQc2Status = channel.unary_unary( + '/dfs.facility.level2.Level2Srv/UpdateQc2Status', + request_serializer=facility_dot_level2_dot_level2__pb2.UpdateQc2StatusReq.SerializeToString, + response_deserializer=facility_dot_level2_dot_level2__pb2.UpdateQc2StatusResp.FromString, + ) + self.UpdateProcStatus = channel.unary_unary( + '/dfs.facility.level2.Level2Srv/UpdateProcStatus', + request_serializer=facility_dot_level2_dot_level2__pb2.UpdateProcStatusReq.SerializeToString, + response_deserializer=facility_dot_level2_dot_level2__pb2.UpdateProcStatusResp.FromString, + ) + self.ExecSQL = channel.unary_unary( + '/dfs.facility.level2.Level2Srv/ExecSQL', + request_serializer=facility_dot_level2_dot_level2__pb2.ExecSQLReq.SerializeToString, + response_deserializer=facility_dot_level2_dot_level2__pb2.ExecSQLResp.FromString, + ) + + +class Level2SrvServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Find(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def FindCatalog(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def FindExistedBricks(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Get(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Write(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateQc2Status(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateProcStatus(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ExecSQL(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_Level2SrvServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Find': grpc.unary_unary_rpc_method_handler( + servicer.Find, + request_deserializer=facility_dot_level2_dot_level2__pb2.FindLevel2Req.FromString, + response_serializer=facility_dot_level2_dot_level2__pb2.FindLevel2Resp.SerializeToString, + ), + 'FindCatalog': grpc.unary_stream_rpc_method_handler( + servicer.FindCatalog, + request_deserializer=facility_dot_level2_dot_level2__pb2.FindLevel2CatalogReq.FromString, + response_serializer=facility_dot_level2_dot_level2__pb2.FindLevel2CatalogResp.SerializeToString, + ), + 'FindExistedBricks': grpc.unary_unary_rpc_method_handler( + servicer.FindExistedBricks, + request_deserializer=facility_dot_level2_dot_level2__pb2.FindExistedBricksReq.FromString, + response_serializer=facility_dot_level2_dot_level2__pb2.FindExistedBricksResp.SerializeToString, + ), + 'Get': grpc.unary_unary_rpc_method_handler( + servicer.Get, + request_deserializer=facility_dot_level2_dot_level2__pb2.GetLevel2Req.FromString, + response_serializer=facility_dot_level2_dot_level2__pb2.GetLevel2Resp.SerializeToString, + ), + 'Write': grpc.stream_unary_rpc_method_handler( + servicer.Write, + request_deserializer=facility_dot_level2_dot_level2__pb2.WriteLevel2Req.FromString, + response_serializer=facility_dot_level2_dot_level2__pb2.WriteLevel2Resp.SerializeToString, + ), + 'UpdateQc2Status': grpc.unary_unary_rpc_method_handler( + servicer.UpdateQc2Status, + request_deserializer=facility_dot_level2_dot_level2__pb2.UpdateQc2StatusReq.FromString, + response_serializer=facility_dot_level2_dot_level2__pb2.UpdateQc2StatusResp.SerializeToString, + ), + 'UpdateProcStatus': grpc.unary_unary_rpc_method_handler( + servicer.UpdateProcStatus, + request_deserializer=facility_dot_level2_dot_level2__pb2.UpdateProcStatusReq.FromString, + response_serializer=facility_dot_level2_dot_level2__pb2.UpdateProcStatusResp.SerializeToString, + ), + 'ExecSQL': grpc.unary_unary_rpc_method_handler( + servicer.ExecSQL, + request_deserializer=facility_dot_level2_dot_level2__pb2.ExecSQLReq.FromString, + response_serializer=facility_dot_level2_dot_level2__pb2.ExecSQLResp.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'dfs.facility.level2.Level2Srv', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class Level2Srv(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Find(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, '/dfs.facility.level2.Level2Srv/Find', + facility_dot_level2_dot_level2__pb2.FindLevel2Req.SerializeToString, + facility_dot_level2_dot_level2__pb2.FindLevel2Resp.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def FindCatalog(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_stream(request, target, '/dfs.facility.level2.Level2Srv/FindCatalog', + facility_dot_level2_dot_level2__pb2.FindLevel2CatalogReq.SerializeToString, + facility_dot_level2_dot_level2__pb2.FindLevel2CatalogResp.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def FindExistedBricks(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, '/dfs.facility.level2.Level2Srv/FindExistedBricks', + facility_dot_level2_dot_level2__pb2.FindExistedBricksReq.SerializeToString, + facility_dot_level2_dot_level2__pb2.FindExistedBricksResp.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Get(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, '/dfs.facility.level2.Level2Srv/Get', + facility_dot_level2_dot_level2__pb2.GetLevel2Req.SerializeToString, + facility_dot_level2_dot_level2__pb2.GetLevel2Resp.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Write(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/dfs.facility.level2.Level2Srv/Write', + facility_dot_level2_dot_level2__pb2.WriteLevel2Req.SerializeToString, + facility_dot_level2_dot_level2__pb2.WriteLevel2Resp.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateQc2Status(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, '/dfs.facility.level2.Level2Srv/UpdateQc2Status', + facility_dot_level2_dot_level2__pb2.UpdateQc2StatusReq.SerializeToString, + facility_dot_level2_dot_level2__pb2.UpdateQc2StatusResp.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateProcStatus(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, '/dfs.facility.level2.Level2Srv/UpdateProcStatus', + facility_dot_level2_dot_level2__pb2.UpdateProcStatusReq.SerializeToString, + facility_dot_level2_dot_level2__pb2.UpdateProcStatusResp.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ExecSQL(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, '/dfs.facility.level2.Level2Srv/ExecSQL', + facility_dot_level2_dot_level2__pb2.ExecSQLReq.SerializeToString, + facility_dot_level2_dot_level2__pb2.ExecSQLResp.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/csst_dfs_proto/facility/level2type/__init__.py b/csst_dfs_proto/facility/level2type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/csst_dfs_proto/facility/level2type/level2type_pb2.py b/csst_dfs_proto/facility/level2type/level2type_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..10a7ce3d4fd133f49adf830bc2f3a1b341e65cfe --- /dev/null +++ b/csst_dfs_proto/facility/level2type/level2type_pb2.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: facility/level2type/level2type.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from ...common import error_pb2 as common_dot_error__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$facility/level2type/level2type.proto\x12\x17\x64\x66s.facility.level2Type\x1a\x12\x63ommon/error.proto\"\xf6\x01\n\x10Level2TypeRecord\x12\x11\n\tdata_type\x18\x01 \x01(\t\x12\x11\n\tmodule_id\x18\x02 \x01(\t\x12\x12\n\nkey_column\x18\x03 \x01(\t\x12\x11\n\thdu_index\x18\x04 \x01(\x05\x12\x15\n\rdemo_filename\x18\x05 \x01(\t\x12\x16\n\x0e\x64\x65mo_file_path\x18\x06 \x01(\t\x12\x11\n\tra_column\x18\x07 \x01(\t\x12\x12\n\ndec_column\x18\x08 \x01(\t\x12\x13\n\x0bupdate_time\x18\t \x01(\t\x12\x13\n\x0b\x63reate_time\x18\n \x01(\t\x12\x15\n\rimport_status\x18\x0b \x01(\x05\"m\n\x11\x46indLevel2TypeReq\x12\x11\n\tmodule_id\x18\x01 \x01(\t\x12\x11\n\tdata_type\x18\x02 \x01(\t\x12\x15\n\rimport_status\x18\x03 \x01(\x05\x12\x0c\n\x04page\x18\x04 \x01(\x05\x12\r\n\x05limit\x18\x05 \x01(\x05\"\x93\x01\n\x12\x46indLevel2TypeResp\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x12\n\ntotalCount\x18\x02 \x01(\x05\x12\x1c\n\x05\x65rror\x18\x03 \x01(\x0b\x32\r.common.Error\x12:\n\x07records\x18\x04 \x03(\x0b\x32).dfs.facility.level2Type.Level2TypeRecord\"%\n\x10GetLevel2TypeReq\x12\x11\n\tdata_type\x18\x01 \x01(\t\"N\n\x11GetLevel2TypeResp\x12\x39\n\x06record\x18\x01 \x01(\x0b\x32).dfs.facility.level2Type.Level2TypeRecord\"]\n\x12WriteLevel2TypeReq\x12\x39\n\x06record\x18\x01 \x01(\x0b\x32).dfs.facility.level2Type.Level2TypeRecord\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"\x7f\n\x13WriteLevel2TypeResp\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x1c\n\x05\x65rror\x18\x02 \x01(\x0b\x32\r.common.Error\x12\x39\n\x06record\x18\x03 \x01(\x0b\x32).dfs.facility.level2Type.Level2TypeRecord\":\n\x15UpdateImportStatusReq\x12\x11\n\tdata_type\x18\x01 \x01(\t\x12\x0e\n\x06status\x18\x02 \x01(\x05\"G\n\x16UpdateImportStatusResp\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x1c\n\x05\x65rror\x18\x02 \x01(\x0b\x32\r.common.Error2\xb3\x03\n\rLevel2TypeSrv\x12\x61\n\x04\x46ind\x12*.dfs.facility.level2Type.FindLevel2TypeReq\x1a+.dfs.facility.level2Type.FindLevel2TypeResp\"\x00\x12^\n\x03Get\x12).dfs.facility.level2Type.GetLevel2TypeReq\x1a*.dfs.facility.level2Type.GetLevel2TypeResp\"\x00\x12\x66\n\x05Write\x12+.dfs.facility.level2Type.WriteLevel2TypeReq\x1a,.dfs.facility.level2Type.WriteLevel2TypeResp\"\x00(\x01\x12w\n\x12UpdateImportStatus\x12..dfs.facility.level2Type.UpdateImportStatusReq\x1a/.dfs.facility.level2Type.UpdateImportStatusResp\"\x00\x42*Z(cnlab.net/csst/proto/facility/level2Typeb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'facility.level2type.level2type_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'Z(cnlab.net/csst/proto/facility/level2Type' + _LEVEL2TYPERECORD._serialized_start=86 + _LEVEL2TYPERECORD._serialized_end=332 + _FINDLEVEL2TYPEREQ._serialized_start=334 + _FINDLEVEL2TYPEREQ._serialized_end=443 + _FINDLEVEL2TYPERESP._serialized_start=446 + _FINDLEVEL2TYPERESP._serialized_end=593 + _GETLEVEL2TYPEREQ._serialized_start=595 + _GETLEVEL2TYPEREQ._serialized_end=632 + _GETLEVEL2TYPERESP._serialized_start=634 + _GETLEVEL2TYPERESP._serialized_end=712 + _WRITELEVEL2TYPEREQ._serialized_start=714 + _WRITELEVEL2TYPEREQ._serialized_end=807 + _WRITELEVEL2TYPERESP._serialized_start=809 + _WRITELEVEL2TYPERESP._serialized_end=936 + _UPDATEIMPORTSTATUSREQ._serialized_start=938 + _UPDATEIMPORTSTATUSREQ._serialized_end=996 + _UPDATEIMPORTSTATUSRESP._serialized_start=998 + _UPDATEIMPORTSTATUSRESP._serialized_end=1069 + _LEVEL2TYPESRV._serialized_start=1072 + _LEVEL2TYPESRV._serialized_end=1507 +# @@protoc_insertion_point(module_scope) diff --git a/csst_dfs_proto/facility/level2type/level2type_pb2_grpc.py b/csst_dfs_proto/facility/level2type/level2type_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..73a7e09da3f131c7f649a350df5e29eebf594eeb --- /dev/null +++ b/csst_dfs_proto/facility/level2type/level2type_pb2_grpc.py @@ -0,0 +1,165 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import level2type_pb2 as facility_dot_level2type_dot_level2type__pb2 + + +class Level2TypeSrvStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Find = channel.unary_unary( + '/dfs.facility.level2Type.Level2TypeSrv/Find', + request_serializer=facility_dot_level2type_dot_level2type__pb2.FindLevel2TypeReq.SerializeToString, + response_deserializer=facility_dot_level2type_dot_level2type__pb2.FindLevel2TypeResp.FromString, + ) + self.Get = channel.unary_unary( + '/dfs.facility.level2Type.Level2TypeSrv/Get', + request_serializer=facility_dot_level2type_dot_level2type__pb2.GetLevel2TypeReq.SerializeToString, + response_deserializer=facility_dot_level2type_dot_level2type__pb2.GetLevel2TypeResp.FromString, + ) + self.Write = channel.stream_unary( + '/dfs.facility.level2Type.Level2TypeSrv/Write', + request_serializer=facility_dot_level2type_dot_level2type__pb2.WriteLevel2TypeReq.SerializeToString, + response_deserializer=facility_dot_level2type_dot_level2type__pb2.WriteLevel2TypeResp.FromString, + ) + self.UpdateImportStatus = channel.unary_unary( + '/dfs.facility.level2Type.Level2TypeSrv/UpdateImportStatus', + request_serializer=facility_dot_level2type_dot_level2type__pb2.UpdateImportStatusReq.SerializeToString, + response_deserializer=facility_dot_level2type_dot_level2type__pb2.UpdateImportStatusResp.FromString, + ) + + +class Level2TypeSrvServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Find(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Get(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Write(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateImportStatus(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_Level2TypeSrvServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Find': grpc.unary_unary_rpc_method_handler( + servicer.Find, + request_deserializer=facility_dot_level2type_dot_level2type__pb2.FindLevel2TypeReq.FromString, + response_serializer=facility_dot_level2type_dot_level2type__pb2.FindLevel2TypeResp.SerializeToString, + ), + 'Get': grpc.unary_unary_rpc_method_handler( + servicer.Get, + request_deserializer=facility_dot_level2type_dot_level2type__pb2.GetLevel2TypeReq.FromString, + response_serializer=facility_dot_level2type_dot_level2type__pb2.GetLevel2TypeResp.SerializeToString, + ), + 'Write': grpc.stream_unary_rpc_method_handler( + servicer.Write, + request_deserializer=facility_dot_level2type_dot_level2type__pb2.WriteLevel2TypeReq.FromString, + response_serializer=facility_dot_level2type_dot_level2type__pb2.WriteLevel2TypeResp.SerializeToString, + ), + 'UpdateImportStatus': grpc.unary_unary_rpc_method_handler( + servicer.UpdateImportStatus, + request_deserializer=facility_dot_level2type_dot_level2type__pb2.UpdateImportStatusReq.FromString, + response_serializer=facility_dot_level2type_dot_level2type__pb2.UpdateImportStatusResp.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'dfs.facility.level2Type.Level2TypeSrv', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class Level2TypeSrv(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Find(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, '/dfs.facility.level2Type.Level2TypeSrv/Find', + facility_dot_level2type_dot_level2type__pb2.FindLevel2TypeReq.SerializeToString, + facility_dot_level2type_dot_level2type__pb2.FindLevel2TypeResp.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Get(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, '/dfs.facility.level2Type.Level2TypeSrv/Get', + facility_dot_level2type_dot_level2type__pb2.GetLevel2TypeReq.SerializeToString, + facility_dot_level2type_dot_level2type__pb2.GetLevel2TypeResp.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Write(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/dfs.facility.level2Type.Level2TypeSrv/Write', + facility_dot_level2type_dot_level2type__pb2.WriteLevel2TypeReq.SerializeToString, + facility_dot_level2type_dot_level2type__pb2.WriteLevel2TypeResp.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateImportStatus(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, '/dfs.facility.level2Type.Level2TypeSrv/UpdateImportStatus', + facility_dot_level2type_dot_level2type__pb2.UpdateImportStatusReq.SerializeToString, + facility_dot_level2type_dot_level2type__pb2.UpdateImportStatusResp.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata)