module TD.Query.GetPremiumState
  (GetPremiumState(..)
  ) where

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

-- | Returns state of Telegram Premium subscription and promotion videos for Premium features. Returns 'TD.Data.PremiumState.PremiumState'
data GetPremiumState
  = GetPremiumState
  deriving (GetPremiumState -> GetPremiumState -> Bool
(GetPremiumState -> GetPremiumState -> Bool)
-> (GetPremiumState -> GetPremiumState -> Bool)
-> Eq GetPremiumState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetPremiumState -> GetPremiumState -> Bool
== :: GetPremiumState -> GetPremiumState -> Bool
$c/= :: GetPremiumState -> GetPremiumState -> Bool
/= :: GetPremiumState -> GetPremiumState -> Bool
Eq, Int -> GetPremiumState -> ShowS
[GetPremiumState] -> ShowS
GetPremiumState -> String
(Int -> GetPremiumState -> ShowS)
-> (GetPremiumState -> String)
-> ([GetPremiumState] -> ShowS)
-> Show GetPremiumState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetPremiumState -> ShowS
showsPrec :: Int -> GetPremiumState -> ShowS
$cshow :: GetPremiumState -> String
show :: GetPremiumState -> String
$cshowList :: [GetPremiumState] -> ShowS
showList :: [GetPremiumState] -> ShowS
Show)

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

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