module TD.Query.SendAuthenticationFirebaseSms
(SendAuthenticationFirebaseSms(..)
) 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 SendAuthenticationFirebaseSms
= SendAuthenticationFirebaseSms
{ SendAuthenticationFirebaseSms -> Maybe Text
token :: Maybe T.Text
}
deriving (SendAuthenticationFirebaseSms
-> SendAuthenticationFirebaseSms -> Bool
(SendAuthenticationFirebaseSms
-> SendAuthenticationFirebaseSms -> Bool)
-> (SendAuthenticationFirebaseSms
-> SendAuthenticationFirebaseSms -> Bool)
-> Eq SendAuthenticationFirebaseSms
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SendAuthenticationFirebaseSms
-> SendAuthenticationFirebaseSms -> Bool
== :: SendAuthenticationFirebaseSms
-> SendAuthenticationFirebaseSms -> Bool
$c/= :: SendAuthenticationFirebaseSms
-> SendAuthenticationFirebaseSms -> Bool
/= :: SendAuthenticationFirebaseSms
-> SendAuthenticationFirebaseSms -> Bool
Eq, Int -> SendAuthenticationFirebaseSms -> ShowS
[SendAuthenticationFirebaseSms] -> ShowS
SendAuthenticationFirebaseSms -> String
(Int -> SendAuthenticationFirebaseSms -> ShowS)
-> (SendAuthenticationFirebaseSms -> String)
-> ([SendAuthenticationFirebaseSms] -> ShowS)
-> Show SendAuthenticationFirebaseSms
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SendAuthenticationFirebaseSms -> ShowS
showsPrec :: Int -> SendAuthenticationFirebaseSms -> ShowS
$cshow :: SendAuthenticationFirebaseSms -> String
show :: SendAuthenticationFirebaseSms -> String
$cshowList :: [SendAuthenticationFirebaseSms] -> ShowS
showList :: [SendAuthenticationFirebaseSms] -> ShowS
Show)
instance I.ShortShow SendAuthenticationFirebaseSms where
shortShow :: SendAuthenticationFirebaseSms -> String
shortShow
SendAuthenticationFirebaseSms
{ token :: SendAuthenticationFirebaseSms -> Maybe Text
token = Maybe Text
token_
}
= String
"SendAuthenticationFirebaseSms"
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_
]
instance AT.ToJSON SendAuthenticationFirebaseSms where
toJSON :: SendAuthenticationFirebaseSms -> Value
toJSON
SendAuthenticationFirebaseSms
{ token :: SendAuthenticationFirebaseSms -> 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
"sendAuthenticationFirebaseSms"
, 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_
]