from ...tl.mtproto_request import MTProtoRequest


class InputMediaGeoPoint(MTProtoRequest):
    """Class generated by TLObjects' generator. All changes will be ERASED. Original .tl definition below.
    inputMediaGeoPoint#f9c44144 geo_point:InputGeoPoint = InputMedia"""

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

    def __init__(self, geo_point):
        """
        :param geo_point: Telegram type: «InputGeoPoint».

        Constructor for InputMedia: Instance of either InputMediaEmpty, InputMediaUploadedPhoto, InputMediaPhoto, InputMediaGeoPoint, InputMediaContact, InputMediaUploadedDocument, InputMediaUploadedThumbDocument, InputMediaDocument, InputMediaVenue, InputMediaGifExternal, InputMediaPhotoExternal, InputMediaDocumentExternal, InputMediaGame, InputMediaInvoice.
        """
        super().__init__()

        self.geo_point = geo_point

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

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

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

    def __repr__(self):
        return 'inputMediaGeoPoint#f9c44144 geo_point:InputGeoPoint = InputMedia'

    def __str__(self):
        return '(inputMediaGeoPoint (ID: 0xf9c44144) = (geo_point={}))'.format(str(self.geo_point))
