module TD.Data.InputInlineQueryResult
  (InputInlineQueryResult(..)) where

import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import qualified Data.Text as T
import qualified TD.Data.ReplyMarkup as ReplyMarkup
import qualified TD.Data.InputMessageContent as InputMessageContent
import qualified TD.Data.Contact as Contact
import qualified TD.Data.Location as Location
import qualified TD.Data.Venue as Venue

-- | Represents a single result of an inline query; for bots only
data InputInlineQueryResult
  = InputInlineQueryResultAnimation -- ^ Represents a link to an animated GIF or an animated (i.e., without sound) H.264/MPEG-4 AVC video
    { InputInlineQueryResult -> Maybe Text
_id                   :: Maybe T.Text                                  -- ^ Unique identifier of the query result
    , InputInlineQueryResult -> Maybe Text
title                 :: Maybe T.Text                                  -- ^ Title of the query result
    , InputInlineQueryResult -> Maybe Text
thumbnail_url         :: Maybe T.Text                                  -- ^ URL of the result thumbnail (JPEG, GIF, or MPEG4), if it exists
    , InputInlineQueryResult -> Maybe Text
thumbnail_mime_type   :: Maybe T.Text                                  -- ^ MIME type of the video thumbnail. If non-empty, must be one of "image/jpeg", "image/gif" and "video/mp4"
    , InputInlineQueryResult -> Maybe Text
video_url             :: Maybe T.Text                                  -- ^ The URL of the video file (file size must not exceed 1MB)
    , InputInlineQueryResult -> Maybe Text
video_mime_type       :: Maybe T.Text                                  -- ^ MIME type of the video file. Must be one of "image/gif" and "video/mp4"
    , InputInlineQueryResult -> Maybe Int
video_duration        :: Maybe Int                                     -- ^ Duration of the video, in seconds
    , InputInlineQueryResult -> Maybe Int
video_width           :: Maybe Int                                     -- ^ Width of the video
    , InputInlineQueryResult -> Maybe Int
video_height          :: Maybe Int                                     -- ^ Height of the video
    , InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          :: Maybe ReplyMarkup.ReplyMarkup                 -- ^ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
    , InputInlineQueryResult -> Maybe InputMessageContent
input_message_content :: Maybe InputMessageContent.InputMessageContent -- ^ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageAnimation, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
    }
  | InputInlineQueryResultArticle -- ^ Represents a link to an article or web page
    { _id                   :: Maybe T.Text                                  -- ^ Unique identifier of the query result
    , InputInlineQueryResult -> Maybe Text
url                   :: Maybe T.Text                                  -- ^ URL of the result, if it exists
    , InputInlineQueryResult -> Maybe Bool
hide_url              :: Maybe Bool                                    -- ^ True, if the URL must be not shown
    , title                 :: Maybe T.Text                                  -- ^ Title of the result
    , InputInlineQueryResult -> Maybe Text
description           :: Maybe T.Text                                  -- ^ A short description of the result
    , thumbnail_url         :: Maybe T.Text                                  -- ^ URL of the result thumbnail, if it exists
    , InputInlineQueryResult -> Maybe Int
thumbnail_width       :: Maybe Int                                     -- ^ Thumbnail width, if known
    , InputInlineQueryResult -> Maybe Int
thumbnail_height      :: Maybe Int                                     -- ^ Thumbnail height, if known
    , reply_markup          :: Maybe ReplyMarkup.ReplyMarkup                 -- ^ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
    , input_message_content :: Maybe InputMessageContent.InputMessageContent -- ^ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
    }
  | InputInlineQueryResultAudio -- ^ Represents a link to an MP3 audio file
    { _id                   :: Maybe T.Text                                  -- ^ Unique identifier of the query result
    , title                 :: Maybe T.Text                                  -- ^ Title of the audio file
    , InputInlineQueryResult -> Maybe Text
performer             :: Maybe T.Text                                  -- ^ Performer of the audio file
    , InputInlineQueryResult -> Maybe Text
audio_url             :: Maybe T.Text                                  -- ^ The URL of the audio file
    , InputInlineQueryResult -> Maybe Int
audio_duration        :: Maybe Int                                     -- ^ Audio file duration, in seconds
    , reply_markup          :: Maybe ReplyMarkup.ReplyMarkup                 -- ^ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
    , input_message_content :: Maybe InputMessageContent.InputMessageContent -- ^ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageAudio, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
    }
  | InputInlineQueryResultContact -- ^ Represents a user contact
    { _id                   :: Maybe T.Text                                  -- ^ Unique identifier of the query result
    , InputInlineQueryResult -> Maybe Contact
contact               :: Maybe Contact.Contact                         -- ^ User contact
    , thumbnail_url         :: Maybe T.Text                                  -- ^ URL of the result thumbnail, if it exists
    , thumbnail_width       :: Maybe Int                                     -- ^ Thumbnail width, if known
    , thumbnail_height      :: Maybe Int                                     -- ^ Thumbnail height, if known
    , reply_markup          :: Maybe ReplyMarkup.ReplyMarkup                 -- ^ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
    , input_message_content :: Maybe InputMessageContent.InputMessageContent -- ^ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
    }
  | InputInlineQueryResultDocument -- ^ Represents a link to a file
    { _id                   :: Maybe T.Text                                  -- ^ Unique identifier of the query result
    , title                 :: Maybe T.Text                                  -- ^ Title of the resulting file
    , description           :: Maybe T.Text                                  -- ^ Short description of the result, if known
    , InputInlineQueryResult -> Maybe Text
document_url          :: Maybe T.Text                                  -- ^ URL of the file
    , InputInlineQueryResult -> Maybe Text
mime_type             :: Maybe T.Text                                  -- ^ MIME type of the file content; only "application/pdf" and "application/zip" are currently allowed
    , thumbnail_url         :: Maybe T.Text                                  -- ^ The URL of the file thumbnail, if it exists
    , thumbnail_width       :: Maybe Int                                     -- ^ Width of the thumbnail
    , thumbnail_height      :: Maybe Int                                     -- ^ Height of the thumbnail
    , reply_markup          :: Maybe ReplyMarkup.ReplyMarkup                 -- ^ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
    , input_message_content :: Maybe InputMessageContent.InputMessageContent -- ^ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageDocument, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
    }
  | InputInlineQueryResultGame -- ^ Represents a game
    { _id             :: Maybe T.Text                  -- ^ Unique identifier of the query result
    , InputInlineQueryResult -> Maybe Text
game_short_name :: Maybe T.Text                  -- ^ Short name of the game
    , reply_markup    :: Maybe ReplyMarkup.ReplyMarkup -- ^ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
    }
  | InputInlineQueryResultLocation -- ^ Represents a point on the map
    { _id                   :: Maybe T.Text                                  -- ^ Unique identifier of the query result
    , InputInlineQueryResult -> Maybe Location
location              :: Maybe Location.Location                       -- ^ Location result
    , InputInlineQueryResult -> Maybe Int
live_period           :: Maybe Int                                     -- ^ Amount of time relative to the message sent time until the location can be updated, in seconds
    , title                 :: Maybe T.Text                                  -- ^ Title of the result
    , thumbnail_url         :: Maybe T.Text                                  -- ^ URL of the result thumbnail, if it exists
    , thumbnail_width       :: Maybe Int                                     -- ^ Thumbnail width, if known
    , thumbnail_height      :: Maybe Int                                     -- ^ Thumbnail height, if known
    , reply_markup          :: Maybe ReplyMarkup.ReplyMarkup                 -- ^ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
    , input_message_content :: Maybe InputMessageContent.InputMessageContent -- ^ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
    }
  | InputInlineQueryResultPhoto -- ^ Represents link to a JPEG image
    { _id                   :: Maybe T.Text                                  -- ^ Unique identifier of the query result
    , title                 :: Maybe T.Text                                  -- ^ Title of the result, if known
    , description           :: Maybe T.Text                                  -- ^ A short description of the result, if known
    , thumbnail_url         :: Maybe T.Text                                  -- ^ URL of the photo thumbnail, if it exists
    , InputInlineQueryResult -> Maybe Text
photo_url             :: Maybe T.Text                                  -- ^ The URL of the JPEG photo (photo size must not exceed 5MB)
    , InputInlineQueryResult -> Maybe Int
photo_width           :: Maybe Int                                     -- ^ Width of the photo
    , InputInlineQueryResult -> Maybe Int
photo_height          :: Maybe Int                                     -- ^ Height of the photo
    , reply_markup          :: Maybe ReplyMarkup.ReplyMarkup                 -- ^ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
    , input_message_content :: Maybe InputMessageContent.InputMessageContent -- ^ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessagePhoto, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
    }
  | InputInlineQueryResultSticker -- ^ Represents a link to a WEBP, TGS, or WEBM sticker
    { _id                   :: Maybe T.Text                                  -- ^ Unique identifier of the query result
    , thumbnail_url         :: Maybe T.Text                                  -- ^ URL of the sticker thumbnail, if it exists
    , InputInlineQueryResult -> Maybe Text
sticker_url           :: Maybe T.Text                                  -- ^ The URL of the WEBP, TGS, or WEBM sticker (sticker file size must not exceed 5MB)
    , InputInlineQueryResult -> Maybe Int
sticker_width         :: Maybe Int                                     -- ^ Width of the sticker
    , InputInlineQueryResult -> Maybe Int
sticker_height        :: Maybe Int                                     -- ^ Height of the sticker
    , reply_markup          :: Maybe ReplyMarkup.ReplyMarkup                 -- ^ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
    , input_message_content :: Maybe InputMessageContent.InputMessageContent -- ^ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageSticker, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
    }
  | InputInlineQueryResultVenue -- ^ Represents information about a venue
    { _id                   :: Maybe T.Text                                  -- ^ Unique identifier of the query result
    , InputInlineQueryResult -> Maybe Venue
venue                 :: Maybe Venue.Venue                             -- ^ Venue result
    , thumbnail_url         :: Maybe T.Text                                  -- ^ URL of the result thumbnail, if it exists
    , thumbnail_width       :: Maybe Int                                     -- ^ Thumbnail width, if known
    , thumbnail_height      :: Maybe Int                                     -- ^ Thumbnail height, if known
    , reply_markup          :: Maybe ReplyMarkup.ReplyMarkup                 -- ^ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
    , input_message_content :: Maybe InputMessageContent.InputMessageContent -- ^ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
    }
  | InputInlineQueryResultVideo -- ^ Represents a link to a page containing an embedded video player or a video file
    { _id                   :: Maybe T.Text                                  -- ^ Unique identifier of the query result
    , title                 :: Maybe T.Text                                  -- ^ Title of the result
    , description           :: Maybe T.Text                                  -- ^ A short description of the result, if known
    , thumbnail_url         :: Maybe T.Text                                  -- ^ The URL of the video thumbnail (JPEG), if it exists
    , video_url             :: Maybe T.Text                                  -- ^ URL of the embedded video player or video file
    , mime_type             :: Maybe T.Text                                  -- ^ MIME type of the content of the video URL, only "text/html" or "video/mp4" are currently supported
    , video_width           :: Maybe Int                                     -- ^ Width of the video
    , video_height          :: Maybe Int                                     -- ^ Height of the video
    , video_duration        :: Maybe Int                                     -- ^ Video duration, in seconds
    , reply_markup          :: Maybe ReplyMarkup.ReplyMarkup                 -- ^ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
    , input_message_content :: Maybe InputMessageContent.InputMessageContent -- ^ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageVideo, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
    }
  | InputInlineQueryResultVoiceNote -- ^ Represents a link to an opus-encoded audio file within an OGG container, single channel audio
    { _id                   :: Maybe T.Text                                  -- ^ Unique identifier of the query result
    , title                 :: Maybe T.Text                                  -- ^ Title of the voice note
    , InputInlineQueryResult -> Maybe Text
voice_note_url        :: Maybe T.Text                                  -- ^ The URL of the voice note file
    , InputInlineQueryResult -> Maybe Int
voice_note_duration   :: Maybe Int                                     -- ^ Duration of the voice note, in seconds
    , reply_markup          :: Maybe ReplyMarkup.ReplyMarkup                 -- ^ The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
    , input_message_content :: Maybe InputMessageContent.InputMessageContent -- ^ The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageVoiceNote, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
    }
  deriving (InputInlineQueryResult -> InputInlineQueryResult -> Bool
(InputInlineQueryResult -> InputInlineQueryResult -> Bool)
-> (InputInlineQueryResult -> InputInlineQueryResult -> Bool)
-> Eq InputInlineQueryResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InputInlineQueryResult -> InputInlineQueryResult -> Bool
== :: InputInlineQueryResult -> InputInlineQueryResult -> Bool
$c/= :: InputInlineQueryResult -> InputInlineQueryResult -> Bool
/= :: InputInlineQueryResult -> InputInlineQueryResult -> Bool
Eq, Int -> InputInlineQueryResult -> ShowS
[InputInlineQueryResult] -> ShowS
InputInlineQueryResult -> String
(Int -> InputInlineQueryResult -> ShowS)
-> (InputInlineQueryResult -> String)
-> ([InputInlineQueryResult] -> ShowS)
-> Show InputInlineQueryResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InputInlineQueryResult -> ShowS
showsPrec :: Int -> InputInlineQueryResult -> ShowS
$cshow :: InputInlineQueryResult -> String
show :: InputInlineQueryResult -> String
$cshowList :: [InputInlineQueryResult] -> ShowS
showList :: [InputInlineQueryResult] -> ShowS
Show)

instance I.ShortShow InputInlineQueryResult where
  shortShow :: InputInlineQueryResult -> String
shortShow InputInlineQueryResultAnimation
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , title :: InputInlineQueryResult -> Maybe Text
title                 = Maybe Text
title_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , thumbnail_mime_type :: InputInlineQueryResult -> Maybe Text
thumbnail_mime_type   = Maybe Text
thumbnail_mime_type_
    , video_url :: InputInlineQueryResult -> Maybe Text
video_url             = Maybe Text
video_url_
    , video_mime_type :: InputInlineQueryResult -> Maybe Text
video_mime_type       = Maybe Text
video_mime_type_
    , video_duration :: InputInlineQueryResult -> Maybe Int
video_duration        = Maybe Int
video_duration_
    , video_width :: InputInlineQueryResult -> Maybe Int
video_width           = Maybe Int
video_width_
    , video_height :: InputInlineQueryResult -> Maybe Int
video_height          = Maybe Int
video_height_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = String
"InputInlineQueryResultAnimation"
        String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
        [ String
"_id"                   String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
_id_
        , String
"title"                 String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
title_
        , String
"thumbnail_url"         String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
thumbnail_url_
        , String
"thumbnail_mime_type"   String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
thumbnail_mime_type_
        , String
"video_url"             String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
video_url_
        , String
"video_mime_type"       String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
video_mime_type_
        , String
"video_duration"        String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
video_duration_
        , String
"video_width"           String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
video_width_
        , String
"video_height"          String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
video_height_
        , String
"reply_markup"          String -> Maybe ReplyMarkup -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ReplyMarkup
reply_markup_
        , String
"input_message_content" String -> Maybe InputMessageContent -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe InputMessageContent
input_message_content_
        ]
  shortShow InputInlineQueryResultArticle
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , url :: InputInlineQueryResult -> Maybe Text
url                   = Maybe Text
url_
    , hide_url :: InputInlineQueryResult -> Maybe Bool
hide_url              = Maybe Bool
hide_url_
    , title :: InputInlineQueryResult -> Maybe Text
title                 = Maybe Text
title_
    , description :: InputInlineQueryResult -> Maybe Text
description           = Maybe Text
description_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , thumbnail_width :: InputInlineQueryResult -> Maybe Int
thumbnail_width       = Maybe Int
thumbnail_width_
    , thumbnail_height :: InputInlineQueryResult -> Maybe Int
thumbnail_height      = Maybe Int
thumbnail_height_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = String
"InputInlineQueryResultArticle"
        String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
        [ String
"_id"                   String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
_id_
        , String
"url"                   String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
url_
        , String
"hide_url"              String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
hide_url_
        , String
"title"                 String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
title_
        , String
"description"           String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
description_
        , String
"thumbnail_url"         String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
thumbnail_url_
        , String
"thumbnail_width"       String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
thumbnail_width_
        , String
"thumbnail_height"      String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
thumbnail_height_
        , String
"reply_markup"          String -> Maybe ReplyMarkup -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ReplyMarkup
reply_markup_
        , String
"input_message_content" String -> Maybe InputMessageContent -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe InputMessageContent
input_message_content_
        ]
  shortShow InputInlineQueryResultAudio
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , title :: InputInlineQueryResult -> Maybe Text
title                 = Maybe Text
title_
    , performer :: InputInlineQueryResult -> Maybe Text
performer             = Maybe Text
performer_
    , audio_url :: InputInlineQueryResult -> Maybe Text
audio_url             = Maybe Text
audio_url_
    , audio_duration :: InputInlineQueryResult -> Maybe Int
audio_duration        = Maybe Int
audio_duration_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = String
"InputInlineQueryResultAudio"
        String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
        [ String
"_id"                   String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
_id_
        , String
"title"                 String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
title_
        , String
"performer"             String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
performer_
        , String
"audio_url"             String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
audio_url_
        , String
"audio_duration"        String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
audio_duration_
        , String
"reply_markup"          String -> Maybe ReplyMarkup -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ReplyMarkup
reply_markup_
        , String
"input_message_content" String -> Maybe InputMessageContent -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe InputMessageContent
input_message_content_
        ]
  shortShow InputInlineQueryResultContact
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , contact :: InputInlineQueryResult -> Maybe Contact
contact               = Maybe Contact
contact_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , thumbnail_width :: InputInlineQueryResult -> Maybe Int
thumbnail_width       = Maybe Int
thumbnail_width_
    , thumbnail_height :: InputInlineQueryResult -> Maybe Int
thumbnail_height      = Maybe Int
thumbnail_height_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = String
"InputInlineQueryResultContact"
        String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
        [ String
"_id"                   String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
_id_
        , String
"contact"               String -> Maybe Contact -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Contact
contact_
        , String
"thumbnail_url"         String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
thumbnail_url_
        , String
"thumbnail_width"       String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
thumbnail_width_
        , String
"thumbnail_height"      String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
thumbnail_height_
        , String
"reply_markup"          String -> Maybe ReplyMarkup -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ReplyMarkup
reply_markup_
        , String
"input_message_content" String -> Maybe InputMessageContent -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe InputMessageContent
input_message_content_
        ]
  shortShow InputInlineQueryResultDocument
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , title :: InputInlineQueryResult -> Maybe Text
title                 = Maybe Text
title_
    , description :: InputInlineQueryResult -> Maybe Text
description           = Maybe Text
description_
    , document_url :: InputInlineQueryResult -> Maybe Text
document_url          = Maybe Text
document_url_
    , mime_type :: InputInlineQueryResult -> Maybe Text
mime_type             = Maybe Text
mime_type_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , thumbnail_width :: InputInlineQueryResult -> Maybe Int
thumbnail_width       = Maybe Int
thumbnail_width_
    , thumbnail_height :: InputInlineQueryResult -> Maybe Int
thumbnail_height      = Maybe Int
thumbnail_height_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = String
"InputInlineQueryResultDocument"
        String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
        [ String
"_id"                   String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
_id_
        , String
"title"                 String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
title_
        , String
"description"           String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
description_
        , String
"document_url"          String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
document_url_
        , String
"mime_type"             String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
mime_type_
        , String
"thumbnail_url"         String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
thumbnail_url_
        , String
"thumbnail_width"       String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
thumbnail_width_
        , String
"thumbnail_height"      String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
thumbnail_height_
        , String
"reply_markup"          String -> Maybe ReplyMarkup -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ReplyMarkup
reply_markup_
        , String
"input_message_content" String -> Maybe InputMessageContent -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe InputMessageContent
input_message_content_
        ]
  shortShow InputInlineQueryResultGame
    { _id :: InputInlineQueryResult -> Maybe Text
_id             = Maybe Text
_id_
    , game_short_name :: InputInlineQueryResult -> Maybe Text
game_short_name = Maybe Text
game_short_name_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup    = Maybe ReplyMarkup
reply_markup_
    }
      = String
"InputInlineQueryResultGame"
        String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
        [ String
"_id"             String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
_id_
        , String
"game_short_name" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
game_short_name_
        , String
"reply_markup"    String -> Maybe ReplyMarkup -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ReplyMarkup
reply_markup_
        ]
  shortShow InputInlineQueryResultLocation
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , location :: InputInlineQueryResult -> Maybe Location
location              = Maybe Location
location_
    , live_period :: InputInlineQueryResult -> Maybe Int
live_period           = Maybe Int
live_period_
    , title :: InputInlineQueryResult -> Maybe Text
title                 = Maybe Text
title_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , thumbnail_width :: InputInlineQueryResult -> Maybe Int
thumbnail_width       = Maybe Int
thumbnail_width_
    , thumbnail_height :: InputInlineQueryResult -> Maybe Int
thumbnail_height      = Maybe Int
thumbnail_height_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = String
"InputInlineQueryResultLocation"
        String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
        [ String
"_id"                   String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
_id_
        , String
"location"              String -> Maybe Location -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Location
location_
        , String
"live_period"           String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
live_period_
        , String
"title"                 String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
title_
        , String
"thumbnail_url"         String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
thumbnail_url_
        , String
"thumbnail_width"       String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
thumbnail_width_
        , String
"thumbnail_height"      String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
thumbnail_height_
        , String
"reply_markup"          String -> Maybe ReplyMarkup -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ReplyMarkup
reply_markup_
        , String
"input_message_content" String -> Maybe InputMessageContent -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe InputMessageContent
input_message_content_
        ]
  shortShow InputInlineQueryResultPhoto
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , title :: InputInlineQueryResult -> Maybe Text
title                 = Maybe Text
title_
    , description :: InputInlineQueryResult -> Maybe Text
description           = Maybe Text
description_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , photo_url :: InputInlineQueryResult -> Maybe Text
photo_url             = Maybe Text
photo_url_
    , photo_width :: InputInlineQueryResult -> Maybe Int
photo_width           = Maybe Int
photo_width_
    , photo_height :: InputInlineQueryResult -> Maybe Int
photo_height          = Maybe Int
photo_height_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = String
"InputInlineQueryResultPhoto"
        String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
        [ String
"_id"                   String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
_id_
        , String
"title"                 String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
title_
        , String
"description"           String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
description_
        , String
"thumbnail_url"         String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
thumbnail_url_
        , String
"photo_url"             String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
photo_url_
        , String
"photo_width"           String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
photo_width_
        , String
"photo_height"          String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
photo_height_
        , String
"reply_markup"          String -> Maybe ReplyMarkup -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ReplyMarkup
reply_markup_
        , String
"input_message_content" String -> Maybe InputMessageContent -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe InputMessageContent
input_message_content_
        ]
  shortShow InputInlineQueryResultSticker
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , sticker_url :: InputInlineQueryResult -> Maybe Text
sticker_url           = Maybe Text
sticker_url_
    , sticker_width :: InputInlineQueryResult -> Maybe Int
sticker_width         = Maybe Int
sticker_width_
    , sticker_height :: InputInlineQueryResult -> Maybe Int
sticker_height        = Maybe Int
sticker_height_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = String
"InputInlineQueryResultSticker"
        String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
        [ String
"_id"                   String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
_id_
        , String
"thumbnail_url"         String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
thumbnail_url_
        , String
"sticker_url"           String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
sticker_url_
        , String
"sticker_width"         String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
sticker_width_
        , String
"sticker_height"        String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
sticker_height_
        , String
"reply_markup"          String -> Maybe ReplyMarkup -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ReplyMarkup
reply_markup_
        , String
"input_message_content" String -> Maybe InputMessageContent -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe InputMessageContent
input_message_content_
        ]
  shortShow InputInlineQueryResultVenue
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , venue :: InputInlineQueryResult -> Maybe Venue
venue                 = Maybe Venue
venue_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , thumbnail_width :: InputInlineQueryResult -> Maybe Int
thumbnail_width       = Maybe Int
thumbnail_width_
    , thumbnail_height :: InputInlineQueryResult -> Maybe Int
thumbnail_height      = Maybe Int
thumbnail_height_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = String
"InputInlineQueryResultVenue"
        String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
        [ String
"_id"                   String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
_id_
        , String
"venue"                 String -> Maybe Venue -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Venue
venue_
        , String
"thumbnail_url"         String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
thumbnail_url_
        , String
"thumbnail_width"       String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
thumbnail_width_
        , String
"thumbnail_height"      String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
thumbnail_height_
        , String
"reply_markup"          String -> Maybe ReplyMarkup -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ReplyMarkup
reply_markup_
        , String
"input_message_content" String -> Maybe InputMessageContent -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe InputMessageContent
input_message_content_
        ]
  shortShow InputInlineQueryResultVideo
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , title :: InputInlineQueryResult -> Maybe Text
title                 = Maybe Text
title_
    , description :: InputInlineQueryResult -> Maybe Text
description           = Maybe Text
description_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , video_url :: InputInlineQueryResult -> Maybe Text
video_url             = Maybe Text
video_url_
    , mime_type :: InputInlineQueryResult -> Maybe Text
mime_type             = Maybe Text
mime_type_
    , video_width :: InputInlineQueryResult -> Maybe Int
video_width           = Maybe Int
video_width_
    , video_height :: InputInlineQueryResult -> Maybe Int
video_height          = Maybe Int
video_height_
    , video_duration :: InputInlineQueryResult -> Maybe Int
video_duration        = Maybe Int
video_duration_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = String
"InputInlineQueryResultVideo"
        String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
        [ String
"_id"                   String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
_id_
        , String
"title"                 String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
title_
        , String
"description"           String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
description_
        , String
"thumbnail_url"         String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
thumbnail_url_
        , String
"video_url"             String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
video_url_
        , String
"mime_type"             String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
mime_type_
        , String
"video_width"           String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
video_width_
        , String
"video_height"          String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
video_height_
        , String
"video_duration"        String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
video_duration_
        , String
"reply_markup"          String -> Maybe ReplyMarkup -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ReplyMarkup
reply_markup_
        , String
"input_message_content" String -> Maybe InputMessageContent -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe InputMessageContent
input_message_content_
        ]
  shortShow InputInlineQueryResultVoiceNote
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , title :: InputInlineQueryResult -> Maybe Text
title                 = Maybe Text
title_
    , voice_note_url :: InputInlineQueryResult -> Maybe Text
voice_note_url        = Maybe Text
voice_note_url_
    , voice_note_duration :: InputInlineQueryResult -> Maybe Int
voice_note_duration   = Maybe Int
voice_note_duration_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = String
"InputInlineQueryResultVoiceNote"
        String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
        [ String
"_id"                   String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
_id_
        , String
"title"                 String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
title_
        , String
"voice_note_url"        String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
voice_note_url_
        , String
"voice_note_duration"   String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
voice_note_duration_
        , String
"reply_markup"          String -> Maybe ReplyMarkup -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ReplyMarkup
reply_markup_
        , String
"input_message_content" String -> Maybe InputMessageContent -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe InputMessageContent
input_message_content_
        ]

instance AT.FromJSON InputInlineQueryResult where
  parseJSON :: Value -> Parser InputInlineQueryResult
parseJSON v :: Value
v@(AT.Object Object
obj) = do
    String
t <- Object
obj Object -> Key -> Parser String
forall a. FromJSON a => Object -> Key -> Parser a
A..: Key
"@type" :: AT.Parser String

    case String
t of
      String
"inputInlineQueryResultAnimation" -> Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultAnimation Value
v
      String
"inputInlineQueryResultArticle"   -> Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultArticle Value
v
      String
"inputInlineQueryResultAudio"     -> Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultAudio Value
v
      String
"inputInlineQueryResultContact"   -> Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultContact Value
v
      String
"inputInlineQueryResultDocument"  -> Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultDocument Value
v
      String
"inputInlineQueryResultGame"      -> Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultGame Value
v
      String
"inputInlineQueryResultLocation"  -> Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultLocation Value
v
      String
"inputInlineQueryResultPhoto"     -> Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultPhoto Value
v
      String
"inputInlineQueryResultSticker"   -> Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultSticker Value
v
      String
"inputInlineQueryResultVenue"     -> Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultVenue Value
v
      String
"inputInlineQueryResultVideo"     -> Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultVideo Value
v
      String
"inputInlineQueryResultVoiceNote" -> Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultVoiceNote Value
v
      String
_                                 -> Parser InputInlineQueryResult
forall a. Monoid a => a
mempty
    
    where
      parseInputInlineQueryResultAnimation :: A.Value -> AT.Parser InputInlineQueryResult
      parseInputInlineQueryResultAnimation :: Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultAnimation = String
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InputInlineQueryResultAnimation" ((Object -> Parser InputInlineQueryResult)
 -> Value -> Parser InputInlineQueryResult)
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
        Maybe Text
_id_                   <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"id"
        Maybe Text
title_                 <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"title"
        Maybe Text
thumbnail_url_         <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_url"
        Maybe Text
thumbnail_mime_type_   <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_mime_type"
        Maybe Text
video_url_             <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"video_url"
        Maybe Text
video_mime_type_       <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"video_mime_type"
        Maybe Int
video_duration_        <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"video_duration"
        Maybe Int
video_width_           <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"video_width"
        Maybe Int
video_height_          <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"video_height"
        Maybe ReplyMarkup
reply_markup_          <- Object
o Object -> Key -> Parser (Maybe ReplyMarkup)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"reply_markup"
        Maybe InputMessageContent
input_message_content_ <- Object
o Object -> Key -> Parser (Maybe InputMessageContent)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"input_message_content"
        InputInlineQueryResult -> Parser InputInlineQueryResult
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InputInlineQueryResult -> Parser InputInlineQueryResult)
-> InputInlineQueryResult -> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ InputInlineQueryResultAnimation
          { _id :: Maybe Text
_id                   = Maybe Text
_id_
          , title :: Maybe Text
title                 = Maybe Text
title_
          , thumbnail_url :: Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
          , thumbnail_mime_type :: Maybe Text
thumbnail_mime_type   = Maybe Text
thumbnail_mime_type_
          , video_url :: Maybe Text
video_url             = Maybe Text
video_url_
          , video_mime_type :: Maybe Text
video_mime_type       = Maybe Text
video_mime_type_
          , video_duration :: Maybe Int
video_duration        = Maybe Int
video_duration_
          , video_width :: Maybe Int
video_width           = Maybe Int
video_width_
          , video_height :: Maybe Int
video_height          = Maybe Int
video_height_
          , reply_markup :: Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
          , input_message_content :: Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
          }
      parseInputInlineQueryResultArticle :: A.Value -> AT.Parser InputInlineQueryResult
      parseInputInlineQueryResultArticle :: Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultArticle = String
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InputInlineQueryResultArticle" ((Object -> Parser InputInlineQueryResult)
 -> Value -> Parser InputInlineQueryResult)
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
        Maybe Text
_id_                   <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"id"
        Maybe Text
url_                   <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"url"
        Maybe Bool
hide_url_              <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"hide_url"
        Maybe Text
title_                 <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"title"
        Maybe Text
description_           <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"description"
        Maybe Text
thumbnail_url_         <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_url"
        Maybe Int
thumbnail_width_       <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_width"
        Maybe Int
thumbnail_height_      <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_height"
        Maybe ReplyMarkup
reply_markup_          <- Object
o Object -> Key -> Parser (Maybe ReplyMarkup)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"reply_markup"
        Maybe InputMessageContent
input_message_content_ <- Object
o Object -> Key -> Parser (Maybe InputMessageContent)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"input_message_content"
        InputInlineQueryResult -> Parser InputInlineQueryResult
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InputInlineQueryResult -> Parser InputInlineQueryResult)
-> InputInlineQueryResult -> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ InputInlineQueryResultArticle
          { _id :: Maybe Text
_id                   = Maybe Text
_id_
          , url :: Maybe Text
url                   = Maybe Text
url_
          , hide_url :: Maybe Bool
hide_url              = Maybe Bool
hide_url_
          , title :: Maybe Text
title                 = Maybe Text
title_
          , description :: Maybe Text
description           = Maybe Text
description_
          , thumbnail_url :: Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
          , thumbnail_width :: Maybe Int
thumbnail_width       = Maybe Int
thumbnail_width_
          , thumbnail_height :: Maybe Int
thumbnail_height      = Maybe Int
thumbnail_height_
          , reply_markup :: Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
          , input_message_content :: Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
          }
      parseInputInlineQueryResultAudio :: A.Value -> AT.Parser InputInlineQueryResult
      parseInputInlineQueryResultAudio :: Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultAudio = String
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InputInlineQueryResultAudio" ((Object -> Parser InputInlineQueryResult)
 -> Value -> Parser InputInlineQueryResult)
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
        Maybe Text
_id_                   <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"id"
        Maybe Text
title_                 <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"title"
        Maybe Text
performer_             <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"performer"
        Maybe Text
audio_url_             <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"audio_url"
        Maybe Int
audio_duration_        <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"audio_duration"
        Maybe ReplyMarkup
reply_markup_          <- Object
o Object -> Key -> Parser (Maybe ReplyMarkup)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"reply_markup"
        Maybe InputMessageContent
input_message_content_ <- Object
o Object -> Key -> Parser (Maybe InputMessageContent)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"input_message_content"
        InputInlineQueryResult -> Parser InputInlineQueryResult
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InputInlineQueryResult -> Parser InputInlineQueryResult)
-> InputInlineQueryResult -> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ InputInlineQueryResultAudio
          { _id :: Maybe Text
_id                   = Maybe Text
_id_
          , title :: Maybe Text
title                 = Maybe Text
title_
          , performer :: Maybe Text
performer             = Maybe Text
performer_
          , audio_url :: Maybe Text
audio_url             = Maybe Text
audio_url_
          , audio_duration :: Maybe Int
audio_duration        = Maybe Int
audio_duration_
          , reply_markup :: Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
          , input_message_content :: Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
          }
      parseInputInlineQueryResultContact :: A.Value -> AT.Parser InputInlineQueryResult
      parseInputInlineQueryResultContact :: Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultContact = String
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InputInlineQueryResultContact" ((Object -> Parser InputInlineQueryResult)
 -> Value -> Parser InputInlineQueryResult)
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
        Maybe Text
_id_                   <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"id"
        Maybe Contact
contact_               <- Object
o Object -> Key -> Parser (Maybe Contact)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"contact"
        Maybe Text
thumbnail_url_         <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_url"
        Maybe Int
thumbnail_width_       <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_width"
        Maybe Int
thumbnail_height_      <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_height"
        Maybe ReplyMarkup
reply_markup_          <- Object
o Object -> Key -> Parser (Maybe ReplyMarkup)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"reply_markup"
        Maybe InputMessageContent
input_message_content_ <- Object
o Object -> Key -> Parser (Maybe InputMessageContent)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"input_message_content"
        InputInlineQueryResult -> Parser InputInlineQueryResult
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InputInlineQueryResult -> Parser InputInlineQueryResult)
-> InputInlineQueryResult -> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ InputInlineQueryResultContact
          { _id :: Maybe Text
_id                   = Maybe Text
_id_
          , contact :: Maybe Contact
contact               = Maybe Contact
contact_
          , thumbnail_url :: Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
          , thumbnail_width :: Maybe Int
thumbnail_width       = Maybe Int
thumbnail_width_
          , thumbnail_height :: Maybe Int
thumbnail_height      = Maybe Int
thumbnail_height_
          , reply_markup :: Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
          , input_message_content :: Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
          }
      parseInputInlineQueryResultDocument :: A.Value -> AT.Parser InputInlineQueryResult
      parseInputInlineQueryResultDocument :: Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultDocument = String
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InputInlineQueryResultDocument" ((Object -> Parser InputInlineQueryResult)
 -> Value -> Parser InputInlineQueryResult)
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
        Maybe Text
_id_                   <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"id"
        Maybe Text
title_                 <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"title"
        Maybe Text
description_           <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"description"
        Maybe Text
document_url_          <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"document_url"
        Maybe Text
mime_type_             <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"mime_type"
        Maybe Text
thumbnail_url_         <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_url"
        Maybe Int
thumbnail_width_       <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_width"
        Maybe Int
thumbnail_height_      <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_height"
        Maybe ReplyMarkup
reply_markup_          <- Object
o Object -> Key -> Parser (Maybe ReplyMarkup)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"reply_markup"
        Maybe InputMessageContent
input_message_content_ <- Object
o Object -> Key -> Parser (Maybe InputMessageContent)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"input_message_content"
        InputInlineQueryResult -> Parser InputInlineQueryResult
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InputInlineQueryResult -> Parser InputInlineQueryResult)
-> InputInlineQueryResult -> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ InputInlineQueryResultDocument
          { _id :: Maybe Text
_id                   = Maybe Text
_id_
          , title :: Maybe Text
title                 = Maybe Text
title_
          , description :: Maybe Text
description           = Maybe Text
description_
          , document_url :: Maybe Text
document_url          = Maybe Text
document_url_
          , mime_type :: Maybe Text
mime_type             = Maybe Text
mime_type_
          , thumbnail_url :: Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
          , thumbnail_width :: Maybe Int
thumbnail_width       = Maybe Int
thumbnail_width_
          , thumbnail_height :: Maybe Int
thumbnail_height      = Maybe Int
thumbnail_height_
          , reply_markup :: Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
          , input_message_content :: Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
          }
      parseInputInlineQueryResultGame :: A.Value -> AT.Parser InputInlineQueryResult
      parseInputInlineQueryResultGame :: Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultGame = String
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InputInlineQueryResultGame" ((Object -> Parser InputInlineQueryResult)
 -> Value -> Parser InputInlineQueryResult)
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
        Maybe Text
_id_             <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"id"
        Maybe Text
game_short_name_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"game_short_name"
        Maybe ReplyMarkup
reply_markup_    <- Object
o Object -> Key -> Parser (Maybe ReplyMarkup)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"reply_markup"
        InputInlineQueryResult -> Parser InputInlineQueryResult
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InputInlineQueryResult -> Parser InputInlineQueryResult)
-> InputInlineQueryResult -> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ InputInlineQueryResultGame
          { _id :: Maybe Text
_id             = Maybe Text
_id_
          , game_short_name :: Maybe Text
game_short_name = Maybe Text
game_short_name_
          , reply_markup :: Maybe ReplyMarkup
reply_markup    = Maybe ReplyMarkup
reply_markup_
          }
      parseInputInlineQueryResultLocation :: A.Value -> AT.Parser InputInlineQueryResult
      parseInputInlineQueryResultLocation :: Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultLocation = String
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InputInlineQueryResultLocation" ((Object -> Parser InputInlineQueryResult)
 -> Value -> Parser InputInlineQueryResult)
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
        Maybe Text
_id_                   <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"id"
        Maybe Location
location_              <- Object
o Object -> Key -> Parser (Maybe Location)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"location"
        Maybe Int
live_period_           <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"live_period"
        Maybe Text
title_                 <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"title"
        Maybe Text
thumbnail_url_         <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_url"
        Maybe Int
thumbnail_width_       <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_width"
        Maybe Int
thumbnail_height_      <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_height"
        Maybe ReplyMarkup
reply_markup_          <- Object
o Object -> Key -> Parser (Maybe ReplyMarkup)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"reply_markup"
        Maybe InputMessageContent
input_message_content_ <- Object
o Object -> Key -> Parser (Maybe InputMessageContent)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"input_message_content"
        InputInlineQueryResult -> Parser InputInlineQueryResult
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InputInlineQueryResult -> Parser InputInlineQueryResult)
-> InputInlineQueryResult -> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ InputInlineQueryResultLocation
          { _id :: Maybe Text
_id                   = Maybe Text
_id_
          , location :: Maybe Location
location              = Maybe Location
location_
          , live_period :: Maybe Int
live_period           = Maybe Int
live_period_
          , title :: Maybe Text
title                 = Maybe Text
title_
          , thumbnail_url :: Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
          , thumbnail_width :: Maybe Int
thumbnail_width       = Maybe Int
thumbnail_width_
          , thumbnail_height :: Maybe Int
thumbnail_height      = Maybe Int
thumbnail_height_
          , reply_markup :: Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
          , input_message_content :: Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
          }
      parseInputInlineQueryResultPhoto :: A.Value -> AT.Parser InputInlineQueryResult
      parseInputInlineQueryResultPhoto :: Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultPhoto = String
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InputInlineQueryResultPhoto" ((Object -> Parser InputInlineQueryResult)
 -> Value -> Parser InputInlineQueryResult)
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
        Maybe Text
_id_                   <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"id"
        Maybe Text
title_                 <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"title"
        Maybe Text
description_           <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"description"
        Maybe Text
thumbnail_url_         <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_url"
        Maybe Text
photo_url_             <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"photo_url"
        Maybe Int
photo_width_           <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"photo_width"
        Maybe Int
photo_height_          <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"photo_height"
        Maybe ReplyMarkup
reply_markup_          <- Object
o Object -> Key -> Parser (Maybe ReplyMarkup)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"reply_markup"
        Maybe InputMessageContent
input_message_content_ <- Object
o Object -> Key -> Parser (Maybe InputMessageContent)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"input_message_content"
        InputInlineQueryResult -> Parser InputInlineQueryResult
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InputInlineQueryResult -> Parser InputInlineQueryResult)
-> InputInlineQueryResult -> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ InputInlineQueryResultPhoto
          { _id :: Maybe Text
_id                   = Maybe Text
_id_
          , title :: Maybe Text
title                 = Maybe Text
title_
          , description :: Maybe Text
description           = Maybe Text
description_
          , thumbnail_url :: Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
          , photo_url :: Maybe Text
photo_url             = Maybe Text
photo_url_
          , photo_width :: Maybe Int
photo_width           = Maybe Int
photo_width_
          , photo_height :: Maybe Int
photo_height          = Maybe Int
photo_height_
          , reply_markup :: Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
          , input_message_content :: Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
          }
      parseInputInlineQueryResultSticker :: A.Value -> AT.Parser InputInlineQueryResult
      parseInputInlineQueryResultSticker :: Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultSticker = String
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InputInlineQueryResultSticker" ((Object -> Parser InputInlineQueryResult)
 -> Value -> Parser InputInlineQueryResult)
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
        Maybe Text
_id_                   <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"id"
        Maybe Text
thumbnail_url_         <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_url"
        Maybe Text
sticker_url_           <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"sticker_url"
        Maybe Int
sticker_width_         <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"sticker_width"
        Maybe Int
sticker_height_        <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"sticker_height"
        Maybe ReplyMarkup
reply_markup_          <- Object
o Object -> Key -> Parser (Maybe ReplyMarkup)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"reply_markup"
        Maybe InputMessageContent
input_message_content_ <- Object
o Object -> Key -> Parser (Maybe InputMessageContent)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"input_message_content"
        InputInlineQueryResult -> Parser InputInlineQueryResult
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InputInlineQueryResult -> Parser InputInlineQueryResult)
-> InputInlineQueryResult -> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ InputInlineQueryResultSticker
          { _id :: Maybe Text
_id                   = Maybe Text
_id_
          , thumbnail_url :: Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
          , sticker_url :: Maybe Text
sticker_url           = Maybe Text
sticker_url_
          , sticker_width :: Maybe Int
sticker_width         = Maybe Int
sticker_width_
          , sticker_height :: Maybe Int
sticker_height        = Maybe Int
sticker_height_
          , reply_markup :: Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
          , input_message_content :: Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
          }
      parseInputInlineQueryResultVenue :: A.Value -> AT.Parser InputInlineQueryResult
      parseInputInlineQueryResultVenue :: Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultVenue = String
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InputInlineQueryResultVenue" ((Object -> Parser InputInlineQueryResult)
 -> Value -> Parser InputInlineQueryResult)
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
        Maybe Text
_id_                   <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"id"
        Maybe Venue
venue_                 <- Object
o Object -> Key -> Parser (Maybe Venue)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"venue"
        Maybe Text
thumbnail_url_         <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_url"
        Maybe Int
thumbnail_width_       <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_width"
        Maybe Int
thumbnail_height_      <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_height"
        Maybe ReplyMarkup
reply_markup_          <- Object
o Object -> Key -> Parser (Maybe ReplyMarkup)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"reply_markup"
        Maybe InputMessageContent
input_message_content_ <- Object
o Object -> Key -> Parser (Maybe InputMessageContent)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"input_message_content"
        InputInlineQueryResult -> Parser InputInlineQueryResult
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InputInlineQueryResult -> Parser InputInlineQueryResult)
-> InputInlineQueryResult -> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ InputInlineQueryResultVenue
          { _id :: Maybe Text
_id                   = Maybe Text
_id_
          , venue :: Maybe Venue
venue                 = Maybe Venue
venue_
          , thumbnail_url :: Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
          , thumbnail_width :: Maybe Int
thumbnail_width       = Maybe Int
thumbnail_width_
          , thumbnail_height :: Maybe Int
thumbnail_height      = Maybe Int
thumbnail_height_
          , reply_markup :: Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
          , input_message_content :: Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
          }
      parseInputInlineQueryResultVideo :: A.Value -> AT.Parser InputInlineQueryResult
      parseInputInlineQueryResultVideo :: Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultVideo = String
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InputInlineQueryResultVideo" ((Object -> Parser InputInlineQueryResult)
 -> Value -> Parser InputInlineQueryResult)
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
        Maybe Text
_id_                   <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"id"
        Maybe Text
title_                 <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"title"
        Maybe Text
description_           <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"description"
        Maybe Text
thumbnail_url_         <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"thumbnail_url"
        Maybe Text
video_url_             <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"video_url"
        Maybe Text
mime_type_             <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"mime_type"
        Maybe Int
video_width_           <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"video_width"
        Maybe Int
video_height_          <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"video_height"
        Maybe Int
video_duration_        <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"video_duration"
        Maybe ReplyMarkup
reply_markup_          <- Object
o Object -> Key -> Parser (Maybe ReplyMarkup)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"reply_markup"
        Maybe InputMessageContent
input_message_content_ <- Object
o Object -> Key -> Parser (Maybe InputMessageContent)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"input_message_content"
        InputInlineQueryResult -> Parser InputInlineQueryResult
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InputInlineQueryResult -> Parser InputInlineQueryResult)
-> InputInlineQueryResult -> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ InputInlineQueryResultVideo
          { _id :: Maybe Text
_id                   = Maybe Text
_id_
          , title :: Maybe Text
title                 = Maybe Text
title_
          , description :: Maybe Text
description           = Maybe Text
description_
          , thumbnail_url :: Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
          , video_url :: Maybe Text
video_url             = Maybe Text
video_url_
          , mime_type :: Maybe Text
mime_type             = Maybe Text
mime_type_
          , video_width :: Maybe Int
video_width           = Maybe Int
video_width_
          , video_height :: Maybe Int
video_height          = Maybe Int
video_height_
          , video_duration :: Maybe Int
video_duration        = Maybe Int
video_duration_
          , reply_markup :: Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
          , input_message_content :: Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
          }
      parseInputInlineQueryResultVoiceNote :: A.Value -> AT.Parser InputInlineQueryResult
      parseInputInlineQueryResultVoiceNote :: Value -> Parser InputInlineQueryResult
parseInputInlineQueryResultVoiceNote = String
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InputInlineQueryResultVoiceNote" ((Object -> Parser InputInlineQueryResult)
 -> Value -> Parser InputInlineQueryResult)
-> (Object -> Parser InputInlineQueryResult)
-> Value
-> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
        Maybe Text
_id_                   <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"id"
        Maybe Text
title_                 <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"title"
        Maybe Text
voice_note_url_        <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"voice_note_url"
        Maybe Int
voice_note_duration_   <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"voice_note_duration"
        Maybe ReplyMarkup
reply_markup_          <- Object
o Object -> Key -> Parser (Maybe ReplyMarkup)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"reply_markup"
        Maybe InputMessageContent
input_message_content_ <- Object
o Object -> Key -> Parser (Maybe InputMessageContent)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:?  Key
"input_message_content"
        InputInlineQueryResult -> Parser InputInlineQueryResult
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InputInlineQueryResult -> Parser InputInlineQueryResult)
-> InputInlineQueryResult -> Parser InputInlineQueryResult
forall a b. (a -> b) -> a -> b
$ InputInlineQueryResultVoiceNote
          { _id :: Maybe Text
_id                   = Maybe Text
_id_
          , title :: Maybe Text
title                 = Maybe Text
title_
          , voice_note_url :: Maybe Text
voice_note_url        = Maybe Text
voice_note_url_
          , voice_note_duration :: Maybe Int
voice_note_duration   = Maybe Int
voice_note_duration_
          , reply_markup :: Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
          , input_message_content :: Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
          }
  parseJSON Value
_ = Parser InputInlineQueryResult
forall a. Monoid a => a
mempty

instance AT.ToJSON InputInlineQueryResult where
  toJSON :: InputInlineQueryResult -> Value
toJSON InputInlineQueryResultAnimation
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , title :: InputInlineQueryResult -> Maybe Text
title                 = Maybe Text
title_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , thumbnail_mime_type :: InputInlineQueryResult -> Maybe Text
thumbnail_mime_type   = Maybe Text
thumbnail_mime_type_
    , video_url :: InputInlineQueryResult -> Maybe Text
video_url             = Maybe Text
video_url_
    , video_mime_type :: InputInlineQueryResult -> Maybe Text
video_mime_type       = Maybe Text
video_mime_type_
    , video_duration :: InputInlineQueryResult -> Maybe Int
video_duration        = Maybe Int
video_duration_
    , video_width :: InputInlineQueryResult -> Maybe Int
video_width           = Maybe Int
video_width_
    , video_height :: InputInlineQueryResult -> Maybe Int
video_height          = Maybe Int
video_height_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = [Pair] -> Value
A.object
        [ Key
"@type"                 Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"inputInlineQueryResultAnimation"
        , Key
"id"                    Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
_id_
        , Key
"title"                 Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
title_
        , Key
"thumbnail_url"         Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
thumbnail_url_
        , Key
"thumbnail_mime_type"   Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
thumbnail_mime_type_
        , Key
"video_url"             Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
video_url_
        , Key
"video_mime_type"       Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
video_mime_type_
        , Key
"video_duration"        Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
video_duration_
        , Key
"video_width"           Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
video_width_
        , Key
"video_height"          Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
video_height_
        , Key
"reply_markup"          Key -> Maybe ReplyMarkup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe ReplyMarkup
reply_markup_
        , Key
"input_message_content" Key -> Maybe InputMessageContent -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe InputMessageContent
input_message_content_
        ]
  toJSON InputInlineQueryResultArticle
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , url :: InputInlineQueryResult -> Maybe Text
url                   = Maybe Text
url_
    , hide_url :: InputInlineQueryResult -> Maybe Bool
hide_url              = Maybe Bool
hide_url_
    , title :: InputInlineQueryResult -> Maybe Text
title                 = Maybe Text
title_
    , description :: InputInlineQueryResult -> Maybe Text
description           = Maybe Text
description_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , thumbnail_width :: InputInlineQueryResult -> Maybe Int
thumbnail_width       = Maybe Int
thumbnail_width_
    , thumbnail_height :: InputInlineQueryResult -> Maybe Int
thumbnail_height      = Maybe Int
thumbnail_height_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = [Pair] -> Value
A.object
        [ Key
"@type"                 Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"inputInlineQueryResultArticle"
        , Key
"id"                    Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
_id_
        , Key
"url"                   Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
url_
        , Key
"hide_url"              Key -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Bool
hide_url_
        , Key
"title"                 Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
title_
        , Key
"description"           Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
description_
        , Key
"thumbnail_url"         Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
thumbnail_url_
        , Key
"thumbnail_width"       Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
thumbnail_width_
        , Key
"thumbnail_height"      Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
thumbnail_height_
        , Key
"reply_markup"          Key -> Maybe ReplyMarkup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe ReplyMarkup
reply_markup_
        , Key
"input_message_content" Key -> Maybe InputMessageContent -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe InputMessageContent
input_message_content_
        ]
  toJSON InputInlineQueryResultAudio
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , title :: InputInlineQueryResult -> Maybe Text
title                 = Maybe Text
title_
    , performer :: InputInlineQueryResult -> Maybe Text
performer             = Maybe Text
performer_
    , audio_url :: InputInlineQueryResult -> Maybe Text
audio_url             = Maybe Text
audio_url_
    , audio_duration :: InputInlineQueryResult -> Maybe Int
audio_duration        = Maybe Int
audio_duration_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = [Pair] -> Value
A.object
        [ Key
"@type"                 Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"inputInlineQueryResultAudio"
        , Key
"id"                    Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
_id_
        , Key
"title"                 Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
title_
        , Key
"performer"             Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
performer_
        , Key
"audio_url"             Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
audio_url_
        , Key
"audio_duration"        Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
audio_duration_
        , Key
"reply_markup"          Key -> Maybe ReplyMarkup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe ReplyMarkup
reply_markup_
        , Key
"input_message_content" Key -> Maybe InputMessageContent -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe InputMessageContent
input_message_content_
        ]
  toJSON InputInlineQueryResultContact
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , contact :: InputInlineQueryResult -> Maybe Contact
contact               = Maybe Contact
contact_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , thumbnail_width :: InputInlineQueryResult -> Maybe Int
thumbnail_width       = Maybe Int
thumbnail_width_
    , thumbnail_height :: InputInlineQueryResult -> Maybe Int
thumbnail_height      = Maybe Int
thumbnail_height_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = [Pair] -> Value
A.object
        [ Key
"@type"                 Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"inputInlineQueryResultContact"
        , Key
"id"                    Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
_id_
        , Key
"contact"               Key -> Maybe Contact -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Contact
contact_
        , Key
"thumbnail_url"         Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
thumbnail_url_
        , Key
"thumbnail_width"       Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
thumbnail_width_
        , Key
"thumbnail_height"      Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
thumbnail_height_
        , Key
"reply_markup"          Key -> Maybe ReplyMarkup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe ReplyMarkup
reply_markup_
        , Key
"input_message_content" Key -> Maybe InputMessageContent -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe InputMessageContent
input_message_content_
        ]
  toJSON InputInlineQueryResultDocument
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , title :: InputInlineQueryResult -> Maybe Text
title                 = Maybe Text
title_
    , description :: InputInlineQueryResult -> Maybe Text
description           = Maybe Text
description_
    , document_url :: InputInlineQueryResult -> Maybe Text
document_url          = Maybe Text
document_url_
    , mime_type :: InputInlineQueryResult -> Maybe Text
mime_type             = Maybe Text
mime_type_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , thumbnail_width :: InputInlineQueryResult -> Maybe Int
thumbnail_width       = Maybe Int
thumbnail_width_
    , thumbnail_height :: InputInlineQueryResult -> Maybe Int
thumbnail_height      = Maybe Int
thumbnail_height_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = [Pair] -> Value
A.object
        [ Key
"@type"                 Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"inputInlineQueryResultDocument"
        , Key
"id"                    Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
_id_
        , Key
"title"                 Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
title_
        , Key
"description"           Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
description_
        , Key
"document_url"          Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
document_url_
        , Key
"mime_type"             Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
mime_type_
        , Key
"thumbnail_url"         Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
thumbnail_url_
        , Key
"thumbnail_width"       Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
thumbnail_width_
        , Key
"thumbnail_height"      Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
thumbnail_height_
        , Key
"reply_markup"          Key -> Maybe ReplyMarkup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe ReplyMarkup
reply_markup_
        , Key
"input_message_content" Key -> Maybe InputMessageContent -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe InputMessageContent
input_message_content_
        ]
  toJSON InputInlineQueryResultGame
    { _id :: InputInlineQueryResult -> Maybe Text
_id             = Maybe Text
_id_
    , game_short_name :: InputInlineQueryResult -> Maybe Text
game_short_name = Maybe Text
game_short_name_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup    = Maybe ReplyMarkup
reply_markup_
    }
      = [Pair] -> Value
A.object
        [ Key
"@type"           Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"inputInlineQueryResultGame"
        , Key
"id"              Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
_id_
        , Key
"game_short_name" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
game_short_name_
        , Key
"reply_markup"    Key -> Maybe ReplyMarkup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe ReplyMarkup
reply_markup_
        ]
  toJSON InputInlineQueryResultLocation
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , location :: InputInlineQueryResult -> Maybe Location
location              = Maybe Location
location_
    , live_period :: InputInlineQueryResult -> Maybe Int
live_period           = Maybe Int
live_period_
    , title :: InputInlineQueryResult -> Maybe Text
title                 = Maybe Text
title_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , thumbnail_width :: InputInlineQueryResult -> Maybe Int
thumbnail_width       = Maybe Int
thumbnail_width_
    , thumbnail_height :: InputInlineQueryResult -> Maybe Int
thumbnail_height      = Maybe Int
thumbnail_height_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = [Pair] -> Value
A.object
        [ Key
"@type"                 Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"inputInlineQueryResultLocation"
        , Key
"id"                    Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
_id_
        , Key
"location"              Key -> Maybe Location -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Location
location_
        , Key
"live_period"           Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
live_period_
        , Key
"title"                 Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
title_
        , Key
"thumbnail_url"         Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
thumbnail_url_
        , Key
"thumbnail_width"       Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
thumbnail_width_
        , Key
"thumbnail_height"      Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
thumbnail_height_
        , Key
"reply_markup"          Key -> Maybe ReplyMarkup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe ReplyMarkup
reply_markup_
        , Key
"input_message_content" Key -> Maybe InputMessageContent -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe InputMessageContent
input_message_content_
        ]
  toJSON InputInlineQueryResultPhoto
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , title :: InputInlineQueryResult -> Maybe Text
title                 = Maybe Text
title_
    , description :: InputInlineQueryResult -> Maybe Text
description           = Maybe Text
description_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , photo_url :: InputInlineQueryResult -> Maybe Text
photo_url             = Maybe Text
photo_url_
    , photo_width :: InputInlineQueryResult -> Maybe Int
photo_width           = Maybe Int
photo_width_
    , photo_height :: InputInlineQueryResult -> Maybe Int
photo_height          = Maybe Int
photo_height_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = [Pair] -> Value
A.object
        [ Key
"@type"                 Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"inputInlineQueryResultPhoto"
        , Key
"id"                    Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
_id_
        , Key
"title"                 Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
title_
        , Key
"description"           Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
description_
        , Key
"thumbnail_url"         Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
thumbnail_url_
        , Key
"photo_url"             Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
photo_url_
        , Key
"photo_width"           Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
photo_width_
        , Key
"photo_height"          Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
photo_height_
        , Key
"reply_markup"          Key -> Maybe ReplyMarkup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe ReplyMarkup
reply_markup_
        , Key
"input_message_content" Key -> Maybe InputMessageContent -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe InputMessageContent
input_message_content_
        ]
  toJSON InputInlineQueryResultSticker
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , sticker_url :: InputInlineQueryResult -> Maybe Text
sticker_url           = Maybe Text
sticker_url_
    , sticker_width :: InputInlineQueryResult -> Maybe Int
sticker_width         = Maybe Int
sticker_width_
    , sticker_height :: InputInlineQueryResult -> Maybe Int
sticker_height        = Maybe Int
sticker_height_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = [Pair] -> Value
A.object
        [ Key
"@type"                 Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"inputInlineQueryResultSticker"
        , Key
"id"                    Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
_id_
        , Key
"thumbnail_url"         Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
thumbnail_url_
        , Key
"sticker_url"           Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
sticker_url_
        , Key
"sticker_width"         Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
sticker_width_
        , Key
"sticker_height"        Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
sticker_height_
        , Key
"reply_markup"          Key -> Maybe ReplyMarkup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe ReplyMarkup
reply_markup_
        , Key
"input_message_content" Key -> Maybe InputMessageContent -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe InputMessageContent
input_message_content_
        ]
  toJSON InputInlineQueryResultVenue
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , venue :: InputInlineQueryResult -> Maybe Venue
venue                 = Maybe Venue
venue_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , thumbnail_width :: InputInlineQueryResult -> Maybe Int
thumbnail_width       = Maybe Int
thumbnail_width_
    , thumbnail_height :: InputInlineQueryResult -> Maybe Int
thumbnail_height      = Maybe Int
thumbnail_height_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = [Pair] -> Value
A.object
        [ Key
"@type"                 Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"inputInlineQueryResultVenue"
        , Key
"id"                    Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
_id_
        , Key
"venue"                 Key -> Maybe Venue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Venue
venue_
        , Key
"thumbnail_url"         Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
thumbnail_url_
        , Key
"thumbnail_width"       Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
thumbnail_width_
        , Key
"thumbnail_height"      Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
thumbnail_height_
        , Key
"reply_markup"          Key -> Maybe ReplyMarkup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe ReplyMarkup
reply_markup_
        , Key
"input_message_content" Key -> Maybe InputMessageContent -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe InputMessageContent
input_message_content_
        ]
  toJSON InputInlineQueryResultVideo
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , title :: InputInlineQueryResult -> Maybe Text
title                 = Maybe Text
title_
    , description :: InputInlineQueryResult -> Maybe Text
description           = Maybe Text
description_
    , thumbnail_url :: InputInlineQueryResult -> Maybe Text
thumbnail_url         = Maybe Text
thumbnail_url_
    , video_url :: InputInlineQueryResult -> Maybe Text
video_url             = Maybe Text
video_url_
    , mime_type :: InputInlineQueryResult -> Maybe Text
mime_type             = Maybe Text
mime_type_
    , video_width :: InputInlineQueryResult -> Maybe Int
video_width           = Maybe Int
video_width_
    , video_height :: InputInlineQueryResult -> Maybe Int
video_height          = Maybe Int
video_height_
    , video_duration :: InputInlineQueryResult -> Maybe Int
video_duration        = Maybe Int
video_duration_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = [Pair] -> Value
A.object
        [ Key
"@type"                 Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"inputInlineQueryResultVideo"
        , Key
"id"                    Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
_id_
        , Key
"title"                 Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
title_
        , Key
"description"           Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
description_
        , Key
"thumbnail_url"         Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
thumbnail_url_
        , Key
"video_url"             Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
video_url_
        , Key
"mime_type"             Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
mime_type_
        , Key
"video_width"           Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
video_width_
        , Key
"video_height"          Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
video_height_
        , Key
"video_duration"        Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
video_duration_
        , Key
"reply_markup"          Key -> Maybe ReplyMarkup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe ReplyMarkup
reply_markup_
        , Key
"input_message_content" Key -> Maybe InputMessageContent -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe InputMessageContent
input_message_content_
        ]
  toJSON InputInlineQueryResultVoiceNote
    { _id :: InputInlineQueryResult -> Maybe Text
_id                   = Maybe Text
_id_
    , title :: InputInlineQueryResult -> Maybe Text
title                 = Maybe Text
title_
    , voice_note_url :: InputInlineQueryResult -> Maybe Text
voice_note_url        = Maybe Text
voice_note_url_
    , voice_note_duration :: InputInlineQueryResult -> Maybe Int
voice_note_duration   = Maybe Int
voice_note_duration_
    , reply_markup :: InputInlineQueryResult -> Maybe ReplyMarkup
reply_markup          = Maybe ReplyMarkup
reply_markup_
    , input_message_content :: InputInlineQueryResult -> Maybe InputMessageContent
input_message_content = Maybe InputMessageContent
input_message_content_
    }
      = [Pair] -> Value
A.object
        [ Key
"@type"                 Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"inputInlineQueryResultVoiceNote"
        , Key
"id"                    Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
_id_
        , Key
"title"                 Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
title_
        , Key
"voice_note_url"        Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
voice_note_url_
        , Key
"voice_note_duration"   Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
voice_note_duration_
        , Key
"reply_markup"          Key -> Maybe ReplyMarkup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe ReplyMarkup
reply_markup_
        , Key
"input_message_content" Key -> Maybe InputMessageContent -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe InputMessageContent
input_message_content_
        ]