From 65a20b2f055bd530b9b346aceaf8715dd026391e Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 26 Aug 2026 17:36:35 +0800 Subject: [PATCH] perf: remove protobuf py and rs --- .gitignore | 6 +- Makefile | 17 +- protobuf-py/protobuf/common_pb2.py | 101 -- protobuf-py/protobuf/common_pb2.pyi | 462 ----- protobuf-py/protobuf/common_pb2_grpc.py | 24 - protobuf-py/protobuf/service_pb2.py | 147 -- protobuf-py/protobuf/service_pb2.pyi | 473 ----- protobuf-py/protobuf/service_pb2_grpc.py | 1129 ------------ protobuf-rs/message.rs | 1017 ----------- protobuf-rs/message.tonic.rs | 2057 ---------------------- 10 files changed, 16 insertions(+), 5417 deletions(-) delete mode 100644 protobuf-py/protobuf/common_pb2.py delete mode 100644 protobuf-py/protobuf/common_pb2.pyi delete mode 100644 protobuf-py/protobuf/common_pb2_grpc.py delete mode 100644 protobuf-py/protobuf/service_pb2.py delete mode 100644 protobuf-py/protobuf/service_pb2.pyi delete mode 100644 protobuf-py/protobuf/service_pb2_grpc.py delete mode 100644 protobuf-rs/message.rs delete mode 100644 protobuf-rs/message.tonic.rs diff --git a/.gitignore b/.gitignore index 71b60ba..959864e 100644 --- a/.gitignore +++ b/.gitignore @@ -46,4 +46,8 @@ release !config_example.yml *.json !test_example.json -**/example/ \ No newline at end of file +**/example/ + +# Python and Rust protobuf SDKs are generated on demand and are not tracked. +/protobuf-py/protobuf/ +/protobuf-rs/ diff --git a/Makefile b/Makefile index 0d9869b..1487ef5 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ NAME=wisp BUILDDIR=build VERSION ?=Unknown +PYTHON ?=python3 BuildTime:=$(shell date -u '+%Y-%m-%d %I:%M:%S%p') COMMIT:=$(shell git rev-parse HEAD) GOVERSION:=$(shell go version) @@ -77,7 +78,9 @@ proto_go_dir=./protobuf-go protobuf_py_dir=./protobuf-py/protobuf .PHONY: proto -proto: proto-go proto-java proto-rust proto-py +# Go and Java are the protobuf SDKs tracked by this repository. +# Python and Rust remain available as explicit, on-demand targets. +proto: proto-go proto-java .PHONY: proto-go proto-go: @@ -91,10 +94,12 @@ proto-go: .PHONY: proto-py proto-py: - @mkdir -p ./protobuf-py/protobuf - python -m grpc_tools.protoc --proto_path=${proto_path} --python_out=./protobuf-py/protobuf \ - --pyi_out=./protobuf-py/protobuf \ - --grpc_python_out=./protobuf-py/protobuf \ + @mkdir -p ${protobuf_py_dir} + protoc --proto_path=${proto_path} --python_out=${protobuf_py_dir} \ + --pyi_out=${protobuf_py_dir} \ + ${proto_files} + ${PYTHON} -m grpc_tools.protoc --proto_path=${proto_path} \ + --grpc_python_out=${protobuf_py_dir} \ ${proto_files} .PHONY: proto-java @@ -113,4 +118,4 @@ proto-rust: --plugin=protoc-gen-tonic=$(shell which protoc-gen-tonic) \ --prost_out=./protobuf-rs \ --tonic_out=./protobuf-rs \ - ${proto_files} \ No newline at end of file + ${proto_files} diff --git a/protobuf-py/protobuf/common_pb2.py b/protobuf-py/protobuf/common_pb2.py deleted file mode 100644 index bbb3f5d..0000000 --- a/protobuf-py/protobuf/common_pb2.py +++ /dev/null @@ -1,101 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE -# source: common.proto -# Protobuf Python Version: 5.29.0 -"""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, - 5, - 29, - 0, - '', - '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\"\x96\x01\n\x0f\x44\x61taMaskingRule\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\x11\n\tis_active\x18\x04 \x01(\x08\x12\x16\n\x0emasking_method\x18\x05 \x01(\t\x12\x14\n\x0cmask_pattern\x18\x06 \x01(\t\x12\x16\n\x0e\x66ields_pattern\x18\x07 \x01(\t\"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\"z\n\x0e\x43onnectOptions\x12\x37\n\x08settings\x18\x01 \x03(\x0b\x32%.message.ConnectOptions.SettingsEntry\x1a/\n\rSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x87\x04\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\x12\x34\n\x12\x64\x61ta_masking_rules\x18\r \x03(\x0b\x32\x18.message.DataMaskingRule\x12\x30\n\x0f\x63onnect_options\x18\x0e \x01(\x0b\x32\x17.message.ConnectOptions\"\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['_CONNECTOPTIONS_SETTINGSENTRY']._loaded_options = None - _globals['_CONNECTOPTIONS_SETTINGSENTRY']._serialized_options = b'8\001' - _globals['_PLATFORMPROTOCOL_SETTINGSENTRY']._loaded_options = None - _globals['_PLATFORMPROTOCOL_SETTINGSENTRY']._serialized_options = b'8\001' - _globals['_TASKACTION']._serialized_start=3871 - _globals['_TASKACTION']._serialized_end=3978 - _globals['_RISKLEVEL']._serialized_start=3980 - _globals['_RISKLEVEL']._serialized_end=4082 - _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['_DATAMASKINGRULE']._serialized_start=1321 - _globals['_DATAMASKINGRULE']._serialized_end=1471 - _globals['_COMMANDGROUP']._serialized_start=1473 - _globals['_COMMANDGROUP']._serialized_end=1582 - _globals['_EXPIREINFO']._serialized_start=1584 - _globals['_EXPIREINFO']._serialized_end=1615 - _globals['_SESSION']._serialized_start=1618 - _globals['_SESSION']._serialized_end=1926 - _globals['_SESSION_LOGINFROM']._serialized_start=1883 - _globals['_SESSION_LOGINFROM']._serialized_end=1926 - _globals['_TOKENSTATUS']._serialized_start=1928 - _globals['_TOKENSTATUS']._serialized_end=1991 - _globals['_TERMINALTASK']._serialized_start=1994 - _globals['_TERMINALTASK']._serialized_end=2164 - _globals['_CONNECTOPTIONS']._serialized_start=2166 - _globals['_CONNECTOPTIONS']._serialized_end=2288 - _globals['_CONNECTOPTIONS_SETTINGSENTRY']._serialized_start=2241 - _globals['_CONNECTOPTIONS_SETTINGSENTRY']._serialized_end=2288 - _globals['_TOKENAUTHINFO']._serialized_start=2291 - _globals['_TOKENAUTHINFO']._serialized_end=2810 - _globals['_PLATFORM']._serialized_start=2813 - _globals['_PLATFORM']._serialized_end=2944 - _globals['_PLATFORMPROTOCOL']._serialized_start=2947 - _globals['_PLATFORMPROTOCOL']._serialized_end=3113 - _globals['_PLATFORMPROTOCOL_SETTINGSENTRY']._serialized_start=2241 - _globals['_PLATFORMPROTOCOL_SETTINGSENTRY']._serialized_end=2288 - _globals['_COMPONENTSETTING']._serialized_start=3115 - _globals['_COMPONENTSETTING']._serialized_end=3182 - _globals['_FORWARD']._serialized_start=3184 - _globals['_FORWARD']._serialized_end=3233 - _globals['_PUBLICSETTING']._serialized_start=3236 - _globals['_PUBLICSETTING']._serialized_end=3403 - _globals['_COOKIE']._serialized_start=3405 - _globals['_COOKIE']._serialized_end=3442 - _globals['_LIFECYCLELOGDATA']._serialized_start=3445 - _globals['_LIFECYCLELOGDATA']._serialized_end=3869 - _globals['_LIFECYCLELOGDATA_EVENT_TYPE']._serialized_start=3549 - _globals['_LIFECYCLELOGDATA_EVENT_TYPE']._serialized_end=3869 -# @@protoc_insertion_point(module_scope) diff --git a/protobuf-py/protobuf/common_pb2.pyi b/protobuf-py/protobuf/common_pb2.pyi deleted file mode 100644 index 5d57c9b..0000000 --- a/protobuf-py/protobuf/common_pb2.pyi +++ /dev/null @@ -1,462 +0,0 @@ -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 typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, 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 DataMaskingRule(_message.Message): - __slots__ = ("id", "name", "priority", "is_active", "masking_method", "mask_pattern", "fields_pattern") - ID_FIELD_NUMBER: _ClassVar[int] - NAME_FIELD_NUMBER: _ClassVar[int] - PRIORITY_FIELD_NUMBER: _ClassVar[int] - IS_ACTIVE_FIELD_NUMBER: _ClassVar[int] - MASKING_METHOD_FIELD_NUMBER: _ClassVar[int] - MASK_PATTERN_FIELD_NUMBER: _ClassVar[int] - FIELDS_PATTERN_FIELD_NUMBER: _ClassVar[int] - id: str - name: str - priority: int - is_active: bool - masking_method: str - mask_pattern: str - fields_pattern: str - def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., priority: _Optional[int] = ..., is_active: bool = ..., masking_method: _Optional[str] = ..., mask_pattern: _Optional[str] = ..., fields_pattern: _Optional[str] = ...) -> 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 ConnectOptions(_message.Message): - __slots__ = ("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: ... - SETTINGS_FIELD_NUMBER: _ClassVar[int] - settings: _containers.ScalarMap[str, str] - def __init__(self, settings: _Optional[_Mapping[str, str]] = ...) -> None: ... - -class TokenAuthInfo(_message.Message): - __slots__ = ("key_id", "secrete_id", "asset", "user", "account", "permission", "expire_info", "filter_rules", "gateways", "setting", "platform", "FaceMonitorToken", "data_masking_rules", "connect_options") - 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] - DATA_MASKING_RULES_FIELD_NUMBER: _ClassVar[int] - CONNECT_OPTIONS_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 - data_masking_rules: _containers.RepeatedCompositeFieldContainer[DataMaskingRule] - connect_options: ConnectOptions - 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] = ..., data_masking_rules: _Optional[_Iterable[_Union[DataMaskingRule, _Mapping]]] = ..., connect_options: _Optional[_Union[ConnectOptions, _Mapping]] = ...) -> 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 deleted file mode 100644 index f80da21..0000000 --- a/protobuf-py/protobuf/common_pb2_grpc.py +++ /dev/null @@ -1,24 +0,0 @@ -# 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.69.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 deleted file mode 100644 index ca51901..0000000 --- a/protobuf-py/protobuf/service_pb2.py +++ /dev/null @@ -1,147 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE -# source: service.proto -# Protobuf Python Version: 5.29.0 -"""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, - 5, - 29, - 0, - '', - 'service.proto' -) -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -import common_pb2 as common__pb2 -from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rservice.proto\x12\x07message\x1a\x0c\x63ommon.proto\x1a\x1cgoogle/protobuf/struct.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\"b\n\x15\x41\x63\x63ountDetailResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\x12(\n\x07payload\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xf8\x01\n\x0bHTTPRequest\x12\x0e\n\x06method\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12.\n\x05query\x18\x03 \x03(\x0b\x32\x1f.message.HTTPRequest.QueryEntry\x12\x30\n\x06header\x18\x04 \x03(\x0b\x32 .message.HTTPRequest.HeaderEntry\x12\x0c\n\x04\x62ody\x18\x05 \x01(\x0c\x1a,\n\nQueryEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bHeaderEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"=\n\x0cHTTPResponse\x12\x1f\n\x06status\x18\x01 \x01(\x0b\x32\x0f.message.Status\x12\x0c\n\x04\x62ody\x18\x02 \x01(\x0c\x32\xa5\x0f\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\x12\x42\n\x0eGetAccountChat\x12\x0e.message.Empty\x1a\x1e.message.AccountDetailResponse\"\x00\x12\x38\n\x07\x43\x61llAPI\x12\x14.message.HTTPRequest\x1a\x15.message.HTTPResponse\"\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['_HTTPREQUEST_QUERYENTRY']._loaded_options = None - _globals['_HTTPREQUEST_QUERYENTRY']._serialized_options = b'8\001' - _globals['_HTTPREQUEST_HEADERENTRY']._loaded_options = None - _globals['_HTTPREQUEST_HEADERENTRY']._serialized_options = b'8\001' - _globals['_JOINFACEMONITORREQUEST']._serialized_start=70 - _globals['_JOINFACEMONITORREQUEST']._serialized_end=142 - _globals['_JOINFACEMONITORRESPONSE']._serialized_start=144 - _globals['_JOINFACEMONITORRESPONSE']._serialized_end=202 - _globals['_FACEMONITORCALLBACKREQUEST']._serialized_start=205 - _globals['_FACEMONITORCALLBACKREQUEST']._serialized_end=345 - _globals['_FACEMONITORCALLBACKRESPONSE']._serialized_start=347 - _globals['_FACEMONITORCALLBACKRESPONSE']._serialized_end=409 - _globals['_FACERECOGNITIONCALLBACKREQUEST']._serialized_start=411 - _globals['_FACERECOGNITIONCALLBACKREQUEST']._serialized_end=517 - _globals['_FACERECOGNITIONCALLBACKRESPONSE']._serialized_start=519 - _globals['_FACERECOGNITIONCALLBACKRESPONSE']._serialized_end=585 - _globals['_ASSETLOGINTICKETREQUEST']._serialized_start=587 - _globals['_ASSETLOGINTICKETREQUEST']._serialized_end=673 - _globals['_ASSETLOGINTICKETRESPONSE']._serialized_start=676 - _globals['_ASSETLOGINTICKETRESPONSE']._serialized_end=818 - _globals['_STATUS']._serialized_start=820 - _globals['_STATUS']._serialized_end=853 - _globals['_TOKENREQUEST']._serialized_start=855 - _globals['_TOKENREQUEST']._serialized_end=884 - _globals['_TOKENRESPONSE']._serialized_start=886 - _globals['_TOKENRESPONSE']._serialized_end=972 - _globals['_SESSIONCREATEREQUEST']._serialized_start=974 - _globals['_SESSIONCREATEREQUEST']._serialized_end=1028 - _globals['_SESSIONCREATERESPONSE']._serialized_start=1030 - _globals['_SESSIONCREATERESPONSE']._serialized_end=1118 - _globals['_SESSIONFINISHREQUEST']._serialized_start=1120 - _globals['_SESSIONFINISHREQUEST']._serialized_end=1202 - _globals['_SESSIONFINISHRESP']._serialized_start=1204 - _globals['_SESSIONFINISHRESP']._serialized_end=1256 - _globals['_REPLAYREQUEST']._serialized_start=1258 - _globals['_REPLAYREQUEST']._serialized_end=1319 - _globals['_REPLAYRESPONSE']._serialized_start=1321 - _globals['_REPLAYRESPONSE']._serialized_end=1370 - _globals['_COMMANDREQUEST']._serialized_start=1373 - _globals['_COMMANDREQUEST']._serialized_end=1596 - _globals['_COMMANDRESPONSE']._serialized_start=1598 - _globals['_COMMANDRESPONSE']._serialized_end=1648 - _globals['_FINISHEDTASKREQUEST']._serialized_start=1650 - _globals['_FINISHEDTASKREQUEST']._serialized_end=1688 - _globals['_TASKRESPONSE']._serialized_start=1690 - _globals['_TASKRESPONSE']._serialized_end=1741 - _globals['_REMAINREPLAYREQUEST']._serialized_start=1743 - _globals['_REMAINREPLAYREQUEST']._serialized_end=1784 - _globals['_REMAINREPLAYRESPONSE']._serialized_start=1786 - _globals['_REMAINREPLAYRESPONSE']._serialized_end=1909 - _globals['_STATUSRESPONSE']._serialized_start=1911 - _globals['_STATUSRESPONSE']._serialized_end=1960 - _globals['_COMMANDCONFIRMREQUEST']._serialized_start=1962 - _globals['_COMMANDCONFIRMREQUEST']._serialized_end=2038 - _globals['_REQINFO']._serialized_start=2040 - _globals['_REQINFO']._serialized_end=2078 - _globals['_COMMANDCONFIRMRESPONSE']._serialized_start=2080 - _globals['_COMMANDCONFIRMRESPONSE']._serialized_end=2172 - _globals['_TICKETINFO']._serialized_start=2175 - _globals['_TICKETINFO']._serialized_end=2308 - _globals['_TICKETREQUEST']._serialized_start=2310 - _globals['_TICKETREQUEST']._serialized_end=2356 - _globals['_TICKETSTATERESPONSE']._serialized_start=2358 - _globals['_TICKETSTATERESPONSE']._serialized_end=2448 - _globals['_TICKETSTATE']._serialized_start=2451 - _globals['_TICKETSTATE']._serialized_end=2585 - _globals['_TICKETSTATE_STATE']._serialized_start=2528 - _globals['_TICKETSTATE_STATE']._serialized_end=2585 - _globals['_FORWARDREQUEST']._serialized_start=2587 - _globals['_FORWARDREQUEST']._serialized_end=2667 - _globals['_FORWARDDELETEREQUEST']._serialized_start=2669 - _globals['_FORWARDDELETEREQUEST']._serialized_end=2703 - _globals['_FORWARDRESPONSE']._serialized_start=2705 - _globals['_FORWARDRESPONSE']._serialized_end=2795 - _globals['_PUBLICSETTINGRESPONSE']._serialized_start=2797 - _globals['_PUBLICSETTINGRESPONSE']._serialized_end=2891 - _globals['_EMPTY']._serialized_start=2893 - _globals['_EMPTY']._serialized_end=2900 - _globals['_LISTENPORTRESPONSE']._serialized_start=2902 - _globals['_LISTENPORTRESPONSE']._serialized_end=2970 - _globals['_PORTINFOREQUEST']._serialized_start=2972 - _globals['_PORTINFOREQUEST']._serialized_end=3003 - _globals['_PORTINFORESPONSE']._serialized_start=3005 - _globals['_PORTINFORESPONSE']._serialized_end=3089 - _globals['_PORTINFO']._serialized_start=3091 - _globals['_PORTINFO']._serialized_end=3168 - _globals['_PORTFAILURE']._serialized_start=3170 - _globals['_PORTFAILURE']._serialized_end=3213 - _globals['_PORTFAILUREREQUEST']._serialized_start=3215 - _globals['_PORTFAILUREREQUEST']._serialized_end=3271 - _globals['_COOKIESREQUEST']._serialized_start=3273 - _globals['_COOKIESREQUEST']._serialized_end=3323 - _globals['_USERRESPONSE']._serialized_start=3325 - _globals['_USERRESPONSE']._serialized_end=3401 - _globals['_SESSIONLIFECYCLELOGREQUEST']._serialized_start=3404 - _globals['_SESSIONLIFECYCLELOGREQUEST']._serialized_end=3866 - _globals['_SESSIONLIFECYCLELOGREQUEST_EVENTTYPE']._serialized_start=3547 - _globals['_SESSIONLIFECYCLELOGREQUEST_EVENTTYPE']._serialized_end=3866 - _globals['_ACCOUNTDETAILRESPONSE']._serialized_start=3868 - _globals['_ACCOUNTDETAILRESPONSE']._serialized_end=3966 - _globals['_HTTPREQUEST']._serialized_start=3969 - _globals['_HTTPREQUEST']._serialized_end=4217 - _globals['_HTTPREQUEST_QUERYENTRY']._serialized_start=4126 - _globals['_HTTPREQUEST_QUERYENTRY']._serialized_end=4170 - _globals['_HTTPREQUEST_HEADERENTRY']._serialized_start=4172 - _globals['_HTTPREQUEST_HEADERENTRY']._serialized_end=4217 - _globals['_HTTPRESPONSE']._serialized_start=4219 - _globals['_HTTPRESPONSE']._serialized_end=4280 - _globals['_SERVICE']._serialized_start=4283 - _globals['_SERVICE']._serialized_end=6240 -# @@protoc_insertion_point(module_scope) diff --git a/protobuf-py/protobuf/service_pb2.pyi b/protobuf-py/protobuf/service_pb2.pyi deleted file mode 100644 index 8c1dcbe..0000000 --- a/protobuf-py/protobuf/service_pb2.pyi +++ /dev/null @@ -1,473 +0,0 @@ -import common_pb2 as _common_pb2 -from google.protobuf import struct_pb2 as _struct_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 typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, 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: ... - -class AccountDetailResponse(_message.Message): - __slots__ = ("status", "payload") - STATUS_FIELD_NUMBER: _ClassVar[int] - PAYLOAD_FIELD_NUMBER: _ClassVar[int] - status: Status - payload: _struct_pb2.Struct - def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ..., payload: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ... - -class HTTPRequest(_message.Message): - __slots__ = ("method", "path", "query", "header", "body") - class QueryEntry(_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: ... - class HeaderEntry(_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: ... - METHOD_FIELD_NUMBER: _ClassVar[int] - PATH_FIELD_NUMBER: _ClassVar[int] - QUERY_FIELD_NUMBER: _ClassVar[int] - HEADER_FIELD_NUMBER: _ClassVar[int] - BODY_FIELD_NUMBER: _ClassVar[int] - method: str - path: str - query: _containers.ScalarMap[str, str] - header: _containers.ScalarMap[str, str] - body: bytes - def __init__(self, method: _Optional[str] = ..., path: _Optional[str] = ..., query: _Optional[_Mapping[str, str]] = ..., header: _Optional[_Mapping[str, str]] = ..., body: _Optional[bytes] = ...) -> None: ... - -class HTTPResponse(_message.Message): - __slots__ = ("status", "body") - STATUS_FIELD_NUMBER: _ClassVar[int] - BODY_FIELD_NUMBER: _ClassVar[int] - status: Status - body: bytes - def __init__(self, status: _Optional[_Union[Status, _Mapping]] = ..., body: _Optional[bytes] = ...) -> None: ... diff --git a/protobuf-py/protobuf/service_pb2_grpc.py b/protobuf-py/protobuf/service_pb2_grpc.py deleted file mode 100644 index 98bdde6..0000000 --- a/protobuf-py/protobuf/service_pb2_grpc.py +++ /dev/null @@ -1,1129 +0,0 @@ -# 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.69.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) - self.GetAccountChat = channel.unary_unary( - '/message.Service/GetAccountChat', - request_serializer=service__pb2.Empty.SerializeToString, - response_deserializer=service__pb2.AccountDetailResponse.FromString, - _registered_method=True) - self.CallAPI = channel.unary_unary( - '/message.Service/CallAPI', - request_serializer=service__pb2.HTTPRequest.SerializeToString, - response_deserializer=service__pb2.HTTPResponse.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 GetAccountChat(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 CallAPI(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, - ), - 'GetAccountChat': grpc.unary_unary_rpc_method_handler( - servicer.GetAccountChat, - request_deserializer=service__pb2.Empty.FromString, - response_serializer=service__pb2.AccountDetailResponse.SerializeToString, - ), - 'CallAPI': grpc.unary_unary_rpc_method_handler( - servicer.CallAPI, - request_deserializer=service__pb2.HTTPRequest.FromString, - response_serializer=service__pb2.HTTPResponse.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) - - @staticmethod - def GetAccountChat(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/GetAccountChat', - service__pb2.Empty.SerializeToString, - service__pb2.AccountDetailResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - _registered_method=True) - - @staticmethod - def CallAPI(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/CallAPI', - service__pb2.HTTPRequest.SerializeToString, - service__pb2.HTTPResponse.FromString, - options, - channel_credentials, - insecure, - call_credentials, - compression, - wait_for_ready, - timeout, - metadata, - _registered_method=True) diff --git a/protobuf-rs/message.rs b/protobuf-rs/message.rs deleted file mode 100644 index 243a621..0000000 --- a/protobuf-rs/message.rs +++ /dev/null @@ -1,1017 +0,0 @@ -// @generated -// This file is @generated by prost-build. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct User { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub name: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub username: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub role: ::prost::alloc::string::String, - #[prost(bool, tag="5")] - pub is_valid: bool, - #[prost(bool, tag="6")] - pub is_active: bool, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Account { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub name: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub username: ::prost::alloc::string::String, - #[prost(string, tag="5")] - pub secret: ::prost::alloc::string::String, - #[prost(message, optional, tag="6")] - pub secret_type: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct LabelValue { - #[prost(string, tag="1")] - pub label: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub value: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Asset { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub name: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub address: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub org_id: ::prost::alloc::string::String, - #[prost(string, tag="5")] - pub org_name: ::prost::alloc::string::String, - #[prost(message, repeated, tag="6")] - pub protocols: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="7")] - pub specific: ::core::option::Option, -} -/// Nested message and enum types in `Asset`. -pub mod asset { - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Specific { - #[prost(string, tag="1")] - pub db_name: ::prost::alloc::string::String, - #[prost(bool, tag="2")] - pub use_ssl: bool, - #[prost(string, tag="3")] - pub ca_cert: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub client_cert: ::prost::alloc::string::String, - #[prost(string, tag="5")] - pub client_key: ::prost::alloc::string::String, - #[prost(bool, tag="6")] - pub allow_invalid_cert: bool, - #[prost(string, tag="7")] - pub auto_fill: ::prost::alloc::string::String, - #[prost(string, tag="8")] - pub username_selector: ::prost::alloc::string::String, - #[prost(string, tag="9")] - pub password_selector: ::prost::alloc::string::String, - #[prost(string, tag="10")] - pub submit_selector: ::prost::alloc::string::String, - #[prost(string, tag="11")] - pub script: ::prost::alloc::string::String, - #[prost(string, tag="12")] - pub http_proxy: ::prost::alloc::string::String, - #[prost(string, tag="13")] - pub pg_ssl_mode: ::prost::alloc::string::String, - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Protocol { - #[prost(string, tag="2")] - pub name: ::prost::alloc::string::String, - #[prost(int32, tag="1")] - pub id: i32, - #[prost(int32, tag="3")] - pub port: i32, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Gateway { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub name: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub ip: ::prost::alloc::string::String, - #[prost(int32, tag="4")] - pub port: i32, - #[prost(string, tag="5")] - pub protocol: ::prost::alloc::string::String, - #[prost(string, tag="6")] - pub username: ::prost::alloc::string::String, - #[prost(string, tag="7")] - pub password: ::prost::alloc::string::String, - #[prost(string, tag="8")] - pub private_key: ::prost::alloc::string::String, -} -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct Permission { - #[prost(bool, tag="1")] - pub enable_connect: bool, - #[prost(bool, tag="2")] - pub enable_download: bool, - #[prost(bool, tag="3")] - pub enable_upload: bool, - #[prost(bool, tag="4")] - pub enable_copy: bool, - #[prost(bool, tag="5")] - pub enable_paste: bool, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CommandAcl { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub name: ::prost::alloc::string::String, - #[prost(int32, tag="3")] - pub priority: i32, - #[prost(enumeration="command_acl::Action", tag="5")] - pub action: i32, - #[prost(bool, tag="6")] - pub is_active: bool, - #[prost(message, repeated, tag="7")] - pub command_groups: ::prost::alloc::vec::Vec, -} -/// Nested message and enum types in `CommandACL`. -pub mod command_acl { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum Action { - Reject = 0, - Accept = 1, - Review = 2, - Warning = 3, - NotifyWarning = 4, - Unknown = 5, - } - impl Action { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Self::Reject => "Reject", - Self::Accept => "Accept", - Self::Review => "Review", - Self::Warning => "Warning", - Self::NotifyWarning => "NotifyWarning", - Self::Unknown => "Unknown", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "Reject" => Some(Self::Reject), - "Accept" => Some(Self::Accept), - "Review" => Some(Self::Review), - "Warning" => Some(Self::Warning), - "NotifyWarning" => Some(Self::NotifyWarning), - "Unknown" => Some(Self::Unknown), - _ => None, - } - } - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DataMaskingRule { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub name: ::prost::alloc::string::String, - #[prost(int32, tag="3")] - pub priority: i32, - #[prost(bool, tag="4")] - pub is_active: bool, - #[prost(string, tag="5")] - pub masking_method: ::prost::alloc::string::String, - #[prost(string, tag="6")] - pub mask_pattern: ::prost::alloc::string::String, - #[prost(string, tag="7")] - pub fields_pattern: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CommandGroup { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub name: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub content: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub r#type: ::prost::alloc::string::String, - #[prost(string, tag="5")] - pub pattern: ::prost::alloc::string::String, - #[prost(bool, tag="6")] - pub ignore_case: bool, -} -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct ExpireInfo { - #[prost(int64, tag="1")] - pub expire_at: i64, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Session { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub user: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub asset: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub account: ::prost::alloc::string::String, - #[prost(enumeration="session::LoginFrom", tag="5")] - pub login_from: i32, - #[prost(string, tag="6")] - pub remote_addr: ::prost::alloc::string::String, - #[prost(string, tag="7")] - pub protocol: ::prost::alloc::string::String, - #[prost(int64, tag="8")] - pub date_start: i64, - #[prost(string, tag="9")] - pub org_id: ::prost::alloc::string::String, - #[prost(string, tag="10")] - pub user_id: ::prost::alloc::string::String, - #[prost(string, tag="11")] - pub asset_id: ::prost::alloc::string::String, - #[prost(string, tag="12")] - pub account_id: ::prost::alloc::string::String, - #[prost(string, tag="13")] - pub token_id: ::prost::alloc::string::String, -} -/// Nested message and enum types in `Session`. -pub mod session { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum LoginFrom { - Wt = 0, - St = 1, - Rt = 2, - Dt = 3, - } - impl LoginFrom { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Self::Wt => "WT", - Self::St => "ST", - Self::Rt => "RT", - Self::Dt => "DT", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "WT" => Some(Self::Wt), - "ST" => Some(Self::St), - "RT" => Some(Self::Rt), - "DT" => Some(Self::Dt), - _ => None, - } - } - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TokenStatus { - #[prost(string, tag="1")] - pub code: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub detail: ::prost::alloc::string::String, - #[prost(bool, tag="3")] - pub is_expired: bool, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TerminalTask { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(enumeration="TaskAction", tag="2")] - pub action: i32, - #[prost(string, tag="3")] - pub session_id: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub terminated_by: ::prost::alloc::string::String, - #[prost(string, tag="5")] - pub created_by: ::prost::alloc::string::String, - #[prost(message, optional, tag="6")] - pub token_status: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConnectOptions { - #[prost(map="string, string", tag="1")] - pub settings: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TokenAuthInfo { - #[prost(string, tag="1")] - pub key_id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub secrete_id: ::prost::alloc::string::String, - #[prost(message, optional, tag="3")] - pub asset: ::core::option::Option, - #[prost(message, optional, tag="4")] - pub user: ::core::option::Option, - #[prost(message, optional, tag="5")] - pub account: ::core::option::Option, - #[prost(message, optional, tag="6")] - pub permission: ::core::option::Option, - #[prost(message, optional, tag="7")] - pub expire_info: ::core::option::Option, - #[prost(message, repeated, tag="8")] - pub filter_rules: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="9")] - pub gateways: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="10")] - pub setting: ::core::option::Option, - #[prost(message, optional, tag="11")] - pub platform: ::core::option::Option, - #[prost(string, tag="12")] - pub face_monitor_token: ::prost::alloc::string::String, - #[prost(message, repeated, tag="13")] - pub data_masking_rules: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="14")] - pub connect_options: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Platform { - #[prost(int32, tag="1")] - pub id: i32, - #[prost(string, tag="2")] - pub name: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub category: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub charset: ::prost::alloc::string::String, - #[prost(string, tag="5")] - pub r#type: ::prost::alloc::string::String, - #[prost(message, repeated, tag="6")] - pub protocols: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PlatformProtocol { - #[prost(int32, tag="1")] - pub id: i32, - #[prost(string, tag="2")] - pub name: ::prost::alloc::string::String, - #[prost(int32, tag="3")] - pub port: i32, - #[prost(map="string, string", tag="4")] - pub settings: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, -} -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct ComponentSetting { - #[prost(int32, tag="1")] - pub max_idle_time: i32, - #[prost(int32, tag="2")] - pub max_session_time: i32, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Forward { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub host: ::prost::alloc::string::String, - #[prost(int32, tag="3")] - pub port: i32, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PublicSetting { - #[prost(bool, tag="1")] - pub xpack_enabled: bool, - #[prost(bool, tag="2")] - pub valid_license: bool, - #[prost(string, tag="3")] - pub gpt_base_url: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub gpt_api_key: ::prost::alloc::string::String, - #[prost(string, tag="5")] - pub gpt_proxy: ::prost::alloc::string::String, - #[prost(string, tag="6")] - pub gpt_model: ::prost::alloc::string::String, - #[prost(string, tag="7")] - pub license_content: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Cookie { - #[prost(string, tag="1")] - pub name: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub value: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct LifecycleLogData { - #[prost(enumeration="lifecycle_log_data::EventType", tag="1")] - pub event: i32, - #[prost(string, tag="2")] - pub reason: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub user: ::prost::alloc::string::String, -} -/// Nested message and enum types in `LifecycleLogData`. -pub mod lifecycle_log_data { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum EventType { - AssetConnectSuccess = 0, - AssetConnectFinished = 1, - CreateShareLink = 2, - UserJoinSession = 3, - UserLeaveSession = 4, - AdminJoinMonitor = 5, - AdminExitMonitor = 6, - ReplayConvertStart = 7, - ReplayConvertSuccess = 8, - ReplayConvertFailure = 9, - ReplayUploadStart = 10, - ReplayUploadSuccess = 11, - ReplayUploadFailure = 12, - } - impl EventType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Self::AssetConnectSuccess => "AssetConnectSuccess", - Self::AssetConnectFinished => "AssetConnectFinished", - Self::CreateShareLink => "CreateShareLink", - Self::UserJoinSession => "UserJoinSession", - Self::UserLeaveSession => "UserLeaveSession", - Self::AdminJoinMonitor => "AdminJoinMonitor", - Self::AdminExitMonitor => "AdminExitMonitor", - Self::ReplayConvertStart => "ReplayConvertStart", - Self::ReplayConvertSuccess => "ReplayConvertSuccess", - Self::ReplayConvertFailure => "ReplayConvertFailure", - Self::ReplayUploadStart => "ReplayUploadStart", - Self::ReplayUploadSuccess => "ReplayUploadSuccess", - Self::ReplayUploadFailure => "ReplayUploadFailure", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "AssetConnectSuccess" => Some(Self::AssetConnectSuccess), - "AssetConnectFinished" => Some(Self::AssetConnectFinished), - "CreateShareLink" => Some(Self::CreateShareLink), - "UserJoinSession" => Some(Self::UserJoinSession), - "UserLeaveSession" => Some(Self::UserLeaveSession), - "AdminJoinMonitor" => Some(Self::AdminJoinMonitor), - "AdminExitMonitor" => Some(Self::AdminExitMonitor), - "ReplayConvertStart" => Some(Self::ReplayConvertStart), - "ReplayConvertSuccess" => Some(Self::ReplayConvertSuccess), - "ReplayConvertFailure" => Some(Self::ReplayConvertFailure), - "ReplayUploadStart" => Some(Self::ReplayUploadStart), - "ReplayUploadSuccess" => Some(Self::ReplayUploadSuccess), - "ReplayUploadFailure" => Some(Self::ReplayUploadFailure), - _ => None, - } - } - } -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum TaskAction { - KillSession = 0, - LockSession = 1, - UnlockSession = 2, - TokenPermExpired = 3, - TokenPermValid = 4, -} -impl TaskAction { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Self::KillSession => "KillSession", - Self::LockSession => "LockSession", - Self::UnlockSession => "UnlockSession", - Self::TokenPermExpired => "TokenPermExpired", - Self::TokenPermValid => "TokenPermValid", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "KillSession" => Some(Self::KillSession), - "LockSession" => Some(Self::LockSession), - "UnlockSession" => Some(Self::UnlockSession), - "TokenPermExpired" => Some(Self::TokenPermExpired), - "TokenPermValid" => Some(Self::TokenPermValid), - _ => None, - } - } -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum RiskLevel { - Normal = 0, - Warning = 1, - Reject = 2, - ReviewReject = 3, - ReviewAccept = 4, - ReviewCancel = 5, -} -impl RiskLevel { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Self::Normal => "Normal", - Self::Warning => "Warning", - Self::Reject => "Reject", - Self::ReviewReject => "ReviewReject", - Self::ReviewAccept => "ReviewAccept", - Self::ReviewCancel => "ReviewCancel", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "Normal" => Some(Self::Normal), - "Warning" => Some(Self::Warning), - "Reject" => Some(Self::Reject), - "ReviewReject" => Some(Self::ReviewReject), - "ReviewAccept" => Some(Self::ReviewAccept), - "ReviewCancel" => Some(Self::ReviewCancel), - _ => None, - } - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct JoinFaceMonitorRequest { - #[prost(string, tag="1")] - pub face_monitor_token: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub session_id: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct JoinFaceMonitorResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FaceMonitorCallbackRequest { - #[prost(string, tag="1")] - pub token: ::prost::alloc::string::String, - #[prost(bool, tag="2")] - pub success: bool, - #[prost(string, tag="3")] - pub error_message: ::prost::alloc::string::String, - #[prost(bool, tag="4")] - pub is_finished: bool, - #[prost(string, tag="5")] - pub action: ::prost::alloc::string::String, - #[prost(string, repeated, tag="6")] - pub face_codes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FaceMonitorCallbackResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FaceRecognitionCallbackRequest { - #[prost(string, tag="1")] - pub token: ::prost::alloc::string::String, - #[prost(bool, tag="2")] - pub success: bool, - #[prost(string, tag="3")] - pub error_message: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub face_code: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FaceRecognitionCallbackResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AssetLoginTicketRequest { - #[prost(string, tag="1")] - pub user_id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub asset_id: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub account_username: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AssetLoginTicketResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub ticket_info: ::core::option::Option, - #[prost(bool, tag="3")] - pub need_confirm: bool, - #[prost(string, tag="4")] - pub ticket_id: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Status { - #[prost(bool, tag="1")] - pub ok: bool, - #[prost(string, tag="2")] - pub err: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TokenRequest { - #[prost(string, tag="1")] - pub token: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TokenResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub data: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SessionCreateRequest { - #[prost(message, optional, tag="1")] - pub data: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SessionCreateResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub data: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SessionFinishRequest { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(bool, tag="2")] - pub success: bool, - #[prost(int64, tag="3")] - pub date_end: i64, - #[prost(string, tag="4")] - pub err: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SessionFinishResp { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ReplayRequest { - #[prost(string, tag="1")] - pub session_id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub replay_file_path: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ReplayResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CommandRequest { - #[prost(string, tag="1")] - pub sid: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub org_id: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub input: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub output: ::prost::alloc::string::String, - #[prost(string, tag="5")] - pub user: ::prost::alloc::string::String, - #[prost(string, tag="6")] - pub asset: ::prost::alloc::string::String, - #[prost(string, tag="7")] - pub account: ::prost::alloc::string::String, - #[prost(int64, tag="8")] - pub timestamp: i64, - #[prost(enumeration="RiskLevel", tag="9")] - pub risk_level: i32, - #[prost(string, tag="10")] - pub cmd_acl_id: ::prost::alloc::string::String, - #[prost(string, tag="11")] - pub cmd_group_id: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CommandResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FinishedTaskRequest { - #[prost(string, tag="1")] - pub task_id: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TaskResponse { - #[prost(message, optional, tag="1")] - pub task: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct RemainReplayRequest { - #[prost(string, tag="1")] - pub replay_dir: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct RemainReplayResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, - #[prost(string, repeated, tag="2")] - pub success_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, repeated, tag="3")] - pub failure_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, repeated, tag="4")] - pub failure_errs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StatusResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CommandConfirmRequest { - #[prost(string, tag="1")] - pub session_id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub cmd_acl_id: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub cmd: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ReqInfo { - #[prost(string, tag="1")] - pub method: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub url: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CommandConfirmResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub info: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TicketInfo { - #[prost(message, optional, tag="1")] - pub check_req: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub cancel_req: ::core::option::Option, - #[prost(string, tag="3")] - pub ticket_detail_url: ::prost::alloc::string::String, - #[prost(string, repeated, tag="4")] - pub reviewers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TicketRequest { - #[prost(message, optional, tag="1")] - pub req: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TicketStateResponse { - #[prost(message, optional, tag="1")] - pub data: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub status: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TicketState { - #[prost(enumeration="ticket_state::State", tag="1")] - pub state: i32, - #[prost(string, tag="2")] - pub processor: ::prost::alloc::string::String, -} -/// Nested message and enum types in `TicketState`. -pub mod ticket_state { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum State { - Open = 0, - Approved = 1, - Rejected = 2, - Closed = 3, - } - impl State { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Self::Open => "Open", - Self::Approved => "Approved", - Self::Rejected => "Rejected", - Self::Closed => "Closed", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "Open" => Some(Self::Open), - "Approved" => Some(Self::Approved), - "Rejected" => Some(Self::Rejected), - "Closed" => Some(Self::Closed), - _ => None, - } - } - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ForwardRequest { - #[prost(string, tag="1")] - pub host: ::prost::alloc::string::String, - #[prost(int32, tag="2")] - pub port: i32, - #[prost(message, repeated, tag="3")] - pub gateways: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ForwardDeleteRequest { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ForwardResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, - #[prost(string, tag="2")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub host: ::prost::alloc::string::String, - #[prost(int32, tag="4")] - pub port: i32, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PublicSettingResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub data: ::core::option::Option, -} -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct Empty { -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListenPortResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, - #[prost(int32, repeated, tag="2")] - pub ports: ::prost::alloc::vec::Vec, -} -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct PortInfoRequest { - #[prost(int32, tag="1")] - pub port: i32, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PortInfoResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub data: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PortInfo { - #[prost(message, optional, tag="1")] - pub asset: ::core::option::Option, - #[prost(message, repeated, tag="2")] - pub gateways: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PortFailure { - #[prost(int32, tag="1")] - pub port: i32, - #[prost(string, tag="2")] - pub reason: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PortFailureRequest { - #[prost(message, repeated, tag="1")] - pub data: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CookiesRequest { - #[prost(message, repeated, tag="1")] - pub cookies: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UserResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub data: ::core::option::Option, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SessionLifecycleLogRequest { - #[prost(string, tag="1")] - pub session_id: ::prost::alloc::string::String, - #[prost(enumeration="session_lifecycle_log_request::EventType", tag="2")] - pub event: i32, - #[prost(string, tag="3")] - pub reason: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub user: ::prost::alloc::string::String, -} -/// Nested message and enum types in `SessionLifecycleLogRequest`. -pub mod session_lifecycle_log_request { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum EventType { - AssetConnectSuccess = 0, - AssetConnectFinished = 1, - CreateShareLink = 2, - UserJoinSession = 3, - UserLeaveSession = 4, - AdminJoinMonitor = 5, - AdminExitMonitor = 6, - ReplayConvertStart = 7, - ReplayConvertSuccess = 8, - ReplayConvertFailure = 9, - ReplayUploadStart = 10, - ReplayUploadSuccess = 11, - ReplayUploadFailure = 12, - } - impl EventType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Self::AssetConnectSuccess => "AssetConnectSuccess", - Self::AssetConnectFinished => "AssetConnectFinished", - Self::CreateShareLink => "CreateShareLink", - Self::UserJoinSession => "UserJoinSession", - Self::UserLeaveSession => "UserLeaveSession", - Self::AdminJoinMonitor => "AdminJoinMonitor", - Self::AdminExitMonitor => "AdminExitMonitor", - Self::ReplayConvertStart => "ReplayConvertStart", - Self::ReplayConvertSuccess => "ReplayConvertSuccess", - Self::ReplayConvertFailure => "ReplayConvertFailure", - Self::ReplayUploadStart => "ReplayUploadStart", - Self::ReplayUploadSuccess => "ReplayUploadSuccess", - Self::ReplayUploadFailure => "ReplayUploadFailure", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "AssetConnectSuccess" => Some(Self::AssetConnectSuccess), - "AssetConnectFinished" => Some(Self::AssetConnectFinished), - "CreateShareLink" => Some(Self::CreateShareLink), - "UserJoinSession" => Some(Self::UserJoinSession), - "UserLeaveSession" => Some(Self::UserLeaveSession), - "AdminJoinMonitor" => Some(Self::AdminJoinMonitor), - "AdminExitMonitor" => Some(Self::AdminExitMonitor), - "ReplayConvertStart" => Some(Self::ReplayConvertStart), - "ReplayConvertSuccess" => Some(Self::ReplayConvertSuccess), - "ReplayConvertFailure" => Some(Self::ReplayConvertFailure), - "ReplayUploadStart" => Some(Self::ReplayUploadStart), - "ReplayUploadSuccess" => Some(Self::ReplayUploadSuccess), - "ReplayUploadFailure" => Some(Self::ReplayUploadFailure), - _ => None, - } - } - } -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AccountDetailResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub payload: ::core::option::Option<::prost_types::Struct>, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct HttpRequest { - #[prost(string, tag="1")] - pub method: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub path: ::prost::alloc::string::String, - #[prost(map="string, string", tag="3")] - pub query: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - #[prost(map="string, string", tag="4")] - pub header: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - #[prost(bytes="vec", tag="5")] - pub body: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct HttpResponse { - #[prost(message, optional, tag="1")] - pub status: ::core::option::Option, - #[prost(bytes="vec", tag="2")] - pub body: ::prost::alloc::vec::Vec, -} -include!("message.tonic.rs"); -// @@protoc_insertion_point(module) diff --git a/protobuf-rs/message.tonic.rs b/protobuf-rs/message.tonic.rs deleted file mode 100644 index 268d678..0000000 --- a/protobuf-rs/message.tonic.rs +++ /dev/null @@ -1,2057 +0,0 @@ -// @generated -/// Generated client implementations. -pub mod service_client { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - #[derive(Debug, Clone)] - pub struct ServiceClient { - inner: tonic::client::Grpc, - } - impl ServiceClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl ServiceClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + std::marker::Send + 'static, - ::Error: Into + std::marker::Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> ServiceClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + std::marker::Send + std::marker::Sync, - { - ServiceClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - pub async fn get_token_auth_info( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/GetTokenAuthInfo", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "GetTokenAuthInfo")); - self.inner.unary(req, path, codec).await - } - pub async fn renew_token( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/RenewToken", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "RenewToken")); - self.inner.unary(req, path, codec).await - } - pub async fn create_session( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/CreateSession", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "CreateSession")); - self.inner.unary(req, path, codec).await - } - pub async fn finish_session( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/FinishSession", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "FinishSession")); - self.inner.unary(req, path, codec).await - } - pub async fn upload_replay_file( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/UploadReplayFile", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "UploadReplayFile")); - self.inner.unary(req, path, codec).await - } - pub async fn upload_command( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/UploadCommand", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "UploadCommand")); - self.inner.unary(req, path, codec).await - } - pub async fn dispatch_task( - &mut self, - request: impl tonic::IntoStreamingRequest< - Message = super::FinishedTaskRequest, - >, - ) -> std::result::Result< - tonic::Response>, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/DispatchTask", - ); - let mut req = request.into_streaming_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "DispatchTask")); - self.inner.streaming(req, path, codec).await - } - pub async fn scan_remain_replays( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/ScanRemainReplays", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "ScanRemainReplays")); - self.inner.unary(req, path, codec).await - } - pub async fn create_command_ticket( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/CreateCommandTicket", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "CreateCommandTicket")); - self.inner.unary(req, path, codec).await - } - pub async fn check_or_create_asset_login_ticket( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/CheckOrCreateAssetLoginTicket", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("message.Service", "CheckOrCreateAssetLoginTicket"), - ); - self.inner.unary(req, path, codec).await - } - pub async fn check_ticket_state( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/CheckTicketState", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "CheckTicketState")); - self.inner.unary(req, path, codec).await - } - pub async fn cancel_ticket( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/CancelTicket", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "CancelTicket")); - self.inner.unary(req, path, codec).await - } - pub async fn create_forward( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/CreateForward", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "CreateForward")); - self.inner.unary(req, path, codec).await - } - pub async fn delete_forward( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/DeleteForward", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "DeleteForward")); - self.inner.unary(req, path, codec).await - } - pub async fn get_public_setting( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/GetPublicSetting", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "GetPublicSetting")); - self.inner.unary(req, path, codec).await - } - pub async fn get_listen_ports( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/GetListenPorts", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "GetListenPorts")); - self.inner.unary(req, path, codec).await - } - pub async fn get_port_info( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/GetPortInfo", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "GetPortInfo")); - self.inner.unary(req, path, codec).await - } - pub async fn handle_port_failure( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/HandlePortFailure", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "HandlePortFailure")); - self.inner.unary(req, path, codec).await - } - pub async fn check_user_by_cookies( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/CheckUserByCookies", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "CheckUserByCookies")); - self.inner.unary(req, path, codec).await - } - pub async fn record_session_lifecycle_log( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/RecordSessionLifecycleLog", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "RecordSessionLifecycleLog")); - self.inner.unary(req, path, codec).await - } - pub async fn face_recognition_callback( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/FaceRecognitionCallback", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "FaceRecognitionCallback")); - self.inner.unary(req, path, codec).await - } - pub async fn face_monitor_callback( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/FaceMonitorCallback", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "FaceMonitorCallback")); - self.inner.unary(req, path, codec).await - } - pub async fn join_face_monitor( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/JoinFaceMonitor", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "JoinFaceMonitor")); - self.inner.unary(req, path, codec).await - } - pub async fn get_account_chat( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/message.Service/GetAccountChat", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("message.Service", "GetAccountChat")); - self.inner.unary(req, path, codec).await - } - pub async fn call_api( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/message.Service/CallAPI"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new("message.Service", "CallAPI")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -pub mod service_server { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with ServiceServer. - #[async_trait] - pub trait Service: std::marker::Send + std::marker::Sync + 'static { - async fn get_token_auth_info( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - async fn renew_token( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - async fn create_session( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn finish_session( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn upload_replay_file( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - async fn upload_command( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - /// Server streaming response type for the DispatchTask method. - type DispatchTaskStream: tonic::codegen::tokio_stream::Stream< - Item = std::result::Result, - > - + std::marker::Send - + 'static; - async fn dispatch_task( - &self, - request: tonic::Request>, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn scan_remain_replays( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn create_command_ticket( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn check_or_create_asset_login_ticket( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn check_ticket_state( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn cancel_ticket( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - async fn create_forward( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - async fn delete_forward( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - async fn get_public_setting( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_listen_ports( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_port_info( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn handle_port_failure( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - async fn check_user_by_cookies( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - async fn record_session_lifecycle_log( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - async fn face_recognition_callback( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn face_monitor_callback( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn join_face_monitor( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_account_chat( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn call_api( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - } - #[derive(Debug)] - pub struct ServiceServer { - inner: Arc, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - impl ServiceServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for ServiceServer - where - T: Service, - B: Body + std::marker::Send + 'static, - B::Error: Into + std::marker::Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - match req.uri().path() { - "/message.Service/GetTokenAuthInfo" => { - #[allow(non_camel_case_types)] - struct GetTokenAuthInfoSvc(pub Arc); - impl tonic::server::UnaryService - for GetTokenAuthInfoSvc { - type Response = super::TokenResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::get_token_auth_info(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = GetTokenAuthInfoSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/RenewToken" => { - #[allow(non_camel_case_types)] - struct RenewTokenSvc(pub Arc); - impl tonic::server::UnaryService - for RenewTokenSvc { - type Response = super::StatusResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::renew_token(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = RenewTokenSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/CreateSession" => { - #[allow(non_camel_case_types)] - struct CreateSessionSvc(pub Arc); - impl< - T: Service, - > tonic::server::UnaryService - for CreateSessionSvc { - type Response = super::SessionCreateResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::create_session(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = CreateSessionSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/FinishSession" => { - #[allow(non_camel_case_types)] - struct FinishSessionSvc(pub Arc); - impl< - T: Service, - > tonic::server::UnaryService - for FinishSessionSvc { - type Response = super::SessionFinishResp; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::finish_session(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = FinishSessionSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/UploadReplayFile" => { - #[allow(non_camel_case_types)] - struct UploadReplayFileSvc(pub Arc); - impl tonic::server::UnaryService - for UploadReplayFileSvc { - type Response = super::ReplayResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::upload_replay_file(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = UploadReplayFileSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/UploadCommand" => { - #[allow(non_camel_case_types)] - struct UploadCommandSvc(pub Arc); - impl tonic::server::UnaryService - for UploadCommandSvc { - type Response = super::CommandResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::upload_command(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = UploadCommandSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/DispatchTask" => { - #[allow(non_camel_case_types)] - struct DispatchTaskSvc(pub Arc); - impl< - T: Service, - > tonic::server::StreamingService - for DispatchTaskSvc { - type Response = super::TaskResponse; - type ResponseStream = T::DispatchTaskStream; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - tonic::Streaming, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::dispatch_task(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = DispatchTaskSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.streaming(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/ScanRemainReplays" => { - #[allow(non_camel_case_types)] - struct ScanRemainReplaysSvc(pub Arc); - impl< - T: Service, - > tonic::server::UnaryService - for ScanRemainReplaysSvc { - type Response = super::RemainReplayResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::scan_remain_replays(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = ScanRemainReplaysSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/CreateCommandTicket" => { - #[allow(non_camel_case_types)] - struct CreateCommandTicketSvc(pub Arc); - impl< - T: Service, - > tonic::server::UnaryService - for CreateCommandTicketSvc { - type Response = super::CommandConfirmResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::create_command_ticket(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = CreateCommandTicketSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/CheckOrCreateAssetLoginTicket" => { - #[allow(non_camel_case_types)] - struct CheckOrCreateAssetLoginTicketSvc(pub Arc); - impl< - T: Service, - > tonic::server::UnaryService - for CheckOrCreateAssetLoginTicketSvc { - type Response = super::AssetLoginTicketResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::check_or_create_asset_login_ticket( - &inner, - request, - ) - .await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = CheckOrCreateAssetLoginTicketSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/CheckTicketState" => { - #[allow(non_camel_case_types)] - struct CheckTicketStateSvc(pub Arc); - impl tonic::server::UnaryService - for CheckTicketStateSvc { - type Response = super::TicketStateResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::check_ticket_state(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = CheckTicketStateSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/CancelTicket" => { - #[allow(non_camel_case_types)] - struct CancelTicketSvc(pub Arc); - impl tonic::server::UnaryService - for CancelTicketSvc { - type Response = super::StatusResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::cancel_ticket(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = CancelTicketSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/CreateForward" => { - #[allow(non_camel_case_types)] - struct CreateForwardSvc(pub Arc); - impl tonic::server::UnaryService - for CreateForwardSvc { - type Response = super::ForwardResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::create_forward(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = CreateForwardSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/DeleteForward" => { - #[allow(non_camel_case_types)] - struct DeleteForwardSvc(pub Arc); - impl< - T: Service, - > tonic::server::UnaryService - for DeleteForwardSvc { - type Response = super::StatusResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::delete_forward(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = DeleteForwardSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/GetPublicSetting" => { - #[allow(non_camel_case_types)] - struct GetPublicSettingSvc(pub Arc); - impl tonic::server::UnaryService - for GetPublicSettingSvc { - type Response = super::PublicSettingResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::get_public_setting(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = GetPublicSettingSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/GetListenPorts" => { - #[allow(non_camel_case_types)] - struct GetListenPortsSvc(pub Arc); - impl tonic::server::UnaryService - for GetListenPortsSvc { - type Response = super::ListenPortResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::get_listen_ports(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = GetListenPortsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/GetPortInfo" => { - #[allow(non_camel_case_types)] - struct GetPortInfoSvc(pub Arc); - impl tonic::server::UnaryService - for GetPortInfoSvc { - type Response = super::PortInfoResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::get_port_info(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = GetPortInfoSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/HandlePortFailure" => { - #[allow(non_camel_case_types)] - struct HandlePortFailureSvc(pub Arc); - impl< - T: Service, - > tonic::server::UnaryService - for HandlePortFailureSvc { - type Response = super::StatusResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::handle_port_failure(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = HandlePortFailureSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/CheckUserByCookies" => { - #[allow(non_camel_case_types)] - struct CheckUserByCookiesSvc(pub Arc); - impl tonic::server::UnaryService - for CheckUserByCookiesSvc { - type Response = super::UserResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::check_user_by_cookies(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = CheckUserByCookiesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/RecordSessionLifecycleLog" => { - #[allow(non_camel_case_types)] - struct RecordSessionLifecycleLogSvc(pub Arc); - impl< - T: Service, - > tonic::server::UnaryService - for RecordSessionLifecycleLogSvc { - type Response = super::StatusResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::record_session_lifecycle_log( - &inner, - request, - ) - .await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = RecordSessionLifecycleLogSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/FaceRecognitionCallback" => { - #[allow(non_camel_case_types)] - struct FaceRecognitionCallbackSvc(pub Arc); - impl< - T: Service, - > tonic::server::UnaryService - for FaceRecognitionCallbackSvc { - type Response = super::FaceRecognitionCallbackResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::FaceRecognitionCallbackRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::face_recognition_callback(&inner, request) - .await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = FaceRecognitionCallbackSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/FaceMonitorCallback" => { - #[allow(non_camel_case_types)] - struct FaceMonitorCallbackSvc(pub Arc); - impl< - T: Service, - > tonic::server::UnaryService - for FaceMonitorCallbackSvc { - type Response = super::FaceMonitorCallbackResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::face_monitor_callback(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = FaceMonitorCallbackSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/JoinFaceMonitor" => { - #[allow(non_camel_case_types)] - struct JoinFaceMonitorSvc(pub Arc); - impl< - T: Service, - > tonic::server::UnaryService - for JoinFaceMonitorSvc { - type Response = super::JoinFaceMonitorResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::join_face_monitor(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = JoinFaceMonitorSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/GetAccountChat" => { - #[allow(non_camel_case_types)] - struct GetAccountChatSvc(pub Arc); - impl tonic::server::UnaryService - for GetAccountChatSvc { - type Response = super::AccountDetailResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::get_account_chat(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = GetAccountChatSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/message.Service/CallAPI" => { - #[allow(non_camel_case_types)] - struct CallAPISvc(pub Arc); - impl tonic::server::UnaryService - for CallAPISvc { - type Response = super::HttpResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::call_api(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = CallAPISvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => { - Box::pin(async move { - let mut response = http::Response::new(empty_body()); - let headers = response.headers_mut(); - headers - .insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers - .insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }) - } - } - } - } - impl Clone for ServiceServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - /// Generated gRPC service name - pub const SERVICE_NAME: &str = "message.Service"; - impl tonic::server::NamedService for ServiceServer { - const NAME: &'static str = SERVICE_NAME; - } -}