from __future__ import annotations

from typing import TypeVar

_TMessage = TypeVar("_TMessage", bound="Message")


class Message:
    def SerializeToString(self) -> bytes: ...

    @classmethod
    def FromString(cls: type[_TMessage], data: bytes) -> _TMessage: ...

    def ParseFromString(self, data: bytes) -> None: ...
    def HasField(self, field_name: str) -> bool: ...
