hostel-protocol 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hostel_protocol-0.1.0/PKG-INFO +6 -0
- hostel_protocol-0.1.0/hostel/protocol/v1/agent_pb2.py +41 -0
- hostel_protocol-0.1.0/hostel/protocol/v1/agent_pb2.pyi +18 -0
- hostel_protocol-0.1.0/hostel/protocol/v1/agent_pb2_grpc.py +83 -0
- hostel_protocol-0.1.0/hostel/protocol/v1/chat_pb2.py +49 -0
- hostel_protocol-0.1.0/hostel/protocol/v1/chat_pb2.pyi +56 -0
- hostel_protocol-0.1.0/hostel/protocol/v1/chat_pb2_grpc.py +83 -0
- hostel_protocol-0.1.0/hostel/protocol/v1/component_pb2.py +57 -0
- hostel_protocol-0.1.0/hostel/protocol/v1/component_pb2.pyi +94 -0
- hostel_protocol-0.1.0/hostel/protocol/v1/component_pb2_grpc.py +255 -0
- hostel_protocol-0.1.0/hostel/protocol/v1/message_pb2.py +41 -0
- hostel_protocol-0.1.0/hostel/protocol/v1/message_pb2.pyi +77 -0
- hostel_protocol-0.1.0/hostel/protocol/v1/message_pb2_grpc.py +4 -0
- hostel_protocol-0.1.0/hostel/protocol/v1/task_pb2.py +59 -0
- hostel_protocol-0.1.0/hostel/protocol/v1/task_pb2.pyi +106 -0
- hostel_protocol-0.1.0/hostel/protocol/v1/task_pb2_grpc.py +255 -0
- hostel_protocol-0.1.0/hostel_protocol.egg-info/PKG-INFO +6 -0
- hostel_protocol-0.1.0/hostel_protocol.egg-info/SOURCES.txt +21 -0
- hostel_protocol-0.1.0/hostel_protocol.egg-info/dependency_links.txt +1 -0
- hostel_protocol-0.1.0/hostel_protocol.egg-info/requires.txt +1 -0
- hostel_protocol-0.1.0/hostel_protocol.egg-info/top_level.txt +1 -0
- hostel_protocol-0.1.0/pyproject.toml +16 -0
- hostel_protocol-0.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: hostel/protocol/v1/agent.proto
|
|
5
|
+
# Protobuf Python Version: 7.34.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
7,
|
|
15
|
+
34,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'hostel/protocol/v1/agent.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ehostel/protocol/v1/agent.proto\x12\x12hostel.protocol.v1\x1a\x1cgoogle/protobuf/struct.proto\"\x13\n\x11ListAgentsRequest\"E\n\x12ListAgentsResponse\x12/\n\x06\x61gents\x18\x01 \x03(\x0b\x32\x17.google.protobuf.StructR\x06\x61gents2k\n\x0c\x41gentService\x12[\n\nListAgents\x12%.hostel.protocol.v1.ListAgentsRequest\x1a&.hostel.protocol.v1.ListAgentsResponseb\x06proto3')
|
|
29
|
+
|
|
30
|
+
_globals = globals()
|
|
31
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
32
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'hostel.protocol.v1.agent_pb2', _globals)
|
|
33
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
34
|
+
DESCRIPTOR._loaded_options = None
|
|
35
|
+
_globals['_LISTAGENTSREQUEST']._serialized_start=84
|
|
36
|
+
_globals['_LISTAGENTSREQUEST']._serialized_end=103
|
|
37
|
+
_globals['_LISTAGENTSRESPONSE']._serialized_start=105
|
|
38
|
+
_globals['_LISTAGENTSRESPONSE']._serialized_end=174
|
|
39
|
+
_globals['_AGENTSERVICE']._serialized_start=176
|
|
40
|
+
_globals['_AGENTSERVICE']._serialized_end=283
|
|
41
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from google.protobuf import struct_pb2 as _struct_pb2
|
|
2
|
+
from google.protobuf.internal import containers as _containers
|
|
3
|
+
from google.protobuf import descriptor as _descriptor
|
|
4
|
+
from google.protobuf import message as _message
|
|
5
|
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
|
6
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
|
7
|
+
|
|
8
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
9
|
+
|
|
10
|
+
class ListAgentsRequest(_message.Message):
|
|
11
|
+
__slots__ = ()
|
|
12
|
+
def __init__(self) -> None: ...
|
|
13
|
+
|
|
14
|
+
class ListAgentsResponse(_message.Message):
|
|
15
|
+
__slots__ = ("agents",)
|
|
16
|
+
AGENTS_FIELD_NUMBER: _ClassVar[int]
|
|
17
|
+
agents: _containers.RepeatedCompositeFieldContainer[_struct_pb2.Struct]
|
|
18
|
+
def __init__(self, agents: _Optional[_Iterable[_Union[_struct_pb2.Struct, _Mapping]]] = ...) -> None: ...
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from hostel.protocol.v1 import agent_pb2 as hostel_dot_protocol_dot_v1_dot_agent__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class AgentServiceStub(object):
|
|
9
|
+
"""── Services ────────────────────────────────────────────────────────────────
|
|
10
|
+
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, channel):
|
|
14
|
+
"""Constructor.
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
channel: A grpc.Channel.
|
|
18
|
+
"""
|
|
19
|
+
self.ListAgents = channel.unary_unary(
|
|
20
|
+
'/hostel.protocol.v1.AgentService/ListAgents',
|
|
21
|
+
request_serializer=hostel_dot_protocol_dot_v1_dot_agent__pb2.ListAgentsRequest.SerializeToString,
|
|
22
|
+
response_deserializer=hostel_dot_protocol_dot_v1_dot_agent__pb2.ListAgentsResponse.FromString,
|
|
23
|
+
_registered_method=True)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class AgentServiceServicer(object):
|
|
27
|
+
"""── Services ────────────────────────────────────────────────────────────────
|
|
28
|
+
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
def ListAgents(self, request, context):
|
|
32
|
+
"""Missing associated documentation comment in .proto file."""
|
|
33
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
34
|
+
context.set_details('Method not implemented!')
|
|
35
|
+
raise NotImplementedError('Method not implemented!')
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def add_AgentServiceServicer_to_server(servicer, server):
|
|
39
|
+
rpc_method_handlers = {
|
|
40
|
+
'ListAgents': grpc.unary_unary_rpc_method_handler(
|
|
41
|
+
servicer.ListAgents,
|
|
42
|
+
request_deserializer=hostel_dot_protocol_dot_v1_dot_agent__pb2.ListAgentsRequest.FromString,
|
|
43
|
+
response_serializer=hostel_dot_protocol_dot_v1_dot_agent__pb2.ListAgentsResponse.SerializeToString,
|
|
44
|
+
),
|
|
45
|
+
}
|
|
46
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
47
|
+
'hostel.protocol.v1.AgentService', rpc_method_handlers)
|
|
48
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
49
|
+
server.add_registered_method_handlers('hostel.protocol.v1.AgentService', rpc_method_handlers)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
# This class is part of an EXPERIMENTAL API.
|
|
53
|
+
class AgentService(object):
|
|
54
|
+
"""── Services ────────────────────────────────────────────────────────────────
|
|
55
|
+
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
@staticmethod
|
|
59
|
+
def ListAgents(request,
|
|
60
|
+
target,
|
|
61
|
+
options=(),
|
|
62
|
+
channel_credentials=None,
|
|
63
|
+
call_credentials=None,
|
|
64
|
+
insecure=False,
|
|
65
|
+
compression=None,
|
|
66
|
+
wait_for_ready=None,
|
|
67
|
+
timeout=None,
|
|
68
|
+
metadata=None):
|
|
69
|
+
return grpc.experimental.unary_unary(
|
|
70
|
+
request,
|
|
71
|
+
target,
|
|
72
|
+
'/hostel.protocol.v1.AgentService/ListAgents',
|
|
73
|
+
hostel_dot_protocol_dot_v1_dot_agent__pb2.ListAgentsRequest.SerializeToString,
|
|
74
|
+
hostel_dot_protocol_dot_v1_dot_agent__pb2.ListAgentsResponse.FromString,
|
|
75
|
+
options,
|
|
76
|
+
channel_credentials,
|
|
77
|
+
insecure,
|
|
78
|
+
call_credentials,
|
|
79
|
+
compression,
|
|
80
|
+
wait_for_ready,
|
|
81
|
+
timeout,
|
|
82
|
+
metadata,
|
|
83
|
+
_registered_method=True)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: hostel/protocol/v1/chat.proto
|
|
5
|
+
# Protobuf Python Version: 7.34.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
7,
|
|
15
|
+
34,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'hostel/protocol/v1/chat.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dhostel/protocol/v1/chat.proto\x12\x12hostel.protocol.v1\x1a\x1cgoogle/protobuf/struct.proto\"\xc6\x01\n\x0b\x43hatMessage\x12<\n\x05human\x18\x01 \x01(\x0b\x32$.hostel.protocol.v1.HumanChatMessageH\x00R\x05human\x12\x33\n\x02\x61i\x18\x02 \x01(\x0b\x32!.hostel.protocol.v1.AIChatMessageH\x00R\x02\x61i\x12\x39\n\x04tool\x18\x03 \x01(\x0b\x32#.hostel.protocol.v1.ToolChatMessageH\x00R\x04toolB\t\n\x07message\",\n\x10HumanChatMessage\x12\x18\n\x07\x63ontent\x18\x01 \x01(\tR\x07\x63ontent\")\n\rAIChatMessage\x12\x18\n\x07\x63ontent\x18\x01 \x01(\tR\x07\x63ontent\"H\n\x0fToolChatMessage\x12\x18\n\x07\x63ontent\x18\x01 \x01(\tR\x07\x63ontent\x12\x1b\n\ttool_name\x18\x02 \x01(\tR\x08toolName\"i\n\x0b\x43hatRequest\x12\x1d\n\nagent_name\x18\x01 \x01(\tR\tagentName\x12;\n\x08messages\x18\x02 \x03(\x0b\x32\x1f.hostel.protocol.v1.ChatMessageR\x08messages\"j\n\x0c\x43hatResponse\x12\x12\n\x04role\x18\x01 \x01(\tR\x04role\x12\x14\n\x05scope\x18\x02 \x01(\tR\x05scope\x12\x30\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x16.google.protobuf.ValueR\x07\x63ontent2Z\n\x0b\x43hatService\x12K\n\x04\x43hat\x12\x1f.hostel.protocol.v1.ChatRequest\x1a .hostel.protocol.v1.ChatResponse0\x01\x62\x06proto3')
|
|
29
|
+
|
|
30
|
+
_globals = globals()
|
|
31
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
32
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'hostel.protocol.v1.chat_pb2', _globals)
|
|
33
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
34
|
+
DESCRIPTOR._loaded_options = None
|
|
35
|
+
_globals['_CHATMESSAGE']._serialized_start=84
|
|
36
|
+
_globals['_CHATMESSAGE']._serialized_end=282
|
|
37
|
+
_globals['_HUMANCHATMESSAGE']._serialized_start=284
|
|
38
|
+
_globals['_HUMANCHATMESSAGE']._serialized_end=328
|
|
39
|
+
_globals['_AICHATMESSAGE']._serialized_start=330
|
|
40
|
+
_globals['_AICHATMESSAGE']._serialized_end=371
|
|
41
|
+
_globals['_TOOLCHATMESSAGE']._serialized_start=373
|
|
42
|
+
_globals['_TOOLCHATMESSAGE']._serialized_end=445
|
|
43
|
+
_globals['_CHATREQUEST']._serialized_start=447
|
|
44
|
+
_globals['_CHATREQUEST']._serialized_end=552
|
|
45
|
+
_globals['_CHATRESPONSE']._serialized_start=554
|
|
46
|
+
_globals['_CHATRESPONSE']._serialized_end=660
|
|
47
|
+
_globals['_CHATSERVICE']._serialized_start=662
|
|
48
|
+
_globals['_CHATSERVICE']._serialized_end=752
|
|
49
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
from google.protobuf import struct_pb2 as _struct_pb2
|
|
2
|
+
from google.protobuf.internal import containers as _containers
|
|
3
|
+
from google.protobuf import descriptor as _descriptor
|
|
4
|
+
from google.protobuf import message as _message
|
|
5
|
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
|
6
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
|
7
|
+
|
|
8
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
9
|
+
|
|
10
|
+
class ChatMessage(_message.Message):
|
|
11
|
+
__slots__ = ("human", "ai", "tool")
|
|
12
|
+
HUMAN_FIELD_NUMBER: _ClassVar[int]
|
|
13
|
+
AI_FIELD_NUMBER: _ClassVar[int]
|
|
14
|
+
TOOL_FIELD_NUMBER: _ClassVar[int]
|
|
15
|
+
human: HumanChatMessage
|
|
16
|
+
ai: AIChatMessage
|
|
17
|
+
tool: ToolChatMessage
|
|
18
|
+
def __init__(self, human: _Optional[_Union[HumanChatMessage, _Mapping]] = ..., ai: _Optional[_Union[AIChatMessage, _Mapping]] = ..., tool: _Optional[_Union[ToolChatMessage, _Mapping]] = ...) -> None: ...
|
|
19
|
+
|
|
20
|
+
class HumanChatMessage(_message.Message):
|
|
21
|
+
__slots__ = ("content",)
|
|
22
|
+
CONTENT_FIELD_NUMBER: _ClassVar[int]
|
|
23
|
+
content: str
|
|
24
|
+
def __init__(self, content: _Optional[str] = ...) -> None: ...
|
|
25
|
+
|
|
26
|
+
class AIChatMessage(_message.Message):
|
|
27
|
+
__slots__ = ("content",)
|
|
28
|
+
CONTENT_FIELD_NUMBER: _ClassVar[int]
|
|
29
|
+
content: str
|
|
30
|
+
def __init__(self, content: _Optional[str] = ...) -> None: ...
|
|
31
|
+
|
|
32
|
+
class ToolChatMessage(_message.Message):
|
|
33
|
+
__slots__ = ("content", "tool_name")
|
|
34
|
+
CONTENT_FIELD_NUMBER: _ClassVar[int]
|
|
35
|
+
TOOL_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
36
|
+
content: str
|
|
37
|
+
tool_name: str
|
|
38
|
+
def __init__(self, content: _Optional[str] = ..., tool_name: _Optional[str] = ...) -> None: ...
|
|
39
|
+
|
|
40
|
+
class ChatRequest(_message.Message):
|
|
41
|
+
__slots__ = ("agent_name", "messages")
|
|
42
|
+
AGENT_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
43
|
+
MESSAGES_FIELD_NUMBER: _ClassVar[int]
|
|
44
|
+
agent_name: str
|
|
45
|
+
messages: _containers.RepeatedCompositeFieldContainer[ChatMessage]
|
|
46
|
+
def __init__(self, agent_name: _Optional[str] = ..., messages: _Optional[_Iterable[_Union[ChatMessage, _Mapping]]] = ...) -> None: ...
|
|
47
|
+
|
|
48
|
+
class ChatResponse(_message.Message):
|
|
49
|
+
__slots__ = ("role", "scope", "content")
|
|
50
|
+
ROLE_FIELD_NUMBER: _ClassVar[int]
|
|
51
|
+
SCOPE_FIELD_NUMBER: _ClassVar[int]
|
|
52
|
+
CONTENT_FIELD_NUMBER: _ClassVar[int]
|
|
53
|
+
role: str
|
|
54
|
+
scope: str
|
|
55
|
+
content: _struct_pb2.Value
|
|
56
|
+
def __init__(self, role: _Optional[str] = ..., scope: _Optional[str] = ..., content: _Optional[_Union[_struct_pb2.Value, _Mapping]] = ...) -> None: ...
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from hostel.protocol.v1 import chat_pb2 as hostel_dot_protocol_dot_v1_dot_chat__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ChatServiceStub(object):
|
|
9
|
+
"""── Services ────────────────────────────────────────────────────────────────
|
|
10
|
+
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, channel):
|
|
14
|
+
"""Constructor.
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
channel: A grpc.Channel.
|
|
18
|
+
"""
|
|
19
|
+
self.Chat = channel.unary_stream(
|
|
20
|
+
'/hostel.protocol.v1.ChatService/Chat',
|
|
21
|
+
request_serializer=hostel_dot_protocol_dot_v1_dot_chat__pb2.ChatRequest.SerializeToString,
|
|
22
|
+
response_deserializer=hostel_dot_protocol_dot_v1_dot_chat__pb2.ChatResponse.FromString,
|
|
23
|
+
_registered_method=True)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class ChatServiceServicer(object):
|
|
27
|
+
"""── Services ────────────────────────────────────────────────────────────────
|
|
28
|
+
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
def Chat(self, request, context):
|
|
32
|
+
"""Missing associated documentation comment in .proto file."""
|
|
33
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
34
|
+
context.set_details('Method not implemented!')
|
|
35
|
+
raise NotImplementedError('Method not implemented!')
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def add_ChatServiceServicer_to_server(servicer, server):
|
|
39
|
+
rpc_method_handlers = {
|
|
40
|
+
'Chat': grpc.unary_stream_rpc_method_handler(
|
|
41
|
+
servicer.Chat,
|
|
42
|
+
request_deserializer=hostel_dot_protocol_dot_v1_dot_chat__pb2.ChatRequest.FromString,
|
|
43
|
+
response_serializer=hostel_dot_protocol_dot_v1_dot_chat__pb2.ChatResponse.SerializeToString,
|
|
44
|
+
),
|
|
45
|
+
}
|
|
46
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
47
|
+
'hostel.protocol.v1.ChatService', rpc_method_handlers)
|
|
48
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
49
|
+
server.add_registered_method_handlers('hostel.protocol.v1.ChatService', rpc_method_handlers)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
# This class is part of an EXPERIMENTAL API.
|
|
53
|
+
class ChatService(object):
|
|
54
|
+
"""── Services ────────────────────────────────────────────────────────────────
|
|
55
|
+
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
@staticmethod
|
|
59
|
+
def Chat(request,
|
|
60
|
+
target,
|
|
61
|
+
options=(),
|
|
62
|
+
channel_credentials=None,
|
|
63
|
+
call_credentials=None,
|
|
64
|
+
insecure=False,
|
|
65
|
+
compression=None,
|
|
66
|
+
wait_for_ready=None,
|
|
67
|
+
timeout=None,
|
|
68
|
+
metadata=None):
|
|
69
|
+
return grpc.experimental.unary_stream(
|
|
70
|
+
request,
|
|
71
|
+
target,
|
|
72
|
+
'/hostel.protocol.v1.ChatService/Chat',
|
|
73
|
+
hostel_dot_protocol_dot_v1_dot_chat__pb2.ChatRequest.SerializeToString,
|
|
74
|
+
hostel_dot_protocol_dot_v1_dot_chat__pb2.ChatResponse.FromString,
|
|
75
|
+
options,
|
|
76
|
+
channel_credentials,
|
|
77
|
+
insecure,
|
|
78
|
+
call_credentials,
|
|
79
|
+
compression,
|
|
80
|
+
wait_for_ready,
|
|
81
|
+
timeout,
|
|
82
|
+
metadata,
|
|
83
|
+
_registered_method=True)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: hostel/protocol/v1/component.proto
|
|
5
|
+
# Protobuf Python Version: 7.34.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
7,
|
|
15
|
+
34,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'hostel/protocol/v1/component.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"hostel/protocol/v1/component.proto\x12\x12hostel.protocol.v1\x1a\x1cgoogle/protobuf/struct.proto\"l\n\x16\x43reateComponentRequest\x12%\n\x0e\x63omponent_type\x18\x01 \x01(\tR\rcomponentType\x12+\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructR\x04\x64\x61ta\"n\n\x17\x43reateComponentResponse\x12%\n\x0e\x63omponent_type\x18\x01 \x01(\tR\rcomponentType\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x18\n\x07success\x18\x03 \x01(\x08R\x07success\"P\n\x13GetComponentRequest\x12%\n\x0e\x63omponent_type\x18\x01 \x01(\tR\rcomponentType\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\"j\n\x14GetComponentResponse\x12%\n\x0e\x63omponent_type\x18\x01 \x01(\tR\rcomponentType\x12+\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructR\x04\x64\x61ta\">\n\x15ListComponentsRequest\x12%\n\x0e\x63omponent_type\x18\x01 \x01(\tR\rcomponentType\"x\n\x16ListComponentsResponse\x12%\n\x0e\x63omponent_type\x18\x01 \x01(\tR\rcomponentType\x12\x37\n\ncomponents\x18\x02 \x03(\x0b\x32\x17.google.protobuf.StructR\ncomponents\"\x80\x01\n\x16UpdateComponentRequest\x12%\n\x0e\x63omponent_type\x18\x01 \x01(\tR\rcomponentType\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12+\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructR\x04\x64\x61ta\"n\n\x17UpdateComponentResponse\x12%\n\x0e\x63omponent_type\x18\x01 \x01(\tR\rcomponentType\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x18\n\x07success\x18\x03 \x01(\x08R\x07success\"S\n\x16\x44\x65leteComponentRequest\x12%\n\x0e\x63omponent_type\x18\x01 \x01(\tR\rcomponentType\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\"n\n\x17\x44\x65leteComponentResponse\x12%\n\x0e\x63omponent_type\x18\x01 \x01(\tR\rcomponentType\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x18\n\x07success\x18\x03 \x01(\x08R\x07success2\xa2\x04\n\x10\x43omponentService\x12j\n\x0f\x43reateComponent\x12*.hostel.protocol.v1.CreateComponentRequest\x1a+.hostel.protocol.v1.CreateComponentResponse\x12\x61\n\x0cGetComponent\x12\'.hostel.protocol.v1.GetComponentRequest\x1a(.hostel.protocol.v1.GetComponentResponse\x12g\n\x0eListComponents\x12).hostel.protocol.v1.ListComponentsRequest\x1a*.hostel.protocol.v1.ListComponentsResponse\x12j\n\x0fUpdateComponent\x12*.hostel.protocol.v1.UpdateComponentRequest\x1a+.hostel.protocol.v1.UpdateComponentResponse\x12j\n\x0f\x44\x65leteComponent\x12*.hostel.protocol.v1.DeleteComponentRequest\x1a+.hostel.protocol.v1.DeleteComponentResponseb\x06proto3')
|
|
29
|
+
|
|
30
|
+
_globals = globals()
|
|
31
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
32
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'hostel.protocol.v1.component_pb2', _globals)
|
|
33
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
34
|
+
DESCRIPTOR._loaded_options = None
|
|
35
|
+
_globals['_CREATECOMPONENTREQUEST']._serialized_start=88
|
|
36
|
+
_globals['_CREATECOMPONENTREQUEST']._serialized_end=196
|
|
37
|
+
_globals['_CREATECOMPONENTRESPONSE']._serialized_start=198
|
|
38
|
+
_globals['_CREATECOMPONENTRESPONSE']._serialized_end=308
|
|
39
|
+
_globals['_GETCOMPONENTREQUEST']._serialized_start=310
|
|
40
|
+
_globals['_GETCOMPONENTREQUEST']._serialized_end=390
|
|
41
|
+
_globals['_GETCOMPONENTRESPONSE']._serialized_start=392
|
|
42
|
+
_globals['_GETCOMPONENTRESPONSE']._serialized_end=498
|
|
43
|
+
_globals['_LISTCOMPONENTSREQUEST']._serialized_start=500
|
|
44
|
+
_globals['_LISTCOMPONENTSREQUEST']._serialized_end=562
|
|
45
|
+
_globals['_LISTCOMPONENTSRESPONSE']._serialized_start=564
|
|
46
|
+
_globals['_LISTCOMPONENTSRESPONSE']._serialized_end=684
|
|
47
|
+
_globals['_UPDATECOMPONENTREQUEST']._serialized_start=687
|
|
48
|
+
_globals['_UPDATECOMPONENTREQUEST']._serialized_end=815
|
|
49
|
+
_globals['_UPDATECOMPONENTRESPONSE']._serialized_start=817
|
|
50
|
+
_globals['_UPDATECOMPONENTRESPONSE']._serialized_end=927
|
|
51
|
+
_globals['_DELETECOMPONENTREQUEST']._serialized_start=929
|
|
52
|
+
_globals['_DELETECOMPONENTREQUEST']._serialized_end=1012
|
|
53
|
+
_globals['_DELETECOMPONENTRESPONSE']._serialized_start=1014
|
|
54
|
+
_globals['_DELETECOMPONENTRESPONSE']._serialized_end=1124
|
|
55
|
+
_globals['_COMPONENTSERVICE']._serialized_start=1127
|
|
56
|
+
_globals['_COMPONENTSERVICE']._serialized_end=1673
|
|
57
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
from google.protobuf import struct_pb2 as _struct_pb2
|
|
2
|
+
from google.protobuf.internal import containers as _containers
|
|
3
|
+
from google.protobuf import descriptor as _descriptor
|
|
4
|
+
from google.protobuf import message as _message
|
|
5
|
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
|
6
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
|
7
|
+
|
|
8
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
9
|
+
|
|
10
|
+
class CreateComponentRequest(_message.Message):
|
|
11
|
+
__slots__ = ("component_type", "data")
|
|
12
|
+
COMPONENT_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
13
|
+
DATA_FIELD_NUMBER: _ClassVar[int]
|
|
14
|
+
component_type: str
|
|
15
|
+
data: _struct_pb2.Struct
|
|
16
|
+
def __init__(self, component_type: _Optional[str] = ..., data: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
|
17
|
+
|
|
18
|
+
class CreateComponentResponse(_message.Message):
|
|
19
|
+
__slots__ = ("component_type", "name", "success")
|
|
20
|
+
COMPONENT_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
21
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
22
|
+
SUCCESS_FIELD_NUMBER: _ClassVar[int]
|
|
23
|
+
component_type: str
|
|
24
|
+
name: str
|
|
25
|
+
success: bool
|
|
26
|
+
def __init__(self, component_type: _Optional[str] = ..., name: _Optional[str] = ..., success: _Optional[bool] = ...) -> None: ...
|
|
27
|
+
|
|
28
|
+
class GetComponentRequest(_message.Message):
|
|
29
|
+
__slots__ = ("component_type", "name")
|
|
30
|
+
COMPONENT_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
31
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
32
|
+
component_type: str
|
|
33
|
+
name: str
|
|
34
|
+
def __init__(self, component_type: _Optional[str] = ..., name: _Optional[str] = ...) -> None: ...
|
|
35
|
+
|
|
36
|
+
class GetComponentResponse(_message.Message):
|
|
37
|
+
__slots__ = ("component_type", "data")
|
|
38
|
+
COMPONENT_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
39
|
+
DATA_FIELD_NUMBER: _ClassVar[int]
|
|
40
|
+
component_type: str
|
|
41
|
+
data: _struct_pb2.Struct
|
|
42
|
+
def __init__(self, component_type: _Optional[str] = ..., data: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
|
43
|
+
|
|
44
|
+
class ListComponentsRequest(_message.Message):
|
|
45
|
+
__slots__ = ("component_type",)
|
|
46
|
+
COMPONENT_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
47
|
+
component_type: str
|
|
48
|
+
def __init__(self, component_type: _Optional[str] = ...) -> None: ...
|
|
49
|
+
|
|
50
|
+
class ListComponentsResponse(_message.Message):
|
|
51
|
+
__slots__ = ("component_type", "components")
|
|
52
|
+
COMPONENT_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
53
|
+
COMPONENTS_FIELD_NUMBER: _ClassVar[int]
|
|
54
|
+
component_type: str
|
|
55
|
+
components: _containers.RepeatedCompositeFieldContainer[_struct_pb2.Struct]
|
|
56
|
+
def __init__(self, component_type: _Optional[str] = ..., components: _Optional[_Iterable[_Union[_struct_pb2.Struct, _Mapping]]] = ...) -> None: ...
|
|
57
|
+
|
|
58
|
+
class UpdateComponentRequest(_message.Message):
|
|
59
|
+
__slots__ = ("component_type", "name", "data")
|
|
60
|
+
COMPONENT_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
61
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
62
|
+
DATA_FIELD_NUMBER: _ClassVar[int]
|
|
63
|
+
component_type: str
|
|
64
|
+
name: str
|
|
65
|
+
data: _struct_pb2.Struct
|
|
66
|
+
def __init__(self, component_type: _Optional[str] = ..., name: _Optional[str] = ..., data: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
|
67
|
+
|
|
68
|
+
class UpdateComponentResponse(_message.Message):
|
|
69
|
+
__slots__ = ("component_type", "name", "success")
|
|
70
|
+
COMPONENT_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
71
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
72
|
+
SUCCESS_FIELD_NUMBER: _ClassVar[int]
|
|
73
|
+
component_type: str
|
|
74
|
+
name: str
|
|
75
|
+
success: bool
|
|
76
|
+
def __init__(self, component_type: _Optional[str] = ..., name: _Optional[str] = ..., success: _Optional[bool] = ...) -> None: ...
|
|
77
|
+
|
|
78
|
+
class DeleteComponentRequest(_message.Message):
|
|
79
|
+
__slots__ = ("component_type", "name")
|
|
80
|
+
COMPONENT_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
81
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
82
|
+
component_type: str
|
|
83
|
+
name: str
|
|
84
|
+
def __init__(self, component_type: _Optional[str] = ..., name: _Optional[str] = ...) -> None: ...
|
|
85
|
+
|
|
86
|
+
class DeleteComponentResponse(_message.Message):
|
|
87
|
+
__slots__ = ("component_type", "name", "success")
|
|
88
|
+
COMPONENT_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
89
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
90
|
+
SUCCESS_FIELD_NUMBER: _ClassVar[int]
|
|
91
|
+
component_type: str
|
|
92
|
+
name: str
|
|
93
|
+
success: bool
|
|
94
|
+
def __init__(self, component_type: _Optional[str] = ..., name: _Optional[str] = ..., success: _Optional[bool] = ...) -> None: ...
|