module TD.Query.ToggleStoryIsPostedToChatPage
(ToggleStoryIsPostedToChatPage(..)
, defaultToggleStoryIsPostedToChatPage
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data ToggleStoryIsPostedToChatPage
= ToggleStoryIsPostedToChatPage
{ ToggleStoryIsPostedToChatPage -> Maybe Int
story_sender_chat_id :: Maybe Int
, ToggleStoryIsPostedToChatPage -> Maybe Int
story_id :: Maybe Int
, ToggleStoryIsPostedToChatPage -> Maybe Bool
is_posted_to_chat_page :: Maybe Bool
}
deriving (ToggleStoryIsPostedToChatPage
-> ToggleStoryIsPostedToChatPage -> Bool
(ToggleStoryIsPostedToChatPage
-> ToggleStoryIsPostedToChatPage -> Bool)
-> (ToggleStoryIsPostedToChatPage
-> ToggleStoryIsPostedToChatPage -> Bool)
-> Eq ToggleStoryIsPostedToChatPage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ToggleStoryIsPostedToChatPage
-> ToggleStoryIsPostedToChatPage -> Bool
== :: ToggleStoryIsPostedToChatPage
-> ToggleStoryIsPostedToChatPage -> Bool
$c/= :: ToggleStoryIsPostedToChatPage
-> ToggleStoryIsPostedToChatPage -> Bool
/= :: ToggleStoryIsPostedToChatPage
-> ToggleStoryIsPostedToChatPage -> Bool
Eq, Int -> ToggleStoryIsPostedToChatPage -> ShowS
[ToggleStoryIsPostedToChatPage] -> ShowS
ToggleStoryIsPostedToChatPage -> String
(Int -> ToggleStoryIsPostedToChatPage -> ShowS)
-> (ToggleStoryIsPostedToChatPage -> String)
-> ([ToggleStoryIsPostedToChatPage] -> ShowS)
-> Show ToggleStoryIsPostedToChatPage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ToggleStoryIsPostedToChatPage -> ShowS
showsPrec :: Int -> ToggleStoryIsPostedToChatPage -> ShowS
$cshow :: ToggleStoryIsPostedToChatPage -> String
show :: ToggleStoryIsPostedToChatPage -> String
$cshowList :: [ToggleStoryIsPostedToChatPage] -> ShowS
showList :: [ToggleStoryIsPostedToChatPage] -> ShowS
Show)
instance I.ShortShow ToggleStoryIsPostedToChatPage where
shortShow :: ToggleStoryIsPostedToChatPage -> String
shortShow
ToggleStoryIsPostedToChatPage
{ story_sender_chat_id :: ToggleStoryIsPostedToChatPage -> Maybe Int
story_sender_chat_id = Maybe Int
story_sender_chat_id_
, story_id :: ToggleStoryIsPostedToChatPage -> Maybe Int
story_id = Maybe Int
story_id_
, is_posted_to_chat_page :: ToggleStoryIsPostedToChatPage -> Maybe Bool
is_posted_to_chat_page = Maybe Bool
is_posted_to_chat_page_
}
= String
"ToggleStoryIsPostedToChatPage"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"story_sender_chat_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
story_sender_chat_id_
, String
"story_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
story_id_
, String
"is_posted_to_chat_page" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
is_posted_to_chat_page_
]
instance AT.ToJSON ToggleStoryIsPostedToChatPage where
toJSON :: ToggleStoryIsPostedToChatPage -> Value
toJSON
ToggleStoryIsPostedToChatPage
{ story_sender_chat_id :: ToggleStoryIsPostedToChatPage -> Maybe Int
story_sender_chat_id = Maybe Int
story_sender_chat_id_
, story_id :: ToggleStoryIsPostedToChatPage -> Maybe Int
story_id = Maybe Int
story_id_
, is_posted_to_chat_page :: ToggleStoryIsPostedToChatPage -> Maybe Bool
is_posted_to_chat_page = Maybe Bool
is_posted_to_chat_page_
}
= [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
"toggleStoryIsPostedToChatPage"
, Key
"story_sender_chat_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_sender_chat_id_
, 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_
, Key
"is_posted_to_chat_page" 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_posted_to_chat_page_
]
defaultToggleStoryIsPostedToChatPage :: ToggleStoryIsPostedToChatPage
defaultToggleStoryIsPostedToChatPage :: ToggleStoryIsPostedToChatPage
defaultToggleStoryIsPostedToChatPage =
ToggleStoryIsPostedToChatPage
{ story_sender_chat_id :: Maybe Int
story_sender_chat_id = Maybe Int
forall a. Maybe a
Nothing
, story_id :: Maybe Int
story_id = Maybe Int
forall a. Maybe a
Nothing
, is_posted_to_chat_page :: Maybe Bool
is_posted_to_chat_page = Maybe Bool
forall a. Maybe a
Nothing
}