module TD.Query.GetNewChatPrivacySettings
  (GetNewChatPrivacySettings(..)
  ) where

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

-- | Returns privacy settings for new chat creation. Returns 'TD.Data.NewChatPrivacySettings.NewChatPrivacySettings'
data GetNewChatPrivacySettings
  = GetNewChatPrivacySettings
  deriving (GetNewChatPrivacySettings -> GetNewChatPrivacySettings -> Bool
(GetNewChatPrivacySettings -> GetNewChatPrivacySettings -> Bool)
-> (GetNewChatPrivacySettings -> GetNewChatPrivacySettings -> Bool)
-> Eq GetNewChatPrivacySettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetNewChatPrivacySettings -> GetNewChatPrivacySettings -> Bool
== :: GetNewChatPrivacySettings -> GetNewChatPrivacySettings -> Bool
$c/= :: GetNewChatPrivacySettings -> GetNewChatPrivacySettings -> Bool
/= :: GetNewChatPrivacySettings -> GetNewChatPrivacySettings -> Bool
Eq, Int -> GetNewChatPrivacySettings -> ShowS
[GetNewChatPrivacySettings] -> ShowS
GetNewChatPrivacySettings -> String
(Int -> GetNewChatPrivacySettings -> ShowS)
-> (GetNewChatPrivacySettings -> String)
-> ([GetNewChatPrivacySettings] -> ShowS)
-> Show GetNewChatPrivacySettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetNewChatPrivacySettings -> ShowS
showsPrec :: Int -> GetNewChatPrivacySettings -> ShowS
$cshow :: GetNewChatPrivacySettings -> String
show :: GetNewChatPrivacySettings -> String
$cshowList :: [GetNewChatPrivacySettings] -> ShowS
showList :: [GetNewChatPrivacySettings] -> ShowS
Show)

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

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