from telethon.tl.mtproto_request import MTProtoRequest


class InputFileLocation(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    inputFileLocation#14637196 volume_id:long local_id:int secret:long = InputFileLocation"""

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

    def __init__(self, volume_id, local_id, secret):
        """
        :param volume_id: Telegram type: «long».
        :param local_id: Telegram type: «int».
        :param secret: Telegram type: «long».
        """
        super().__init__()

        self.volume_id = volume_id
        self.local_id = local_id
        self.secret = secret

    def on_send(self, writer):
        writer.write_int(InputFileLocation.constructor_id, signed=False)
        writer.write_long(self.volume_id)
        writer.write_int(self.local_id)
        writer.write_long(self.secret)

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

    def on_response(self, reader):
        self.volume_id = reader.read_long()
        self.local_id = reader.read_int()
        self.secret = reader.read_long()

    def __repr__(self):
        return 'inputFileLocation#14637196 volume_id:long local_id:int secret:long = InputFileLocation'

    def __str__(self):
        return '(inputFileLocation (ID: 0x14637196) = (volume_id={}, local_id={}, secret={}))'.format(str(self.volume_id), str(self.local_id), str(self.secret))
