from ....tl.mtproto_request import MTProtoRequest


class GetStateRequest(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. TL definition below.
    updates.getState#edd4882a  = updates.State"""

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

    def __init__(self):
        super().__init__()
        self.result = None
        self.confirmed = True  # Confirmed by default

    @staticmethod
    def to_dict():
        return {}

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

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

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

    def __repr__(self):
        return 'updates.getState#edd4882a  = updates.State'

    def __str__(self):
        return '(updates.getState (ID: 0xedd4882a) = ())'.format()
