from ....tl.mtproto_request import MTProtoRequest


class GetNearestDcRequest(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. TL definition below.
    help.getNearestDc#1fb33026  = NearestDc"""

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

    def __init__(self):
        super().__init__()
        self.result = None
        self.confirmed = True  # Confirmed by default

    @staticmethod
    def to_dict():
        return {}

    def on_send(self, writer):
        writer.write_int(GetNearestDcRequest.constructor_id, signed=False)

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

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

    def __repr__(self):
        return 'help.getNearestDc#1fb33026  = NearestDc'

    def __str__(self):
        return '(help.getNearestDc (ID: 0x1fb33026) = ())'.format()
