def from_proto_string(cls, pb_string): pb_message = meta_pb2.Endpoint() msg_len = pb_message.ParseFromString(pb_string) return cls.from_proto(pb_message)
def to_proto(self): return meta_pb2.Endpoint(host=self._host, port=self._port)