@@ -696,6 +696,20 @@ def to_proto(self) -> ydb_topic_pb2.StreamReadMessage.StopPartitionSessionRespon
696696 partition_session_id = self .partition_session_id ,
697697 )
698698
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+
699713 @dataclass
700714 class FromClient (IToProto ):
701715 client_message : "ReaderMessagesFromClientToServer"
@@ -775,6 +789,13 @@ def from_proto(
775789 msg .partition_session_status_response
776790 ),
777791 )
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+ )
778799 else :
779800 raise issues .UnexpectedGrpcMessage (
780801 "Unexpected message while parse ReaderMessagesFromServerToClient: '%s'" % mess_type
@@ -799,6 +820,7 @@ def from_proto(
799820 UpdateTokenResponse ,
800821 StreamReadMessage .StartPartitionSessionRequest ,
801822 StreamReadMessage .StopPartitionSessionRequest ,
823+ StreamReadMessage .EndPartitionSession ,
802824]
803825
804826
0 commit comments