@@ -28,6 +28,21 @@ def to_proto(self) -> ydb_coordination_pb2.CreateNodeRequest:
2828 operation_params = self .operation_params ,
2929 )
3030
31+ @dataclass
32+ class AlterNodeRequest (IToProto ):
33+ path : str
34+ config : typing .Optional [public_types .NodeConfig ] = None
35+ operation_params : typing .Any = None
36+
37+ def to_proto (self ) -> ydb_coordination_pb2 .AlterNodeRequest :
38+ cfg_proto = self .config .to_proto () if self .config else None
39+ return ydb_coordination_pb2 .AlterNodeRequest (
40+ path = self .path ,
41+ config = cfg_proto ,
42+ operation_params = self .operation_params ,
43+ )
44+
45+
3146
3247@dataclass
3348class DescribeNodeRequest (IToProto ):
@@ -53,41 +68,3 @@ def to_proto(self) -> ydb_coordination_pb2.DropNodeRequest:
5368 )
5469
5570
56- @dataclass
57- class CreateNodeResponse (IFromProto ):
58- operation : ydb .Operation
59- OPERATION_FIELD_NUMBER : int
60-
61- @staticmethod
62- def from_proto (msg : ydb_coordination_pb2 .CreateNodeResponse ) -> "CreateNodeResponse" :
63- return CreateNodeResponse (
64- operation = msg .operation ,
65- OPERATION_FIELD_NUMBER = msg .OPERATION_FIELD_NUMBER
66- )
67-
68-
69- @dataclass
70- class DescribeNodeResponse (IFromProto ):
71- operation : ydb .Operation
72- OPERATION_FIELD_NUMBER : int
73-
74- @staticmethod
75- def from_proto (msg : "ydb_coordination_pb2.DescribeNodeResponse" ) -> "DescribeNodeResponse" :
76- return DescribeNodeResponse (
77- operation = msg .operation ,
78- OPERATION_FIELD_NUMBER = msg .OPERATION_FIELD_NUMBER
79- )
80-
81-
82- @dataclass
83- class DropNodeResponse (IFromProto ):
84- operation : ydb .Operation
85- OPERATION_FIELD_NUMBER : int
86-
87- @staticmethod
88- def from_proto (msg : ydb_coordination_pb2 .DropNodeResponse ) -> "DropNodeResponse" :
89- return DropNodeResponse (
90- operation = msg .operation ,
91- OPERATION_FIELD_NUMBER = msg .OPERATION_FIELD_NUMBER
92- )
93-
0 commit comments