module TD.Data.SupergroupFullInfo
(SupergroupFullInfo(..)) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import qualified TD.Data.ChatPhoto as ChatPhoto
import qualified Data.Text as T
import qualified TD.Data.ChatLocation as ChatLocation
import qualified TD.Data.ChatInviteLink as ChatInviteLink
import qualified TD.Data.BotCommands as BotCommands
import qualified TD.Data.BotVerification as BotVerification
data SupergroupFullInfo
= SupergroupFullInfo
{ SupergroupFullInfo -> Maybe ChatPhoto
photo :: Maybe ChatPhoto.ChatPhoto
, SupergroupFullInfo -> Maybe Text
description :: Maybe T.Text
, SupergroupFullInfo -> Maybe Int
member_count :: Maybe Int
, SupergroupFullInfo -> Maybe Int
administrator_count :: Maybe Int
, SupergroupFullInfo -> Maybe Int
restricted_count :: Maybe Int
, SupergroupFullInfo -> Maybe Int
banned_count :: Maybe Int
, SupergroupFullInfo -> Maybe Int
linked_chat_id :: Maybe Int
, SupergroupFullInfo -> Maybe Int
slow_mode_delay :: Maybe Int
, SupergroupFullInfo -> Maybe Double
slow_mode_delay_expires_in :: Maybe Double
, SupergroupFullInfo -> Maybe Bool
can_enable_paid_reaction :: Maybe Bool
, SupergroupFullInfo -> Maybe Bool
can_get_members :: Maybe Bool
, SupergroupFullInfo -> Maybe Bool
has_hidden_members :: Maybe Bool
, SupergroupFullInfo -> Maybe Bool
can_hide_members :: Maybe Bool
, SupergroupFullInfo -> Maybe Bool
can_set_sticker_set :: Maybe Bool
, SupergroupFullInfo -> Maybe Bool
can_set_location :: Maybe Bool
, SupergroupFullInfo -> Maybe Bool
can_get_statistics :: Maybe Bool
, SupergroupFullInfo -> Maybe Bool
can_get_revenue_statistics :: Maybe Bool
, SupergroupFullInfo -> Maybe Bool
can_get_star_revenue_statistics :: Maybe Bool
, SupergroupFullInfo -> Maybe Bool
can_toggle_aggressive_anti_spam :: Maybe Bool
, SupergroupFullInfo -> Maybe Bool
is_all_history_available :: Maybe Bool
, :: Maybe Bool
, SupergroupFullInfo -> Maybe Bool
has_aggressive_anti_spam_enabled :: Maybe Bool
, SupergroupFullInfo -> Maybe Bool
has_paid_media_allowed :: Maybe Bool
, SupergroupFullInfo -> Maybe Bool
has_pinned_stories :: Maybe Bool
, SupergroupFullInfo -> Maybe Int
my_boost_count :: Maybe Int
, SupergroupFullInfo -> Maybe Int
unrestrict_boost_count :: Maybe Int
, SupergroupFullInfo -> Maybe Int
sticker_set_id :: Maybe Int
, SupergroupFullInfo -> Maybe Int
custom_emoji_sticker_set_id :: Maybe Int
, SupergroupFullInfo -> Maybe ChatLocation
location :: Maybe ChatLocation.ChatLocation
, SupergroupFullInfo -> Maybe ChatInviteLink
invite_link :: Maybe ChatInviteLink.ChatInviteLink
, SupergroupFullInfo -> Maybe [BotCommands]
bot_commands :: Maybe [BotCommands.BotCommands]
, SupergroupFullInfo -> Maybe BotVerification
bot_verification :: Maybe BotVerification.BotVerification
, SupergroupFullInfo -> Maybe Int
upgraded_from_basic_group_id :: Maybe Int
, SupergroupFullInfo -> Maybe Int
upgraded_from_max_message_id :: Maybe Int
}
deriving (SupergroupFullInfo -> SupergroupFullInfo -> Bool
(SupergroupFullInfo -> SupergroupFullInfo -> Bool)
-> (SupergroupFullInfo -> SupergroupFullInfo -> Bool)
-> Eq SupergroupFullInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SupergroupFullInfo -> SupergroupFullInfo -> Bool
== :: SupergroupFullInfo -> SupergroupFullInfo -> Bool
$c/= :: SupergroupFullInfo -> SupergroupFullInfo -> Bool
/= :: SupergroupFullInfo -> SupergroupFullInfo -> Bool
Eq, Int -> SupergroupFullInfo -> ShowS
[SupergroupFullInfo] -> ShowS
SupergroupFullInfo -> String
(Int -> SupergroupFullInfo -> ShowS)
-> (SupergroupFullInfo -> String)
-> ([SupergroupFullInfo] -> ShowS)
-> Show SupergroupFullInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SupergroupFullInfo -> ShowS
showsPrec :: Int -> SupergroupFullInfo -> ShowS
$cshow :: SupergroupFullInfo -> String
show :: SupergroupFullInfo -> String
$cshowList :: [SupergroupFullInfo] -> ShowS
showList :: [SupergroupFullInfo] -> ShowS
Show)
instance I.ShortShow SupergroupFullInfo where
shortShow :: SupergroupFullInfo -> String
shortShow SupergroupFullInfo
{ photo :: SupergroupFullInfo -> Maybe ChatPhoto
photo = Maybe ChatPhoto
photo_
, description :: SupergroupFullInfo -> Maybe Text
description = Maybe Text
description_
, member_count :: SupergroupFullInfo -> Maybe Int
member_count = Maybe Int
member_count_
, administrator_count :: SupergroupFullInfo -> Maybe Int
administrator_count = Maybe Int
administrator_count_
, restricted_count :: SupergroupFullInfo -> Maybe Int
restricted_count = Maybe Int
restricted_count_
, banned_count :: SupergroupFullInfo -> Maybe Int
banned_count = Maybe Int
banned_count_
, linked_chat_id :: SupergroupFullInfo -> Maybe Int
linked_chat_id = Maybe Int
linked_chat_id_
, slow_mode_delay :: SupergroupFullInfo -> Maybe Int
slow_mode_delay = Maybe Int
slow_mode_delay_
, slow_mode_delay_expires_in :: SupergroupFullInfo -> Maybe Double
slow_mode_delay_expires_in = Maybe Double
slow_mode_delay_expires_in_
, can_enable_paid_reaction :: SupergroupFullInfo -> Maybe Bool
can_enable_paid_reaction = Maybe Bool
can_enable_paid_reaction_
, can_get_members :: SupergroupFullInfo -> Maybe Bool
can_get_members = Maybe Bool
can_get_members_
, has_hidden_members :: SupergroupFullInfo -> Maybe Bool
has_hidden_members = Maybe Bool
has_hidden_members_
, can_hide_members :: SupergroupFullInfo -> Maybe Bool
can_hide_members = Maybe Bool
can_hide_members_
, can_set_sticker_set :: SupergroupFullInfo -> Maybe Bool
can_set_sticker_set = Maybe Bool
can_set_sticker_set_
, can_set_location :: SupergroupFullInfo -> Maybe Bool
can_set_location = Maybe Bool
can_set_location_
, can_get_statistics :: SupergroupFullInfo -> Maybe Bool
can_get_statistics = Maybe Bool
can_get_statistics_
, can_get_revenue_statistics :: SupergroupFullInfo -> Maybe Bool
can_get_revenue_statistics = Maybe Bool
can_get_revenue_statistics_
, can_get_star_revenue_statistics :: SupergroupFullInfo -> Maybe Bool
can_get_star_revenue_statistics = Maybe Bool
can_get_star_revenue_statistics_
, can_toggle_aggressive_anti_spam :: SupergroupFullInfo -> Maybe Bool
can_toggle_aggressive_anti_spam = Maybe Bool
can_toggle_aggressive_anti_spam_
, is_all_history_available :: SupergroupFullInfo -> Maybe Bool
is_all_history_available = Maybe Bool
is_all_history_available_
, can_have_sponsored_messages :: SupergroupFullInfo -> Maybe Bool
can_have_sponsored_messages = Maybe Bool
can_have_sponsored_messages_
, has_aggressive_anti_spam_enabled :: SupergroupFullInfo -> Maybe Bool
has_aggressive_anti_spam_enabled = Maybe Bool
has_aggressive_anti_spam_enabled_
, has_paid_media_allowed :: SupergroupFullInfo -> Maybe Bool
has_paid_media_allowed = Maybe Bool
has_paid_media_allowed_
, has_pinned_stories :: SupergroupFullInfo -> Maybe Bool
has_pinned_stories = Maybe Bool
has_pinned_stories_
, my_boost_count :: SupergroupFullInfo -> Maybe Int
my_boost_count = Maybe Int
my_boost_count_
, unrestrict_boost_count :: SupergroupFullInfo -> Maybe Int
unrestrict_boost_count = Maybe Int
unrestrict_boost_count_
, sticker_set_id :: SupergroupFullInfo -> Maybe Int
sticker_set_id = Maybe Int
sticker_set_id_
, custom_emoji_sticker_set_id :: SupergroupFullInfo -> Maybe Int
custom_emoji_sticker_set_id = Maybe Int
custom_emoji_sticker_set_id_
, location :: SupergroupFullInfo -> Maybe ChatLocation
location = Maybe ChatLocation
location_
, invite_link :: SupergroupFullInfo -> Maybe ChatInviteLink
invite_link = Maybe ChatInviteLink
invite_link_
, bot_commands :: SupergroupFullInfo -> Maybe [BotCommands]
bot_commands = Maybe [BotCommands]
bot_commands_
, bot_verification :: SupergroupFullInfo -> Maybe BotVerification
bot_verification = Maybe BotVerification
bot_verification_
, upgraded_from_basic_group_id :: SupergroupFullInfo -> Maybe Int
upgraded_from_basic_group_id = Maybe Int
upgraded_from_basic_group_id_
, upgraded_from_max_message_id :: SupergroupFullInfo -> Maybe Int
upgraded_from_max_message_id = Maybe Int
upgraded_from_max_message_id_
}
= String
"SupergroupFullInfo"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"photo" String -> Maybe ChatPhoto -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ChatPhoto
photo_
, String
"description" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
description_
, String
"member_count" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
member_count_
, String
"administrator_count" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
administrator_count_
, String
"restricted_count" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
restricted_count_
, String
"banned_count" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
banned_count_
, String
"linked_chat_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
linked_chat_id_
, String
"slow_mode_delay" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
slow_mode_delay_
, String
"slow_mode_delay_expires_in" String -> Maybe Double -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Double
slow_mode_delay_expires_in_
, String
"can_enable_paid_reaction" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
can_enable_paid_reaction_
, String
"can_get_members" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
can_get_members_
, String
"has_hidden_members" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
has_hidden_members_
, String
"can_hide_members" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
can_hide_members_
, String
"can_set_sticker_set" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
can_set_sticker_set_
, String
"can_set_location" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
can_set_location_
, String
"can_get_statistics" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
can_get_statistics_
, String
"can_get_revenue_statistics" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
can_get_revenue_statistics_
, String
"can_get_star_revenue_statistics" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
can_get_star_revenue_statistics_
, String
"can_toggle_aggressive_anti_spam" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
can_toggle_aggressive_anti_spam_
, String
"is_all_history_available" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
is_all_history_available_
, String
"can_have_sponsored_messages" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
can_have_sponsored_messages_
, String
"has_aggressive_anti_spam_enabled" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
has_aggressive_anti_spam_enabled_
, String
"has_paid_media_allowed" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
has_paid_media_allowed_
, String
"has_pinned_stories" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
has_pinned_stories_
, String
"my_boost_count" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
my_boost_count_
, String
"unrestrict_boost_count" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
unrestrict_boost_count_
, String
"sticker_set_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
sticker_set_id_
, String
"custom_emoji_sticker_set_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
custom_emoji_sticker_set_id_
, String
"location" String -> Maybe ChatLocation -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ChatLocation
location_
, String
"invite_link" String -> Maybe ChatInviteLink -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ChatInviteLink
invite_link_
, String
"bot_commands" String -> Maybe [BotCommands] -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe [BotCommands]
bot_commands_
, String
"bot_verification" String -> Maybe BotVerification -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe BotVerification
bot_verification_
, String
"upgraded_from_basic_group_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
upgraded_from_basic_group_id_
, String
"upgraded_from_max_message_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
upgraded_from_max_message_id_
]
instance AT.FromJSON SupergroupFullInfo where
parseJSON :: Value -> Parser SupergroupFullInfo
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
"supergroupFullInfo" -> Value -> Parser SupergroupFullInfo
parseSupergroupFullInfo Value
v
String
_ -> Parser SupergroupFullInfo
forall a. Monoid a => a
mempty
where
parseSupergroupFullInfo :: A.Value -> AT.Parser SupergroupFullInfo
parseSupergroupFullInfo :: Value -> Parser SupergroupFullInfo
parseSupergroupFullInfo = String
-> (Object -> Parser SupergroupFullInfo)
-> Value
-> Parser SupergroupFullInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
A.withObject String
"SupergroupFullInfo" ((Object -> Parser SupergroupFullInfo)
-> Value -> Parser SupergroupFullInfo)
-> (Object -> Parser SupergroupFullInfo)
-> Value
-> Parser SupergroupFullInfo
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
Maybe ChatPhoto
photo_ <- Object
o Object -> Key -> Parser (Maybe ChatPhoto)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"photo"
Maybe Text
description_ <- Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"description"
Maybe Int
member_count_ <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"member_count"
Maybe Int
administrator_count_ <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"administrator_count"
Maybe Int
restricted_count_ <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"restricted_count"
Maybe Int
banned_count_ <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"banned_count"
Maybe Int
linked_chat_id_ <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"linked_chat_id"
Maybe Int
slow_mode_delay_ <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"slow_mode_delay"
Maybe Double
slow_mode_delay_expires_in_ <- Object
o Object -> Key -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"slow_mode_delay_expires_in"
Maybe Bool
can_enable_paid_reaction_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"can_enable_paid_reaction"
Maybe Bool
can_get_members_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"can_get_members"
Maybe Bool
has_hidden_members_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"has_hidden_members"
Maybe Bool
can_hide_members_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"can_hide_members"
Maybe Bool
can_set_sticker_set_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"can_set_sticker_set"
Maybe Bool
can_set_location_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"can_set_location"
Maybe Bool
can_get_statistics_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"can_get_statistics"
Maybe Bool
can_get_revenue_statistics_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"can_get_revenue_statistics"
Maybe Bool
can_get_star_revenue_statistics_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"can_get_star_revenue_statistics"
Maybe Bool
can_toggle_aggressive_anti_spam_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"can_toggle_aggressive_anti_spam"
Maybe Bool
is_all_history_available_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"is_all_history_available"
Maybe Bool
can_have_sponsored_messages_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"can_have_sponsored_messages"
Maybe Bool
has_aggressive_anti_spam_enabled_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"has_aggressive_anti_spam_enabled"
Maybe Bool
has_paid_media_allowed_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"has_paid_media_allowed"
Maybe Bool
has_pinned_stories_ <- Object
o Object -> Key -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"has_pinned_stories"
Maybe Int
my_boost_count_ <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"my_boost_count"
Maybe Int
unrestrict_boost_count_ <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"unrestrict_boost_count"
Maybe Int
sticker_set_id_ <- (String -> Int) -> Maybe String -> Maybe Int
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap String -> Int
I.readInt64 (Maybe String -> Maybe Int)
-> Parser (Maybe String) -> Parser (Maybe Int)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o Object -> Key -> Parser (Maybe String)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"sticker_set_id"
Maybe Int
custom_emoji_sticker_set_id_ <- (String -> Int) -> Maybe String -> Maybe Int
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap String -> Int
I.readInt64 (Maybe String -> Maybe Int)
-> Parser (Maybe String) -> Parser (Maybe Int)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o Object -> Key -> Parser (Maybe String)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"custom_emoji_sticker_set_id"
Maybe ChatLocation
location_ <- Object
o Object -> Key -> Parser (Maybe ChatLocation)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"location"
Maybe ChatInviteLink
invite_link_ <- Object
o Object -> Key -> Parser (Maybe ChatInviteLink)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"invite_link"
Maybe [BotCommands]
bot_commands_ <- Object
o Object -> Key -> Parser (Maybe [BotCommands])
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"bot_commands"
Maybe BotVerification
bot_verification_ <- Object
o Object -> Key -> Parser (Maybe BotVerification)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"bot_verification"
Maybe Int
upgraded_from_basic_group_id_ <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"upgraded_from_basic_group_id"
Maybe Int
upgraded_from_max_message_id_ <- Object
o Object -> Key -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
A..:? Key
"upgraded_from_max_message_id"
SupergroupFullInfo -> Parser SupergroupFullInfo
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (SupergroupFullInfo -> Parser SupergroupFullInfo)
-> SupergroupFullInfo -> Parser SupergroupFullInfo
forall a b. (a -> b) -> a -> b
$ SupergroupFullInfo
{ photo :: Maybe ChatPhoto
photo = Maybe ChatPhoto
photo_
, description :: Maybe Text
description = Maybe Text
description_
, member_count :: Maybe Int
member_count = Maybe Int
member_count_
, administrator_count :: Maybe Int
administrator_count = Maybe Int
administrator_count_
, restricted_count :: Maybe Int
restricted_count = Maybe Int
restricted_count_
, banned_count :: Maybe Int
banned_count = Maybe Int
banned_count_
, linked_chat_id :: Maybe Int
linked_chat_id = Maybe Int
linked_chat_id_
, slow_mode_delay :: Maybe Int
slow_mode_delay = Maybe Int
slow_mode_delay_
, slow_mode_delay_expires_in :: Maybe Double
slow_mode_delay_expires_in = Maybe Double
slow_mode_delay_expires_in_
, can_enable_paid_reaction :: Maybe Bool
can_enable_paid_reaction = Maybe Bool
can_enable_paid_reaction_
, can_get_members :: Maybe Bool
can_get_members = Maybe Bool
can_get_members_
, has_hidden_members :: Maybe Bool
has_hidden_members = Maybe Bool
has_hidden_members_
, can_hide_members :: Maybe Bool
can_hide_members = Maybe Bool
can_hide_members_
, can_set_sticker_set :: Maybe Bool
can_set_sticker_set = Maybe Bool
can_set_sticker_set_
, can_set_location :: Maybe Bool
can_set_location = Maybe Bool
can_set_location_
, can_get_statistics :: Maybe Bool
can_get_statistics = Maybe Bool
can_get_statistics_
, can_get_revenue_statistics :: Maybe Bool
can_get_revenue_statistics = Maybe Bool
can_get_revenue_statistics_
, can_get_star_revenue_statistics :: Maybe Bool
can_get_star_revenue_statistics = Maybe Bool
can_get_star_revenue_statistics_
, can_toggle_aggressive_anti_spam :: Maybe Bool
can_toggle_aggressive_anti_spam = Maybe Bool
can_toggle_aggressive_anti_spam_
, is_all_history_available :: Maybe Bool
is_all_history_available = Maybe Bool
is_all_history_available_
, can_have_sponsored_messages :: Maybe Bool
can_have_sponsored_messages = Maybe Bool
can_have_sponsored_messages_
, has_aggressive_anti_spam_enabled :: Maybe Bool
has_aggressive_anti_spam_enabled = Maybe Bool
has_aggressive_anti_spam_enabled_
, has_paid_media_allowed :: Maybe Bool
has_paid_media_allowed = Maybe Bool
has_paid_media_allowed_
, has_pinned_stories :: Maybe Bool
has_pinned_stories = Maybe Bool
has_pinned_stories_
, my_boost_count :: Maybe Int
my_boost_count = Maybe Int
my_boost_count_
, unrestrict_boost_count :: Maybe Int
unrestrict_boost_count = Maybe Int
unrestrict_boost_count_
, sticker_set_id :: Maybe Int
sticker_set_id = Maybe Int
sticker_set_id_
, custom_emoji_sticker_set_id :: Maybe Int
custom_emoji_sticker_set_id = Maybe Int
custom_emoji_sticker_set_id_
, location :: Maybe ChatLocation
location = Maybe ChatLocation
location_
, invite_link :: Maybe ChatInviteLink
invite_link = Maybe ChatInviteLink
invite_link_
, bot_commands :: Maybe [BotCommands]
bot_commands = Maybe [BotCommands]
bot_commands_
, bot_verification :: Maybe BotVerification
bot_verification = Maybe BotVerification
bot_verification_
, upgraded_from_basic_group_id :: Maybe Int
upgraded_from_basic_group_id = Maybe Int
upgraded_from_basic_group_id_
, upgraded_from_max_message_id :: Maybe Int
upgraded_from_max_message_id = Maybe Int
upgraded_from_max_message_id_
}
parseJSON Value
_ = Parser SupergroupFullInfo
forall a. Monoid a => a
mempty