module TD.Query.GetStarWithdrawalUrl
(GetStarWithdrawalUrl(..)
, defaultGetStarWithdrawalUrl
) 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.MessageSender as MessageSender
import qualified Data.Text as T
data GetStarWithdrawalUrl
= GetStarWithdrawalUrl
{ GetStarWithdrawalUrl -> Maybe MessageSender
owner_id :: Maybe MessageSender.MessageSender
, GetStarWithdrawalUrl -> Maybe Int
star_count :: Maybe Int
, GetStarWithdrawalUrl -> Maybe Text
password :: Maybe T.Text
}
deriving (GetStarWithdrawalUrl -> GetStarWithdrawalUrl -> Bool
(GetStarWithdrawalUrl -> GetStarWithdrawalUrl -> Bool)
-> (GetStarWithdrawalUrl -> GetStarWithdrawalUrl -> Bool)
-> Eq GetStarWithdrawalUrl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetStarWithdrawalUrl -> GetStarWithdrawalUrl -> Bool
== :: GetStarWithdrawalUrl -> GetStarWithdrawalUrl -> Bool
$c/= :: GetStarWithdrawalUrl -> GetStarWithdrawalUrl -> Bool
/= :: GetStarWithdrawalUrl -> GetStarWithdrawalUrl -> Bool
Eq, Int -> GetStarWithdrawalUrl -> ShowS
[GetStarWithdrawalUrl] -> ShowS
GetStarWithdrawalUrl -> String
(Int -> GetStarWithdrawalUrl -> ShowS)
-> (GetStarWithdrawalUrl -> String)
-> ([GetStarWithdrawalUrl] -> ShowS)
-> Show GetStarWithdrawalUrl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetStarWithdrawalUrl -> ShowS
showsPrec :: Int -> GetStarWithdrawalUrl -> ShowS
$cshow :: GetStarWithdrawalUrl -> String
show :: GetStarWithdrawalUrl -> String
$cshowList :: [GetStarWithdrawalUrl] -> ShowS
showList :: [GetStarWithdrawalUrl] -> ShowS
Show)
instance I.ShortShow GetStarWithdrawalUrl where
shortShow :: GetStarWithdrawalUrl -> String
shortShow
GetStarWithdrawalUrl
{ owner_id :: GetStarWithdrawalUrl -> Maybe MessageSender
owner_id = Maybe MessageSender
owner_id_
, star_count :: GetStarWithdrawalUrl -> Maybe Int
star_count = Maybe Int
star_count_
, password :: GetStarWithdrawalUrl -> Maybe Text
password = Maybe Text
password_
}
= String
"GetStarWithdrawalUrl"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"owner_id" String -> Maybe MessageSender -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe MessageSender
owner_id_
, String
"star_count" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
star_count_
, String
"password" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
password_
]
instance AT.ToJSON GetStarWithdrawalUrl where
toJSON :: GetStarWithdrawalUrl -> Value
toJSON
GetStarWithdrawalUrl
{ owner_id :: GetStarWithdrawalUrl -> Maybe MessageSender
owner_id = Maybe MessageSender
owner_id_
, star_count :: GetStarWithdrawalUrl -> Maybe Int
star_count = Maybe Int
star_count_
, password :: GetStarWithdrawalUrl -> Maybe Text
password = Maybe Text
password_
}
= [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
"getStarWithdrawalUrl"
, Key
"owner_id" Key -> Maybe MessageSender -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe MessageSender
owner_id_
, 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
"password" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
password_
]
defaultGetStarWithdrawalUrl :: GetStarWithdrawalUrl
defaultGetStarWithdrawalUrl :: GetStarWithdrawalUrl
defaultGetStarWithdrawalUrl =
GetStarWithdrawalUrl
{ owner_id :: Maybe MessageSender
owner_id = Maybe MessageSender
forall a. Maybe a
Nothing
, star_count :: Maybe Int
star_count = Maybe Int
forall a. Maybe a
Nothing
, password :: Maybe Text
password = Maybe Text
forall a. Maybe a
Nothing
}