module TD.Query.DeleteBusinessStory
(DeleteBusinessStory(..)
, defaultDeleteBusinessStory
) 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 DeleteBusinessStory
= DeleteBusinessStory
{ DeleteBusinessStory -> Maybe Text
business_connection_id :: Maybe T.Text
, DeleteBusinessStory -> Maybe Int
story_id :: Maybe Int
}
deriving (DeleteBusinessStory -> DeleteBusinessStory -> Bool
(DeleteBusinessStory -> DeleteBusinessStory -> Bool)
-> (DeleteBusinessStory -> DeleteBusinessStory -> Bool)
-> Eq DeleteBusinessStory
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeleteBusinessStory -> DeleteBusinessStory -> Bool
== :: DeleteBusinessStory -> DeleteBusinessStory -> Bool
$c/= :: DeleteBusinessStory -> DeleteBusinessStory -> Bool
/= :: DeleteBusinessStory -> DeleteBusinessStory -> Bool
Eq, Int -> DeleteBusinessStory -> ShowS
[DeleteBusinessStory] -> ShowS
DeleteBusinessStory -> String
(Int -> DeleteBusinessStory -> ShowS)
-> (DeleteBusinessStory -> String)
-> ([DeleteBusinessStory] -> ShowS)
-> Show DeleteBusinessStory
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DeleteBusinessStory -> ShowS
showsPrec :: Int -> DeleteBusinessStory -> ShowS
$cshow :: DeleteBusinessStory -> String
show :: DeleteBusinessStory -> String
$cshowList :: [DeleteBusinessStory] -> ShowS
showList :: [DeleteBusinessStory] -> ShowS
Show)
instance I.ShortShow DeleteBusinessStory where
shortShow :: DeleteBusinessStory -> String
shortShow
DeleteBusinessStory
{ business_connection_id :: DeleteBusinessStory -> Maybe Text
business_connection_id = Maybe Text
business_connection_id_
, story_id :: DeleteBusinessStory -> Maybe Int
story_id = Maybe Int
story_id_
}
= String
"DeleteBusinessStory"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"business_connection_id" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
business_connection_id_
, String
"story_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
story_id_
]
instance AT.ToJSON DeleteBusinessStory where
toJSON :: DeleteBusinessStory -> Value
toJSON
DeleteBusinessStory
{ business_connection_id :: DeleteBusinessStory -> Maybe Text
business_connection_id = Maybe Text
business_connection_id_
, story_id :: DeleteBusinessStory -> Maybe Int
story_id = Maybe Int
story_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
"deleteBusinessStory"
, Key
"business_connection_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
business_connection_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_
]
defaultDeleteBusinessStory :: DeleteBusinessStory
defaultDeleteBusinessStory :: DeleteBusinessStory
defaultDeleteBusinessStory =
DeleteBusinessStory
{ business_connection_id :: Maybe Text
business_connection_id = Maybe Text
forall a. Maybe a
Nothing
, story_id :: Maybe Int
story_id = Maybe Int
forall a. Maybe a
Nothing
}