module TD.Data.PremiumFeature
(PremiumFeature(..)) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data PremiumFeature
= PremiumFeatureIncreasedLimits
| PremiumFeatureIncreasedUploadFileSize
| PremiumFeatureImprovedDownloadSpeed
| PremiumFeatureVoiceRecognition
| PremiumFeatureDisabledAds
| PremiumFeatureUniqueReactions
| PremiumFeatureUniqueStickers
| PremiumFeatureCustomEmoji
| PremiumFeatureAdvancedChatManagement
| PremiumFeatureProfileBadge
| PremiumFeatureEmojiStatus
| PremiumFeatureAnimatedProfilePhoto
| PremiumFeatureForumTopicIcon
| PremiumFeatureAppIcons
| PremiumFeatureRealTimeChatTranslation
| PremiumFeatureUpgradedStories
| PremiumFeatureChatBoost
| PremiumFeatureAccentColor
| PremiumFeatureBackgroundForBoth
| PremiumFeatureSavedMessagesTags
| PremiumFeatureMessagePrivacy
| PremiumFeatureLastSeenTimes
| PremiumFeatureBusiness
| PremiumFeatureMessageEffects
deriving (PremiumFeature -> PremiumFeature -> Bool
(PremiumFeature -> PremiumFeature -> Bool)
-> (PremiumFeature -> PremiumFeature -> Bool) -> Eq PremiumFeature
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PremiumFeature -> PremiumFeature -> Bool
== :: PremiumFeature -> PremiumFeature -> Bool
$c/= :: PremiumFeature -> PremiumFeature -> Bool
/= :: PremiumFeature -> PremiumFeature -> Bool
Eq, Int -> PremiumFeature -> ShowS
[PremiumFeature] -> ShowS
PremiumFeature -> String
(Int -> PremiumFeature -> ShowS)
-> (PremiumFeature -> String)
-> ([PremiumFeature] -> ShowS)
-> Show PremiumFeature
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PremiumFeature -> ShowS
showsPrec :: Int -> PremiumFeature -> ShowS
$cshow :: PremiumFeature -> String
show :: PremiumFeature -> String
$cshowList :: [PremiumFeature] -> ShowS
showList :: [PremiumFeature] -> ShowS
Show)
instance I.ShortShow PremiumFeature where
shortShow :: PremiumFeature -> String
shortShow PremiumFeature
PremiumFeatureIncreasedLimits
= String
"PremiumFeatureIncreasedLimits"
shortShow PremiumFeature
PremiumFeatureIncreasedUploadFileSize
= String
"PremiumFeatureIncreasedUploadFileSize"
shortShow PremiumFeature
PremiumFeatureImprovedDownloadSpeed
= String
"PremiumFeatureImprovedDownloadSpeed"
shortShow PremiumFeature
PremiumFeatureVoiceRecognition
= String
"PremiumFeatureVoiceRecognition"
shortShow PremiumFeature
PremiumFeatureDisabledAds
= String
"PremiumFeatureDisabledAds"
shortShow PremiumFeature
PremiumFeatureUniqueReactions
= String
"PremiumFeatureUniqueReactions"
shortShow PremiumFeature
PremiumFeatureUniqueStickers
= String
"PremiumFeatureUniqueStickers"
shortShow PremiumFeature
PremiumFeatureCustomEmoji
= String
"PremiumFeatureCustomEmoji"
shortShow PremiumFeature
PremiumFeatureAdvancedChatManagement
= String
"PremiumFeatureAdvancedChatManagement"
shortShow PremiumFeature
PremiumFeatureProfileBadge
= String
"PremiumFeatureProfileBadge"
shortShow PremiumFeature
PremiumFeatureEmojiStatus
= String
"PremiumFeatureEmojiStatus"
shortShow PremiumFeature
PremiumFeatureAnimatedProfilePhoto
= String
"PremiumFeatureAnimatedProfilePhoto"
shortShow PremiumFeature
PremiumFeatureForumTopicIcon
= String
"PremiumFeatureForumTopicIcon"
shortShow PremiumFeature
PremiumFeatureAppIcons
= String
"PremiumFeatureAppIcons"
shortShow PremiumFeature
PremiumFeatureRealTimeChatTranslation
= String
"PremiumFeatureRealTimeChatTranslation"
shortShow PremiumFeature
PremiumFeatureUpgradedStories
= String
"PremiumFeatureUpgradedStories"
shortShow PremiumFeature
PremiumFeatureChatBoost
= String
"PremiumFeatureChatBoost"
shortShow PremiumFeature
PremiumFeatureAccentColor
= String
"PremiumFeatureAccentColor"
shortShow PremiumFeature
PremiumFeatureBackgroundForBoth
= String
"PremiumFeatureBackgroundForBoth"
shortShow PremiumFeature
PremiumFeatureSavedMessagesTags
= String
"PremiumFeatureSavedMessagesTags"
shortShow PremiumFeature
PremiumFeatureMessagePrivacy
= String
"PremiumFeatureMessagePrivacy"
shortShow PremiumFeature
PremiumFeatureLastSeenTimes
= String
"PremiumFeatureLastSeenTimes"
shortShow PremiumFeature
PremiumFeatureBusiness
= String
"PremiumFeatureBusiness"
shortShow PremiumFeature
PremiumFeatureMessageEffects
= String
"PremiumFeatureMessageEffects"
instance AT.FromJSON PremiumFeature where
parseJSON :: Value -> Parser PremiumFeature
parseJSON (AT.Object Object
obj) = do
String
t <- Object
obj Object -> Key -> Parser String
forall a. FromJSON a => Object -> Key -> Parser a
A..: Key
"@type" :: AT.Parser String
case String
t of
String
"premiumFeatureIncreasedLimits" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureIncreasedLimits
String
"premiumFeatureIncreasedUploadFileSize" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureIncreasedUploadFileSize
String
"premiumFeatureImprovedDownloadSpeed" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureImprovedDownloadSpeed
String
"premiumFeatureVoiceRecognition" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureVoiceRecognition
String
"premiumFeatureDisabledAds" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureDisabledAds
String
"premiumFeatureUniqueReactions" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureUniqueReactions
String
"premiumFeatureUniqueStickers" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureUniqueStickers
String
"premiumFeatureCustomEmoji" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureCustomEmoji
String
"premiumFeatureAdvancedChatManagement" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureAdvancedChatManagement
String
"premiumFeatureProfileBadge" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureProfileBadge
String
"premiumFeatureEmojiStatus" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureEmojiStatus
String
"premiumFeatureAnimatedProfilePhoto" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureAnimatedProfilePhoto
String
"premiumFeatureForumTopicIcon" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureForumTopicIcon
String
"premiumFeatureAppIcons" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureAppIcons
String
"premiumFeatureRealTimeChatTranslation" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureRealTimeChatTranslation
String
"premiumFeatureUpgradedStories" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureUpgradedStories
String
"premiumFeatureChatBoost" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureChatBoost
String
"premiumFeatureAccentColor" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureAccentColor
String
"premiumFeatureBackgroundForBoth" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureBackgroundForBoth
String
"premiumFeatureSavedMessagesTags" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureSavedMessagesTags
String
"premiumFeatureMessagePrivacy" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureMessagePrivacy
String
"premiumFeatureLastSeenTimes" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureLastSeenTimes
String
"premiumFeatureBusiness" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureBusiness
String
"premiumFeatureMessageEffects" -> PremiumFeature -> Parser PremiumFeature
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure PremiumFeature
PremiumFeatureMessageEffects
String
_ -> Parser PremiumFeature
forall a. Monoid a => a
mempty
parseJSON Value
_ = Parser PremiumFeature
forall a. Monoid a => a
mempty
instance AT.ToJSON PremiumFeature where
toJSON :: PremiumFeature -> Value
toJSON PremiumFeature
PremiumFeatureIncreasedLimits
= [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
"premiumFeatureIncreasedLimits"
]
toJSON PremiumFeature
PremiumFeatureIncreasedUploadFileSize
= [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
"premiumFeatureIncreasedUploadFileSize"
]
toJSON PremiumFeature
PremiumFeatureImprovedDownloadSpeed
= [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
"premiumFeatureImprovedDownloadSpeed"
]
toJSON PremiumFeature
PremiumFeatureVoiceRecognition
= [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
"premiumFeatureVoiceRecognition"
]
toJSON PremiumFeature
PremiumFeatureDisabledAds
= [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
"premiumFeatureDisabledAds"
]
toJSON PremiumFeature
PremiumFeatureUniqueReactions
= [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
"premiumFeatureUniqueReactions"
]
toJSON PremiumFeature
PremiumFeatureUniqueStickers
= [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
"premiumFeatureUniqueStickers"
]
toJSON PremiumFeature
PremiumFeatureCustomEmoji
= [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
"premiumFeatureCustomEmoji"
]
toJSON PremiumFeature
PremiumFeatureAdvancedChatManagement
= [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
"premiumFeatureAdvancedChatManagement"
]
toJSON PremiumFeature
PremiumFeatureProfileBadge
= [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
"premiumFeatureProfileBadge"
]
toJSON PremiumFeature
PremiumFeatureEmojiStatus
= [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
"premiumFeatureEmojiStatus"
]
toJSON PremiumFeature
PremiumFeatureAnimatedProfilePhoto
= [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
"premiumFeatureAnimatedProfilePhoto"
]
toJSON PremiumFeature
PremiumFeatureForumTopicIcon
= [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
"premiumFeatureForumTopicIcon"
]
toJSON PremiumFeature
PremiumFeatureAppIcons
= [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
"premiumFeatureAppIcons"
]
toJSON PremiumFeature
PremiumFeatureRealTimeChatTranslation
= [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
"premiumFeatureRealTimeChatTranslation"
]
toJSON PremiumFeature
PremiumFeatureUpgradedStories
= [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
"premiumFeatureUpgradedStories"
]
toJSON PremiumFeature
PremiumFeatureChatBoost
= [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
"premiumFeatureChatBoost"
]
toJSON PremiumFeature
PremiumFeatureAccentColor
= [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
"premiumFeatureAccentColor"
]
toJSON PremiumFeature
PremiumFeatureBackgroundForBoth
= [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
"premiumFeatureBackgroundForBoth"
]
toJSON PremiumFeature
PremiumFeatureSavedMessagesTags
= [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
"premiumFeatureSavedMessagesTags"
]
toJSON PremiumFeature
PremiumFeatureMessagePrivacy
= [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
"premiumFeatureMessagePrivacy"
]
toJSON PremiumFeature
PremiumFeatureLastSeenTimes
= [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
"premiumFeatureLastSeenTimes"
]
toJSON PremiumFeature
PremiumFeatureBusiness
= [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
"premiumFeatureBusiness"
]
toJSON PremiumFeature
PremiumFeatureMessageEffects
= [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
"premiumFeatureMessageEffects"
]