from ....tl.tlobject import TLObject


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

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

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

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

        self.random = random

    def to_dict(self):
        return {
            'random': self.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 (attributes=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 TLObject.pretty_format(self)

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