From 8bfa592bef9975dcc6e95d18a609fba2bd334c08 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 4 Sep 2025 18:55:55 +0800 Subject: [PATCH] perf: add python protobuf sdk --- protobuf-py/protobuf/common_pb2.py | 93 ++ protobuf-py/protobuf/common_pb2.pyi | 428 +++++++++ protobuf-py/protobuf/common_pb2_grpc.py | 24 + protobuf-py/protobuf/service_pb2.py | 132 +++ protobuf-py/protobuf/service_pb2.pyi | 429 +++++++++ protobuf-py/protobuf/service_pb2_grpc.py | 1043 ++++++++++++++++++++++ 6 files changed, 2149 insertions(+) create mode 100644 protobuf-py/protobuf/common_pb2.py create mode 100644 protobuf-py/protobuf/common_pb2.pyi create mode 100644 protobuf-py/protobuf/common_pb2_grpc.py create mode 100644 protobuf-py/protobuf/service_pb2.py create mode 100644 protobuf-py/protobuf/service_pb2.pyi create mode 100644 protobuf-py/protobuf/service_pb2_grpc.py diff --git a/protobuf-py/protobuf/common_pb2.py b/protobuf-py/protobuf/common_pb2.py new file mode 100644 index 0000000..3b26920 --- /dev/null +++ b/protobuf-py/protobuf/common_pb2.py @@ -0,0 +1,93 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: common.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'common.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x63ommon.proto\x12\x07message\"e\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08username\x18\x03 \x01(\t\x12\x0c\n\x04role\x18\x04 \x01(\t\x12\x10\n\x08is_valid\x18\x05 \x01(\x08\x12\x11\n\tis_active\x18\x06 \x01(\x08\"n\n\x07\x41\x63\x63ount\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08username\x18\x04 \x01(\t\x12\x0e\n\x06secret\x18\x05 \x01(\t\x12\'\n\nsecretType\x18\x06 \x01(\x0b\x32\x13.message.LabelValue\"*\n\nLabelValue\x12\r\n\x05label\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\xc5\x03\n\x05\x41sset\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x03 \x01(\t\x12\x0e\n\x06org_id\x18\x04 \x01(\t\x12\x10\n\x08org_name\x18\x05 \x01(\t\x12$\n\tprotocols\x18\x06 \x03(\x0b\x32\x11.message.Protocol\x12)\n\x08specific\x18\x07 \x01(\x0b\x32\x17.message.Asset.Specific\x1a\x9d\x02\n\x08Specific\x12\x0f\n\x07\x64\x62_name\x18\x01 \x01(\t\x12\x0f\n\x07use_ssl\x18\x02 \x01(\x08\x12\x0f\n\x07\x63\x61_cert\x18\x03 \x01(\t\x12\x13\n\x0b\x63lient_cert\x18\x04 \x01(\t\x12\x12\n\nclient_key\x18\x05 \x01(\t\x12\x1a\n\x12\x61llow_invalid_cert\x18\x06 \x01(\x08\x12\x11\n\tauto_fill\x18\x07 \x01(\t\x12\x19\n\x11username_selector\x18\x08 \x01(\t\x12\x19\n\x11password_selector\x18\t \x01(\t\x12\x17\n\x0fsubmit_selector\x18\n \x01(\t\x12\x0e\n\x06script\x18\x0b \x01(\t\x12\x12\n\nhttp_proxy\x18\x0c \x01(\t\x12\x13\n\x0bpg_ssl_mode\x18\r \x01(\t\"2\n\x08Protocol\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x0c\n\x04port\x18\x03 \x01(\x05\"\x88\x01\n\x07Gateway\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\n\n\x02ip\x18\x03 \x01(\t\x12\x0c\n\x04port\x18\x04 \x01(\x05\x12\x10\n\x08protocol\x18\x05 \x01(\t\x12\x10\n\x08username\x18\x06 \x01(\t\x12\x10\n\x08password\x18\x07 \x01(\t\x12\x13\n\x0bprivate_key\x18\x08 \x01(\t\"\x7f\n\nPermission\x12\x16\n\x0e\x65nable_connect\x18\x01 \x01(\x08\x12\x17\n\x0f\x65nable_download\x18\x02 \x01(\x08\x12\x15\n\renable_upload\x18\x03 \x01(\x08\x12\x13\n\x0b\x65nable_copy\x18\x04 \x01(\x08\x12\x14\n\x0c\x65nable_paste\x18\x05 \x01(\x08\"\x81\x02\n\nCommandACL\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08priority\x18\x03 \x01(\x05\x12*\n\x06\x61\x63tion\x18\x05 \x01(\x0e\x32\x1a.message.CommandACL.Action\x12\x11\n\tis_active\x18\x06 \x01(\x08\x12-\n\x0e\x63ommand_groups\x18\x07 \x03(\x0b\x32\x15.message.CommandGroup\"Y\n\x06\x41\x63tion\x12\n\n\x06Reject\x10\x00\x12\n\n\x06\x41\x63\x63\x65pt\x10\x01\x12\n\n\x06Review\x10\x02\x12\x0b\n\x07Warning\x10\x03\x12\x11\n\rNotifyWarning\x10\x04\x12\x0b\n\x07Unknown\x10\x05\"m\n\x0c\x43ommandGroup\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\x12\x0c\n\x04Type\x18\x04 \x01(\t\x12\x0f\n\x07pattern\x18\x05 \x01(\t\x12\x13\n\x0bignore_case\x18\x06 \x01(\x08\"\x1f\n\nExpireInfo\x12\x11\n\texpire_at\x18\x01 \x01(\x03\"\xb4\x02\n\x07Session\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04user\x18\x02 \x01(\t\x12\r\n\x05\x61sset\x18\x03 \x01(\t\x12\x0f\n\x07\x61\x63\x63ount\x18\x04 \x01(\t\x12.\n\nlogin_from\x18\x05 \x01(\x0e\x32\x1a.message.Session.LoginFrom\x12\x13\n\x0bremote_addr\x18\x06 \x01(\t\x12\x10\n\x08protocol\x18\x07 \x01(\t\x12\x12\n\ndate_start\x18\x08 \x01(\x03\x12\x0e\n\x06org_id\x18\t \x01(\t\x12\x0f\n\x07user_id\x18\n \x01(\t\x12\x10\n\x08\x61sset_id\x18\x0b \x01(\t\x12\x12\n\naccount_id\x18\x0c \x01(\t\x12\x10\n\x08token_id\x18\r \x01(\t\"+\n\tLoginFrom\x12\x06\n\x02WT\x10\x00\x12\x06\n\x02ST\x10\x01\x12\x06\n\x02RT\x10\x02\x12\x06\n\x02\x44T\x10\x03\"?\n\x0bTokenStatus\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x0e\n\x06\x64\x65tail\x18\x02 \x01(\t\x12\x12\n\nis_expired\x18\x03 \x01(\x08\"\xaa\x01\n\x0cTerminalTask\x12\n\n\x02id\x18\x01 \x01(\t\x12#\n\x06\x61\x63tion\x18\x02 \x01(\x0e\x32\x13.message.TaskAction\x12\x12\n\nsession_id\x18\x03 \x01(\t\x12\x15\n\rterminated_by\x18\x04 \x01(\t\x12\x12\n\ncreated_by\x18\x05 \x01(\t\x12*\n\x0ctoken_status\x18\x06 \x01(\x0b\x32\x14.message.TokenStatus\"\x9f\x03\n\rTokenAuthInfo\x12\x0e\n\x06key_id\x18\x01 \x01(\t\x12\x12\n\nsecrete_id\x18\x02 \x01(\t\x12\x1d\n\x05\x61sset\x18\x03 \x01(\x0b\x32\x0e.message.Asset\x12\x1b\n\x04user\x18\x04 \x01(\x0b\x32\r.message.User\x12!\n\x07\x61\x63\x63ount\x18\x05 \x01(\x0b\x32\x10.message.Account\x12\'\n\npermission\x18\x06 \x01(\x0b\x32\x13.message.Permission\x12(\n\x0b\x65xpire_info\x18\x07 \x01(\x0b\x32\x13.message.ExpireInfo\x12)\n\x0c\x66ilter_rules\x18\x08 \x03(\x0b\x32\x13.message.CommandACL\x12\"\n\x08gateways\x18\t \x03(\x0b\x32\x10.message.Gateway\x12*\n\x07setting\x18\n \x01(\x0b\x32\x19.message.ComponentSetting\x12#\n\x08platform\x18\x0b \x01(\x0b\x32\x11.message.Platform\x12\x18\n\x10\x46\x61\x63\x65MonitorToken\x18\x0c \x01(\t\"\x83\x01\n\x08Platform\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08\x63\x61tegory\x18\x03 \x01(\t\x12\x0f\n\x07\x63harset\x18\x04 \x01(\t\x12\x0c\n\x04type\x18\x05 \x01(\t\x12,\n\tprotocols\x18\x06 \x03(\x0b\x32\x19.message.PlatformProtocol\"\xa6\x01\n\x10PlatformProtocol\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\x05\x12\x39\n\x08settings\x18\x04 \x03(\x0b\x32\'.message.PlatformProtocol.SettingsEntry\x1a/\n\rSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"C\n\x10\x43omponentSetting\x12\x15\n\rmax_idle_time\x18\x01 \x01(\x05\x12\x18\n\x10max_session_time\x18\x02 \x01(\x05\"1\n\x07\x46orward\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04Host\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\x05\"\xa7\x01\n\rPublicSetting\x12\x15\n\rxpack_enabled\x18\x01 \x01(\x08\x12\x15\n\rvalid_license\x18\x02 \x01(\x08\x12\x14\n\x0cgpt_base_url\x18\x03 \x01(\t\x12\x13\n\x0bgpt_api_key\x18\x04 \x01(\t\x12\x11\n\tgpt_proxy\x18\x05 \x01(\t\x12\x11\n\tgpt_model\x18\x06 \x01(\t\x12\x17\n\x0flicense_content\x18\x07 \x01(\t\"%\n\x06\x43ookie\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\xa8\x03\n\x10LifecycleLogData\x12\x33\n\x05\x65vent\x18\x01 \x01(\x0e\x32$.message.LifecycleLogData.event_type\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\x0c\n\x04user\x18\x03 \x01(\t\"\xc0\x02\n\nevent_type\x12\x17\n\x13\x41ssetConnectSuccess\x10\x00\x12\x18\n\x14\x41ssetConnectFinished\x10\x01\x12\x13\n\x0f\x43reateShareLink\x10\x02\x12\x13\n\x0fUserJoinSession\x10\x03\x12\x14\n\x10UserLeaveSession\x10\x04\x12\x14\n\x10\x41\x64minJoinMonitor\x10\x05\x12\x14\n\x10\x41\x64minExitMonitor\x10\x06\x12\x16\n\x12ReplayConvertStart\x10\x07\x12\x18\n\x14ReplayConvertSuccess\x10\x08\x12\x18\n\x14ReplayConvertFailure\x10\t\x12\x15\n\x11ReplayUploadStart\x10\n\x12\x17\n\x13ReplayUploadSuccess\x10\x0b\x12\x17\n\x13ReplayUploadFailure\x10\x0c*k\n\nTaskAction\x12\x0f\n\x0bKillSession\x10\x00\x12\x0f\n\x0bLockSession\x10\x01\x12\x11\n\rUnlockSession\x10\x02\x12\x14\n\x10TokenPermExpired\x10\x03\x12\x12\n\x0eTokenPermValid\x10\x04*f\n\tRiskLevel\x12\n\n\x06Normal\x10\x00\x12\x0b\n\x07Warning\x10\x01\x12\n\n\x06Reject\x10\x02\x12\x10\n\x0cReviewReject\x10\x03\x12\x10\n\x0cReviewAccept\x10\x04\x12\x10\n\x0cReviewCancel\x10\x05\x42 \n\x13org.jumpserver.wispZ\t/protobufb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'common_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\023org.jumpserver.wispZ\t/protobuf' + _globals['_PLATFORMPROTOCOL_SETTINGSENTRY']._loaded_options = None + _globals['_PLATFORMPROTOCOL_SETTINGSENTRY']._serialized_options = b'8\001' + _globals['_TASKACTION']._serialized_start=3490 + _globals['_TASKACTION']._serialized_end=3597 + _globals['_RISKLEVEL']._serialized_start=3599 + _globals['_RISKLEVEL']._serialized_end=3701 + _globals['_USER']._serialized_start=25 + _globals['_USER']._serialized_end=126 + _globals['_ACCOUNT']._serialized_start=128 + _globals['_ACCOUNT']._serialized_end=238 + _globals['_LABELVALUE']._serialized_start=240 + _globals['_LABELVALUE']._serialized_end=282 + _globals['_ASSET']._serialized_start=285 + _globals['_ASSET']._serialized_end=738 + _globals['_ASSET_SPECIFIC']._serialized_start=453 + _globals['_ASSET_SPECIFIC']._serialized_end=738 + _globals['_PROTOCOL']._serialized_start=740 + _globals['_PROTOCOL']._serialized_end=790 + _globals['_GATEWAY']._serialized_start=793 + _globals['_GATEWAY']._serialized_end=929 + _globals['_PERMISSION']._serialized_start=931 + _globals['_PERMISSION']._serialized_end=1058 + _globals['_COMMANDACL']._serialized_start=1061 + _globals['_COMMANDACL']._serialized_end=1318 + _globals['_COMMANDACL_ACTION']._serialized_start=1229 + _globals['_COMMANDACL_ACTION']._serialized_end=1318 + _globals['_COMMANDGROUP']._serialized_start=1320 + _globals['_COMMANDGROUP']._serialized_end=1429 + _globals['_EXPIREINFO']._serialized_start=1431 + _globals['_EXPIREINFO']._serialized_end=1462 + _globals['_SESSION']._serialized_start=1465 + _globals['_SESSION']._serialized_end=1773 + _globals['_SESSION_LOGINFROM']._serialized_start=1730 + _globals['_SESSION_LOGINFROM']._serialized_end=1773 + _globals['_TOKENSTATUS']._serialized_start=1775 + _globals['_TOKENSTATUS']._serialized_end=1838 + _globals['_TERMINALTASK']._serialized_start=1841 + _globals['_TERMINALTASK']._serialized_end=2011 + _globals['_TOKENAUTHINFO']._serialized_start=2014 + _globals['_TOKENAUTHINFO']._serialized_end=2429 + _globals['_PLATFORM']._serialized_start=2432 + _globals['_PLATFORM']._serialized_end=2563 + _globals['_PLATFORMPROTOCOL']._serialized_start=2566 + _globals['_PLATFORMPROTOCOL']._serialized_end=2732 + _globals['_PLATFORMPROTOCOL_SETTINGSENTRY']._serialized_start=2685 + _globals['_PLATFORMPROTOCOL_SETTINGSENTRY']._serialized_end=2732 + _globals['_COMPONENTSETTING']._serialized_start=2734 + _globals['_COMPONENTSETTING']._serialized_end=2801 + _globals['_FORWARD']._serialized_start=2803 + _globals['_FORWARD']._serialized_end=2852 + _globals['_PUBLICSETTING']._serialized_start=2855 + _globals['_PUBLICSETTING']._serialized_end=3022 + _globals['_COOKIE']._serialized_start=3024 + _globals['_COOKIE']._serialized_end=3061 + _globals['_LIFECYCLELOGDATA']._serialized_start=3064 + _globals['_LIFECYCLELOGDATA']._serialized_end=3488 + _globals['_LIFECYCLELOGDATA_EVENT_TYPE']._serialized_start=3168 + _globals['_LIFECYCLELOGDATA_EVENT_TYPE']._serialized_end=3488 +# @@protoc_insertion_point(module_scope) diff --git a/protobuf-py/protobuf/common_pb2.pyi b/protobuf-py/protobuf/common_pb2.pyi new file mode 100644 index 0000000..3347b4a --- /dev/null +++ b/protobuf-py/protobuf/common_pb2.pyi @@ -0,0 +1,428 @@ +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TaskAction(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + KillSession: _ClassVar[TaskAction] + LockSession: _ClassVar[TaskAction] + UnlockSession: _ClassVar[TaskAction] + TokenPermExpired: _ClassVar[TaskAction] + TokenPermValid: _ClassVar[TaskAction] + +class RiskLevel(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + Normal: _ClassVar[RiskLevel] + Warning: _ClassVar[RiskLevel] + Reject: _ClassVar[RiskLevel] + ReviewReject: _ClassVar[RiskLevel] + ReviewAccept: _ClassVar[RiskLevel] + ReviewCancel: _ClassVar[RiskLevel] +KillSession: TaskAction +LockSession: TaskAction +UnlockSession: TaskAction +TokenPermExpired: TaskAction +TokenPermValid: TaskAction +Normal: RiskLevel +Warning: RiskLevel +Reject: RiskLevel +ReviewReject: RiskLevel +ReviewAccept: RiskLevel +ReviewCancel: RiskLevel + +class User(_message.Message): + __slots__ = ("id", "name", "username", "role", "is_valid", "is_active") + ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + USERNAME_FIELD_NUMBER: _ClassVar[int] + ROLE_FIELD_NUMBER: _ClassVar[int] + IS_VALID_FIELD_NUMBER: _ClassVar[int] + IS_ACTIVE_FIELD_NUMBER: _ClassVar[int] + id: str + name: str + username: str + role: str + is_valid: bool + is_active: bool + def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., username: _Optional[str] = ..., role: _Optional[str] = ..., is_valid: bool = ..., is_active: bool = ...) -> None: ... + +class Account(_message.Message): + __slots__ = ("id", "name", "username", "secret", "secretType") + ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + USERNAME_FIELD_NUMBER: _ClassVar[int] + SECRET_FIELD_NUMBER: _ClassVar[int] + SECRETTYPE_FIELD_NUMBER: _ClassVar[int] + id: str + name: str + username: str + secret: str + secretType: LabelValue + def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., username: _Optional[str] = ..., secret: _Optional[str] = ..., secretType: _Optional[_Union[LabelValue, _Mapping]] = ...) -> None: ... + +class LabelValue(_message.Message): + __slots__ = ("label", "value") + LABEL_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + label: str + value: str + def __init__(self, label: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + +class Asset(_message.Message): + __slots__ = ("id", "name", "address", "org_id", "org_name", "protocols", "specific") + class Specific(_message.Message): + __slots__ = ("db_name", "use_ssl", "ca_cert", "client_cert", "client_key", "allow_invalid_cert", "auto_fill", "username_selector", "password_selector", "submit_selector", "script", "http_proxy", "pg_ssl_mode") + DB_NAME_FIELD_NUMBER: _ClassVar[int] + USE_SSL_FIELD_NUMBER: _ClassVar[int] + CA_CERT_FIELD_NUMBER: _ClassVar[int] + CLIENT_CERT_FIELD_NUMBER: _ClassVar[int] + CLIENT_KEY_FIELD_NUMBER: _ClassVar[int] + ALLOW_INVALID_CERT_FIELD_NUMBER: _ClassVar[int] + AUTO_FILL_FIELD_NUMBER: _ClassVar[int] + USERNAME_SELECTOR_FIELD_NUMBER: _ClassVar[int] + PASSWORD_SELECTOR_FIELD_NUMBER: _ClassVar[int] + SUBMIT_SELECTOR_FIELD_NUMBER: _ClassVar[int] + SCRIPT_FIELD_NUMBER: _ClassVar[int] + HTTP_PROXY_FIELD_NUMBER: _ClassVar[int] + PG_SSL_MODE_FIELD_NUMBER: _ClassVar[int] + db_name: str + use_ssl: bool + ca_cert: str + client_cert: str + client_key: str + allow_invalid_cert: bool + auto_fill: str + username_selector: str + password_selector: str + submit_selector: str + script: str + http_proxy: str + pg_ssl_mode: str + def __init__(self, db_name: _Optional[str] = ..., use_ssl: bool = ..., ca_cert: _Optional[str] = ..., client_cert: _Optional[str] = ..., client_key: _Optional[str] = ..., allow_invalid_cert: bool = ..., auto_fill: _Optional[str] = ..., username_selector: _Optional[str] = ..., password_selector: _Optional[str] = ..., submit_selector: _Optional[str] = ..., script: _Optional[str] = ..., http_proxy: _Optional[str] = ..., pg_ssl_mode: _Optional[str] = ...) -> None: ... + ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + ADDRESS_FIELD_NUMBER: _ClassVar[int] + ORG_ID_FIELD_NUMBER: _ClassVar[int] + ORG_NAME_FIELD_NUMBER: _ClassVar[int] + PROTOCOLS_FIELD_NUMBER: _ClassVar[int] + SPECIFIC_FIELD_NUMBER: _ClassVar[int] + id: str + name: str + address: str + org_id: str + org_name: str + protocols: _containers.RepeatedCompositeFieldContainer[Protocol] + specific: Asset.Specific + def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., address: _Optional[str] = ..., org_id: _Optional[str] = ..., org_name: _Optional[str] = ..., protocols: _Optional[_Iterable[_Union[Protocol, _Mapping]]] = ..., specific: _Optional[_Union[Asset.Specific, _Mapping]] = ...) -> None: ... + +class Protocol(_message.Message): + __slots__ = ("name", "id", "port") + NAME_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + PORT_FIELD_NUMBER: _ClassVar[int] + name: str + id: int + port: int + def __init__(self, name: _Optional[str] = ..., id: _Optional[int] = ..., port: _Optional[int] = ...) -> None: ... + +class Gateway(_message.Message): + __slots__ = ("id", "name", "ip", "port", "protocol", "username", "password", "private_key") + ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + IP_FIELD_NUMBER: _ClassVar[int] + PORT_FIELD_NUMBER: _ClassVar[int] + PROTOCOL_FIELD_NUMBER: _ClassVar[int] + USERNAME_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + PRIVATE_KEY_FIELD_NUMBER: _ClassVar[int] + id: str + name: str + ip: str + port: int + protocol: str + username: str + password: str + private_key: str + def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., ip: _Optional[str] = ..., port: _Optional[int] = ..., protocol: _Optional[str] = ..., username: _Optional[str] = ..., password: _Optional[str] = ..., private_key: _Optional[str] = ...) -> None: ... + +class Permission(_message.Message): + __slots__ = ("enable_connect", "enable_download", "enable_upload", "enable_copy", "enable_paste") + ENABLE_CONNECT_FIELD_NUMBER: _ClassVar[int] + ENABLE_DOWNLOAD_FIELD_NUMBER: _ClassVar[int] + ENABLE_UPLOAD_FIELD_NUMBER: _ClassVar[int] + ENABLE_COPY_FIELD_NUMBER: _ClassVar[int] + ENABLE_PASTE_FIELD_NUMBER: _ClassVar[int] + enable_connect: bool + enable_download: bool + enable_upload: bool + enable_copy: bool + enable_paste: bool + def __init__(self, enable_connect: bool = ..., enable_download: bool = ..., enable_upload: bool = ..., enable_copy: bool = ..., enable_paste: bool = ...) -> None: ... + +class CommandACL(_message.Message): + __slots__ = ("id", "name", "priority", "action", "is_active", "command_groups") + class Action(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + Reject: _ClassVar[CommandACL.Action] + Accept: _ClassVar[CommandACL.Action] + Review: _ClassVar[CommandACL.Action] + Warning: _ClassVar[CommandACL.Action] + NotifyWarning: _ClassVar[CommandACL.Action] + Unknown: _ClassVar[CommandACL.Action] + Reject: CommandACL.Action + Accept: CommandACL.Action + Review: CommandACL.Action + Warning: CommandACL.Action + NotifyWarning: CommandACL.Action + Unknown: CommandACL.Action + ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + PRIORITY_FIELD_NUMBER: _ClassVar[int] + ACTION_FIELD_NUMBER: _ClassVar[int] + IS_ACTIVE_FIELD_NUMBER: _ClassVar[int] + COMMAND_GROUPS_FIELD_NUMBER: _ClassVar[int] + id: str + name: str + priority: int + action: CommandACL.Action + is_active: bool + command_groups: _containers.RepeatedCompositeFieldContainer[CommandGroup] + def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., priority: _Optional[int] = ..., action: _Optional[_Union[CommandACL.Action, str]] = ..., is_active: bool = ..., command_groups: _Optional[_Iterable[_Union[CommandGroup, _Mapping]]] = ...) -> None: ... + +class CommandGroup(_message.Message): + __slots__ = ("id", "name", "content", "Type", "pattern", "ignore_case") + ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + CONTENT_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + PATTERN_FIELD_NUMBER: _ClassVar[int] + IGNORE_CASE_FIELD_NUMBER: _ClassVar[int] + id: str + name: str + content: str + Type: str + pattern: str + ignore_case: bool + def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., content: _Optional[str] = ..., Type: _Optional[str] = ..., pattern: _Optional[str] = ..., ignore_case: bool = ...) -> None: ... + +class ExpireInfo(_message.Message): + __slots__ = ("expire_at",) + EXPIRE_AT_FIELD_NUMBER: _ClassVar[int] + expire_at: int + def __init__(self, expire_at: _Optional[int] = ...) -> None: ... + +class Session(_message.Message): + __slots__ = ("id", "user", "asset", "account", "login_from", "remote_addr", "protocol", "date_start", "org_id", "user_id", "asset_id", "account_id", "token_id") + class LoginFrom(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + WT: _ClassVar[Session.LoginFrom] + ST: _ClassVar[Session.LoginFrom] + RT: _ClassVar[Session.LoginFrom] + DT: _ClassVar[Session.LoginFrom] + WT: Session.LoginFrom + ST: Session.LoginFrom + RT: Session.LoginFrom + DT: Session.LoginFrom + ID_FIELD_NUMBER: _ClassVar[int] + USER_FIELD_NUMBER: _ClassVar[int] + ASSET_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_FIELD_NUMBER: _ClassVar[int] + LOGIN_FROM_FIELD_NUMBER: _ClassVar[int] + REMOTE_ADDR_FIELD_NUMBER: _ClassVar[int] + PROTOCOL_FIELD_NUMBER: _ClassVar[int] + DATE_START_FIELD_NUMBER: _ClassVar[int] + ORG_ID_FIELD_NUMBER: _ClassVar[int] + USER_ID_FIELD_NUMBER: _ClassVar[int] + ASSET_ID_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + TOKEN_ID_FIELD_NUMBER: _ClassVar[int] + id: str + user: str + asset: str + account: str + login_from: Session.LoginFrom + remote_addr: str + protocol: str + date_start: int + org_id: str + user_id: str + asset_id: str + account_id: str + token_id: str + def __init__(self, id: _Optional[str] = ..., user: _Optional[str] = ..., asset: _Optional[str] = ..., account: _Optional[str] = ..., login_from: _Optional[_Union[Session.LoginFrom, str]] = ..., remote_addr: _Optional[str] = ..., protocol: _Optional[str] = ..., date_start: _Optional[int] = ..., org_id: _Optional[str] = ..., user_id: _Optional[str] = ..., asset_id: _Optional[str] = ..., account_id: _Optional[str] = ..., token_id: _Optional[str] = ...) -> None: ... + +class TokenStatus(_message.Message): + __slots__ = ("code", "detail", "is_expired") + CODE_FIELD_NUMBER: _ClassVar[int] + DETAIL_FIELD_NUMBER: _ClassVar[int] + IS_EXPIRED_FIELD_NUMBER: _ClassVar[int] + code: str + detail: str + is_expired: bool + def __init__(self, code: _Optional[str] = ..., detail: _Optional[str] = ..., is_expired: bool = ...) -> None: ... + +class TerminalTask(_message.Message): + __slots__ = ("id", "action", "session_id", "terminated_by", "created_by", "token_status") + ID_FIELD_NUMBER: _ClassVar[int] + ACTION_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + TERMINATED_BY_FIELD_NUMBER: _ClassVar[int] + CREATED_BY_FIELD_NUMBER: _ClassVar[int] + TOKEN_STATUS_FIELD_NUMBER: _ClassVar[int] + id: str + action: TaskAction + session_id: str + terminated_by: str + created_by: str + token_status: TokenStatus + def __init__(self, id: _Optional[str] = ..., action: _Optional[_Union[TaskAction, str]] = ..., session_id: _Optional[str] = ..., terminated_by: _Optional[str] = ..., created_by: _Optional[str] = ..., token_status: _Optional[_Union[TokenStatus, _Mapping]] = ...) -> None: ... + +class TokenAuthInfo(_message.Message): + __slots__ = ("key_id", "secrete_id", "asset", "user", "account", "permission", "expire_info", "filter_rules", "gateways", "setting", "platform", "FaceMonitorToken") + KEY_ID_FIELD_NUMBER: _ClassVar[int] + SECRETE_ID_FIELD_NUMBER: _ClassVar[int] + ASSET_FIELD_NUMBER: _ClassVar[int] + USER_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_FIELD_NUMBER: _ClassVar[int] + PERMISSION_FIELD_NUMBER: _ClassVar[int] + EXPIRE_INFO_FIELD_NUMBER: _ClassVar[int] + FILTER_RULES_FIELD_NUMBER: _ClassVar[int] + GATEWAYS_FIELD_NUMBER: _ClassVar[int] + SETTING_FIELD_NUMBER: _ClassVar[int] + PLATFORM_FIELD_NUMBER: _ClassVar[int] + FACEMONITORTOKEN_FIELD_NUMBER: _ClassVar[int] + key_id: str + secrete_id: str + asset: Asset + user: User + account: Account + permission: Permission + expire_info: ExpireInfo + filter_rules: _containers.RepeatedCompositeFieldContainer[CommandACL] + gateways: _containers.RepeatedCompositeFieldContainer[Gateway] + setting: ComponentSetting + platform: Platform + FaceMonitorToken: str + def __init__(self, key_id: _Optional[str] = ..., secrete_id: _Optional[str] = ..., asset: _Optional[_Union[Asset, _Mapping]] = ..., user: _Optional[_Union[User, _Mapping]] = ..., account: _Optional[_Union[Account, _Mapping]] = ..., permission: _Optional[_Union[Permission, _Mapping]] = ..., expire_info: _Optional[_Union[ExpireInfo, _Mapping]] = ..., filter_rules: _Optional[_Iterable[_Union[CommandACL, _Mapping]]] = ..., gateways: _Optional[_Iterable[_Union[Gateway, _Mapping]]] = ..., setting: _Optional[_Union[ComponentSetting, _Mapping]] = ..., platform: _Optional[_Union[Platform, _Mapping]] = ..., FaceMonitorToken: _Optional[str] = ...) -> None: ... + +class Platform(_message.Message): + __slots__ = ("id", "name", "category", "charset", "type", "protocols") + ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + CATEGORY_FIELD_NUMBER: _ClassVar[int] + CHARSET_FIELD_NUMBER: _ClassVar[int] + TYPE_FIELD_NUMBER: _ClassVar[int] + PROTOCOLS_FIELD_NUMBER: _ClassVar[int] + id: int + name: str + category: str + charset: str + type: str + protocols: _containers.RepeatedCompositeFieldContainer[PlatformProtocol] + def __init__(self, id: _Optional[int] = ..., name: _Optional[str] = ..., category: _Optional[str] = ..., charset: _Optional[str] = ..., type: _Optional[str] = ..., protocols: _Optional[_Iterable[_Union[PlatformProtocol, _Mapping]]] = ...) -> None: ... + +class PlatformProtocol(_message.Message): + __slots__ = ("id", "name", "port", "settings") + class SettingsEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + PORT_FIELD_NUMBER: _ClassVar[int] + SETTINGS_FIELD_NUMBER: _ClassVar[int] + id: int + name: str + port: int + settings: _containers.ScalarMap[str, str] + def __init__(self, id: _Optional[int] = ..., name: _Optional[str] = ..., port: _Optional[int] = ..., settings: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class ComponentSetting(_message.Message): + __slots__ = ("max_idle_time", "max_session_time") + MAX_IDLE_TIME_FIELD_NUMBER: _ClassVar[int] + MAX_SESSION_TIME_FIELD_NUMBER: _ClassVar[int] + max_idle_time: int + max_session_time: int + def __init__(self, max_idle_time: _Optional[int] = ..., max_session_time: _Optional[int] = ...) -> None: ... + +class Forward(_message.Message): + __slots__ = ("id", "Host", "port") + ID_FIELD_NUMBER: _ClassVar[int] + HOST_FIELD_NUMBER: _ClassVar[int] + PORT_FIELD_NUMBER: _ClassVar[int] + id: str + Host: str + port: int + def __init__(self, id: _Optional[str] = ..., Host: _Optional[str] = ..., port: _Optional[int] = ...) -> None: ... + +class PublicSetting(_message.Message): + __slots__ = ("xpack_enabled", "valid_license", "gpt_base_url", "gpt_api_key", "gpt_proxy", "gpt_model", "license_content") + XPACK_ENABLED_FIELD_NUMBER: _ClassVar[int] + VALID_LICENSE_FIELD_NUMBER: _ClassVar[int] + GPT_BASE_URL_FIELD_NUMBER: _ClassVar[int] + GPT_API_KEY_FIELD_NUMBER: _ClassVar[int] + GPT_PROXY_FIELD_NUMBER: _ClassVar[int] + GPT_MODEL_FIELD_NUMBER: _ClassVar[int] + LICENSE_CONTENT_FIELD_NUMBER: _ClassVar[int] + xpack_enabled: bool + valid_license: bool + gpt_base_url: str + gpt_api_key: str + gpt_proxy: str + gpt_model: str + license_content: str + def __init__(self, xpack_enabled: bool = ..., valid_license: bool = ..., gpt_base_url: _Optional[str] = ..., gpt_api_key: _Optional[str] = ..., gpt_proxy: _Optional[str] = ..., gpt_model: _Optional[str] = ..., license_content: _Optional[str] = ...) -> None: ... + +class Cookie(_message.Message): + __slots__ = ("name", "value") + NAME_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + name: str + value: str + def __init__(self, name: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + +class LifecycleLogData(_message.Message): + __slots__ = ("event", "reason", "user") + class event_type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + AssetConnectSuccess: _ClassVar[LifecycleLogData.event_type] + AssetConnectFinished: _ClassVar[LifecycleLogData.event_type] + CreateShareLink: _ClassVar[LifecycleLogData.event_type] + UserJoinSession: _ClassVar[LifecycleLogData.event_type] + UserLeaveSession: _ClassVar[LifecycleLogData.event_type] + AdminJoinMonitor: _ClassVar[LifecycleLogData.event_type] + AdminExitMonitor: _ClassVar[LifecycleLogData.event_type] + ReplayConvertStart: _ClassVar[LifecycleLogData.event_type] + ReplayConvertSuccess: _ClassVar[LifecycleLogData.event_type] + ReplayConvertFailure: _ClassVar[LifecycleLogData.event_type] + ReplayUploadStart: _ClassVar[LifecycleLogData.event_type] + ReplayUploadSuccess: _ClassVar[LifecycleLogData.event_type] + ReplayUploadFailure: _ClassVar[LifecycleLogData.event_type] + AssetConnectSuccess: LifecycleLogData.event_type + AssetConnectFinished: LifecycleLogData.event_type + CreateShareLink: LifecycleLogData.event_type + UserJoinSession: LifecycleLogData.event_type + UserLeaveSession: LifecycleLogData.event_type + AdminJoinMonitor: LifecycleLogData.event_type + AdminExitMonitor: LifecycleLogData.event_type + ReplayConvertStart: LifecycleLogData.event_type + ReplayConvertSuccess: LifecycleLogData.event_type + ReplayConvertFailure: LifecycleLogData.event_type + ReplayUploadStart: LifecycleLogData.event_type + ReplayUploadSuccess: LifecycleLogData.event_type + ReplayUploadFailure: LifecycleLogData.event_type + EVENT_FIELD_NUMBER: _ClassVar[int] + REASON_FIELD_NUMBER: _ClassVar[int] + USER_FIELD_NUMBER: _ClassVar[int] + event: LifecycleLogData.event_type + reason: str + user: str + def __init__(self, event: _Optional[_Union[LifecycleLogData.event_type, str]] = ..., reason: _Optional[str] = ..., user: _Optional[str] = ...) -> None: ... diff --git a/protobuf-py/protobuf/common_pb2_grpc.py b/protobuf-py/protobuf/common_pb2_grpc.py new file mode 100644 index 0000000..b4464be --- /dev/null +++ b/protobuf-py/protobuf/common_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.74.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + f' but the generated code in common_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/protobuf-py/protobuf/service_pb2.py b/protobuf-py/protobuf/service_pb2.py new file mode 100644 index 0000000..17187db --- /dev/null +++ b/protobuf-py/protobuf/service_pb2.py @@ -0,0 +1,132 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: service.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'service.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import common_pb2 as common__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rservice.proto\x12\x07message\x1a\x0c\x63ommon.proto\"H\n\x16JoinFaceMonitorRequest\x12\x1a\n\x12\x66\x61\x63\x65_monitor_token\x18\x01 \x01(\t\x12\x12\n\nsession_id\x18\x02 \x01(\t\":\n\x17JoinFaceMonitorResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\"\x8c\x01\n\x1a\x46\x61\x63\x65MonitorCallbackRequest\x12\r\n\x05token\x18\x01 \x01(\t\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12\x15\n\rerror_message\x18\x03 \x01(\t\x12\x13\n\x0bis_finished\x18\x04 \x01(\x08\x12\x0e\n\x06\x61\x63tion\x18\x05 \x01(\t\x12\x12\n\nface_codes\x18\x06 \x03(\t\">\n\x1b\x46\x61\x63\x65MonitorCallbackResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\"j\n\x1e\x46\x61\x63\x65RecognitionCallbackRequest\x12\r\n\x05token\x18\x01 \x01(\t\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12\x15\n\rerror_message\x18\x03 \x01(\t\x12\x11\n\tface_code\x18\x04 \x01(\t\"B\n\x1f\x46\x61\x63\x65RecognitionCallbackResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\"V\n\x17\x41ssetLoginTicketRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x10\n\x08\x61sset_id\x18\x02 \x01(\t\x12\x18\n\x10\x61\x63\x63ount_username\x18\x04 \x01(\t\"\x8e\x01\n\x18\x41ssetLoginTicketResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\x12(\n\x0bticket_info\x18\x02 \x01(\x0b\x32\x13.message.TicketInfo\x12\x14\n\x0cneed_confirm\x18\x03 \x01(\x08\x12\x11\n\tticket_id\x18\x04 \x01(\t\"!\n\x06Status\x12\n\n\x02ok\x18\x01 \x01(\x08\x12\x0b\n\x03\x65rr\x18\x02 \x01(\t\"\x1d\n\x0cTokenRequest\x12\r\n\x05token\x18\x01 \x01(\t\"V\n\rTokenResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.message.TokenAuthInfo\"6\n\x14SessionCreateRequest\x12\x1e\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x10.message.Session\"X\n\x15SessionCreateResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\x12\x1e\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x10.message.Session\"R\n\x14SessionFinishRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12\x10\n\x08\x64\x61te_end\x18\x03 \x01(\x03\x12\x0b\n\x03\x65rr\x18\x04 \x01(\t\"4\n\x11SessionFinishResp\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\"=\n\rReplayRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x18\n\x10replay_file_path\x18\x02 \x01(\t\"1\n\x0eReplayResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\"\xdf\x01\n\x0e\x43ommandRequest\x12\x0b\n\x03sid\x18\x01 \x01(\t\x12\x0e\n\x06org_id\x18\x02 \x01(\t\x12\r\n\x05input\x18\x03 \x01(\t\x12\x0e\n\x06output\x18\x04 \x01(\t\x12\x0c\n\x04user\x18\x05 \x01(\t\x12\r\n\x05\x61sset\x18\x06 \x01(\t\x12\x0f\n\x07\x61\x63\x63ount\x18\x07 \x01(\t\x12\x11\n\ttimestamp\x18\x08 \x01(\x03\x12&\n\nrisk_level\x18\t \x01(\x0e\x32\x12.message.RiskLevel\x12\x12\n\ncmd_acl_id\x18\n \x01(\t\x12\x14\n\x0c\x63md_group_id\x18\x0b \x01(\t\"2\n\x0f\x43ommandResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\"&\n\x13\x46inishedTaskRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\"3\n\x0cTaskResponse\x12#\n\x04task\x18\x01 \x01(\x0b\x32\x15.message.TerminalTask\")\n\x13RemainReplayRequest\x12\x12\n\nreplay_dir\x18\x01 \x01(\t\"{\n\x14RemainReplayResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\x12\x15\n\rsuccess_files\x18\x02 \x03(\t\x12\x15\n\rfailure_files\x18\x03 \x03(\t\x12\x14\n\x0c\x66\x61ilure_errs\x18\x04 \x03(\t\"1\n\x0eStatusResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\"L\n\x15\x43ommandConfirmRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12\x12\n\ncmd_acl_id\x18\x02 \x01(\t\x12\x0b\n\x03\x63md\x18\x03 \x01(\t\"&\n\x07ReqInfo\x12\x0e\n\x06method\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\"\\\n\x16\x43ommandConfirmResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\x12!\n\x04info\x18\x02 \x01(\x0b\x32\x13.message.TicketInfo\"\x85\x01\n\nTicketInfo\x12#\n\tcheck_req\x18\x01 \x01(\x0b\x32\x10.message.ReqInfo\x12$\n\ncancel_req\x18\x02 \x01(\x0b\x32\x10.message.ReqInfo\x12\x19\n\x11ticket_detail_url\x18\x03 \x01(\t\x12\x11\n\treviewers\x18\x04 \x03(\t\".\n\rTicketRequest\x12\x1d\n\x03req\x18\x01 \x01(\x0b\x32\x10.message.ReqInfo\"Z\n\x13TicketStateResponse\x12\"\n\x04\x44\x61ta\x18\x01 \x01(\x0b\x32\x14.message.TicketState\x12\x1f\n\x06status\x18\x02 \x01(\x0b\x32\x0f.message.Status\"\x86\x01\n\x0bTicketState\x12)\n\x05state\x18\x01 \x01(\x0e\x32\x1a.message.TicketState.State\x12\x11\n\tprocessor\x18\x02 \x01(\t\"9\n\x05State\x12\x08\n\x04Open\x10\x00\x12\x0c\n\x08\x41pproved\x10\x01\x12\x0c\n\x08Rejected\x10\x02\x12\n\n\x06\x43losed\x10\x03\"P\n\x0e\x46orwardRequest\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\x05\x12\"\n\x08gateways\x18\x03 \x03(\x0b\x32\x10.message.Gateway\"\"\n\x14\x46orwardDeleteRequest\x12\n\n\x02id\x18\x01 \x01(\t\"Z\n\x0f\x46orwardResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\x12\n\n\x02id\x18\x02 \x01(\t\x12\x0c\n\x04host\x18\x03 \x01(\t\x12\x0c\n\x04port\x18\x04 \x01(\x05\"^\n\x15PublicSettingResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.message.PublicSetting\"\x07\n\x05\x45mpty\"D\n\x12ListenPortResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\x12\r\n\x05ports\x18\x02 \x03(\x05\"\x1f\n\x0fPortInfoRequest\x12\x0c\n\x04port\x18\x01 \x01(\x05\"T\n\x10PortInfoResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\x12\x1f\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x11.message.PortInfo\"M\n\x08PortInfo\x12\x1d\n\x05\x61sset\x18\x01 \x01(\x0b\x32\x0e.message.Asset\x12\"\n\x08gateways\x18\x02 \x03(\x0b\x32\x10.message.Gateway\"+\n\x0bPortFailure\x12\x0c\n\x04port\x18\x01 \x01(\x05\x12\x0e\n\x06reason\x18\x02 \x01(\t\"8\n\x12PortFailureRequest\x12\"\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32\x14.message.PortFailure\"2\n\x0e\x43ookiesRequest\x12 \n\x07\x63ookies\x18\x01 \x03(\x0b\x32\x0f.message.Cookie\"L\n\x0cUserResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\x12\x1b\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\r.message.User\"\xce\x03\n\x1aSessionLifecycleLogRequest\x12\x12\n\nsession_id\x18\x01 \x01(\t\x12<\n\x05\x65vent\x18\x02 \x01(\x0e\x32-.message.SessionLifecycleLogRequest.EventType\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12\x0c\n\x04user\x18\x04 \x01(\t\"\xbf\x02\n\tEventType\x12\x17\n\x13\x41ssetConnectSuccess\x10\x00\x12\x18\n\x14\x41ssetConnectFinished\x10\x01\x12\x13\n\x0f\x43reateShareLink\x10\x02\x12\x13\n\x0fUserJoinSession\x10\x03\x12\x14\n\x10UserLeaveSession\x10\x04\x12\x14\n\x10\x41\x64minJoinMonitor\x10\x05\x12\x14\n\x10\x41\x64minExitMonitor\x10\x06\x12\x16\n\x12ReplayConvertStart\x10\x07\x12\x18\n\x14ReplayConvertSuccess\x10\x08\x12\x18\n\x14ReplayConvertFailure\x10\t\x12\x15\n\x11ReplayUploadStart\x10\n\x12\x17\n\x13ReplayUploadSuccess\x10\x0b\x12\x17\n\x13ReplayUploadFailure\x10\x0c\x32\xa7\x0e\n\x07Service\x12\x43\n\x10GetTokenAuthInfo\x12\x15.message.TokenRequest\x1a\x16.message.TokenResponse\"\x00\x12>\n\nRenewToken\x12\x15.message.TokenRequest\x1a\x17.message.StatusResponse\"\x00\x12P\n\rCreateSession\x12\x1d.message.SessionCreateRequest\x1a\x1e.message.SessionCreateResponse\"\x00\x12L\n\rFinishSession\x12\x1d.message.SessionFinishRequest\x1a\x1a.message.SessionFinishResp\"\x00\x12\x45\n\x10UploadReplayFile\x12\x16.message.ReplayRequest\x1a\x17.message.ReplayResponse\"\x00\x12\x44\n\rUploadCommand\x12\x17.message.CommandRequest\x1a\x18.message.CommandResponse\"\x00\x12I\n\x0c\x44ispatchTask\x12\x1c.message.FinishedTaskRequest\x1a\x15.message.TaskResponse\"\x00(\x01\x30\x01\x12R\n\x11ScanRemainReplays\x12\x1c.message.RemainReplayRequest\x1a\x1d.message.RemainReplayResponse\"\x00\x12X\n\x13\x43reateCommandTicket\x12\x1e.message.CommandConfirmRequest\x1a\x1f.message.CommandConfirmResponse\"\x00\x12\x66\n\x1d\x43heckOrCreateAssetLoginTicket\x12 .message.AssetLoginTicketRequest\x1a!.message.AssetLoginTicketResponse\"\x00\x12J\n\x10\x43heckTicketState\x12\x16.message.TicketRequest\x1a\x1c.message.TicketStateResponse\"\x00\x12\x41\n\x0c\x43\x61ncelTicket\x12\x16.message.TicketRequest\x1a\x17.message.StatusResponse\"\x00\x12\x44\n\rCreateForward\x12\x17.message.ForwardRequest\x1a\x18.message.ForwardResponse\"\x00\x12I\n\rDeleteForward\x12\x1d.message.ForwardDeleteRequest\x1a\x17.message.StatusResponse\"\x00\x12\x44\n\x10GetPublicSetting\x12\x0e.message.Empty\x1a\x1e.message.PublicSettingResponse\"\x00\x12?\n\x0eGetListenPorts\x12\x0e.message.Empty\x1a\x1b.message.ListenPortResponse\"\x00\x12\x44\n\x0bGetPortInfo\x12\x18.message.PortInfoRequest\x1a\x19.message.PortInfoResponse\"\x00\x12K\n\x11HandlePortFailure\x12\x1b.message.PortFailureRequest\x1a\x17.message.StatusResponse\"\x00\x12\x46\n\x12\x43heckUserByCookies\x12\x17.message.CookiesRequest\x1a\x15.message.UserResponse\"\x00\x12[\n\x19RecordSessionLifecycleLog\x12#.message.SessionLifecycleLogRequest\x1a\x17.message.StatusResponse\"\x00\x12n\n\x17\x46\x61\x63\x65RecognitionCallback\x12\'.message.FaceRecognitionCallbackRequest\x1a(.message.FaceRecognitionCallbackResponse\"\x00\x12\x62\n\x13\x46\x61\x63\x65MonitorCallback\x12#.message.FaceMonitorCallbackRequest\x1a$.message.FaceMonitorCallbackResponse\"\x00\x12V\n\x0fJoinFaceMonitor\x12\x1f.message.JoinFaceMonitorRequest\x1a .message.JoinFaceMonitorResponse\"\x00\x42 \n\x13org.jumpserver.wispZ\t/protobufb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'service_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\023org.jumpserver.wispZ\t/protobuf' + _globals['_JOINFACEMONITORREQUEST']._serialized_start=40 + _globals['_JOINFACEMONITORREQUEST']._serialized_end=112 + _globals['_JOINFACEMONITORRESPONSE']._serialized_start=114 + _globals['_JOINFACEMONITORRESPONSE']._serialized_end=172 + _globals['_FACEMONITORCALLBACKREQUEST']._serialized_start=175 + _globals['_FACEMONITORCALLBACKREQUEST']._serialized_end=315 + _globals['_FACEMONITORCALLBACKRESPONSE']._serialized_start=317 + _globals['_FACEMONITORCALLBACKRESPONSE']._serialized_end=379 + _globals['_FACERECOGNITIONCALLBACKREQUEST']._serialized_start=381 + _globals['_FACERECOGNITIONCALLBACKREQUEST']._serialized_end=487 + _globals['_FACERECOGNITIONCALLBACKRESPONSE']._serialized_start=489 + _globals['_FACERECOGNITIONCALLBACKRESPONSE']._serialized_end=555 + _globals['_ASSETLOGINTICKETREQUEST']._serialized_start=557 + _globals['_ASSETLOGINTICKETREQUEST']._serialized_end=643 + _globals['_ASSETLOGINTICKETRESPONSE']._serialized_start=646 + _globals['_ASSETLOGINTICKETRESPONSE']._serialized_end=788 + _globals['_STATUS']._serialized_start=790 + _globals['_STATUS']._serialized_end=823 + _globals['_TOKENREQUEST']._serialized_start=825 + _globals['_TOKENREQUEST']._serialized_end=854 + _globals['_TOKENRESPONSE']._serialized_start=856 + _globals['_TOKENRESPONSE']._serialized_end=942 + _globals['_SESSIONCREATEREQUEST']._serialized_start=944 + _globals['_SESSIONCREATEREQUEST']._serialized_end=998 + _globals['_SESSIONCREATERESPONSE']._serialized_start=1000 + _globals['_SESSIONCREATERESPONSE']._serialized_end=1088 + _globals['_SESSIONFINISHREQUEST']._serialized_start=1090 + _globals['_SESSIONFINISHREQUEST']._serialized_end=1172 + _globals['_SESSIONFINISHRESP']._serialized_start=1174 + _globals['_SESSIONFINISHRESP']._serialized_end=1226 + _globals['_REPLAYREQUEST']._serialized_start=1228 + _globals['_REPLAYREQUEST']._serialized_end=1289 + _globals['_REPLAYRESPONSE']._serialized_start=1291 + _globals['_REPLAYRESPONSE']._serialized_end=1340 + _globals['_COMMANDREQUEST']._serialized_start=1343 + _globals['_COMMANDREQUEST']._serialized_end=1566 + _globals['_COMMANDRESPONSE']._serialized_start=1568 + _globals['_COMMANDRESPONSE']._serialized_end=1618 + _globals['_FINISHEDTASKREQUEST']._serialized_start=1620 + _globals['_FINISHEDTASKREQUEST']._serialized_end=1658 + _globals['_TASKRESPONSE']._serialized_start=1660 + _globals['_TASKRESPONSE']._serialized_end=1711 + _globals['_REMAINREPLAYREQUEST']._serialized_start=1713 + _globals['_REMAINREPLAYREQUEST']._serialized_end=1754 + _globals['_REMAINREPLAYRESPONSE']._serialized_start=1756 + _globals['_REMAINREPLAYRESPONSE']._serialized_end=1879 + _globals['_STATUSRESPONSE']._serialized_start=1881 + _globals['_STATUSRESPONSE']._serialized_end=1930 + _globals['_COMMANDCONFIRMREQUEST']._serialized_start=1932 + _globals['_COMMANDCONFIRMREQUEST']._serialized_end=2008 + _globals['_REQINFO']._serialized_start=2010 + _globals['_REQINFO']._serialized_end=2048 + _globals['_COMMANDCONFIRMRESPONSE']._serialized_start=2050 + _globals['_COMMANDCONFIRMRESPONSE']._serialized_end=2142 + _globals['_TICKETINFO']._serialized_start=2145 + _globals['_TICKETINFO']._serialized_end=2278 + _globals['_TICKETREQUEST']._serialized_start=2280 + _globals['_TICKETREQUEST']._serialized_end=2326 + _globals['_TICKETSTATERESPONSE']._serialized_start=2328 + _globals['_TICKETSTATERESPONSE']._serialized_end=2418 + _globals['_TICKETSTATE']._serialized_start=2421 + _globals['_TICKETSTATE']._serialized_end=2555 + _globals['_TICKETSTATE_STATE']._serialized_start=2498 + _globals['_TICKETSTATE_STATE']._serialized_end=2555 + _globals['_FORWARDREQUEST']._serialized_start=2557 + _globals['_FORWARDREQUEST']._serialized_end=2637 + _globals['_FORWARDDELETEREQUEST']._serialized_start=2639 + _globals['_FORWARDDELETEREQUEST']._serialized_end=2673 + _globals['_FORWARDRESPONSE']._serialized_start=2675 + _globals['_FORWARDRESPONSE']._serialized_end=2765 + _globals['_PUBLICSETTINGRESPONSE']._serialized_start=2767 + _globals['_PUBLICSETTINGRESPONSE']._serialized_end=2861 + _globals['_EMPTY']._serialized_start=2863 + _globals['_EMPTY']._serialized_end=2870 + _globals['_LISTENPORTRESPONSE']._serialized_start=2872 + _globals['_LISTENPORTRESPONSE']._serialized_end=2940 + _globals['_PORTINFOREQUEST']._serialized_start=2942 + _globals['_PORTINFOREQUEST']._serialized_end=2973 + _globals['_PORTINFORESPONSE']._serialized_start=2975 + _globals['_PORTINFORESPONSE']._serialized_end=3059 + _globals['_PORTINFO']._serialized_start=3061 + _globals['_PORTINFO']._serialized_end=3138 + _globals['_PORTFAILURE']._serialized_start=3140 + _globals['_PORTFAILURE']._serialized_end=3183 + _globals['_PORTFAILUREREQUEST']._serialized_start=3185 + _globals['_PORTFAILUREREQUEST']._serialized_end=3241 + _globals['_COOKIESREQUEST']._serialized_start=3243 + _globals['_COOKIESREQUEST']._serialized_end=3293 + _globals['_USERRESPONSE']._serialized_start=3295 + _globals['_USERRESPONSE']._serialized_end=3371 + _globals['_SESSIONLIFECYCLELOGREQUEST']._serialized_start=3374 + _globals['_SESSIONLIFECYCLELOGREQUEST']._serialized_end=3836 + _globals['_SESSIONLIFECYCLELOGREQUEST_EVENTTYPE']._serialized_start=3517 + _globals['_SESSIONLIFECYCLELOGREQUEST_EVENTTYPE']._serialized_end=3836 + _globals['_SERVICE']._serialized_start=3839 + _globals['_SERVICE']._serialized_end=5670 +# @@protoc_insertion_point(module_scope) diff --git a/protobuf-py/protobuf/service_pb2.pyi b/protobuf-py/protobuf/service_pb2.pyi new file mode 100644 index 0000000..99204a2 --- /dev/null +++ b/protobuf-py/protobuf/service_pb2.pyi @@ -0,0 +1,429 @@ +import common_pb2 as _common_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class JoinFaceMonitorRequest(_message.Message): + __slots__ = ("face_monitor_token", "session_id") + FACE_MONITOR_TOKEN_FIELD_NUMBER: _ClassVar[int] + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + face_monitor_token: str + session_id: str + def __init__(self, face_monitor_token: _Optional[str] = ..., session_id: _Optional[str] = ...) -> None: ... + +class JoinFaceMonitorResponse(_message.Message): + __slots__ = ("status",) + STATUS_FIELD_NUMBER: _ClassVar[int] + status: Status + def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ...) -> None: ... + +class FaceMonitorCallbackRequest(_message.Message): + __slots__ = ("token", "success", "error_message", "is_finished", "action", "face_codes") + TOKEN_FIELD_NUMBER: _ClassVar[int] + SUCCESS_FIELD_NUMBER: _ClassVar[int] + ERROR_MESSAGE_FIELD_NUMBER: _ClassVar[int] + IS_FINISHED_FIELD_NUMBER: _ClassVar[int] + ACTION_FIELD_NUMBER: _ClassVar[int] + FACE_CODES_FIELD_NUMBER: _ClassVar[int] + token: str + success: bool + error_message: str + is_finished: bool + action: str + face_codes: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, token: _Optional[str] = ..., success: bool = ..., error_message: _Optional[str] = ..., is_finished: bool = ..., action: _Optional[str] = ..., face_codes: _Optional[_Iterable[str]] = ...) -> None: ... + +class FaceMonitorCallbackResponse(_message.Message): + __slots__ = ("status",) + STATUS_FIELD_NUMBER: _ClassVar[int] + status: Status + def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ...) -> None: ... + +class FaceRecognitionCallbackRequest(_message.Message): + __slots__ = ("token", "success", "error_message", "face_code") + TOKEN_FIELD_NUMBER: _ClassVar[int] + SUCCESS_FIELD_NUMBER: _ClassVar[int] + ERROR_MESSAGE_FIELD_NUMBER: _ClassVar[int] + FACE_CODE_FIELD_NUMBER: _ClassVar[int] + token: str + success: bool + error_message: str + face_code: str + def __init__(self, token: _Optional[str] = ..., success: bool = ..., error_message: _Optional[str] = ..., face_code: _Optional[str] = ...) -> None: ... + +class FaceRecognitionCallbackResponse(_message.Message): + __slots__ = ("status",) + STATUS_FIELD_NUMBER: _ClassVar[int] + status: Status + def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ...) -> None: ... + +class AssetLoginTicketRequest(_message.Message): + __slots__ = ("user_id", "asset_id", "account_username") + USER_ID_FIELD_NUMBER: _ClassVar[int] + ASSET_ID_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_USERNAME_FIELD_NUMBER: _ClassVar[int] + user_id: str + asset_id: str + account_username: str + def __init__(self, user_id: _Optional[str] = ..., asset_id: _Optional[str] = ..., account_username: _Optional[str] = ...) -> None: ... + +class AssetLoginTicketResponse(_message.Message): + __slots__ = ("status", "ticket_info", "need_confirm", "ticket_id") + STATUS_FIELD_NUMBER: _ClassVar[int] + TICKET_INFO_FIELD_NUMBER: _ClassVar[int] + NEED_CONFIRM_FIELD_NUMBER: _ClassVar[int] + TICKET_ID_FIELD_NUMBER: _ClassVar[int] + status: Status + ticket_info: TicketInfo + need_confirm: bool + ticket_id: str + def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ..., ticket_info: _Optional[_Union[TicketInfo, _Mapping]] = ..., need_confirm: bool = ..., ticket_id: _Optional[str] = ...) -> None: ... + +class Status(_message.Message): + __slots__ = ("ok", "err") + OK_FIELD_NUMBER: _ClassVar[int] + ERR_FIELD_NUMBER: _ClassVar[int] + ok: bool + err: str + def __init__(self, ok: bool = ..., err: _Optional[str] = ...) -> None: ... + +class TokenRequest(_message.Message): + __slots__ = ("token",) + TOKEN_FIELD_NUMBER: _ClassVar[int] + token: str + def __init__(self, token: _Optional[str] = ...) -> None: ... + +class TokenResponse(_message.Message): + __slots__ = ("status", "data") + STATUS_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + status: Status + data: _common_pb2.TokenAuthInfo + def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ..., data: _Optional[_Union[_common_pb2.TokenAuthInfo, _Mapping]] = ...) -> None: ... + +class SessionCreateRequest(_message.Message): + __slots__ = ("data",) + DATA_FIELD_NUMBER: _ClassVar[int] + data: _common_pb2.Session + def __init__(self, data: _Optional[_Union[_common_pb2.Session, _Mapping]] = ...) -> None: ... + +class SessionCreateResponse(_message.Message): + __slots__ = ("status", "data") + STATUS_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + status: Status + data: _common_pb2.Session + def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ..., data: _Optional[_Union[_common_pb2.Session, _Mapping]] = ...) -> None: ... + +class SessionFinishRequest(_message.Message): + __slots__ = ("id", "success", "date_end", "err") + ID_FIELD_NUMBER: _ClassVar[int] + SUCCESS_FIELD_NUMBER: _ClassVar[int] + DATE_END_FIELD_NUMBER: _ClassVar[int] + ERR_FIELD_NUMBER: _ClassVar[int] + id: str + success: bool + date_end: int + err: str + def __init__(self, id: _Optional[str] = ..., success: bool = ..., date_end: _Optional[int] = ..., err: _Optional[str] = ...) -> None: ... + +class SessionFinishResp(_message.Message): + __slots__ = ("status",) + STATUS_FIELD_NUMBER: _ClassVar[int] + status: Status + def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ...) -> None: ... + +class ReplayRequest(_message.Message): + __slots__ = ("session_id", "replay_file_path") + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + REPLAY_FILE_PATH_FIELD_NUMBER: _ClassVar[int] + session_id: str + replay_file_path: str + def __init__(self, session_id: _Optional[str] = ..., replay_file_path: _Optional[str] = ...) -> None: ... + +class ReplayResponse(_message.Message): + __slots__ = ("status",) + STATUS_FIELD_NUMBER: _ClassVar[int] + status: Status + def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ...) -> None: ... + +class CommandRequest(_message.Message): + __slots__ = ("sid", "org_id", "input", "output", "user", "asset", "account", "timestamp", "risk_level", "cmd_acl_id", "cmd_group_id") + SID_FIELD_NUMBER: _ClassVar[int] + ORG_ID_FIELD_NUMBER: _ClassVar[int] + INPUT_FIELD_NUMBER: _ClassVar[int] + OUTPUT_FIELD_NUMBER: _ClassVar[int] + USER_FIELD_NUMBER: _ClassVar[int] + ASSET_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_FIELD_NUMBER: _ClassVar[int] + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + RISK_LEVEL_FIELD_NUMBER: _ClassVar[int] + CMD_ACL_ID_FIELD_NUMBER: _ClassVar[int] + CMD_GROUP_ID_FIELD_NUMBER: _ClassVar[int] + sid: str + org_id: str + input: str + output: str + user: str + asset: str + account: str + timestamp: int + risk_level: _common_pb2.RiskLevel + cmd_acl_id: str + cmd_group_id: str + def __init__(self, sid: _Optional[str] = ..., org_id: _Optional[str] = ..., input: _Optional[str] = ..., output: _Optional[str] = ..., user: _Optional[str] = ..., asset: _Optional[str] = ..., account: _Optional[str] = ..., timestamp: _Optional[int] = ..., risk_level: _Optional[_Union[_common_pb2.RiskLevel, str]] = ..., cmd_acl_id: _Optional[str] = ..., cmd_group_id: _Optional[str] = ...) -> None: ... + +class CommandResponse(_message.Message): + __slots__ = ("status",) + STATUS_FIELD_NUMBER: _ClassVar[int] + status: Status + def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ...) -> None: ... + +class FinishedTaskRequest(_message.Message): + __slots__ = ("task_id",) + TASK_ID_FIELD_NUMBER: _ClassVar[int] + task_id: str + def __init__(self, task_id: _Optional[str] = ...) -> None: ... + +class TaskResponse(_message.Message): + __slots__ = ("task",) + TASK_FIELD_NUMBER: _ClassVar[int] + task: _common_pb2.TerminalTask + def __init__(self, task: _Optional[_Union[_common_pb2.TerminalTask, _Mapping]] = ...) -> None: ... + +class RemainReplayRequest(_message.Message): + __slots__ = ("replay_dir",) + REPLAY_DIR_FIELD_NUMBER: _ClassVar[int] + replay_dir: str + def __init__(self, replay_dir: _Optional[str] = ...) -> None: ... + +class RemainReplayResponse(_message.Message): + __slots__ = ("status", "success_files", "failure_files", "failure_errs") + STATUS_FIELD_NUMBER: _ClassVar[int] + SUCCESS_FILES_FIELD_NUMBER: _ClassVar[int] + FAILURE_FILES_FIELD_NUMBER: _ClassVar[int] + FAILURE_ERRS_FIELD_NUMBER: _ClassVar[int] + status: Status + success_files: _containers.RepeatedScalarFieldContainer[str] + failure_files: _containers.RepeatedScalarFieldContainer[str] + failure_errs: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ..., success_files: _Optional[_Iterable[str]] = ..., failure_files: _Optional[_Iterable[str]] = ..., failure_errs: _Optional[_Iterable[str]] = ...) -> None: ... + +class StatusResponse(_message.Message): + __slots__ = ("status",) + STATUS_FIELD_NUMBER: _ClassVar[int] + status: Status + def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ...) -> None: ... + +class CommandConfirmRequest(_message.Message): + __slots__ = ("session_id", "cmd_acl_id", "cmd") + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + CMD_ACL_ID_FIELD_NUMBER: _ClassVar[int] + CMD_FIELD_NUMBER: _ClassVar[int] + session_id: str + cmd_acl_id: str + cmd: str + def __init__(self, session_id: _Optional[str] = ..., cmd_acl_id: _Optional[str] = ..., cmd: _Optional[str] = ...) -> None: ... + +class ReqInfo(_message.Message): + __slots__ = ("method", "url") + METHOD_FIELD_NUMBER: _ClassVar[int] + URL_FIELD_NUMBER: _ClassVar[int] + method: str + url: str + def __init__(self, method: _Optional[str] = ..., url: _Optional[str] = ...) -> None: ... + +class CommandConfirmResponse(_message.Message): + __slots__ = ("status", "info") + STATUS_FIELD_NUMBER: _ClassVar[int] + INFO_FIELD_NUMBER: _ClassVar[int] + status: Status + info: TicketInfo + def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ..., info: _Optional[_Union[TicketInfo, _Mapping]] = ...) -> None: ... + +class TicketInfo(_message.Message): + __slots__ = ("check_req", "cancel_req", "ticket_detail_url", "reviewers") + CHECK_REQ_FIELD_NUMBER: _ClassVar[int] + CANCEL_REQ_FIELD_NUMBER: _ClassVar[int] + TICKET_DETAIL_URL_FIELD_NUMBER: _ClassVar[int] + REVIEWERS_FIELD_NUMBER: _ClassVar[int] + check_req: ReqInfo + cancel_req: ReqInfo + ticket_detail_url: str + reviewers: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, check_req: _Optional[_Union[ReqInfo, _Mapping]] = ..., cancel_req: _Optional[_Union[ReqInfo, _Mapping]] = ..., ticket_detail_url: _Optional[str] = ..., reviewers: _Optional[_Iterable[str]] = ...) -> None: ... + +class TicketRequest(_message.Message): + __slots__ = ("req",) + REQ_FIELD_NUMBER: _ClassVar[int] + req: ReqInfo + def __init__(self, req: _Optional[_Union[ReqInfo, _Mapping]] = ...) -> None: ... + +class TicketStateResponse(_message.Message): + __slots__ = ("Data", "status") + DATA_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + Data: TicketState + status: Status + def __init__(self, Data: _Optional[_Union[TicketState, _Mapping]] = ..., status: _Optional[_Union[Status, _Mapping]] = ...) -> None: ... + +class TicketState(_message.Message): + __slots__ = ("state", "processor") + class State(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + Open: _ClassVar[TicketState.State] + Approved: _ClassVar[TicketState.State] + Rejected: _ClassVar[TicketState.State] + Closed: _ClassVar[TicketState.State] + Open: TicketState.State + Approved: TicketState.State + Rejected: TicketState.State + Closed: TicketState.State + STATE_FIELD_NUMBER: _ClassVar[int] + PROCESSOR_FIELD_NUMBER: _ClassVar[int] + state: TicketState.State + processor: str + def __init__(self, state: _Optional[_Union[TicketState.State, str]] = ..., processor: _Optional[str] = ...) -> None: ... + +class ForwardRequest(_message.Message): + __slots__ = ("host", "port", "gateways") + HOST_FIELD_NUMBER: _ClassVar[int] + PORT_FIELD_NUMBER: _ClassVar[int] + GATEWAYS_FIELD_NUMBER: _ClassVar[int] + host: str + port: int + gateways: _containers.RepeatedCompositeFieldContainer[_common_pb2.Gateway] + def __init__(self, host: _Optional[str] = ..., port: _Optional[int] = ..., gateways: _Optional[_Iterable[_Union[_common_pb2.Gateway, _Mapping]]] = ...) -> None: ... + +class ForwardDeleteRequest(_message.Message): + __slots__ = ("id",) + ID_FIELD_NUMBER: _ClassVar[int] + id: str + def __init__(self, id: _Optional[str] = ...) -> None: ... + +class ForwardResponse(_message.Message): + __slots__ = ("status", "id", "host", "port") + STATUS_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] + HOST_FIELD_NUMBER: _ClassVar[int] + PORT_FIELD_NUMBER: _ClassVar[int] + status: Status + id: str + host: str + port: int + def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ..., id: _Optional[str] = ..., host: _Optional[str] = ..., port: _Optional[int] = ...) -> None: ... + +class PublicSettingResponse(_message.Message): + __slots__ = ("status", "data") + STATUS_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + status: Status + data: _common_pb2.PublicSetting + def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ..., data: _Optional[_Union[_common_pb2.PublicSetting, _Mapping]] = ...) -> None: ... + +class Empty(_message.Message): + __slots__ = () + def __init__(self) -> None: ... + +class ListenPortResponse(_message.Message): + __slots__ = ("status", "ports") + STATUS_FIELD_NUMBER: _ClassVar[int] + PORTS_FIELD_NUMBER: _ClassVar[int] + status: Status + ports: _containers.RepeatedScalarFieldContainer[int] + def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ..., ports: _Optional[_Iterable[int]] = ...) -> None: ... + +class PortInfoRequest(_message.Message): + __slots__ = ("port",) + PORT_FIELD_NUMBER: _ClassVar[int] + port: int + def __init__(self, port: _Optional[int] = ...) -> None: ... + +class PortInfoResponse(_message.Message): + __slots__ = ("status", "data") + STATUS_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + status: Status + data: PortInfo + def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ..., data: _Optional[_Union[PortInfo, _Mapping]] = ...) -> None: ... + +class PortInfo(_message.Message): + __slots__ = ("asset", "gateways") + ASSET_FIELD_NUMBER: _ClassVar[int] + GATEWAYS_FIELD_NUMBER: _ClassVar[int] + asset: _common_pb2.Asset + gateways: _containers.RepeatedCompositeFieldContainer[_common_pb2.Gateway] + def __init__(self, asset: _Optional[_Union[_common_pb2.Asset, _Mapping]] = ..., gateways: _Optional[_Iterable[_Union[_common_pb2.Gateway, _Mapping]]] = ...) -> None: ... + +class PortFailure(_message.Message): + __slots__ = ("port", "reason") + PORT_FIELD_NUMBER: _ClassVar[int] + REASON_FIELD_NUMBER: _ClassVar[int] + port: int + reason: str + def __init__(self, port: _Optional[int] = ..., reason: _Optional[str] = ...) -> None: ... + +class PortFailureRequest(_message.Message): + __slots__ = ("data",) + DATA_FIELD_NUMBER: _ClassVar[int] + data: _containers.RepeatedCompositeFieldContainer[PortFailure] + def __init__(self, data: _Optional[_Iterable[_Union[PortFailure, _Mapping]]] = ...) -> None: ... + +class CookiesRequest(_message.Message): + __slots__ = ("cookies",) + COOKIES_FIELD_NUMBER: _ClassVar[int] + cookies: _containers.RepeatedCompositeFieldContainer[_common_pb2.Cookie] + def __init__(self, cookies: _Optional[_Iterable[_Union[_common_pb2.Cookie, _Mapping]]] = ...) -> None: ... + +class UserResponse(_message.Message): + __slots__ = ("status", "data") + STATUS_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + status: Status + data: _common_pb2.User + def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ..., data: _Optional[_Union[_common_pb2.User, _Mapping]] = ...) -> None: ... + +class SessionLifecycleLogRequest(_message.Message): + __slots__ = ("session_id", "event", "reason", "user") + class EventType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + AssetConnectSuccess: _ClassVar[SessionLifecycleLogRequest.EventType] + AssetConnectFinished: _ClassVar[SessionLifecycleLogRequest.EventType] + CreateShareLink: _ClassVar[SessionLifecycleLogRequest.EventType] + UserJoinSession: _ClassVar[SessionLifecycleLogRequest.EventType] + UserLeaveSession: _ClassVar[SessionLifecycleLogRequest.EventType] + AdminJoinMonitor: _ClassVar[SessionLifecycleLogRequest.EventType] + AdminExitMonitor: _ClassVar[SessionLifecycleLogRequest.EventType] + ReplayConvertStart: _ClassVar[SessionLifecycleLogRequest.EventType] + ReplayConvertSuccess: _ClassVar[SessionLifecycleLogRequest.EventType] + ReplayConvertFailure: _ClassVar[SessionLifecycleLogRequest.EventType] + ReplayUploadStart: _ClassVar[SessionLifecycleLogRequest.EventType] + ReplayUploadSuccess: _ClassVar[SessionLifecycleLogRequest.EventType] + ReplayUploadFailure: _ClassVar[SessionLifecycleLogRequest.EventType] + AssetConnectSuccess: SessionLifecycleLogRequest.EventType + AssetConnectFinished: SessionLifecycleLogRequest.EventType + CreateShareLink: SessionLifecycleLogRequest.EventType + UserJoinSession: SessionLifecycleLogRequest.EventType + UserLeaveSession: SessionLifecycleLogRequest.EventType + AdminJoinMonitor: SessionLifecycleLogRequest.EventType + AdminExitMonitor: SessionLifecycleLogRequest.EventType + ReplayConvertStart: SessionLifecycleLogRequest.EventType + ReplayConvertSuccess: SessionLifecycleLogRequest.EventType + ReplayConvertFailure: SessionLifecycleLogRequest.EventType + ReplayUploadStart: SessionLifecycleLogRequest.EventType + ReplayUploadSuccess: SessionLifecycleLogRequest.EventType + ReplayUploadFailure: SessionLifecycleLogRequest.EventType + SESSION_ID_FIELD_NUMBER: _ClassVar[int] + EVENT_FIELD_NUMBER: _ClassVar[int] + REASON_FIELD_NUMBER: _ClassVar[int] + USER_FIELD_NUMBER: _ClassVar[int] + session_id: str + event: SessionLifecycleLogRequest.EventType + reason: str + user: str + def __init__(self, session_id: _Optional[str] = ..., event: _Optional[_Union[SessionLifecycleLogRequest.EventType, str]] = ..., reason: _Optional[str] = ..., user: _Optional[str] = ...) -> None: ... diff --git a/protobuf-py/protobuf/service_pb2_grpc.py b/protobuf-py/protobuf/service_pb2_grpc.py new file mode 100644 index 0000000..5123d26 --- /dev/null +++ b/protobuf-py/protobuf/service_pb2_grpc.py @@ -0,0 +1,1043 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + +import service_pb2 as service__pb2 + +GRPC_GENERATED_VERSION = '1.74.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + f' but the generated code in service_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class ServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetTokenAuthInfo = channel.unary_unary( + '/message.Service/GetTokenAuthInfo', + request_serializer=service__pb2.TokenRequest.SerializeToString, + response_deserializer=service__pb2.TokenResponse.FromString, + _registered_method=True) + self.RenewToken = channel.unary_unary( + '/message.Service/RenewToken', + request_serializer=service__pb2.TokenRequest.SerializeToString, + response_deserializer=service__pb2.StatusResponse.FromString, + _registered_method=True) + self.CreateSession = channel.unary_unary( + '/message.Service/CreateSession', + request_serializer=service__pb2.SessionCreateRequest.SerializeToString, + response_deserializer=service__pb2.SessionCreateResponse.FromString, + _registered_method=True) + self.FinishSession = channel.unary_unary( + '/message.Service/FinishSession', + request_serializer=service__pb2.SessionFinishRequest.SerializeToString, + response_deserializer=service__pb2.SessionFinishResp.FromString, + _registered_method=True) + self.UploadReplayFile = channel.unary_unary( + '/message.Service/UploadReplayFile', + request_serializer=service__pb2.ReplayRequest.SerializeToString, + response_deserializer=service__pb2.ReplayResponse.FromString, + _registered_method=True) + self.UploadCommand = channel.unary_unary( + '/message.Service/UploadCommand', + request_serializer=service__pb2.CommandRequest.SerializeToString, + response_deserializer=service__pb2.CommandResponse.FromString, + _registered_method=True) + self.DispatchTask = channel.stream_stream( + '/message.Service/DispatchTask', + request_serializer=service__pb2.FinishedTaskRequest.SerializeToString, + response_deserializer=service__pb2.TaskResponse.FromString, + _registered_method=True) + self.ScanRemainReplays = channel.unary_unary( + '/message.Service/ScanRemainReplays', + request_serializer=service__pb2.RemainReplayRequest.SerializeToString, + response_deserializer=service__pb2.RemainReplayResponse.FromString, + _registered_method=True) + self.CreateCommandTicket = channel.unary_unary( + '/message.Service/CreateCommandTicket', + request_serializer=service__pb2.CommandConfirmRequest.SerializeToString, + response_deserializer=service__pb2.CommandConfirmResponse.FromString, + _registered_method=True) + self.CheckOrCreateAssetLoginTicket = channel.unary_unary( + '/message.Service/CheckOrCreateAssetLoginTicket', + request_serializer=service__pb2.AssetLoginTicketRequest.SerializeToString, + response_deserializer=service__pb2.AssetLoginTicketResponse.FromString, + _registered_method=True) + self.CheckTicketState = channel.unary_unary( + '/message.Service/CheckTicketState', + request_serializer=service__pb2.TicketRequest.SerializeToString, + response_deserializer=service__pb2.TicketStateResponse.FromString, + _registered_method=True) + self.CancelTicket = channel.unary_unary( + '/message.Service/CancelTicket', + request_serializer=service__pb2.TicketRequest.SerializeToString, + response_deserializer=service__pb2.StatusResponse.FromString, + _registered_method=True) + self.CreateForward = channel.unary_unary( + '/message.Service/CreateForward', + request_serializer=service__pb2.ForwardRequest.SerializeToString, + response_deserializer=service__pb2.ForwardResponse.FromString, + _registered_method=True) + self.DeleteForward = channel.unary_unary( + '/message.Service/DeleteForward', + request_serializer=service__pb2.ForwardDeleteRequest.SerializeToString, + response_deserializer=service__pb2.StatusResponse.FromString, + _registered_method=True) + self.GetPublicSetting = channel.unary_unary( + '/message.Service/GetPublicSetting', + request_serializer=service__pb2.Empty.SerializeToString, + response_deserializer=service__pb2.PublicSettingResponse.FromString, + _registered_method=True) + self.GetListenPorts = channel.unary_unary( + '/message.Service/GetListenPorts', + request_serializer=service__pb2.Empty.SerializeToString, + response_deserializer=service__pb2.ListenPortResponse.FromString, + _registered_method=True) + self.GetPortInfo = channel.unary_unary( + '/message.Service/GetPortInfo', + request_serializer=service__pb2.PortInfoRequest.SerializeToString, + response_deserializer=service__pb2.PortInfoResponse.FromString, + _registered_method=True) + self.HandlePortFailure = channel.unary_unary( + '/message.Service/HandlePortFailure', + request_serializer=service__pb2.PortFailureRequest.SerializeToString, + response_deserializer=service__pb2.StatusResponse.FromString, + _registered_method=True) + self.CheckUserByCookies = channel.unary_unary( + '/message.Service/CheckUserByCookies', + request_serializer=service__pb2.CookiesRequest.SerializeToString, + response_deserializer=service__pb2.UserResponse.FromString, + _registered_method=True) + self.RecordSessionLifecycleLog = channel.unary_unary( + '/message.Service/RecordSessionLifecycleLog', + request_serializer=service__pb2.SessionLifecycleLogRequest.SerializeToString, + response_deserializer=service__pb2.StatusResponse.FromString, + _registered_method=True) + self.FaceRecognitionCallback = channel.unary_unary( + '/message.Service/FaceRecognitionCallback', + request_serializer=service__pb2.FaceRecognitionCallbackRequest.SerializeToString, + response_deserializer=service__pb2.FaceRecognitionCallbackResponse.FromString, + _registered_method=True) + self.FaceMonitorCallback = channel.unary_unary( + '/message.Service/FaceMonitorCallback', + request_serializer=service__pb2.FaceMonitorCallbackRequest.SerializeToString, + response_deserializer=service__pb2.FaceMonitorCallbackResponse.FromString, + _registered_method=True) + self.JoinFaceMonitor = channel.unary_unary( + '/message.Service/JoinFaceMonitor', + request_serializer=service__pb2.JoinFaceMonitorRequest.SerializeToString, + response_deserializer=service__pb2.JoinFaceMonitorResponse.FromString, + _registered_method=True) + + +class ServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def GetTokenAuthInfo(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 RenewToken(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 CreateSession(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 FinishSession(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 UploadReplayFile(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 UploadCommand(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 DispatchTask(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 ScanRemainReplays(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 CreateCommandTicket(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 CheckOrCreateAssetLoginTicket(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 CheckTicketState(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 CancelTicket(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 CreateForward(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 DeleteForward(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 GetPublicSetting(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 GetListenPorts(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 GetPortInfo(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 HandlePortFailure(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 CheckUserByCookies(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 RecordSessionLifecycleLog(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 FaceRecognitionCallback(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 FaceMonitorCallback(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 JoinFaceMonitor(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_ServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetTokenAuthInfo': grpc.unary_unary_rpc_method_handler( + servicer.GetTokenAuthInfo, + request_deserializer=service__pb2.TokenRequest.FromString, + response_serializer=service__pb2.TokenResponse.SerializeToString, + ), + 'RenewToken': grpc.unary_unary_rpc_method_handler( + servicer.RenewToken, + request_deserializer=service__pb2.TokenRequest.FromString, + response_serializer=service__pb2.StatusResponse.SerializeToString, + ), + 'CreateSession': grpc.unary_unary_rpc_method_handler( + servicer.CreateSession, + request_deserializer=service__pb2.SessionCreateRequest.FromString, + response_serializer=service__pb2.SessionCreateResponse.SerializeToString, + ), + 'FinishSession': grpc.unary_unary_rpc_method_handler( + servicer.FinishSession, + request_deserializer=service__pb2.SessionFinishRequest.FromString, + response_serializer=service__pb2.SessionFinishResp.SerializeToString, + ), + 'UploadReplayFile': grpc.unary_unary_rpc_method_handler( + servicer.UploadReplayFile, + request_deserializer=service__pb2.ReplayRequest.FromString, + response_serializer=service__pb2.ReplayResponse.SerializeToString, + ), + 'UploadCommand': grpc.unary_unary_rpc_method_handler( + servicer.UploadCommand, + request_deserializer=service__pb2.CommandRequest.FromString, + response_serializer=service__pb2.CommandResponse.SerializeToString, + ), + 'DispatchTask': grpc.stream_stream_rpc_method_handler( + servicer.DispatchTask, + request_deserializer=service__pb2.FinishedTaskRequest.FromString, + response_serializer=service__pb2.TaskResponse.SerializeToString, + ), + 'ScanRemainReplays': grpc.unary_unary_rpc_method_handler( + servicer.ScanRemainReplays, + request_deserializer=service__pb2.RemainReplayRequest.FromString, + response_serializer=service__pb2.RemainReplayResponse.SerializeToString, + ), + 'CreateCommandTicket': grpc.unary_unary_rpc_method_handler( + servicer.CreateCommandTicket, + request_deserializer=service__pb2.CommandConfirmRequest.FromString, + response_serializer=service__pb2.CommandConfirmResponse.SerializeToString, + ), + 'CheckOrCreateAssetLoginTicket': grpc.unary_unary_rpc_method_handler( + servicer.CheckOrCreateAssetLoginTicket, + request_deserializer=service__pb2.AssetLoginTicketRequest.FromString, + response_serializer=service__pb2.AssetLoginTicketResponse.SerializeToString, + ), + 'CheckTicketState': grpc.unary_unary_rpc_method_handler( + servicer.CheckTicketState, + request_deserializer=service__pb2.TicketRequest.FromString, + response_serializer=service__pb2.TicketStateResponse.SerializeToString, + ), + 'CancelTicket': grpc.unary_unary_rpc_method_handler( + servicer.CancelTicket, + request_deserializer=service__pb2.TicketRequest.FromString, + response_serializer=service__pb2.StatusResponse.SerializeToString, + ), + 'CreateForward': grpc.unary_unary_rpc_method_handler( + servicer.CreateForward, + request_deserializer=service__pb2.ForwardRequest.FromString, + response_serializer=service__pb2.ForwardResponse.SerializeToString, + ), + 'DeleteForward': grpc.unary_unary_rpc_method_handler( + servicer.DeleteForward, + request_deserializer=service__pb2.ForwardDeleteRequest.FromString, + response_serializer=service__pb2.StatusResponse.SerializeToString, + ), + 'GetPublicSetting': grpc.unary_unary_rpc_method_handler( + servicer.GetPublicSetting, + request_deserializer=service__pb2.Empty.FromString, + response_serializer=service__pb2.PublicSettingResponse.SerializeToString, + ), + 'GetListenPorts': grpc.unary_unary_rpc_method_handler( + servicer.GetListenPorts, + request_deserializer=service__pb2.Empty.FromString, + response_serializer=service__pb2.ListenPortResponse.SerializeToString, + ), + 'GetPortInfo': grpc.unary_unary_rpc_method_handler( + servicer.GetPortInfo, + request_deserializer=service__pb2.PortInfoRequest.FromString, + response_serializer=service__pb2.PortInfoResponse.SerializeToString, + ), + 'HandlePortFailure': grpc.unary_unary_rpc_method_handler( + servicer.HandlePortFailure, + request_deserializer=service__pb2.PortFailureRequest.FromString, + response_serializer=service__pb2.StatusResponse.SerializeToString, + ), + 'CheckUserByCookies': grpc.unary_unary_rpc_method_handler( + servicer.CheckUserByCookies, + request_deserializer=service__pb2.CookiesRequest.FromString, + response_serializer=service__pb2.UserResponse.SerializeToString, + ), + 'RecordSessionLifecycleLog': grpc.unary_unary_rpc_method_handler( + servicer.RecordSessionLifecycleLog, + request_deserializer=service__pb2.SessionLifecycleLogRequest.FromString, + response_serializer=service__pb2.StatusResponse.SerializeToString, + ), + 'FaceRecognitionCallback': grpc.unary_unary_rpc_method_handler( + servicer.FaceRecognitionCallback, + request_deserializer=service__pb2.FaceRecognitionCallbackRequest.FromString, + response_serializer=service__pb2.FaceRecognitionCallbackResponse.SerializeToString, + ), + 'FaceMonitorCallback': grpc.unary_unary_rpc_method_handler( + servicer.FaceMonitorCallback, + request_deserializer=service__pb2.FaceMonitorCallbackRequest.FromString, + response_serializer=service__pb2.FaceMonitorCallbackResponse.SerializeToString, + ), + 'JoinFaceMonitor': grpc.unary_unary_rpc_method_handler( + servicer.JoinFaceMonitor, + request_deserializer=service__pb2.JoinFaceMonitorRequest.FromString, + response_serializer=service__pb2.JoinFaceMonitorResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'message.Service', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('message.Service', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class Service(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def GetTokenAuthInfo(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, + '/message.Service/GetTokenAuthInfo', + service__pb2.TokenRequest.SerializeToString, + service__pb2.TokenResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def RenewToken(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, + '/message.Service/RenewToken', + service__pb2.TokenRequest.SerializeToString, + service__pb2.StatusResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def CreateSession(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, + '/message.Service/CreateSession', + service__pb2.SessionCreateRequest.SerializeToString, + service__pb2.SessionCreateResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def FinishSession(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, + '/message.Service/FinishSession', + service__pb2.SessionFinishRequest.SerializeToString, + service__pb2.SessionFinishResp.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def UploadReplayFile(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, + '/message.Service/UploadReplayFile', + service__pb2.ReplayRequest.SerializeToString, + service__pb2.ReplayResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def UploadCommand(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, + '/message.Service/UploadCommand', + service__pb2.CommandRequest.SerializeToString, + service__pb2.CommandResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def DispatchTask(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_stream( + request_iterator, + target, + '/message.Service/DispatchTask', + service__pb2.FinishedTaskRequest.SerializeToString, + service__pb2.TaskResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def ScanRemainReplays(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, + '/message.Service/ScanRemainReplays', + service__pb2.RemainReplayRequest.SerializeToString, + service__pb2.RemainReplayResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def CreateCommandTicket(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, + '/message.Service/CreateCommandTicket', + service__pb2.CommandConfirmRequest.SerializeToString, + service__pb2.CommandConfirmResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def CheckOrCreateAssetLoginTicket(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, + '/message.Service/CheckOrCreateAssetLoginTicket', + service__pb2.AssetLoginTicketRequest.SerializeToString, + service__pb2.AssetLoginTicketResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def CheckTicketState(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, + '/message.Service/CheckTicketState', + service__pb2.TicketRequest.SerializeToString, + service__pb2.TicketStateResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def CancelTicket(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, + '/message.Service/CancelTicket', + service__pb2.TicketRequest.SerializeToString, + service__pb2.StatusResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def CreateForward(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, + '/message.Service/CreateForward', + service__pb2.ForwardRequest.SerializeToString, + service__pb2.ForwardResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def DeleteForward(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, + '/message.Service/DeleteForward', + service__pb2.ForwardDeleteRequest.SerializeToString, + service__pb2.StatusResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def GetPublicSetting(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, + '/message.Service/GetPublicSetting', + service__pb2.Empty.SerializeToString, + service__pb2.PublicSettingResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def GetListenPorts(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, + '/message.Service/GetListenPorts', + service__pb2.Empty.SerializeToString, + service__pb2.ListenPortResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def GetPortInfo(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, + '/message.Service/GetPortInfo', + service__pb2.PortInfoRequest.SerializeToString, + service__pb2.PortInfoResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def HandlePortFailure(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, + '/message.Service/HandlePortFailure', + service__pb2.PortFailureRequest.SerializeToString, + service__pb2.StatusResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def CheckUserByCookies(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, + '/message.Service/CheckUserByCookies', + service__pb2.CookiesRequest.SerializeToString, + service__pb2.UserResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def RecordSessionLifecycleLog(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, + '/message.Service/RecordSessionLifecycleLog', + service__pb2.SessionLifecycleLogRequest.SerializeToString, + service__pb2.StatusResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def FaceRecognitionCallback(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, + '/message.Service/FaceRecognitionCallback', + service__pb2.FaceRecognitionCallbackRequest.SerializeToString, + service__pb2.FaceRecognitionCallbackResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def FaceMonitorCallback(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, + '/message.Service/FaceMonitorCallback', + service__pb2.FaceMonitorCallbackRequest.SerializeToString, + service__pb2.FaceMonitorCallbackResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def JoinFaceMonitor(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, + '/message.Service/JoinFaceMonitor', + service__pb2.JoinFaceMonitorRequest.SerializeToString, + service__pb2.JoinFaceMonitorResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True)