module TD.Query.GetBusinessConnectedBot
  (GetBusinessConnectedBot(..)
  ) where

import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I

-- | Returns the business bot that is connected to the current user account. Returns a 404 error if there is no connected bot. Returns 'TD.Data.BusinessConnectedBot.BusinessConnectedBot'
data GetBusinessConnectedBot
  = GetBusinessConnectedBot
  deriving (GetBusinessConnectedBot -> GetBusinessConnectedBot -> Bool
(GetBusinessConnectedBot -> GetBusinessConnectedBot -> Bool)
-> (GetBusinessConnectedBot -> GetBusinessConnectedBot -> Bool)
-> Eq GetBusinessConnectedBot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetBusinessConnectedBot -> GetBusinessConnectedBot -> Bool
== :: GetBusinessConnectedBot -> GetBusinessConnectedBot -> Bool
$c/= :: GetBusinessConnectedBot -> GetBusinessConnectedBot -> Bool
/= :: GetBusinessConnectedBot -> GetBusinessConnectedBot -> Bool
Eq, Int -> GetBusinessConnectedBot -> ShowS
[GetBusinessConnectedBot] -> ShowS
GetBusinessConnectedBot -> String
(Int -> GetBusinessConnectedBot -> ShowS)
-> (GetBusinessConnectedBot -> String)
-> ([GetBusinessConnectedBot] -> ShowS)
-> Show GetBusinessConnectedBot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetBusinessConnectedBot -> ShowS
showsPrec :: Int -> GetBusinessConnectedBot -> ShowS
$cshow :: GetBusinessConnectedBot -> String
show :: GetBusinessConnectedBot -> String
$cshowList :: [GetBusinessConnectedBot] -> ShowS
showList :: [GetBusinessConnectedBot] -> ShowS
Show)

instance I.ShortShow GetBusinessConnectedBot where
  shortShow :: GetBusinessConnectedBot -> String
shortShow
    GetBusinessConnectedBot
GetBusinessConnectedBot
        = String
"GetBusinessConnectedBot"

instance AT.ToJSON GetBusinessConnectedBot where
  toJSON :: GetBusinessConnectedBot -> Value
toJSON
    GetBusinessConnectedBot
GetBusinessConnectedBot
        = [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
"getBusinessConnectedBot"
          ]