{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.SwitchInlineQueryChosenChat where

import Data.Aeson (FromJSON (..), ToJSON (..))
import Data.Text
import GHC.Generics (Generic)

import Telegram.Bot.API.Internal.Utils

-- ** 'SwitchInlineQueryChosenChat'

-- | This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.
data SwitchInlineQueryChosenChat = SwitchInlineQueryChosenChat
  { SwitchInlineQueryChosenChat -> Maybe Text
switchInlineQueryChosenChatQuery :: Maybe Text -- ^ The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted.
  , SwitchInlineQueryChosenChat -> Maybe Bool
switchInlineQueryChosenChatAllowUserChats :: Maybe Bool -- ^ 'True', if private chats with users can be chosen.
  , SwitchInlineQueryChosenChat -> Maybe Bool
switchInlineQueryChosenChatAllowBotChats :: Maybe Bool -- ^ 'True', if private chats with bots can be chosen.
  , SwitchInlineQueryChosenChat -> Maybe Bool
switchInlineQueryChosenChatAllowGroupChats :: Maybe Bool -- ^ 'True', if group and supergroup chats can be chosen.
  , SwitchInlineQueryChosenChat -> Maybe Bool
switchInlineQueryChosenChatAllowChannelChats :: Maybe Bool -- ^ 'True', if channel chats can be chosen.
  }
  deriving (Int -> SwitchInlineQueryChosenChat -> ShowS
[SwitchInlineQueryChosenChat] -> ShowS
SwitchInlineQueryChosenChat -> String
(Int -> SwitchInlineQueryChosenChat -> ShowS)
-> (SwitchInlineQueryChosenChat -> String)
-> ([SwitchInlineQueryChosenChat] -> ShowS)
-> Show SwitchInlineQueryChosenChat
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SwitchInlineQueryChosenChat -> ShowS
showsPrec :: Int -> SwitchInlineQueryChosenChat -> ShowS
$cshow :: SwitchInlineQueryChosenChat -> String
show :: SwitchInlineQueryChosenChat -> String
$cshowList :: [SwitchInlineQueryChosenChat] -> ShowS
showList :: [SwitchInlineQueryChosenChat] -> ShowS
Show, (forall x.
 SwitchInlineQueryChosenChat -> Rep SwitchInlineQueryChosenChat x)
-> (forall x.
    Rep SwitchInlineQueryChosenChat x -> SwitchInlineQueryChosenChat)
-> Generic SwitchInlineQueryChosenChat
forall x.
Rep SwitchInlineQueryChosenChat x -> SwitchInlineQueryChosenChat
forall x.
SwitchInlineQueryChosenChat -> Rep SwitchInlineQueryChosenChat x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SwitchInlineQueryChosenChat -> Rep SwitchInlineQueryChosenChat x
from :: forall x.
SwitchInlineQueryChosenChat -> Rep SwitchInlineQueryChosenChat x
$cto :: forall x.
Rep SwitchInlineQueryChosenChat x -> SwitchInlineQueryChosenChat
to :: forall x.
Rep SwitchInlineQueryChosenChat x -> SwitchInlineQueryChosenChat
Generic)

instance ToJSON   SwitchInlineQueryChosenChat where toJSON :: SwitchInlineQueryChosenChat -> Value
toJSON = SwitchInlineQueryChosenChat -> Value
forall a (d :: Meta) (f :: * -> *).
(Generic a, GToJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
a -> Value
gtoJSON
instance FromJSON SwitchInlineQueryChosenChat where parseJSON :: Value -> Parser SwitchInlineQueryChosenChat
parseJSON = Value -> Parser SwitchInlineQueryChosenChat
forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON