from ....tl.mtproto_request import MTProtoRequest


class DhConfigNotModified(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    messages.dhConfigNotModified#c0e24635 random:bytes = messages.DhConfig"""

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

    def __init__(self, random):
        """
        :param random: Telegram type: «bytes».

        Constructor for messages.DhConfig: Instance of either DhConfigNotModified, DhConfig.
        """
        super().__init__()

        self.random = random

    def on_send(self, writer):
        writer.write_int(DhConfigNotModified.constructor_id, signed=False)
        writer.tgwrite_bytes(self.random)

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

    def on_response(self, reader):
        self.random = reader.tgread_bytes()

    def __repr__(self):
        return 'messages.dhConfigNotModified#c0e24635 random:bytes = messages.DhConfig'

    def __str__(self):
        return '(messages.dhConfigNotModified (ID: 0xc0e24635) = (random={}))'.format(str(self.random))
