module TD.Query.GetGiftAuctionState
(GetGiftAuctionState(..)
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import qualified Data.Text as T
data GetGiftAuctionState
= GetGiftAuctionState
{ GetGiftAuctionState -> Maybe Text
auction_id :: Maybe T.Text
}
deriving (GetGiftAuctionState -> GetGiftAuctionState -> Bool
(GetGiftAuctionState -> GetGiftAuctionState -> Bool)
-> (GetGiftAuctionState -> GetGiftAuctionState -> Bool)
-> Eq GetGiftAuctionState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetGiftAuctionState -> GetGiftAuctionState -> Bool
== :: GetGiftAuctionState -> GetGiftAuctionState -> Bool
$c/= :: GetGiftAuctionState -> GetGiftAuctionState -> Bool
/= :: GetGiftAuctionState -> GetGiftAuctionState -> Bool
Eq, Int -> GetGiftAuctionState -> ShowS
[GetGiftAuctionState] -> ShowS
GetGiftAuctionState -> String
(Int -> GetGiftAuctionState -> ShowS)
-> (GetGiftAuctionState -> String)
-> ([GetGiftAuctionState] -> ShowS)
-> Show GetGiftAuctionState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetGiftAuctionState -> ShowS
showsPrec :: Int -> GetGiftAuctionState -> ShowS
$cshow :: GetGiftAuctionState -> String
show :: GetGiftAuctionState -> String
$cshowList :: [GetGiftAuctionState] -> ShowS
showList :: [GetGiftAuctionState] -> ShowS
Show)
instance I.ShortShow GetGiftAuctionState where
shortShow :: GetGiftAuctionState -> String
shortShow
GetGiftAuctionState
{ auction_id :: GetGiftAuctionState -> Maybe Text
auction_id = Maybe Text
auction_id_
}
= String
"GetGiftAuctionState"
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_
]
instance AT.ToJSON GetGiftAuctionState where
toJSON :: GetGiftAuctionState -> Value
toJSON
GetGiftAuctionState
{ auction_id :: GetGiftAuctionState -> 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
"getGiftAuctionState"
, 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_
]