from ....tl.tlobject import TLObject


class UpdateStatusRequest(TLObject):
    """Class generated by TLObjects' generator. All changes will be ERASED. TL definition below.
    account.updateStatus#6628562c offline:Bool = Bool"""

    # Telegram's constructor (U)ID for this class
    constructor_id = 0x6628562c
    # Also the ID of its resulting type for fast checks
    subclass_of_id = 0xf5b399ac

    def __init__(self, offline):
        """
        :param offline: Telegram type: "Bool".

        :returns Bool: This type has no constructors.
        """
        super().__init__()
        self.result = None
        self.content_related = True

        self.offline = offline

    def to_dict(self):
        return {
            'offline': self.offline,
        }

    def on_send(self, writer):
        writer.write_int(UpdateStatusRequest.constructor_id, signed=False)
        writer.tgwrite_bool(self.offline)

    @staticmethod
    def empty():
        """Returns an "empty" instance (attributes=None)"""
        return UpdateStatusRequest(None)

    def on_response(self, reader):
        self.result = reader.tgread_object()

    def __repr__(self):
        return 'account.updateStatus#6628562c offline:Bool = Bool'

    def __str__(self):
        return TLObject.pretty_format(self)

    def stringify(self):
        return TLObject.pretty_format(self, indent=0)
