from ...tl.mtproto_request import MTProtoRequest


class GetFutureSaltsRequest(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    get_future_salts#b921bd04 num:int = FutureSalts"""

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

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

        :returns FutureSalts: Instance of FutureSalts.
        """
        super().__init__()
        self.result = None
        self.confirmed = True  # Confirmed by default

        self.num = num

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

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

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

    def __repr__(self):
        return 'get_future_salts#b921bd04 num:int = FutureSalts'

    def __str__(self):
        return '(get_future_salts (ID: 0xb921bd04) = (num={}))'.format(str(self.num))
