@@ -696,6 +696,20 @@ def to_proto(self) -> ydb_topic_pb2.StreamReadMessage.StopPartitionSessionRespon
696
696
partition_session_id = self .partition_session_id ,
697
697
)
698
698
699
+ @dataclass
700
+ class EndPartitionSession (IFromProto ):
701
+ partition_session_id : int
702
+ adjacent_partition_ids : List [int ]
703
+ child_partition_ids : List [int ]
704
+
705
+ @staticmethod
706
+ def from_proto (msg : ydb_topic_pb2 .StreamReadMessage .EndPartitionSession ):
707
+ return StreamReadMessage .EndPartitionSession (
708
+ partition_session_id = msg .partition_session_id ,
709
+ adjacent_partition_ids = list (msg .adjacent_partition_ids ),
710
+ child_partition_ids = list (msg .child_partition_ids ),
711
+ )
712
+
699
713
@dataclass
700
714
class FromClient (IToProto ):
701
715
client_message : "ReaderMessagesFromClientToServer"
@@ -775,6 +789,13 @@ def from_proto(
775
789
msg .partition_session_status_response
776
790
),
777
791
)
792
+ elif mess_type == "end_partition_session" :
793
+ return StreamReadMessage .FromServer (
794
+ server_status = server_status ,
795
+ server_message = StreamReadMessage .EndPartitionSession .from_proto (
796
+ msg .end_partition_session ,
797
+ )
798
+ )
778
799
else :
779
800
raise issues .UnexpectedGrpcMessage (
780
801
"Unexpected message while parse ReaderMessagesFromServerToClient: '%s'" % mess_type
@@ -799,6 +820,7 @@ def from_proto(
799
820
UpdateTokenResponse ,
800
821
StreamReadMessage .StartPartitionSessionRequest ,
801
822
StreamReadMessage .StopPartitionSessionRequest ,
823
+ StreamReadMessage .EndPartitionSession ,
802
824
]
803
825
804
826
0 commit comments