module TD.Data.InternalLinkType
(InternalLinkType(..)) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import {-# SOURCE #-} qualified TD.Data.TargetChat as TargetChat
import qualified Data.Text as T
import qualified TD.Data.ChatAdministratorRights as ChatAdministratorRights
import qualified TD.Data.WebAppOpenMode as WebAppOpenMode
import qualified TD.Data.FormattedText as FormattedText
import qualified TD.Data.StoryContentType as StoryContentType
import qualified TD.Data.Proxy as Proxy
import qualified TD.Data.SettingsSection as SettingsSection
data InternalLinkType
=
{ InternalLinkType -> Maybe TargetChat
target_chat :: Maybe TargetChat.TargetChat
, InternalLinkType -> Maybe Text
bot_username :: Maybe T.Text
, InternalLinkType -> Maybe Text
url :: Maybe T.Text
}
| InternalLinkTypeAuthenticationCode
{ InternalLinkType -> Maybe Text
code :: Maybe T.Text
}
| InternalLinkTypeBackground
{ InternalLinkType -> Maybe Text
background_name :: Maybe T.Text
}
| InternalLinkTypeBotAddToChannel
{ bot_username :: Maybe T.Text
, InternalLinkType -> Maybe ChatAdministratorRights
administrator_rights :: Maybe ChatAdministratorRights.ChatAdministratorRights
}
| InternalLinkTypeBotStart
{ bot_username :: Maybe T.Text
, InternalLinkType -> Maybe Text
start_parameter :: Maybe T.Text
, InternalLinkType -> Maybe Bool
autostart :: Maybe Bool
}
| InternalLinkTypeBotStartInGroup
{ bot_username :: Maybe T.Text
, start_parameter :: Maybe T.Text
, administrator_rights :: Maybe ChatAdministratorRights.ChatAdministratorRights
}
| InternalLinkTypeBusinessChat
{ InternalLinkType -> Maybe Text
link_name :: Maybe T.Text
}
| InternalLinkTypeCallsPage
{ InternalLinkType -> Maybe Text
section :: Maybe T.Text
}
| InternalLinkTypeChatAffiliateProgram
{ InternalLinkType -> Maybe Text
username :: Maybe T.Text
, InternalLinkType -> Maybe Text
referrer :: Maybe T.Text
}
| InternalLinkTypeChatBoost
{ url :: Maybe T.Text
}
| InternalLinkTypeChatFolderInvite
{ InternalLinkType -> Maybe Text
invite_link :: Maybe T.Text
}
| InternalLinkTypeChatInvite
{ invite_link :: Maybe T.Text
}
| InternalLinkTypeChatSelection
| InternalLinkTypeContactsPage
{ section :: Maybe T.Text
}
| InternalLinkTypeDirectMessagesChat
{ InternalLinkType -> Maybe Text
channel_username :: Maybe T.Text
}
| InternalLinkTypeGame
{ bot_username :: Maybe T.Text
, InternalLinkType -> Maybe Text
game_short_name :: Maybe T.Text
}
| InternalLinkTypeGiftAuction
{ InternalLinkType -> Maybe Text
auction_id :: Maybe T.Text
}
| InternalLinkTypeGiftCollection
{ InternalLinkType -> Maybe Text
gift_owner_username :: Maybe T.Text
, InternalLinkType -> Maybe Int
collection_id :: Maybe Int
}
| InternalLinkTypeGroupCall
{ invite_link :: Maybe T.Text
}
| InternalLinkTypeInstantView
{ url :: Maybe T.Text
, InternalLinkType -> Maybe Text
fallback_url :: Maybe T.Text
}
| InternalLinkTypeInvoice
{ InternalLinkType -> Maybe Text
invoice_name :: Maybe T.Text
}
| InternalLinkTypeLanguagePack
{ InternalLinkType -> Maybe Text
language_pack_id :: Maybe T.Text
}
| InternalLinkTypeLiveStory
{ InternalLinkType -> Maybe Text
story_poster_username :: Maybe T.Text
}
| InternalLinkTypeMainWebApp
{ bot_username :: Maybe T.Text
, start_parameter :: Maybe T.Text
, InternalLinkType -> Maybe WebAppOpenMode
mode :: Maybe WebAppOpenMode.WebAppOpenMode
}
| InternalLinkTypeMessage
{ url :: Maybe T.Text
}
| InternalLinkTypeMessageDraft
{ InternalLinkType -> Maybe FormattedText
text :: Maybe FormattedText.FormattedText
, InternalLinkType -> Maybe Bool
contains_link :: Maybe Bool
}
| InternalLinkTypeMyProfilePage
{ section :: Maybe T.Text
}
| InternalLinkTypeNewChannelChat
| InternalLinkTypeNewGroupChat
| InternalLinkTypeNewPrivateChat
| InternalLinkTypeNewStory
{ InternalLinkType -> Maybe StoryContentType
content_type :: Maybe StoryContentType.StoryContentType
}
| InternalLinkTypeOauth
{ url :: Maybe T.Text
}
| InternalLinkTypePassportDataRequest
{ InternalLinkType -> Maybe Int
bot_user_id :: Maybe Int
, InternalLinkType -> Maybe Text
scope :: Maybe T.Text
, InternalLinkType -> Maybe Text
public_key :: Maybe T.Text
, InternalLinkType -> Maybe Text
nonce :: Maybe T.Text
, InternalLinkType -> Maybe Text
callback_url :: Maybe T.Text
}
| InternalLinkTypePhoneNumberConfirmation
{ InternalLinkType -> Maybe Text
hash :: Maybe T.Text
, InternalLinkType -> Maybe Text
phone_number :: Maybe T.Text
}
| InternalLinkTypePremiumFeaturesPage
{ referrer :: Maybe T.Text
}
| InternalLinkTypePremiumGiftCode
{ code :: Maybe T.Text
}
| InternalLinkTypePremiumGiftPurchase
{ referrer :: Maybe T.Text
}
| InternalLinkTypeProxy
{ InternalLinkType -> Maybe Proxy
proxy :: Maybe Proxy.Proxy
}
| InternalLinkTypePublicChat
{ InternalLinkType -> Maybe Text
chat_username :: Maybe T.Text
, InternalLinkType -> Maybe Text
draft_text :: Maybe T.Text
, InternalLinkType -> Maybe Bool
open_profile :: Maybe Bool
}
| InternalLinkTypeQrCodeAuthentication
| InternalLinkTypeRestorePurchases
| InternalLinkTypeSavedMessages
| InternalLinkTypeSearch
| InternalLinkTypeSettings
{ InternalLinkType -> Maybe SettingsSection
_section :: Maybe SettingsSection.SettingsSection
}
| InternalLinkTypeStarPurchase
{ InternalLinkType -> Maybe Int
star_count :: Maybe Int
, InternalLinkType -> Maybe Text
purpose :: Maybe T.Text
}
| InternalLinkTypeStickerSet
{ InternalLinkType -> Maybe Text
sticker_set_name :: Maybe T.Text
, InternalLinkType -> Maybe Bool
expect_custom_emoji :: Maybe Bool
}
| InternalLinkTypeStory
{ story_poster_username :: Maybe T.Text
, InternalLinkType -> Maybe Int
story_id :: Maybe Int
}
| InternalLinkTypeStoryAlbum
{ InternalLinkType -> Maybe Text
story_album_owner_username :: Maybe T.Text
, InternalLinkType -> Maybe Int
story_album_id :: Maybe Int
}
| InternalLinkTypeTheme
{ InternalLinkType -> Maybe Text
theme_name :: Maybe T.Text
}
| InternalLinkTypeUnknownDeepLink
{ InternalLinkType -> Maybe Text
link :: Maybe T.Text
}
| InternalLinkTypeUpgradedGift
{ InternalLinkType -> Maybe Text
name :: Maybe T.Text
}
| InternalLinkTypeUserPhoneNumber
{ phone_number :: Maybe T.Text
, draft_text :: Maybe T.Text
, open_profile :: Maybe Bool
}
| InternalLinkTypeUserToken
{ InternalLinkType -> Maybe Text
token :: Maybe T.Text
}
| InternalLinkTypeVideoChat
{ chat_username :: Maybe T.Text
, InternalLinkType -> Maybe Text
invite_hash :: Maybe T.Text
, InternalLinkType -> Maybe Bool
is_live_stream :: Maybe Bool
}
| InternalLinkTypeWebApp
{ bot_username :: Maybe T.Text
, InternalLinkType -> Maybe Text
web_app_short_name :: Maybe T.Text
, start_parameter :: Maybe T.Text
, mode :: Maybe WebAppOpenMode.WebAppOpenMode
}
deriving (InternalLinkType -> InternalLinkType -> Bool
(InternalLinkType -> InternalLinkType -> Bool)
-> (InternalLinkType -> InternalLinkType -> Bool)
-> Eq InternalLinkType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InternalLinkType -> InternalLinkType -> Bool
== :: InternalLinkType -> InternalLinkType -> Bool
$c/= :: InternalLinkType -> InternalLinkType -> Bool
/= :: InternalLinkType -> InternalLinkType -> Bool
Eq, Int -> InternalLinkType -> ShowS
[InternalLinkType] -> ShowS
InternalLinkType -> String
(Int -> InternalLinkType -> ShowS)
-> (InternalLinkType -> String)
-> ([InternalLinkType] -> ShowS)
-> Show InternalLinkType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InternalLinkType -> ShowS
showsPrec :: Int -> InternalLinkType -> ShowS
$cshow :: InternalLinkType -> String
show :: InternalLinkType -> String
$cshowList :: [InternalLinkType] -> ShowS
showList :: [InternalLinkType] -> ShowS
Show)
instance I.ShortShow InternalLinkType where
shortShow :: InternalLinkType -> String
shortShow InternalLinkTypeAttachmentMenuBot
{ target_chat :: InternalLinkType -> Maybe TargetChat
target_chat = Maybe TargetChat
target_chat_
, bot_username :: InternalLinkType -> Maybe Text
bot_username = Maybe Text
bot_username_
, url :: InternalLinkType -> Maybe Text
url = Maybe Text
url_
}
= String
"InternalLinkTypeAttachmentMenuBot"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"target_chat" String -> Maybe TargetChat -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe TargetChat
target_chat_
, String
"bot_username" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
bot_username_
, String
"url" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
url_
]
shortShow InternalLinkTypeAuthenticationCode
{ code :: InternalLinkType -> Maybe Text
code = Maybe Text
code_
}
= String
"InternalLinkTypeAuthenticationCode"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"code" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
code_
]
shortShow InternalLinkTypeBackground
{ background_name :: InternalLinkType -> Maybe Text
background_name = Maybe Text
background_name_
}
= String
"InternalLinkTypeBackground"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"background_name" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
background_name_
]
shortShow InternalLinkTypeBotAddToChannel
{ bot_username :: InternalLinkType -> Maybe Text
bot_username = Maybe Text
bot_username_
, administrator_rights :: InternalLinkType -> Maybe ChatAdministratorRights
administrator_rights = Maybe ChatAdministratorRights
administrator_rights_
}
= String
"InternalLinkTypeBotAddToChannel"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"bot_username" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
bot_username_
, String
"administrator_rights" String -> Maybe ChatAdministratorRights -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ChatAdministratorRights
administrator_rights_
]
shortShow InternalLinkTypeBotStart
{ bot_username :: InternalLinkType -> Maybe Text
bot_username = Maybe Text
bot_username_
, start_parameter :: InternalLinkType -> Maybe Text
start_parameter = Maybe Text
start_parameter_
, autostart :: InternalLinkType -> Maybe Bool
autostart = Maybe Bool
autostart_
}
= String
"InternalLinkTypeBotStart"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"bot_username" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
bot_username_
, String
"start_parameter" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
start_parameter_
, String
"autostart" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
autostart_
]
shortShow InternalLinkTypeBotStartInGroup
{ bot_username :: InternalLinkType -> Maybe Text
bot_username = Maybe Text
bot_username_
, start_parameter :: InternalLinkType -> Maybe Text
start_parameter = Maybe Text
start_parameter_
, administrator_rights :: InternalLinkType -> Maybe ChatAdministratorRights
administrator_rights = Maybe ChatAdministratorRights
administrator_rights_
}
= String
"InternalLinkTypeBotStartInGroup"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"bot_username" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
bot_username_
, String
"start_parameter" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
start_parameter_
, String
"administrator_rights" String -> Maybe ChatAdministratorRights -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ChatAdministratorRights
administrator_rights_
]
shortShow InternalLinkTypeBusinessChat
{ link_name :: InternalLinkType -> Maybe Text
link_name = Maybe Text
link_name_
}
= String
"InternalLinkTypeBusinessChat"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"link_name" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
link_name_
]
shortShow InternalLinkTypeCallsPage
{ section :: InternalLinkType -> Maybe Text
section = Maybe Text
section_
}
= String
"InternalLinkTypeCallsPage"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"section" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
section_
]
shortShow InternalLinkTypeChatAffiliateProgram
{ username :: InternalLinkType -> Maybe Text
username = Maybe Text
username_
, referrer :: InternalLinkType -> Maybe Text
referrer = Maybe Text
referrer_
}
= String
"InternalLinkTypeChatAffiliateProgram"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"username" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
username_
, String
"referrer" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
referrer_
]
shortShow InternalLinkTypeChatBoost
{ url :: InternalLinkType -> Maybe Text
url = Maybe Text
url_
}
= String
"InternalLinkTypeChatBoost"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"url" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
url_
]
shortShow InternalLinkTypeChatFolderInvite
{ invite_link :: InternalLinkType -> Maybe Text
invite_link = Maybe Text
invite_link_
}
= String
"InternalLinkTypeChatFolderInvite"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"invite_link" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
invite_link_
]
shortShow InternalLinkTypeChatInvite
{ invite_link :: InternalLinkType -> Maybe Text
invite_link = Maybe Text
invite_link_
}
= String
"InternalLinkTypeChatInvite"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"invite_link" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
invite_link_
]
shortShow InternalLinkType
InternalLinkTypeChatSelection
= String
"InternalLinkTypeChatSelection"
shortShow InternalLinkTypeContactsPage
{ section :: InternalLinkType -> Maybe Text
section = Maybe Text
section_
}
= String
"InternalLinkTypeContactsPage"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"section" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
section_
]
shortShow InternalLinkTypeDirectMessagesChat
{ channel_username :: InternalLinkType -> Maybe Text
channel_username = Maybe Text
channel_username_
}
= String
"InternalLinkTypeDirectMessagesChat"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"channel_username" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
channel_username_
]
shortShow InternalLinkTypeGame
{ bot_username :: InternalLinkType -> Maybe Text
bot_username = Maybe Text
bot_username_
, game_short_name :: InternalLinkType -> Maybe Text
game_short_name = Maybe Text
game_short_name_
}
= String
"InternalLinkTypeGame"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"bot_username" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
bot_username_
, String
"game_short_name" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
game_short_name_
]
shortShow InternalLinkTypeGiftAuction
{ auction_id :: InternalLinkType -> Maybe Text
auction_id = Maybe Text
auction_id_
}
= String
"InternalLinkTypeGiftAuction"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"auction_id" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
auction_id_
]
shortShow InternalLinkTypeGiftCollection
{ gift_owner_username :: InternalLinkType -> Maybe Text
gift_owner_username = Maybe Text
gift_owner_username_
, collection_id :: InternalLinkType -> Maybe Int
collection_id = Maybe Int
collection_id_
}
= String
"InternalLinkTypeGiftCollection"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"gift_owner_username" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
gift_owner_username_
, String
"collection_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
collection_id_
]
shortShow InternalLinkTypeGroupCall
{ invite_link :: InternalLinkType -> Maybe Text
invite_link = Maybe Text
invite_link_
}
= String
"InternalLinkTypeGroupCall"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"invite_link" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
invite_link_
]
shortShow InternalLinkTypeInstantView
{ url :: InternalLinkType -> Maybe Text
url = Maybe Text
url_
, fallback_url :: InternalLinkType -> Maybe Text
fallback_url = Maybe Text
fallback_url_
}
= String
"InternalLinkTypeInstantView"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"url" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
url_
, String
"fallback_url" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
fallback_url_
]
shortShow InternalLinkTypeInvoice
{ invoice_name :: InternalLinkType -> Maybe Text
invoice_name = Maybe Text
invoice_name_
}
= String
"InternalLinkTypeInvoice"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"invoice_name" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
invoice_name_
]
shortShow InternalLinkTypeLanguagePack
{ language_pack_id :: InternalLinkType -> Maybe Text
language_pack_id = Maybe Text
language_pack_id_
}
= String
"InternalLinkTypeLanguagePack"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"language_pack_id" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
language_pack_id_
]
shortShow InternalLinkTypeLiveStory
{ story_poster_username :: InternalLinkType -> Maybe Text
story_poster_username = Maybe Text
story_poster_username_
}
= String
"InternalLinkTypeLiveStory"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"story_poster_username" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
story_poster_username_
]
shortShow InternalLinkTypeMainWebApp
{ bot_username :: InternalLinkType -> Maybe Text
bot_username = Maybe Text
bot_username_
, start_parameter :: InternalLinkType -> Maybe Text
start_parameter = Maybe Text
start_parameter_
, mode :: InternalLinkType -> Maybe WebAppOpenMode
mode = Maybe WebAppOpenMode
mode_
}
= String
"InternalLinkTypeMainWebApp"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"bot_username" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
bot_username_
, String
"start_parameter" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
start_parameter_
, String
"mode" String -> Maybe WebAppOpenMode -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe WebAppOpenMode
mode_
]
shortShow InternalLinkTypeMessage
{ url :: InternalLinkType -> Maybe Text
url = Maybe Text
url_
}
= String
"InternalLinkTypeMessage"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"url" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
url_
]
shortShow InternalLinkTypeMessageDraft
{ text :: InternalLinkType -> Maybe FormattedText
text = Maybe FormattedText
text_
, contains_link :: InternalLinkType -> Maybe Bool
contains_link = Maybe Bool
contains_link_
}
= String
"InternalLinkTypeMessageDraft"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"text" String -> Maybe FormattedText -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe FormattedText
text_
, String
"contains_link" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
contains_link_
]
shortShow InternalLinkTypeMyProfilePage
{ section :: InternalLinkType -> Maybe Text
section = Maybe Text
section_
}
= String
"InternalLinkTypeMyProfilePage"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"section" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
section_
]
shortShow InternalLinkType
InternalLinkTypeNewChannelChat
= String
"InternalLinkTypeNewChannelChat"
shortShow InternalLinkType
InternalLinkTypeNewGroupChat
= String
"InternalLinkTypeNewGroupChat"
shortShow InternalLinkType
InternalLinkTypeNewPrivateChat
= String
"InternalLinkTypeNewPrivateChat"
shortShow InternalLinkTypeNewStory
{ content_type :: InternalLinkType -> Maybe StoryContentType
content_type = Maybe StoryContentType
content_type_
}
= String
"InternalLinkTypeNewStory"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"content_type" String -> Maybe StoryContentType -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe StoryContentType
content_type_
]
shortShow InternalLinkTypeOauth
{ url :: InternalLinkType -> Maybe Text
url = Maybe Text
url_
}
= String
"InternalLinkTypeOauth"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"url" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
url_
]
shortShow InternalLinkTypePassportDataRequest
{ bot_user_id :: InternalLinkType -> Maybe Int
bot_user_id = Maybe Int
bot_user_id_
, scope :: InternalLinkType -> Maybe Text
scope = Maybe Text
scope_
, public_key :: InternalLinkType -> Maybe Text
public_key = Maybe Text
public_key_
, nonce :: InternalLinkType -> Maybe Text
nonce = Maybe Text
nonce_
, callback_url :: InternalLinkType -> Maybe Text
callback_url = Maybe Text
callback_url_
}
= String
"InternalLinkTypePassportDataRequest"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"bot_user_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
bot_user_id_
, String
"scope" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
scope_
, String
"public_key" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
public_key_
, String
"nonce" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
nonce_
, String
"callback_url" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
callback_url_
]
shortShow InternalLinkTypePhoneNumberConfirmation
{ hash :: InternalLinkType -> Maybe Text
hash = Maybe Text
hash_
, phone_number :: InternalLinkType -> Maybe Text
phone_number = Maybe Text
phone_number_
}
= String
"InternalLinkTypePhoneNumberConfirmation"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"hash" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
hash_
, String
"phone_number" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
phone_number_
]
shortShow InternalLinkTypePremiumFeaturesPage
{ referrer :: InternalLinkType -> Maybe Text
referrer = Maybe Text
referrer_
}
= String
"InternalLinkTypePremiumFeaturesPage"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"referrer" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
referrer_
]
shortShow InternalLinkTypePremiumGiftCode
{ code :: InternalLinkType -> Maybe Text
code = Maybe Text
code_
}
= String
"InternalLinkTypePremiumGiftCode"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"code" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
code_
]
shortShow InternalLinkTypePremiumGiftPurchase
{ referrer :: InternalLinkType -> Maybe Text
referrer = Maybe Text
referrer_
}
= String
"InternalLinkTypePremiumGiftPurchase"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"referrer" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
referrer_
]
shortShow InternalLinkTypeProxy
{ proxy :: InternalLinkType -> Maybe Proxy
proxy = Maybe Proxy
proxy_
}
= String
"InternalLinkTypeProxy"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"proxy" String -> Maybe Proxy -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Proxy
proxy_
]
shortShow InternalLinkTypePublicChat
{ chat_username :: InternalLinkType -> Maybe Text
chat_username = Maybe Text
chat_username_
, draft_text :: InternalLinkType -> Maybe Text
draft_text = Maybe Text
draft_text_
, open_profile :: InternalLinkType -> Maybe Bool
open_profile = Maybe Bool
open_profile_
}
= String
"InternalLinkTypePublicChat"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"chat_username" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
chat_username_
, String
"draft_text" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
draft_text_
, String
"open_profile" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
open_profile_
]
shortShow InternalLinkType
InternalLinkTypeQrCodeAuthentication
= String
"InternalLinkTypeQrCodeAuthentication"
shortShow InternalLinkType
InternalLinkTypeRestorePurchases
= String
"InternalLinkTypeRestorePurchases"
shortShow InternalLinkType
InternalLinkTypeSavedMessages
= String
"InternalLinkTypeSavedMessages"
shortShow InternalLinkType
InternalLinkTypeSearch
= String
"InternalLinkTypeSearch"
shortShow InternalLinkTypeSettings
{ _section :: InternalLinkType -> Maybe SettingsSection
_section = Maybe SettingsSection
_section_
}
= String
"InternalLinkTypeSettings"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"_section" String -> Maybe SettingsSection -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe SettingsSection
_section_
]
shortShow InternalLinkTypeStarPurchase
{ star_count :: InternalLinkType -> Maybe Int
star_count = Maybe Int
star_count_
, purpose :: InternalLinkType -> Maybe Text
purpose = Maybe Text
purpose_
}
= String
"InternalLinkTypeStarPurchase"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"star_count" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
star_count_
, String
"purpose" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
purpose_
]
shortShow InternalLinkTypeStickerSet
{ sticker_set_name :: InternalLinkType -> Maybe Text
sticker_set_name = Maybe Text
sticker_set_name_
, expect_custom_emoji :: InternalLinkType -> Maybe Bool
expect_custom_emoji = Maybe Bool
expect_custom_emoji_
}
= String
"InternalLinkTypeStickerSet"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"sticker_set_name" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
sticker_set_name_
, String
"expect_custom_emoji" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
expect_custom_emoji_
]
shortShow InternalLinkTypeStory
{ story_poster_username :: InternalLinkType -> Maybe Text
story_poster_username = Maybe Text
story_poster_username_
, story_id :: InternalLinkType -> Maybe Int
story_id = Maybe Int
story_id_
}
= String
"InternalLinkTypeStory"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"story_poster_username" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
story_poster_username_
, String
"story_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
story_id_
]
shortShow InternalLinkTypeStoryAlbum
{ story_album_owner_username :: InternalLinkType -> Maybe Text
story_album_owner_username = Maybe Text
story_album_owner_username_
, story_album_id :: InternalLinkType -> Maybe Int
story_album_id = Maybe Int
story_album_id_
}
= String
"InternalLinkTypeStoryAlbum"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"story_album_owner_username" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
story_album_owner_username_
, String
"story_album_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
story_album_id_
]
shortShow InternalLinkTypeTheme
{ theme_name :: InternalLinkType -> Maybe Text
theme_name = Maybe Text
theme_name_
}
= String
"InternalLinkTypeTheme"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"theme_name" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
theme_name_
]
shortShow InternalLinkTypeUnknownDeepLink
{ link :: InternalLinkType -> Maybe Text
link = Maybe Text
link_
}
= String
"InternalLinkTypeUnknownDeepLink"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"link" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
link_
]
shortShow InternalLinkTypeUpgradedGift
{ name :: InternalLinkType -> Maybe Text
name = Maybe Text
name_
}
= String
"InternalLinkTypeUpgradedGift"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"name" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
name_
]
shortShow InternalLinkTypeUserPhoneNumber
{ phone_number :: InternalLinkType -> Maybe Text
phone_number = Maybe Text
phone_number_
, draft_text :: InternalLinkType -> Maybe Text
draft_text = Maybe Text
draft_text_
, open_profile :: InternalLinkType -> Maybe Bool
open_profile = Maybe Bool
open_profile_
}
= String
"InternalLinkTypeUserPhoneNumber"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"phone_number" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
phone_number_
, String
"draft_text" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
draft_text_
, String
"open_profile" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
open_profile_
]
shortShow InternalLinkTypeUserToken
{ token :: InternalLinkType -> Maybe Text
token = Maybe Text
token_
}
= String
"InternalLinkTypeUserToken"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"token" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
token_
]
shortShow InternalLinkTypeVideoChat
{ chat_username :: InternalLinkType -> Maybe Text
chat_username = Maybe Text
chat_username_
, invite_hash :: InternalLinkType -> Maybe Text
invite_hash = Maybe Text
invite_hash_
, is_live_stream :: InternalLinkType -> Maybe Bool
is_live_stream = Maybe Bool
is_live_stream_
}
= String
"InternalLinkTypeVideoChat"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"chat_username" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
chat_username_
, String
"invite_hash" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
invite_hash_
, String
"is_live_stream" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
is_live_stream_
]
shortShow InternalLinkTypeWebApp
{ bot_username :: InternalLinkType -> Maybe Text
bot_username = Maybe Text
bot_username_
, web_app_short_name :: InternalLinkType -> Maybe Text
web_app_short_name = Maybe Text
web_app_short_name_
, start_parameter :: InternalLinkType -> Maybe Text
start_parameter = Maybe Text
start_parameter_
, mode :: InternalLinkType -> Maybe WebAppOpenMode
mode = Maybe WebAppOpenMode
mode_
}
= String
"InternalLinkTypeWebApp"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"bot_username" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
bot_username_
, String
"web_app_short_name" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
web_app_short_name_
, String
"start_parameter" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
start_parameter_
, String
"mode" String -> Maybe WebAppOpenMode -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe WebAppOpenMode
mode_
]
instance AT.FromJSON InternalLinkType where
parseJSON :: Value -> Parser InternalLinkType
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
"internalLinkTypeAttachmentMenuBot" -> Value -> Parser InternalLinkType
parseInternalLinkTypeAttachmentMenuBot Value
v
String
"internalLinkTypeAuthenticationCode" -> Value -> Parser InternalLinkType
parseInternalLinkTypeAuthenticationCode Value
v
String
"internalLinkTypeBackground" -> Value -> Parser InternalLinkType
parseInternalLinkTypeBackground Value
v
String
"internalLinkTypeBotAddToChannel" -> Value -> Parser InternalLinkType
parseInternalLinkTypeBotAddToChannel Value
v
String
"internalLinkTypeBotStart" -> Value -> Parser InternalLinkType
parseInternalLinkTypeBotStart Value
v
String
"internalLinkTypeBotStartInGroup" -> Value -> Parser InternalLinkType
parseInternalLinkTypeBotStartInGroup Value
v
String
"internalLinkTypeBusinessChat" -> Value -> Parser InternalLinkType
parseInternalLinkTypeBusinessChat Value
v
String
"internalLinkTypeCallsPage" -> Value -> Parser InternalLinkType
parseInternalLinkTypeCallsPage Value
v
String
"internalLinkTypeChatAffiliateProgram" -> Value -> Parser InternalLinkType
parseInternalLinkTypeChatAffiliateProgram Value
v
String
"internalLinkTypeChatBoost" -> Value -> Parser InternalLinkType
parseInternalLinkTypeChatBoost Value
v
String
"internalLinkTypeChatFolderInvite" -> Value -> Parser InternalLinkType
parseInternalLinkTypeChatFolderInvite Value
v
String
"internalLinkTypeChatInvite" -> Value -> Parser InternalLinkType
parseInternalLinkTypeChatInvite Value
v
String
"internalLinkTypeChatSelection" -> InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure InternalLinkType
InternalLinkTypeChatSelection
String
"internalLinkTypeContactsPage" -> Value -> Parser InternalLinkType
parseInternalLinkTypeContactsPage Value
v
String
"internalLinkTypeDirectMessagesChat" -> Value -> Parser InternalLinkType
parseInternalLinkTypeDirectMessagesChat Value
v
String
"internalLinkTypeGame" -> Value -> Parser InternalLinkType
parseInternalLinkTypeGame Value
v
String
"internalLinkTypeGiftAuction" -> Value -> Parser InternalLinkType
parseInternalLinkTypeGiftAuction Value
v
String
"internalLinkTypeGiftCollection" -> Value -> Parser InternalLinkType
parseInternalLinkTypeGiftCollection Value
v
String
"internalLinkTypeGroupCall" -> Value -> Parser InternalLinkType
parseInternalLinkTypeGroupCall Value
v
String
"internalLinkTypeInstantView" -> Value -> Parser InternalLinkType
parseInternalLinkTypeInstantView Value
v
String
"internalLinkTypeInvoice" -> Value -> Parser InternalLinkType
parseInternalLinkTypeInvoice Value
v
String
"internalLinkTypeLanguagePack" -> Value -> Parser InternalLinkType
parseInternalLinkTypeLanguagePack Value
v
String
"internalLinkTypeLiveStory" -> Value -> Parser InternalLinkType
parseInternalLinkTypeLiveStory Value
v
String
"internalLinkTypeMainWebApp" -> Value -> Parser InternalLinkType
parseInternalLinkTypeMainWebApp Value
v
String
"internalLinkTypeMessage" -> Value -> Parser InternalLinkType
parseInternalLinkTypeMessage Value
v
String
"internalLinkTypeMessageDraft" -> Value -> Parser InternalLinkType
parseInternalLinkTypeMessageDraft Value
v
String
"internalLinkTypeMyProfilePage" -> Value -> Parser InternalLinkType
parseInternalLinkTypeMyProfilePage Value
v
String
"internalLinkTypeNewChannelChat" -> InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure InternalLinkType
InternalLinkTypeNewChannelChat
String
"internalLinkTypeNewGroupChat" -> InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure InternalLinkType
InternalLinkTypeNewGroupChat
String
"internalLinkTypeNewPrivateChat" -> InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure InternalLinkType
InternalLinkTypeNewPrivateChat
String
"internalLinkTypeNewStory" -> Value -> Parser InternalLinkType
parseInternalLinkTypeNewStory Value
v
String
"internalLinkTypeOauth" -> Value -> Parser InternalLinkType
parseInternalLinkTypeOauth Value
v
String
"internalLinkTypePassportDataRequest" -> Value -> Parser InternalLinkType
parseInternalLinkTypePassportDataRequest Value
v
String
"internalLinkTypePhoneNumberConfirmation" -> Value -> Parser InternalLinkType
parseInternalLinkTypePhoneNumberConfirmation Value
v
String
"internalLinkTypePremiumFeaturesPage" -> Value -> Parser InternalLinkType
parseInternalLinkTypePremiumFeaturesPage Value
v
String
"internalLinkTypePremiumGiftCode" -> Value -> Parser InternalLinkType
parseInternalLinkTypePremiumGiftCode Value
v
String
"internalLinkTypePremiumGiftPurchase" -> Value -> Parser InternalLinkType
parseInternalLinkTypePremiumGiftPurchase Value
v
String
"internalLinkTypeProxy" -> Value -> Parser InternalLinkType
parseInternalLinkTypeProxy Value
v
String
"internalLinkTypePublicChat" -> Value -> Parser InternalLinkType
parseInternalLinkTypePublicChat Value
v
String
"internalLinkTypeQrCodeAuthentication" -> InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure InternalLinkType
InternalLinkTypeQrCodeAuthentication
String
"internalLinkTypeRestorePurchases" -> InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure InternalLinkType
InternalLinkTypeRestorePurchases
String
"internalLinkTypeSavedMessages" -> InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure InternalLinkType
InternalLinkTypeSavedMessages
String
"internalLinkTypeSearch" -> InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure InternalLinkType
InternalLinkTypeSearch
String
"internalLinkTypeSettings" -> Value -> Parser InternalLinkType
parseInternalLinkTypeSettings Value
v
String
"internalLinkTypeStarPurchase" -> Value -> Parser InternalLinkType
parseInternalLinkTypeStarPurchase Value
v
String
"internalLinkTypeStickerSet" -> Value -> Parser InternalLinkType
parseInternalLinkTypeStickerSet Value
v
String
"internalLinkTypeStory" -> Value -> Parser InternalLinkType
parseInternalLinkTypeStory Value
v
String
"internalLinkTypeStoryAlbum" -> Value -> Parser InternalLinkType
parseInternalLinkTypeStoryAlbum Value
v
String
"internalLinkTypeTheme" -> Value -> Parser InternalLinkType
parseInternalLinkTypeTheme Value
v
String
"internalLinkTypeUnknownDeepLink" -> Value -> Parser InternalLinkType
parseInternalLinkTypeUnknownDeepLink Value
v
String
"internalLinkTypeUpgradedGift" -> Value -> Parser InternalLinkType
parseInternalLinkTypeUpgradedGift Value
v
String
"internalLinkTypeUserPhoneNumber" -> Value -> Parser InternalLinkType
parseInternalLinkTypeUserPhoneNumber Value
v
String
"internalLinkTypeUserToken" -> Value -> Parser InternalLinkType
parseInternalLinkTypeUserToken Value
v
String
"internalLinkTypeVideoChat" -> Value -> Parser InternalLinkType
parseInternalLinkTypeVideoChat Value
v
String
"internalLinkTypeWebApp" -> Value -> Parser InternalLinkType
parseInternalLinkTypeWebApp Value
v
String
_ -> Parser InternalLinkType
forall a. Monoid a => a
mempty
where
parseInternalLinkTypeAttachmentMenuBot :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeAttachmentMenuBot :: Value -> Parser InternalLinkType
parseInternalLinkTypeAttachmentMenuBot = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeAttachmentMenuBot" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe TargetChat
target_chat_ <- Object
o Object -> Key -> Parser (Maybe TargetChat)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"target_chat"
Maybe Text
bot_username_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"bot_username"
Maybe Text
url_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"url"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeAttachmentMenuBot
{ target_chat :: Maybe TargetChat
target_chat = Maybe TargetChat
target_chat_
, bot_username :: Maybe Text
bot_username = Maybe Text
bot_username_
, url :: Maybe Text
url = Maybe Text
url_
}
parseInternalLinkTypeAuthenticationCode :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeAuthenticationCode :: Value -> Parser InternalLinkType
parseInternalLinkTypeAuthenticationCode = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeAuthenticationCode" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
code_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"code"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeAuthenticationCode
{ code :: Maybe Text
code = Maybe Text
code_
}
parseInternalLinkTypeBackground :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeBackground :: Value -> Parser InternalLinkType
parseInternalLinkTypeBackground = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeBackground" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
background_name_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"background_name"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeBackground
{ background_name :: Maybe Text
background_name = Maybe Text
background_name_
}
parseInternalLinkTypeBotAddToChannel :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeBotAddToChannel :: Value -> Parser InternalLinkType
parseInternalLinkTypeBotAddToChannel = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeBotAddToChannel" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
bot_username_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"bot_username"
Maybe ChatAdministratorRights
administrator_rights_ <- Object
o Object -> Key -> Parser (Maybe ChatAdministratorRights)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"administrator_rights"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeBotAddToChannel
{ bot_username :: Maybe Text
bot_username = Maybe Text
bot_username_
, administrator_rights :: Maybe ChatAdministratorRights
administrator_rights = Maybe ChatAdministratorRights
administrator_rights_
}
parseInternalLinkTypeBotStart :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeBotStart :: Value -> Parser InternalLinkType
parseInternalLinkTypeBotStart = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeBotStart" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
bot_username_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"bot_username"
Maybe Text
start_parameter_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"start_parameter"
Maybe Bool
autostart_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"autostart"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeBotStart
{ bot_username :: Maybe Text
bot_username = Maybe Text
bot_username_
, start_parameter :: Maybe Text
start_parameter = Maybe Text
start_parameter_
, autostart :: Maybe Bool
autostart = Maybe Bool
autostart_
}
parseInternalLinkTypeBotStartInGroup :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeBotStartInGroup :: Value -> Parser InternalLinkType
parseInternalLinkTypeBotStartInGroup = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeBotStartInGroup" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
bot_username_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"bot_username"
Maybe Text
start_parameter_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"start_parameter"
Maybe ChatAdministratorRights
administrator_rights_ <- Object
o Object -> Key -> Parser (Maybe ChatAdministratorRights)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"administrator_rights"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeBotStartInGroup
{ bot_username :: Maybe Text
bot_username = Maybe Text
bot_username_
, start_parameter :: Maybe Text
start_parameter = Maybe Text
start_parameter_
, administrator_rights :: Maybe ChatAdministratorRights
administrator_rights = Maybe ChatAdministratorRights
administrator_rights_
}
parseInternalLinkTypeBusinessChat :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeBusinessChat :: Value -> Parser InternalLinkType
parseInternalLinkTypeBusinessChat = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeBusinessChat" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
link_name_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"link_name"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeBusinessChat
{ link_name :: Maybe Text
link_name = Maybe Text
link_name_
}
parseInternalLinkTypeCallsPage :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeCallsPage :: Value -> Parser InternalLinkType
parseInternalLinkTypeCallsPage = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeCallsPage" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
section_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"section"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeCallsPage
{ section :: Maybe Text
section = Maybe Text
section_
}
parseInternalLinkTypeChatAffiliateProgram :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeChatAffiliateProgram :: Value -> Parser InternalLinkType
parseInternalLinkTypeChatAffiliateProgram = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeChatAffiliateProgram" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
username_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"username"
Maybe Text
referrer_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"referrer"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeChatAffiliateProgram
{ username :: Maybe Text
username = Maybe Text
username_
, referrer :: Maybe Text
referrer = Maybe Text
referrer_
}
parseInternalLinkTypeChatBoost :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeChatBoost :: Value -> Parser InternalLinkType
parseInternalLinkTypeChatBoost = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeChatBoost" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
url_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"url"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeChatBoost
{ url :: Maybe Text
url = Maybe Text
url_
}
parseInternalLinkTypeChatFolderInvite :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeChatFolderInvite :: Value -> Parser InternalLinkType
parseInternalLinkTypeChatFolderInvite = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeChatFolderInvite" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
invite_link_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"invite_link"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeChatFolderInvite
{ invite_link :: Maybe Text
invite_link = Maybe Text
invite_link_
}
parseInternalLinkTypeChatInvite :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeChatInvite :: Value -> Parser InternalLinkType
parseInternalLinkTypeChatInvite = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeChatInvite" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
invite_link_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"invite_link"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeChatInvite
{ invite_link :: Maybe Text
invite_link = Maybe Text
invite_link_
}
parseInternalLinkTypeContactsPage :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeContactsPage :: Value -> Parser InternalLinkType
parseInternalLinkTypeContactsPage = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeContactsPage" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
section_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"section"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeContactsPage
{ section :: Maybe Text
section = Maybe Text
section_
}
parseInternalLinkTypeDirectMessagesChat :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeDirectMessagesChat :: Value -> Parser InternalLinkType
parseInternalLinkTypeDirectMessagesChat = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeDirectMessagesChat" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
channel_username_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"channel_username"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeDirectMessagesChat
{ channel_username :: Maybe Text
channel_username = Maybe Text
channel_username_
}
parseInternalLinkTypeGame :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeGame :: Value -> Parser InternalLinkType
parseInternalLinkTypeGame = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeGame" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
bot_username_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"bot_username"
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"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeGame
{ bot_username :: Maybe Text
bot_username = Maybe Text
bot_username_
, game_short_name :: Maybe Text
game_short_name = Maybe Text
game_short_name_
}
parseInternalLinkTypeGiftAuction :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeGiftAuction :: Value -> Parser InternalLinkType
parseInternalLinkTypeGiftAuction = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeGiftAuction" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
auction_id_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"auction_id"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeGiftAuction
{ auction_id :: Maybe Text
auction_id = Maybe Text
auction_id_
}
parseInternalLinkTypeGiftCollection :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeGiftCollection :: Value -> Parser InternalLinkType
parseInternalLinkTypeGiftCollection = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeGiftCollection" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
gift_owner_username_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"gift_owner_username"
Maybe Int
collection_id_ <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"collection_id"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeGiftCollection
{ gift_owner_username :: Maybe Text
gift_owner_username = Maybe Text
gift_owner_username_
, collection_id :: Maybe Int
collection_id = Maybe Int
collection_id_
}
parseInternalLinkTypeGroupCall :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeGroupCall :: Value -> Parser InternalLinkType
parseInternalLinkTypeGroupCall = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeGroupCall" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
invite_link_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"invite_link"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeGroupCall
{ invite_link :: Maybe Text
invite_link = Maybe Text
invite_link_
}
parseInternalLinkTypeInstantView :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeInstantView :: Value -> Parser InternalLinkType
parseInternalLinkTypeInstantView = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeInstantView" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
url_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"url"
Maybe Text
fallback_url_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"fallback_url"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeInstantView
{ url :: Maybe Text
url = Maybe Text
url_
, fallback_url :: Maybe Text
fallback_url = Maybe Text
fallback_url_
}
parseInternalLinkTypeInvoice :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeInvoice :: Value -> Parser InternalLinkType
parseInternalLinkTypeInvoice = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeInvoice" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
invoice_name_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"invoice_name"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeInvoice
{ invoice_name :: Maybe Text
invoice_name = Maybe Text
invoice_name_
}
parseInternalLinkTypeLanguagePack :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeLanguagePack :: Value -> Parser InternalLinkType
parseInternalLinkTypeLanguagePack = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeLanguagePack" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
language_pack_id_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"language_pack_id"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeLanguagePack
{ language_pack_id :: Maybe Text
language_pack_id = Maybe Text
language_pack_id_
}
parseInternalLinkTypeLiveStory :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeLiveStory :: Value -> Parser InternalLinkType
parseInternalLinkTypeLiveStory = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeLiveStory" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
story_poster_username_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"story_poster_username"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeLiveStory
{ story_poster_username :: Maybe Text
story_poster_username = Maybe Text
story_poster_username_
}
parseInternalLinkTypeMainWebApp :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeMainWebApp :: Value -> Parser InternalLinkType
parseInternalLinkTypeMainWebApp = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeMainWebApp" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
bot_username_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"bot_username"
Maybe Text
start_parameter_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"start_parameter"
Maybe WebAppOpenMode
mode_ <- Object
o Object -> Key -> Parser (Maybe WebAppOpenMode)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"mode"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeMainWebApp
{ bot_username :: Maybe Text
bot_username = Maybe Text
bot_username_
, start_parameter :: Maybe Text
start_parameter = Maybe Text
start_parameter_
, mode :: Maybe WebAppOpenMode
mode = Maybe WebAppOpenMode
mode_
}
parseInternalLinkTypeMessage :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeMessage :: Value -> Parser InternalLinkType
parseInternalLinkTypeMessage = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeMessage" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
url_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"url"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeMessage
{ url :: Maybe Text
url = Maybe Text
url_
}
parseInternalLinkTypeMessageDraft :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeMessageDraft :: Value -> Parser InternalLinkType
parseInternalLinkTypeMessageDraft = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeMessageDraft" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe FormattedText
text_ <- Object
o Object -> Key -> Parser (Maybe FormattedText)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"text"
Maybe Bool
contains_link_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"contains_link"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeMessageDraft
{ text :: Maybe FormattedText
text = Maybe FormattedText
text_
, contains_link :: Maybe Bool
contains_link = Maybe Bool
contains_link_
}
parseInternalLinkTypeMyProfilePage :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeMyProfilePage :: Value -> Parser InternalLinkType
parseInternalLinkTypeMyProfilePage = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeMyProfilePage" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
section_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"section"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeMyProfilePage
{ section :: Maybe Text
section = Maybe Text
section_
}
parseInternalLinkTypeNewStory :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeNewStory :: Value -> Parser InternalLinkType
parseInternalLinkTypeNewStory = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeNewStory" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe StoryContentType
content_type_ <- Object
o Object -> Key -> Parser (Maybe StoryContentType)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"content_type"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeNewStory
{ content_type :: Maybe StoryContentType
content_type = Maybe StoryContentType
content_type_
}
parseInternalLinkTypeOauth :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeOauth :: Value -> Parser InternalLinkType
parseInternalLinkTypeOauth = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeOauth" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
url_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"url"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeOauth
{ url :: Maybe Text
url = Maybe Text
url_
}
parseInternalLinkTypePassportDataRequest :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypePassportDataRequest :: Value -> Parser InternalLinkType
parseInternalLinkTypePassportDataRequest = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypePassportDataRequest" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Int
bot_user_id_ <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"bot_user_id"
Maybe Text
scope_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"scope"
Maybe Text
public_key_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"public_key"
Maybe Text
nonce_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"nonce"
Maybe Text
callback_url_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"callback_url"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypePassportDataRequest
{ bot_user_id :: Maybe Int
bot_user_id = Maybe Int
bot_user_id_
, scope :: Maybe Text
scope = Maybe Text
scope_
, public_key :: Maybe Text
public_key = Maybe Text
public_key_
, nonce :: Maybe Text
nonce = Maybe Text
nonce_
, callback_url :: Maybe Text
callback_url = Maybe Text
callback_url_
}
parseInternalLinkTypePhoneNumberConfirmation :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypePhoneNumberConfirmation :: Value -> Parser InternalLinkType
parseInternalLinkTypePhoneNumberConfirmation = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypePhoneNumberConfirmation" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
hash_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"hash"
Maybe Text
phone_number_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"phone_number"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypePhoneNumberConfirmation
{ hash :: Maybe Text
hash = Maybe Text
hash_
, phone_number :: Maybe Text
phone_number = Maybe Text
phone_number_
}
parseInternalLinkTypePremiumFeaturesPage :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypePremiumFeaturesPage :: Value -> Parser InternalLinkType
parseInternalLinkTypePremiumFeaturesPage = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypePremiumFeaturesPage" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
referrer_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"referrer"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypePremiumFeaturesPage
{ referrer :: Maybe Text
referrer = Maybe Text
referrer_
}
parseInternalLinkTypePremiumGiftCode :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypePremiumGiftCode :: Value -> Parser InternalLinkType
parseInternalLinkTypePremiumGiftCode = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypePremiumGiftCode" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
code_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"code"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypePremiumGiftCode
{ code :: Maybe Text
code = Maybe Text
code_
}
parseInternalLinkTypePremiumGiftPurchase :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypePremiumGiftPurchase :: Value -> Parser InternalLinkType
parseInternalLinkTypePremiumGiftPurchase = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypePremiumGiftPurchase" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
referrer_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"referrer"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypePremiumGiftPurchase
{ referrer :: Maybe Text
referrer = Maybe Text
referrer_
}
parseInternalLinkTypeProxy :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeProxy :: Value -> Parser InternalLinkType
parseInternalLinkTypeProxy = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeProxy" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Proxy
proxy_ <- Object
o Object -> Key -> Parser (Maybe Proxy)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"proxy"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeProxy
{ proxy :: Maybe Proxy
proxy = Maybe Proxy
proxy_
}
parseInternalLinkTypePublicChat :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypePublicChat :: Value -> Parser InternalLinkType
parseInternalLinkTypePublicChat = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypePublicChat" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
chat_username_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"chat_username"
Maybe Text
draft_text_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"draft_text"
Maybe Bool
open_profile_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"open_profile"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypePublicChat
{ chat_username :: Maybe Text
chat_username = Maybe Text
chat_username_
, draft_text :: Maybe Text
draft_text = Maybe Text
draft_text_
, open_profile :: Maybe Bool
open_profile = Maybe Bool
open_profile_
}
parseInternalLinkTypeSettings :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeSettings :: Value -> Parser InternalLinkType
parseInternalLinkTypeSettings = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeSettings" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe SettingsSection
_section_ <- Object
o Object -> Key -> Parser (Maybe SettingsSection)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"section"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeSettings
{ _section :: Maybe SettingsSection
_section = Maybe SettingsSection
_section_
}
parseInternalLinkTypeStarPurchase :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeStarPurchase :: Value -> Parser InternalLinkType
parseInternalLinkTypeStarPurchase = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeStarPurchase" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Int
star_count_ <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"star_count"
Maybe Text
purpose_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"purpose"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeStarPurchase
{ star_count :: Maybe Int
star_count = Maybe Int
star_count_
, purpose :: Maybe Text
purpose = Maybe Text
purpose_
}
parseInternalLinkTypeStickerSet :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeStickerSet :: Value -> Parser InternalLinkType
parseInternalLinkTypeStickerSet = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeStickerSet" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
sticker_set_name_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"sticker_set_name"
Maybe Bool
expect_custom_emoji_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"expect_custom_emoji"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeStickerSet
{ sticker_set_name :: Maybe Text
sticker_set_name = Maybe Text
sticker_set_name_
, expect_custom_emoji :: Maybe Bool
expect_custom_emoji = Maybe Bool
expect_custom_emoji_
}
parseInternalLinkTypeStory :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeStory :: Value -> Parser InternalLinkType
parseInternalLinkTypeStory = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeStory" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
story_poster_username_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"story_poster_username"
Maybe Int
story_id_ <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"story_id"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeStory
{ story_poster_username :: Maybe Text
story_poster_username = Maybe Text
story_poster_username_
, story_id :: Maybe Int
story_id = Maybe Int
story_id_
}
parseInternalLinkTypeStoryAlbum :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeStoryAlbum :: Value -> Parser InternalLinkType
parseInternalLinkTypeStoryAlbum = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeStoryAlbum" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
story_album_owner_username_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"story_album_owner_username"
Maybe Int
story_album_id_ <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"story_album_id"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeStoryAlbum
{ story_album_owner_username :: Maybe Text
story_album_owner_username = Maybe Text
story_album_owner_username_
, story_album_id :: Maybe Int
story_album_id = Maybe Int
story_album_id_
}
parseInternalLinkTypeTheme :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeTheme :: Value -> Parser InternalLinkType
parseInternalLinkTypeTheme = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeTheme" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
theme_name_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"theme_name"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeTheme
{ theme_name :: Maybe Text
theme_name = Maybe Text
theme_name_
}
parseInternalLinkTypeUnknownDeepLink :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeUnknownDeepLink :: Value -> Parser InternalLinkType
parseInternalLinkTypeUnknownDeepLink = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeUnknownDeepLink" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
link_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"link"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeUnknownDeepLink
{ link :: Maybe Text
link = Maybe Text
link_
}
parseInternalLinkTypeUpgradedGift :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeUpgradedGift :: Value -> Parser InternalLinkType
parseInternalLinkTypeUpgradedGift = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeUpgradedGift" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
name_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"name"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeUpgradedGift
{ name :: Maybe Text
name = Maybe Text
name_
}
parseInternalLinkTypeUserPhoneNumber :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeUserPhoneNumber :: Value -> Parser InternalLinkType
parseInternalLinkTypeUserPhoneNumber = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeUserPhoneNumber" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
phone_number_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"phone_number"
Maybe Text
draft_text_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"draft_text"
Maybe Bool
open_profile_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"open_profile"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeUserPhoneNumber
{ phone_number :: Maybe Text
phone_number = Maybe Text
phone_number_
, draft_text :: Maybe Text
draft_text = Maybe Text
draft_text_
, open_profile :: Maybe Bool
open_profile = Maybe Bool
open_profile_
}
parseInternalLinkTypeUserToken :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeUserToken :: Value -> Parser InternalLinkType
parseInternalLinkTypeUserToken = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeUserToken" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
token_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"token"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeUserToken
{ token :: Maybe Text
token = Maybe Text
token_
}
parseInternalLinkTypeVideoChat :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeVideoChat :: Value -> Parser InternalLinkType
parseInternalLinkTypeVideoChat = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeVideoChat" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
chat_username_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"chat_username"
Maybe Text
invite_hash_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"invite_hash"
Maybe Bool
is_live_stream_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"is_live_stream"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeVideoChat
{ chat_username :: Maybe Text
chat_username = Maybe Text
chat_username_
, invite_hash :: Maybe Text
invite_hash = Maybe Text
invite_hash_
, is_live_stream :: Maybe Bool
is_live_stream = Maybe Bool
is_live_stream_
}
parseInternalLinkTypeWebApp :: A.Value -> AT.Parser InternalLinkType
parseInternalLinkTypeWebApp :: Value -> Parser InternalLinkType
parseInternalLinkTypeWebApp = String
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"InternalLinkTypeWebApp" ((Object -> Parser InternalLinkType)
-> Value -> Parser InternalLinkType)
-> (Object -> Parser InternalLinkType)
-> Value
-> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe Text
bot_username_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"bot_username"
Maybe Text
web_app_short_name_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"web_app_short_name"
Maybe Text
start_parameter_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"start_parameter"
Maybe WebAppOpenMode
mode_ <- Object
o Object -> Key -> Parser (Maybe WebAppOpenMode)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"mode"
InternalLinkType -> Parser InternalLinkType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (InternalLinkType -> Parser InternalLinkType)
-> InternalLinkType -> Parser InternalLinkType
forall a b. (a -> b) -> a -> b
$ InternalLinkTypeWebApp
{ bot_username :: Maybe Text
bot_username = Maybe Text
bot_username_
, web_app_short_name :: Maybe Text
web_app_short_name = Maybe Text
web_app_short_name_
, start_parameter :: Maybe Text
start_parameter = Maybe Text
start_parameter_
, mode :: Maybe WebAppOpenMode
mode = Maybe WebAppOpenMode
mode_
}
parseJSON Value
_ = Parser InternalLinkType
forall a. Monoid a => a
mempty
instance AT.ToJSON InternalLinkType where
toJSON :: InternalLinkType -> Value
toJSON InternalLinkTypeAttachmentMenuBot
{ target_chat :: InternalLinkType -> Maybe TargetChat
target_chat = Maybe TargetChat
target_chat_
, bot_username :: InternalLinkType -> Maybe Text
bot_username = Maybe Text
bot_username_
, url :: InternalLinkType -> Maybe Text
url = Maybe Text
url_
}
= [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
"internalLinkTypeAttachmentMenuBot"
, Key
"target_chat" Key -> Maybe TargetChat -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe TargetChat
target_chat_
, Key
"bot_username" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
bot_username_
, 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_
]
toJSON InternalLinkTypeAuthenticationCode
{ code :: InternalLinkType -> Maybe Text
code = Maybe Text
code_
}
= [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
"internalLinkTypeAuthenticationCode"
, Key
"code" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
code_
]
toJSON InternalLinkTypeBackground
{ background_name :: InternalLinkType -> Maybe Text
background_name = Maybe Text
background_name_
}
= [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
"internalLinkTypeBackground"
, Key
"background_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
background_name_
]
toJSON InternalLinkTypeBotAddToChannel
{ bot_username :: InternalLinkType -> Maybe Text
bot_username = Maybe Text
bot_username_
, administrator_rights :: InternalLinkType -> Maybe ChatAdministratorRights
administrator_rights = Maybe ChatAdministratorRights
administrator_rights_
}
= [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
"internalLinkTypeBotAddToChannel"
, Key
"bot_username" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
bot_username_
, Key
"administrator_rights" Key -> Maybe ChatAdministratorRights -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe ChatAdministratorRights
administrator_rights_
]
toJSON InternalLinkTypeBotStart
{ bot_username :: InternalLinkType -> Maybe Text
bot_username = Maybe Text
bot_username_
, start_parameter :: InternalLinkType -> Maybe Text
start_parameter = Maybe Text
start_parameter_
, autostart :: InternalLinkType -> Maybe Bool
autostart = Maybe Bool
autostart_
}
= [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
"internalLinkTypeBotStart"
, Key
"bot_username" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
bot_username_
, Key
"start_parameter" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
start_parameter_
, Key
"autostart" Key -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Bool
autostart_
]
toJSON InternalLinkTypeBotStartInGroup
{ bot_username :: InternalLinkType -> Maybe Text
bot_username = Maybe Text
bot_username_
, start_parameter :: InternalLinkType -> Maybe Text
start_parameter = Maybe Text
start_parameter_
, administrator_rights :: InternalLinkType -> Maybe ChatAdministratorRights
administrator_rights = Maybe ChatAdministratorRights
administrator_rights_
}
= [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
"internalLinkTypeBotStartInGroup"
, Key
"bot_username" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
bot_username_
, Key
"start_parameter" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
start_parameter_
, Key
"administrator_rights" Key -> Maybe ChatAdministratorRights -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe ChatAdministratorRights
administrator_rights_
]
toJSON InternalLinkTypeBusinessChat
{ link_name :: InternalLinkType -> Maybe Text
link_name = Maybe Text
link_name_
}
= [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
"internalLinkTypeBusinessChat"
, Key
"link_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
link_name_
]
toJSON InternalLinkTypeCallsPage
{ section :: InternalLinkType -> Maybe Text
section = Maybe Text
section_
}
= [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
"internalLinkTypeCallsPage"
, Key
"section" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
section_
]
toJSON InternalLinkTypeChatAffiliateProgram
{ username :: InternalLinkType -> Maybe Text
username = Maybe Text
username_
, referrer :: InternalLinkType -> Maybe Text
referrer = Maybe Text
referrer_
}
= [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
"internalLinkTypeChatAffiliateProgram"
, Key
"username" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
username_
, Key
"referrer" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
referrer_
]
toJSON InternalLinkTypeChatBoost
{ url :: InternalLinkType -> Maybe Text
url = Maybe Text
url_
}
= [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
"internalLinkTypeChatBoost"
, 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_
]
toJSON InternalLinkTypeChatFolderInvite
{ invite_link :: InternalLinkType -> Maybe Text
invite_link = Maybe Text
invite_link_
}
= [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
"internalLinkTypeChatFolderInvite"
, Key
"invite_link" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
invite_link_
]
toJSON InternalLinkTypeChatInvite
{ invite_link :: InternalLinkType -> Maybe Text
invite_link = Maybe Text
invite_link_
}
= [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
"internalLinkTypeChatInvite"
, Key
"invite_link" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
invite_link_
]
toJSON InternalLinkType
InternalLinkTypeChatSelection
= [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
"internalLinkTypeChatSelection"
]
toJSON InternalLinkTypeContactsPage
{ section :: InternalLinkType -> Maybe Text
section = Maybe Text
section_
}
= [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
"internalLinkTypeContactsPage"
, Key
"section" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
section_
]
toJSON InternalLinkTypeDirectMessagesChat
{ channel_username :: InternalLinkType -> Maybe Text
channel_username = Maybe Text
channel_username_
}
= [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
"internalLinkTypeDirectMessagesChat"
, Key
"channel_username" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
channel_username_
]
toJSON InternalLinkTypeGame
{ bot_username :: InternalLinkType -> Maybe Text
bot_username = Maybe Text
bot_username_
, game_short_name :: InternalLinkType -> Maybe Text
game_short_name = Maybe Text
game_short_name_
}
= [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
"internalLinkTypeGame"
, Key
"bot_username" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
bot_username_
, 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_
]
toJSON InternalLinkTypeGiftAuction
{ auction_id :: InternalLinkType -> Maybe Text
auction_id = Maybe Text
auction_id_
}
= [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
"internalLinkTypeGiftAuction"
, Key
"auction_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
auction_id_
]
toJSON InternalLinkTypeGiftCollection
{ gift_owner_username :: InternalLinkType -> Maybe Text
gift_owner_username = Maybe Text
gift_owner_username_
, collection_id :: InternalLinkType -> Maybe Int
collection_id = Maybe Int
collection_id_
}
= [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
"internalLinkTypeGiftCollection"
, Key
"gift_owner_username" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
gift_owner_username_
, Key
"collection_id" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
collection_id_
]
toJSON InternalLinkTypeGroupCall
{ invite_link :: InternalLinkType -> Maybe Text
invite_link = Maybe Text
invite_link_
}
= [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
"internalLinkTypeGroupCall"
, Key
"invite_link" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
invite_link_
]
toJSON InternalLinkTypeInstantView
{ url :: InternalLinkType -> Maybe Text
url = Maybe Text
url_
, fallback_url :: InternalLinkType -> Maybe Text
fallback_url = Maybe Text
fallback_url_
}
= [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
"internalLinkTypeInstantView"
, 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
"fallback_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
fallback_url_
]
toJSON InternalLinkTypeInvoice
{ invoice_name :: InternalLinkType -> Maybe Text
invoice_name = Maybe Text
invoice_name_
}
= [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
"internalLinkTypeInvoice"
, Key
"invoice_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
invoice_name_
]
toJSON InternalLinkTypeLanguagePack
{ language_pack_id :: InternalLinkType -> Maybe Text
language_pack_id = Maybe Text
language_pack_id_
}
= [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
"internalLinkTypeLanguagePack"
, Key
"language_pack_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
language_pack_id_
]
toJSON InternalLinkTypeLiveStory
{ story_poster_username :: InternalLinkType -> Maybe Text
story_poster_username = Maybe Text
story_poster_username_
}
= [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
"internalLinkTypeLiveStory"
, Key
"story_poster_username" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
story_poster_username_
]
toJSON InternalLinkTypeMainWebApp
{ bot_username :: InternalLinkType -> Maybe Text
bot_username = Maybe Text
bot_username_
, start_parameter :: InternalLinkType -> Maybe Text
start_parameter = Maybe Text
start_parameter_
, mode :: InternalLinkType -> Maybe WebAppOpenMode
mode = Maybe WebAppOpenMode
mode_
}
= [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
"internalLinkTypeMainWebApp"
, Key
"bot_username" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
bot_username_
, Key
"start_parameter" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
start_parameter_
, Key
"mode" Key -> Maybe WebAppOpenMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe WebAppOpenMode
mode_
]
toJSON InternalLinkTypeMessage
{ url :: InternalLinkType -> Maybe Text
url = Maybe Text
url_
}
= [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
"internalLinkTypeMessage"
, 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_
]
toJSON InternalLinkTypeMessageDraft
{ text :: InternalLinkType -> Maybe FormattedText
text = Maybe FormattedText
text_
, contains_link :: InternalLinkType -> Maybe Bool
contains_link = Maybe Bool
contains_link_
}
= [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
"internalLinkTypeMessageDraft"
, Key
"text" Key -> Maybe FormattedText -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe FormattedText
text_
, Key
"contains_link" Key -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Bool
contains_link_
]
toJSON InternalLinkTypeMyProfilePage
{ section :: InternalLinkType -> Maybe Text
section = Maybe Text
section_
}
= [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
"internalLinkTypeMyProfilePage"
, Key
"section" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
section_
]
toJSON InternalLinkType
InternalLinkTypeNewChannelChat
= [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
"internalLinkTypeNewChannelChat"
]
toJSON InternalLinkType
InternalLinkTypeNewGroupChat
= [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
"internalLinkTypeNewGroupChat"
]
toJSON InternalLinkType
InternalLinkTypeNewPrivateChat
= [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
"internalLinkTypeNewPrivateChat"
]
toJSON InternalLinkTypeNewStory
{ content_type :: InternalLinkType -> Maybe StoryContentType
content_type = Maybe StoryContentType
content_type_
}
= [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
"internalLinkTypeNewStory"
, Key
"content_type" Key -> Maybe StoryContentType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe StoryContentType
content_type_
]
toJSON InternalLinkTypeOauth
{ url :: InternalLinkType -> Maybe Text
url = Maybe Text
url_
}
= [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
"internalLinkTypeOauth"
, 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_
]
toJSON InternalLinkTypePassportDataRequest
{ bot_user_id :: InternalLinkType -> Maybe Int
bot_user_id = Maybe Int
bot_user_id_
, scope :: InternalLinkType -> Maybe Text
scope = Maybe Text
scope_
, public_key :: InternalLinkType -> Maybe Text
public_key = Maybe Text
public_key_
, nonce :: InternalLinkType -> Maybe Text
nonce = Maybe Text
nonce_
, callback_url :: InternalLinkType -> Maybe Text
callback_url = Maybe Text
callback_url_
}
= [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
"internalLinkTypePassportDataRequest"
, Key
"bot_user_id" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
bot_user_id_
, Key
"scope" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
scope_
, Key
"public_key" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
public_key_
, Key
"nonce" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
nonce_
, Key
"callback_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
callback_url_
]
toJSON InternalLinkTypePhoneNumberConfirmation
{ hash :: InternalLinkType -> Maybe Text
hash = Maybe Text
hash_
, phone_number :: InternalLinkType -> Maybe Text
phone_number = Maybe Text
phone_number_
}
= [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
"internalLinkTypePhoneNumberConfirmation"
, Key
"hash" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
hash_
, Key
"phone_number" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
phone_number_
]
toJSON InternalLinkTypePremiumFeaturesPage
{ referrer :: InternalLinkType -> Maybe Text
referrer = Maybe Text
referrer_
}
= [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
"internalLinkTypePremiumFeaturesPage"
, Key
"referrer" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
referrer_
]
toJSON InternalLinkTypePremiumGiftCode
{ code :: InternalLinkType -> Maybe Text
code = Maybe Text
code_
}
= [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
"internalLinkTypePremiumGiftCode"
, Key
"code" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
code_
]
toJSON InternalLinkTypePremiumGiftPurchase
{ referrer :: InternalLinkType -> Maybe Text
referrer = Maybe Text
referrer_
}
= [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
"internalLinkTypePremiumGiftPurchase"
, Key
"referrer" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
referrer_
]
toJSON InternalLinkTypeProxy
{ proxy :: InternalLinkType -> Maybe Proxy
proxy = Maybe Proxy
proxy_
}
= [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
"internalLinkTypeProxy"
, Key
"proxy" Key -> Maybe Proxy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Proxy
proxy_
]
toJSON InternalLinkTypePublicChat
{ chat_username :: InternalLinkType -> Maybe Text
chat_username = Maybe Text
chat_username_
, draft_text :: InternalLinkType -> Maybe Text
draft_text = Maybe Text
draft_text_
, open_profile :: InternalLinkType -> Maybe Bool
open_profile = Maybe Bool
open_profile_
}
= [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
"internalLinkTypePublicChat"
, Key
"chat_username" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
chat_username_
, Key
"draft_text" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
draft_text_
, Key
"open_profile" Key -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Bool
open_profile_
]
toJSON InternalLinkType
InternalLinkTypeQrCodeAuthentication
= [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
"internalLinkTypeQrCodeAuthentication"
]
toJSON InternalLinkType
InternalLinkTypeRestorePurchases
= [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
"internalLinkTypeRestorePurchases"
]
toJSON InternalLinkType
InternalLinkTypeSavedMessages
= [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
"internalLinkTypeSavedMessages"
]
toJSON InternalLinkType
InternalLinkTypeSearch
= [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
"internalLinkTypeSearch"
]
toJSON InternalLinkTypeSettings
{ _section :: InternalLinkType -> Maybe SettingsSection
_section = Maybe SettingsSection
_section_
}
= [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
"internalLinkTypeSettings"
, Key
"section" Key -> Maybe SettingsSection -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe SettingsSection
_section_
]
toJSON InternalLinkTypeStarPurchase
{ star_count :: InternalLinkType -> Maybe Int
star_count = Maybe Int
star_count_
, purpose :: InternalLinkType -> Maybe Text
purpose = Maybe Text
purpose_
}
= [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
"internalLinkTypeStarPurchase"
, Key
"star_count" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
star_count_
, Key
"purpose" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
purpose_
]
toJSON InternalLinkTypeStickerSet
{ sticker_set_name :: InternalLinkType -> Maybe Text
sticker_set_name = Maybe Text
sticker_set_name_
, expect_custom_emoji :: InternalLinkType -> Maybe Bool
expect_custom_emoji = Maybe Bool
expect_custom_emoji_
}
= [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
"internalLinkTypeStickerSet"
, Key
"sticker_set_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
sticker_set_name_
, Key
"expect_custom_emoji" Key -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Bool
expect_custom_emoji_
]
toJSON InternalLinkTypeStory
{ story_poster_username :: InternalLinkType -> Maybe Text
story_poster_username = Maybe Text
story_poster_username_
, story_id :: InternalLinkType -> Maybe Int
story_id = Maybe Int
story_id_
}
= [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
"internalLinkTypeStory"
, Key
"story_poster_username" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
story_poster_username_
, Key
"story_id" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
story_id_
]
toJSON InternalLinkTypeStoryAlbum
{ story_album_owner_username :: InternalLinkType -> Maybe Text
story_album_owner_username = Maybe Text
story_album_owner_username_
, story_album_id :: InternalLinkType -> Maybe Int
story_album_id = Maybe Int
story_album_id_
}
= [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
"internalLinkTypeStoryAlbum"
, Key
"story_album_owner_username" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
story_album_owner_username_
, Key
"story_album_id" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
story_album_id_
]
toJSON InternalLinkTypeTheme
{ theme_name :: InternalLinkType -> Maybe Text
theme_name = Maybe Text
theme_name_
}
= [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
"internalLinkTypeTheme"
, Key
"theme_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
theme_name_
]
toJSON InternalLinkTypeUnknownDeepLink
{ link :: InternalLinkType -> Maybe Text
link = Maybe Text
link_
}
= [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
"internalLinkTypeUnknownDeepLink"
, Key
"link" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
link_
]
toJSON InternalLinkTypeUpgradedGift
{ name :: InternalLinkType -> Maybe Text
name = Maybe Text
name_
}
= [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
"internalLinkTypeUpgradedGift"
, Key
"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
name_
]
toJSON InternalLinkTypeUserPhoneNumber
{ phone_number :: InternalLinkType -> Maybe Text
phone_number = Maybe Text
phone_number_
, draft_text :: InternalLinkType -> Maybe Text
draft_text = Maybe Text
draft_text_
, open_profile :: InternalLinkType -> Maybe Bool
open_profile = Maybe Bool
open_profile_
}
= [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
"internalLinkTypeUserPhoneNumber"
, Key
"phone_number" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
phone_number_
, Key
"draft_text" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
draft_text_
, Key
"open_profile" Key -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Bool
open_profile_
]
toJSON InternalLinkTypeUserToken
{ token :: InternalLinkType -> Maybe Text
token = Maybe Text
token_
}
= [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
"internalLinkTypeUserToken"
, Key
"token" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
token_
]
toJSON InternalLinkTypeVideoChat
{ chat_username :: InternalLinkType -> Maybe Text
chat_username = Maybe Text
chat_username_
, invite_hash :: InternalLinkType -> Maybe Text
invite_hash = Maybe Text
invite_hash_
, is_live_stream :: InternalLinkType -> Maybe Bool
is_live_stream = Maybe Bool
is_live_stream_
}
= [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
"internalLinkTypeVideoChat"
, Key
"chat_username" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
chat_username_
, Key
"invite_hash" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
invite_hash_
, Key
"is_live_stream" Key -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Bool
is_live_stream_
]
toJSON InternalLinkTypeWebApp
{ bot_username :: InternalLinkType -> Maybe Text
bot_username = Maybe Text
bot_username_
, web_app_short_name :: InternalLinkType -> Maybe Text
web_app_short_name = Maybe Text
web_app_short_name_
, start_parameter :: InternalLinkType -> Maybe Text
start_parameter = Maybe Text
start_parameter_
, mode :: InternalLinkType -> Maybe WebAppOpenMode
mode = Maybe WebAppOpenMode
mode_
}
= [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
"internalLinkTypeWebApp"
, Key
"bot_username" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
bot_username_
, Key
"web_app_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
web_app_short_name_
, Key
"start_parameter" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
start_parameter_
, Key
"mode" Key -> Maybe WebAppOpenMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe WebAppOpenMode
mode_
]