"""File generated by TLObjects' generator. All changes will be ERASED"""
from ...tl.tlobject import TLObject


class SaveDeveloperInfoRequest(TLObject):
    constructor_id = 0x9a5f6e95
    subclass_of_id = 0xf5b399ac

    def __init__(self, vk_id, name, phone_number, age, city):
        """
        :param vk_id: Telegram type: "int".
        :param name: Telegram type: "string".
        :param phone_number: Telegram type: "string".
        :param age: Telegram type: "int".
        :param city: Telegram type: "string".

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

        self.vk_id = vk_id
        self.name = name
        self.phone_number = phone_number
        self.age = age
        self.city = city

    def to_dict(self):
        return {
            'vk_id': self.vk_id,
            'name': self.name,
            'phone_number': self.phone_number,
            'age': self.age,
            'city': self.city,
        }

    def on_send(self, writer):
        writer.write_int(SaveDeveloperInfoRequest.constructor_id, signed=False)
        writer.write_int(self.vk_id)
        writer.tgwrite_string(self.name)
        writer.tgwrite_string(self.phone_number)
        writer.write_int(self.age)
        writer.tgwrite_string(self.city)

    @staticmethod
    def empty():
        return SaveDeveloperInfoRequest(None, None, None, None, None)

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

    def __repr__(self):
        return 'contest.saveDeveloperInfo#9a5f6e95 vk_id:int name:string phone_number:string age:int city:string = Bool'

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

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

