from ...tl.mtproto_request import MTProtoRequest


class UserEmpty(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    userEmpty#200250ba id:int = User"""

    # Telegram's constructor ID (and unique identifier) for this class
    constructor_id = 0x200250ba

    def __init__(self, id):
        """
        :param id: Telegram type: «int».

        Constructor for User: Instance of either UserEmpty, User.
        """
        super().__init__()

        self.id = id

    def on_send(self, writer):
        writer.write_int(UserEmpty.constructor_id, signed=False)
        writer.write_int(self.id)

    @staticmethod
    def empty():
        """Returns an "empty" instance (all attributes are None)"""
        return UserEmpty(None)

    def on_response(self, reader):
        self.id = reader.read_int()

    def __repr__(self):
        return 'userEmpty#200250ba id:int = User'

    def __str__(self):
        return '(userEmpty (ID: 0x200250ba) = (id={}))'.format(str(self.id))
