from ...tl.tlobject import TLObject


class ChannelParticipantsKicked(TLObject):
    """Class generated by TLObjects' generator. All changes will be ERASED. TL definition below.
    channelParticipantsKicked#a3b54985 q:string = ChannelParticipantsFilter"""

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

    def __init__(self, q):
        """
        :param q: Telegram type: "string".

        Constructor for ChannelParticipantsFilter: Instance of either ChannelParticipantsRecent, ChannelParticipantsAdmins, ChannelParticipantsKicked, ChannelParticipantsBots, ChannelParticipantsBanned, ChannelParticipantsSearch.
        """
        super().__init__()

        self.q = q

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

    def on_send(self, writer):
        writer.write_int(ChannelParticipantsKicked.constructor_id, signed=False)
        writer.tgwrite_string(self.q)

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

    def on_response(self, reader):
        self.q = reader.tgread_string()

    def __repr__(self):
        return 'channelParticipantsKicked#a3b54985 q:string = ChannelParticipantsFilter'

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

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