    {-# LANGUAGE CPP #-}
    {-# LANGUAGE DeriveDataTypeable #-}
    {-# LANGUAGE DeriveGeneric #-}
    {-# LANGUAGE LambdaCase #-}
    {-# LANGUAGE OverloadedStrings #-}
    {-# LANGUAGE RecordWildCards #-}

    module Web.Twitter.Types (
        UserId,
        Friends,
        URIString,
        UserName,
        StatusId,
        LanguageCode,
        StreamingAPI (..),
        Status (..),
        SearchResult (..),
        SearchStatus (..),
        SearchMetadata (..),
        RetweetedStatus (..),
        DirectMessage (..),
        EventTarget (..),
        Event (..),
        Delete (..),
        User (..),
        List (..),
        Entities (..),
        EntityIndices,
        ExtendedEntities (..),
        Variant (..),
        VideoInfo (..),
        ExtendedEntity (..),
        Entity (..),
        HashTagEntity (..),
        UserEntity (..),
        URLEntity (..),
        MediaEntity (..),
        MediaSize (..),
        Coordinates (..),
        Place (..),
        BoundingBox (..),
        Contributor (..),
        UploadedMedia (..),
        ImageSizeType (..),
        DisplayTextRange (..),
        checkError,
        twitterTimeFormat,
    ) where

    import Control.Applicative
    import Control.Monad
    import Data.Aeson
    import Data.Aeson.Types (Parser)
    import Data.Data
    import Data.HashMap.Strict (HashMap)

    #if MIN_VERSION_aeson(2, 0, 0)
    import qualified Data.Aeson.KeyMap as KeyMap
    #else
    import qualified Data.HashMap.Strict as KeyMap
    #endif
    import Data.Int
    import Data.Ratio
    import Data.Text (Text, pack, unpack)
    import Data.Text.Read (decimal)
    import Data.Time
    import Data.Time.Clock.POSIX
    import GHC.Generics

    newtype TwitterTime = TwitterTime {TwitterTime -> UTCTime
    fromTwitterTime :: UTCTime}

    type UserId = Integer
    type Friends = [UserId]
    type URIString = Text
    type UserName = Text
    type StatusId = Integer
    type LanguageCode = String

    data StreamingAPI
        = SStatus Status
        | SRetweetedStatus RetweetedStatus
        | SEvent Event
        | SDelete Delete
        | -- | SScrubGeo ScrubGeo
          SFriends Friends
        | SDirectMessage DirectMessage
        | SUnknown Value
        deriving (Int -> StreamingAPI -> ShowS
    [StreamingAPI] -> ShowS
    StreamingAPI -> String
    (Int -> StreamingAPI -> ShowS)
    -> (StreamingAPI -> String)
    -> ([StreamingAPI] -> ShowS)
    -> Show StreamingAPI
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> StreamingAPI -> ShowS
    showsPrec :: Int -> StreamingAPI -> ShowS
    $cshow :: StreamingAPI -> String
    show :: StreamingAPI -> String
    $cshowList :: [StreamingAPI] -> ShowS
    showList :: [StreamingAPI] -> ShowS
    Show, StreamingAPI -> StreamingAPI -> Bool
    (StreamingAPI -> StreamingAPI -> Bool)
    -> (StreamingAPI -> StreamingAPI -> Bool) -> Eq StreamingAPI
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: StreamingAPI -> StreamingAPI -> Bool
    == :: StreamingAPI -> StreamingAPI -> Bool
    $c/= :: StreamingAPI -> StreamingAPI -> Bool
    /= :: StreamingAPI -> StreamingAPI -> Bool
    Eq, Typeable StreamingAPI
    Typeable StreamingAPI =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> StreamingAPI -> c StreamingAPI)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c StreamingAPI)
    -> (StreamingAPI -> Constr)
    -> (StreamingAPI -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c StreamingAPI))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c StreamingAPI))
    -> ((forall b. Data b => b -> b) -> StreamingAPI -> StreamingAPI)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> StreamingAPI -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> StreamingAPI -> r)
    -> (forall u. (forall d. Data d => d -> u) -> StreamingAPI -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> StreamingAPI -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> StreamingAPI -> m StreamingAPI)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> StreamingAPI -> m StreamingAPI)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> StreamingAPI -> m StreamingAPI)
    -> Data StreamingAPI
    StreamingAPI -> Constr
    StreamingAPI -> DataType
    (forall b. Data b => b -> b) -> StreamingAPI -> StreamingAPI
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> StreamingAPI -> u
    forall u. (forall d. Data d => d -> u) -> StreamingAPI -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> StreamingAPI -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> StreamingAPI -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> StreamingAPI -> m StreamingAPI
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> StreamingAPI -> m StreamingAPI
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c StreamingAPI
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> StreamingAPI -> c StreamingAPI
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c StreamingAPI)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c StreamingAPI)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> StreamingAPI -> c StreamingAPI
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> StreamingAPI -> c StreamingAPI
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c StreamingAPI
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c StreamingAPI
    $ctoConstr :: StreamingAPI -> Constr
    toConstr :: StreamingAPI -> Constr
    $cdataTypeOf :: StreamingAPI -> DataType
    dataTypeOf :: StreamingAPI -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c StreamingAPI)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c StreamingAPI)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c StreamingAPI)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c StreamingAPI)
    $cgmapT :: (forall b. Data b => b -> b) -> StreamingAPI -> StreamingAPI
    gmapT :: (forall b. Data b => b -> b) -> StreamingAPI -> StreamingAPI
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> StreamingAPI -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> StreamingAPI -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> StreamingAPI -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> StreamingAPI -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> StreamingAPI -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> StreamingAPI -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> StreamingAPI -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> StreamingAPI -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> StreamingAPI -> m StreamingAPI
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> StreamingAPI -> m StreamingAPI
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> StreamingAPI -> m StreamingAPI
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> StreamingAPI -> m StreamingAPI
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> StreamingAPI -> m StreamingAPI
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> StreamingAPI -> m StreamingAPI
    Data, Typeable, (forall x. StreamingAPI -> Rep StreamingAPI x)
    -> (forall x. Rep StreamingAPI x -> StreamingAPI)
    -> Generic StreamingAPI
    forall x. Rep StreamingAPI x -> StreamingAPI
    forall x. StreamingAPI -> Rep StreamingAPI x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. StreamingAPI -> Rep StreamingAPI x
    from :: forall x. StreamingAPI -> Rep StreamingAPI x
    $cto :: forall x. Rep StreamingAPI x -> StreamingAPI
    to :: forall x. Rep StreamingAPI x -> StreamingAPI
    Generic)

    checkError :: Object -> Parser ()
    checkError :: Object -> Parser ()
    checkError Object
    o = do
        err <- Object
    o Object -> Key -> Parser (Maybe String)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "error"
        case err of
            Just String
    msg -> String -> Parser ()
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail String
    msg
            Maybe String
    Nothing -> () -> Parser ()
    forall a. a -> Parser a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    twitterTimeFormat :: String
    twitterTimeFormat :: String
    twitterTimeFormat = String
    "%a %b %d %T %z %Y"

    instance FromJSON TwitterTime where
        parseJSON :: Value -> Parser TwitterTime
    parseJSON = String
    -> (Text -> Parser TwitterTime) -> Value -> Parser TwitterTime
    forall a. String -> (Text -> Parser a) -> Value -> Parser a
    withText String
    "TwitterTime" ((Text -> Parser TwitterTime) -> Value -> Parser TwitterTime)
    -> (Text -> Parser TwitterTime) -> Value -> Parser TwitterTime
    forall a b. (a -> b) -> a -> b
    $ \Text
    t ->
            case Bool -> TimeLocale -> String -> String -> Maybe UTCTime
    forall (m :: * -> *) t.
    (MonadFail m, ParseTime t) =>
    Bool -> TimeLocale -> String -> String -> m t
    parseTimeM Bool
    True TimeLocale
    defaultTimeLocale String
    twitterTimeFormat (Text -> String
    unpack Text
    t) of
                Just UTCTime
    d -> TwitterTime -> Parser TwitterTime
    forall a. a -> Parser a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (TwitterTime -> Parser TwitterTime)
    -> TwitterTime -> Parser TwitterTime
    forall a b. (a -> b) -> a -> b
    $ UTCTime -> TwitterTime
    TwitterTime UTCTime
    d
                Maybe UTCTime
    Nothing -> String -> Parser TwitterTime
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser TwitterTime) -> String -> Parser TwitterTime
    forall a b. (a -> b) -> a -> b
    $ String
    "Could not parse twitter time. Text was: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Text -> String
    unpack Text
    t

    instance ToJSON TwitterTime where
        toJSON :: TwitterTime -> Value
    toJSON TwitterTime
    t = Text -> Value
    String (Text -> Value) -> Text -> Value
    forall a b. (a -> b) -> a -> b
    $ String -> Text
    pack (String -> Text) -> String -> Text
    forall a b. (a -> b) -> a -> b
    $ TimeLocale -> String -> UTCTime -> String
    forall t. FormatTime t => TimeLocale -> String -> t -> String
    formatTime TimeLocale
    defaultTimeLocale String
    twitterTimeFormat (UTCTime -> String) -> UTCTime -> String
    forall a b. (a -> b) -> a -> b
    $ TwitterTime -> UTCTime
    fromTwitterTime TwitterTime
    t

    instance FromJSON StreamingAPI where
        parseJSON :: Value -> Parser StreamingAPI
    parseJSON v :: Value
    v@(Object Object
    o) =
            RetweetedStatus -> StreamingAPI
    SRetweetedStatus (RetweetedStatus -> StreamingAPI)
    -> Parser RetweetedStatus -> Parser StreamingAPI
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Parser RetweetedStatus
    forall a. FromJSON a => Parser a
    js
                Parser StreamingAPI -> Parser StreamingAPI -> Parser StreamingAPI
    forall a. Parser a -> Parser a -> Parser a
    forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
    <|> Status -> StreamingAPI
    SStatus (Status -> StreamingAPI) -> Parser Status -> Parser StreamingAPI
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Parser Status
    forall a. FromJSON a => Parser a
    js
                Parser StreamingAPI -> Parser StreamingAPI -> Parser StreamingAPI
    forall a. Parser a -> Parser a -> Parser a
    forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
    <|> Event -> StreamingAPI
    SEvent (Event -> StreamingAPI) -> Parser Event -> Parser StreamingAPI
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Parser Event
    forall a. FromJSON a => Parser a
    js
                Parser StreamingAPI -> Parser StreamingAPI -> Parser StreamingAPI
    forall a. Parser a -> Parser a -> Parser a
    forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
    <|> Delete -> StreamingAPI
    SDelete (Delete -> StreamingAPI) -> Parser Delete -> Parser StreamingAPI
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Parser Delete
    forall a. FromJSON a => Parser a
    js
                Parser StreamingAPI -> Parser StreamingAPI -> Parser StreamingAPI
    forall a. Parser a -> Parser a -> Parser a
    forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
    <|> Friends -> StreamingAPI
    SFriends (Friends -> StreamingAPI) -> Parser Friends -> Parser StreamingAPI
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (Object
    o Object -> Key -> Parser Friends
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "friends")
                Parser StreamingAPI -> Parser StreamingAPI -> Parser StreamingAPI
    forall a. Parser a -> Parser a -> Parser a
    forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
    <|> DirectMessage -> StreamingAPI
    SDirectMessage (DirectMessage -> StreamingAPI)
    -> Parser DirectMessage -> Parser StreamingAPI
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (Object
    o Object -> Key -> Parser DirectMessage
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "direct_message")
                Parser StreamingAPI -> Parser StreamingAPI -> Parser StreamingAPI
    forall a. Parser a -> Parser a -> Parser a
    forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
    <|> StreamingAPI -> Parser StreamingAPI
    forall a. a -> Parser a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (Value -> StreamingAPI
    SUnknown Value
    v)
          where
            js :: FromJSON a => Parser a
            js :: forall a. FromJSON a => Parser a
    js = Value -> Parser a
    forall a. FromJSON a => Value -> Parser a
    parseJSON Value
    v
        parseJSON Value
    v = String -> Parser StreamingAPI
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser StreamingAPI) -> String -> Parser StreamingAPI
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse StreamingAPI from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON StreamingAPI where
        toJSON :: StreamingAPI -> Value
    toJSON (SStatus Status
    s) = Status -> Value
    forall a. ToJSON a => a -> Value
    toJSON Status
    s
        toJSON (SRetweetedStatus RetweetedStatus
    s) = RetweetedStatus -> Value
    forall a. ToJSON a => a -> Value
    toJSON RetweetedStatus
    s
        toJSON (SEvent Event
    e) = Event -> Value
    forall a. ToJSON a => a -> Value
    toJSON Event
    e
        toJSON (SDelete Delete
    d) = Delete -> Value
    forall a. ToJSON a => a -> Value
    toJSON Delete
    d
        toJSON (SFriends Friends
    f) = Friends -> Value
    forall a. ToJSON a => a -> Value
    toJSON Friends
    f
        toJSON (SDirectMessage DirectMessage
    m) = DirectMessage -> Value
    forall a. ToJSON a => a -> Value
    toJSON DirectMessage
    m
        toJSON (SUnknown Value
    v) = Value
    v

    -- | This type represents a Twitter tweet structure.
    -- See <https://dev.twitter.com/docs/platform-objects/tweets>.
    data Status = Status
        { Status -> Maybe [Contributor]
    statusContributors :: Maybe [Contributor]
        , Status -> Maybe Coordinates
    statusCoordinates :: Maybe Coordinates
        , Status -> UTCTime
    statusCreatedAt :: UTCTime
        , Status -> Maybe Integer
    statusCurrentUserRetweet :: Maybe StatusId
        , Status -> Maybe Entities
    statusEntities :: Maybe Entities
        , Status -> Maybe ExtendedEntities
    statusExtendedEntities :: Maybe ExtendedEntities
        , Status -> Integer
    statusFavoriteCount :: Integer
        , Status -> Maybe Bool
    statusFavorited :: Maybe Bool
        , Status -> Maybe Text
    statusFilterLevel :: Maybe Text
        , Status -> Integer
    statusId :: StatusId
        , Status -> Maybe Text
    statusInReplyToScreenName :: Maybe Text
        , Status -> Maybe Integer
    statusInReplyToStatusId :: Maybe StatusId
        , Status -> Maybe Integer
    statusInReplyToUserId :: Maybe UserId
        , Status -> Maybe String
    statusLang :: Maybe LanguageCode
        , Status -> Maybe Place
    statusPlace :: Maybe Place
        , Status -> Maybe Bool
    statusPossiblySensitive :: Maybe Bool
        , Status -> Maybe Object
    statusScopes :: Maybe Object
        , Status -> Maybe Integer
    statusQuotedStatusId :: Maybe StatusId
        , Status -> Maybe Status
    statusQuotedStatus :: Maybe Status
        , Status -> Integer
    statusRetweetCount :: Integer
        , Status -> Maybe Bool
    statusRetweeted :: Maybe Bool
        , Status -> Maybe Status
    statusRetweetedStatus :: Maybe Status
        , Status -> Text
    statusSource :: Text
        , Status -> Text
    statusText :: Text
        , Status -> Bool
    statusTruncated :: Bool
        , Status -> User
    statusUser :: User
        , Status -> Maybe Bool
    statusWithheldCopyright :: Maybe Bool
        , Status -> Maybe [Text]
    statusWithheldInCountries :: Maybe [Text]
        , Status -> Maybe Text
    statusWithheldScope :: Maybe Text
        , Status -> Maybe DisplayTextRange
    statusDisplayTextRange :: Maybe DisplayTextRange
        }
        deriving (Int -> Status -> ShowS
    [Status] -> ShowS
    Status -> String
    (Int -> Status -> ShowS)
    -> (Status -> String) -> ([Status] -> ShowS) -> Show Status
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Status -> ShowS
    showsPrec :: Int -> Status -> ShowS
    $cshow :: Status -> String
    show :: Status -> String
    $cshowList :: [Status] -> ShowS
    showList :: [Status] -> ShowS
    Show, Status -> Status -> Bool
    (Status -> Status -> Bool)
    -> (Status -> Status -> Bool) -> Eq Status
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Status -> Status -> Bool
    == :: Status -> Status -> Bool
    $c/= :: Status -> Status -> Bool
    /= :: Status -> Status -> Bool
    Eq, Typeable Status
    Typeable Status =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> Status -> c Status)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c Status)
    -> (Status -> Constr)
    -> (Status -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c Status))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Status))
    -> ((forall b. Data b => b -> b) -> Status -> Status)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> Status -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> Status -> r)
    -> (forall u. (forall d. Data d => d -> u) -> Status -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> Status -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> Status -> m Status)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Status -> m Status)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Status -> m Status)
    -> Data Status
    Status -> Constr
    Status -> DataType
    (forall b. Data b => b -> b) -> Status -> Status
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> Status -> u
    forall u. (forall d. Data d => d -> u) -> Status -> [u]
    forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Status -> r
    forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Status -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Status -> m Status
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Status -> m Status
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Status
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Status -> c Status
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Status)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Status)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Status -> c Status
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Status -> c Status
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Status
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Status
    $ctoConstr :: Status -> Constr
    toConstr :: Status -> Constr
    $cdataTypeOf :: Status -> DataType
    dataTypeOf :: Status -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Status)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Status)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Status)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Status)
    $cgmapT :: (forall b. Data b => b -> b) -> Status -> Status
    gmapT :: (forall b. Data b => b -> b) -> Status -> Status
    $cgmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Status -> r
    gmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Status -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Status -> r
    gmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Status -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> Status -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> Status -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Status -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Status -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Status -> m Status
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Status -> m Status
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Status -> m Status
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Status -> m Status
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Status -> m Status
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Status -> m Status
    Data, Typeable, (forall x. Status -> Rep Status x)
    -> (forall x. Rep Status x -> Status) -> Generic Status
    forall x. Rep Status x -> Status
    forall x. Status -> Rep Status x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. Status -> Rep Status x
    from :: forall x. Status -> Rep Status x
    $cto :: forall x. Rep Status x -> Status
    to :: forall x. Rep Status x -> Status
    Generic)

    instance FromJSON Status where
        parseJSON :: Value -> Parser Status
    parseJSON (Object Object
    o) =
            Object -> Parser ()
    checkError Object
    o
                Parser () -> Parser Status -> Parser Status
    forall a b. Parser a -> Parser b -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    >> Maybe [Contributor]
    -> Maybe Coordinates
    -> UTCTime
    -> Maybe Integer
    -> Maybe Entities
    -> Maybe ExtendedEntities
    -> Integer
    -> Maybe Bool
    -> Maybe Text
    -> Integer
    -> Maybe Text
    -> Maybe Integer
    -> Maybe Integer
    -> Maybe String
    -> Maybe Place
    -> Maybe Bool
    -> Maybe Object
    -> Maybe Integer
    -> Maybe Status
    -> Integer
    -> Maybe Bool
    -> Maybe Status
    -> Text
    -> Text
    -> Bool
    -> User
    -> Maybe Bool
    -> Maybe [Text]
    -> Maybe Text
    -> Maybe DisplayTextRange
    -> Status
    Status (Maybe [Contributor]
     -> Maybe Coordinates
     -> UTCTime
     -> Maybe Integer
     -> Maybe Entities
     -> Maybe ExtendedEntities
     -> Integer
     -> Maybe Bool
     -> Maybe Text
     -> Integer
     -> Maybe Text
     -> Maybe Integer
     -> Maybe Integer
     -> Maybe String
     -> Maybe Place
     -> Maybe Bool
     -> Maybe Object
     -> Maybe Integer
     -> Maybe Status
     -> Integer
     -> Maybe Bool
     -> Maybe Status
     -> Text
     -> Text
     -> Bool
     -> User
     -> Maybe Bool
     -> Maybe [Text]
     -> Maybe Text
     -> Maybe DisplayTextRange
     -> Status)
    -> Parser (Maybe [Contributor])
    -> Parser
         (Maybe Coordinates
          -> UTCTime
          -> Maybe Integer
          -> Maybe Entities
          -> Maybe ExtendedEntities
          -> Integer
          -> Maybe Bool
          -> Maybe Text
          -> Integer
          -> Maybe Text
          -> Maybe Integer
          -> Maybe Integer
          -> Maybe String
          -> Maybe Place
          -> Maybe Bool
          -> Maybe Object
          -> Maybe Integer
          -> Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser (Maybe (Maybe [Contributor]))
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "contributors" Parser (Maybe (Maybe [Contributor]))
    -> Maybe [Contributor] -> Parser (Maybe [Contributor])
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= Maybe [Contributor]
    forall a. Maybe a
    Nothing
                Parser
      (Maybe Coordinates
       -> UTCTime
       -> Maybe Integer
       -> Maybe Entities
       -> Maybe ExtendedEntities
       -> Integer
       -> Maybe Bool
       -> Maybe Text
       -> Integer
       -> Maybe Text
       -> Maybe Integer
       -> Maybe Integer
       -> Maybe String
       -> Maybe Place
       -> Maybe Bool
       -> Maybe Object
       -> Maybe Integer
       -> Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser (Maybe Coordinates)
    -> Parser
         (UTCTime
          -> Maybe Integer
          -> Maybe Entities
          -> Maybe ExtendedEntities
          -> Integer
          -> Maybe Bool
          -> Maybe Text
          -> Integer
          -> Maybe Text
          -> Maybe Integer
          -> Maybe Integer
          -> Maybe String
          -> Maybe Place
          -> Maybe Bool
          -> Maybe Object
          -> Maybe Integer
          -> Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe (Maybe Coordinates))
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "coordinates" Parser (Maybe (Maybe Coordinates))
    -> Maybe Coordinates -> Parser (Maybe Coordinates)
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= Maybe Coordinates
    forall a. Maybe a
    Nothing
                Parser
      (UTCTime
       -> Maybe Integer
       -> Maybe Entities
       -> Maybe ExtendedEntities
       -> Integer
       -> Maybe Bool
       -> Maybe Text
       -> Integer
       -> Maybe Text
       -> Maybe Integer
       -> Maybe Integer
       -> Maybe String
       -> Maybe Place
       -> Maybe Bool
       -> Maybe Object
       -> Maybe Integer
       -> Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser UTCTime
    -> Parser
         (Maybe Integer
          -> Maybe Entities
          -> Maybe ExtendedEntities
          -> Integer
          -> Maybe Bool
          -> Maybe Text
          -> Integer
          -> Maybe Text
          -> Maybe Integer
          -> Maybe Integer
          -> Maybe String
          -> Maybe Place
          -> Maybe Bool
          -> Maybe Object
          -> Maybe Integer
          -> Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> (Object
    o Object -> Key -> Parser TwitterTime
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "created_at" Parser TwitterTime
    -> (TwitterTime -> Parser UTCTime) -> Parser UTCTime
    forall a b. Parser a -> (a -> Parser b) -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= UTCTime -> Parser UTCTime
    forall a. a -> Parser a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (UTCTime -> Parser UTCTime)
    -> (TwitterTime -> UTCTime) -> TwitterTime -> Parser UTCTime
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . TwitterTime -> UTCTime
    fromTwitterTime)
                Parser
      (Maybe Integer
       -> Maybe Entities
       -> Maybe ExtendedEntities
       -> Integer
       -> Maybe Bool
       -> Maybe Text
       -> Integer
       -> Maybe Text
       -> Maybe Integer
       -> Maybe Integer
       -> Maybe String
       -> Maybe Place
       -> Maybe Bool
       -> Maybe Object
       -> Maybe Integer
       -> Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser (Maybe Integer)
    -> Parser
         (Maybe Entities
          -> Maybe ExtendedEntities
          -> Integer
          -> Maybe Bool
          -> Maybe Text
          -> Integer
          -> Maybe Text
          -> Maybe Integer
          -> Maybe Integer
          -> Maybe String
          -> Maybe Place
          -> Maybe Bool
          -> Maybe Object
          -> Maybe Integer
          -> Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> ((Object
    o Object -> Key -> Parser Object
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "current_user_retweet" Parser Object
    -> (Object -> Parser (Maybe Integer)) -> Parser (Maybe Integer)
    forall a b. Parser a -> (a -> Parser b) -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= (Object -> Key -> Parser (Maybe Integer)
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "id")) Parser (Maybe Integer)
    -> Parser (Maybe Integer) -> Parser (Maybe Integer)
    forall a. Parser a -> Parser a -> Parser a
    forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
    <|> Maybe Integer -> Parser (Maybe Integer)
    forall a. a -> Parser a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Maybe Integer
    forall a. Maybe a
    Nothing)
                Parser
      (Maybe Entities
       -> Maybe ExtendedEntities
       -> Integer
       -> Maybe Bool
       -> Maybe Text
       -> Integer
       -> Maybe Text
       -> Maybe Integer
       -> Maybe Integer
       -> Maybe String
       -> Maybe Place
       -> Maybe Bool
       -> Maybe Object
       -> Maybe Integer
       -> Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser (Maybe Entities)
    -> Parser
         (Maybe ExtendedEntities
          -> Integer
          -> Maybe Bool
          -> Maybe Text
          -> Integer
          -> Maybe Text
          -> Maybe Integer
          -> Maybe Integer
          -> Maybe String
          -> Maybe Place
          -> Maybe Bool
          -> Maybe Object
          -> Maybe Integer
          -> Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Entities)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "entities"
                Parser
      (Maybe ExtendedEntities
       -> Integer
       -> Maybe Bool
       -> Maybe Text
       -> Integer
       -> Maybe Text
       -> Maybe Integer
       -> Maybe Integer
       -> Maybe String
       -> Maybe Place
       -> Maybe Bool
       -> Maybe Object
       -> Maybe Integer
       -> Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser (Maybe ExtendedEntities)
    -> Parser
         (Integer
          -> Maybe Bool
          -> Maybe Text
          -> Integer
          -> Maybe Text
          -> Maybe Integer
          -> Maybe Integer
          -> Maybe String
          -> Maybe Place
          -> Maybe Bool
          -> Maybe Object
          -> Maybe Integer
          -> Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe ExtendedEntities)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "extended_entities"
                Parser
      (Integer
       -> Maybe Bool
       -> Maybe Text
       -> Integer
       -> Maybe Text
       -> Maybe Integer
       -> Maybe Integer
       -> Maybe String
       -> Maybe Place
       -> Maybe Bool
       -> Maybe Object
       -> Maybe Integer
       -> Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser Integer
    -> Parser
         (Maybe Bool
          -> Maybe Text
          -> Integer
          -> Maybe Text
          -> Maybe Integer
          -> Maybe Integer
          -> Maybe String
          -> Maybe Place
          -> Maybe Bool
          -> Maybe Object
          -> Maybe Integer
          -> Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Integer)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "favorite_count" Parser (Maybe Integer) -> Integer -> Parser Integer
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= Integer
    0
                Parser
      (Maybe Bool
       -> Maybe Text
       -> Integer
       -> Maybe Text
       -> Maybe Integer
       -> Maybe Integer
       -> Maybe String
       -> Maybe Place
       -> Maybe Bool
       -> Maybe Object
       -> Maybe Integer
       -> Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser (Maybe Bool)
    -> Parser
         (Maybe Text
          -> Integer
          -> Maybe Text
          -> Maybe Integer
          -> Maybe Integer
          -> Maybe String
          -> Maybe Place
          -> Maybe Bool
          -> Maybe Object
          -> Maybe Integer
          -> Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Bool)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "favorited"
                Parser
      (Maybe Text
       -> Integer
       -> Maybe Text
       -> Maybe Integer
       -> Maybe Integer
       -> Maybe String
       -> Maybe Place
       -> Maybe Bool
       -> Maybe Object
       -> Maybe Integer
       -> Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser (Maybe Text)
    -> Parser
         (Integer
          -> Maybe Text
          -> Maybe Integer
          -> Maybe Integer
          -> Maybe String
          -> Maybe Place
          -> Maybe Bool
          -> Maybe Object
          -> Maybe Integer
          -> Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Text)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "filter_level"
                Parser
      (Integer
       -> Maybe Text
       -> Maybe Integer
       -> Maybe Integer
       -> Maybe String
       -> Maybe Place
       -> Maybe Bool
       -> Maybe Object
       -> Maybe Integer
       -> Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser Integer
    -> Parser
         (Maybe Text
          -> Maybe Integer
          -> Maybe Integer
          -> Maybe String
          -> Maybe Place
          -> Maybe Bool
          -> Maybe Object
          -> Maybe Integer
          -> Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Integer
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "id"
                Parser
      (Maybe Text
       -> Maybe Integer
       -> Maybe Integer
       -> Maybe String
       -> Maybe Place
       -> Maybe Bool
       -> Maybe Object
       -> Maybe Integer
       -> Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser (Maybe Text)
    -> Parser
         (Maybe Integer
          -> Maybe Integer
          -> Maybe String
          -> Maybe Place
          -> Maybe Bool
          -> Maybe Object
          -> Maybe Integer
          -> Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe (Maybe Text))
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "in_reply_to_screen_name" Parser (Maybe (Maybe Text)) -> Maybe Text -> Parser (Maybe Text)
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= Maybe Text
    forall a. Maybe a
    Nothing
                Parser
      (Maybe Integer
       -> Maybe Integer
       -> Maybe String
       -> Maybe Place
       -> Maybe Bool
       -> Maybe Object
       -> Maybe Integer
       -> Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser (Maybe Integer)
    -> Parser
         (Maybe Integer
          -> Maybe String
          -> Maybe Place
          -> Maybe Bool
          -> Maybe Object
          -> Maybe Integer
          -> Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe (Maybe Integer))
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "in_reply_to_status_id" Parser (Maybe (Maybe Integer))
    -> Maybe Integer -> Parser (Maybe Integer)
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= Maybe Integer
    forall a. Maybe a
    Nothing
                Parser
      (Maybe Integer
       -> Maybe String
       -> Maybe Place
       -> Maybe Bool
       -> Maybe Object
       -> Maybe Integer
       -> Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser (Maybe Integer)
    -> Parser
         (Maybe String
          -> Maybe Place
          -> Maybe Bool
          -> Maybe Object
          -> Maybe Integer
          -> Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe (Maybe Integer))
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "in_reply_to_user_id" Parser (Maybe (Maybe Integer))
    -> Maybe Integer -> Parser (Maybe Integer)
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= Maybe Integer
    forall a. Maybe a
    Nothing
                Parser
      (Maybe String
       -> Maybe Place
       -> Maybe Bool
       -> Maybe Object
       -> Maybe Integer
       -> Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser (Maybe String)
    -> Parser
         (Maybe Place
          -> Maybe Bool
          -> Maybe Object
          -> Maybe Integer
          -> Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe String)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "lang"
                Parser
      (Maybe Place
       -> Maybe Bool
       -> Maybe Object
       -> Maybe Integer
       -> Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser (Maybe Place)
    -> Parser
         (Maybe Bool
          -> Maybe Object
          -> Maybe Integer
          -> Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe (Maybe Place))
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "place" Parser (Maybe (Maybe Place)) -> Maybe Place -> Parser (Maybe Place)
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= Maybe Place
    forall a. Maybe a
    Nothing
                Parser
      (Maybe Bool
       -> Maybe Object
       -> Maybe Integer
       -> Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser (Maybe Bool)
    -> Parser
         (Maybe Object
          -> Maybe Integer
          -> Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Bool)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "possibly_sensitive"
                Parser
      (Maybe Object
       -> Maybe Integer
       -> Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser (Maybe Object)
    -> Parser
         (Maybe Integer
          -> Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Object)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "scopes"
                Parser
      (Maybe Integer
       -> Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser (Maybe Integer)
    -> Parser
         (Maybe Status
          -> Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Integer)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "quoted_status_id"
                Parser
      (Maybe Status
       -> Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser (Maybe Status)
    -> Parser
         (Integer
          -> Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Status)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "quoted_status"
                Parser
      (Integer
       -> Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser Integer
    -> Parser
         (Maybe Bool
          -> Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Integer)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "retweet_count" Parser (Maybe Integer) -> Integer -> Parser Integer
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= Integer
    0
                Parser
      (Maybe Bool
       -> Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser (Maybe Bool)
    -> Parser
         (Maybe Status
          -> Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Bool)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "retweeted"
                Parser
      (Maybe Status
       -> Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser (Maybe Status)
    -> Parser
         (Text
          -> Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Status)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "retweeted_status"
                Parser
      (Text
       -> Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser Text
    -> Parser
         (Text
          -> Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "source"
                Parser
      (Text
       -> Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser Text
    -> Parser
         (Bool
          -> User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> (Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "full_text" Parser Text -> Parser Text -> Parser Text
    forall a. Parser a -> Parser a -> Parser a
    forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
    <|> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "text")
                Parser
      (Bool
       -> User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser Bool
    -> Parser
         (User
          -> Maybe Bool
          -> Maybe [Text]
          -> Maybe Text
          -> Maybe DisplayTextRange
          -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Bool
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "truncated"
                Parser
      (User
       -> Maybe Bool
       -> Maybe [Text]
       -> Maybe Text
       -> Maybe DisplayTextRange
       -> Status)
    -> Parser User
    -> Parser
         (Maybe Bool
          -> Maybe [Text] -> Maybe Text -> Maybe DisplayTextRange -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser User
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "user"
                Parser
      (Maybe Bool
       -> Maybe [Text] -> Maybe Text -> Maybe DisplayTextRange -> Status)
    -> Parser (Maybe Bool)
    -> Parser
         (Maybe [Text] -> Maybe Text -> Maybe DisplayTextRange -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Bool)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "withheld_copyright"
                Parser
      (Maybe [Text] -> Maybe Text -> Maybe DisplayTextRange -> Status)
    -> Parser (Maybe [Text])
    -> Parser (Maybe Text -> Maybe DisplayTextRange -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe [Text])
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "withheld_in_countries"
                Parser (Maybe Text -> Maybe DisplayTextRange -> Status)
    -> Parser (Maybe Text) -> Parser (Maybe DisplayTextRange -> Status)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Text)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "withheld_scope"
                Parser (Maybe DisplayTextRange -> Status)
    -> Parser (Maybe DisplayTextRange) -> Parser Status
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe DisplayTextRange)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "display_text_range"
        parseJSON Value
    v = String -> Parser Status
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser Status) -> String -> Parser Status
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse status from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON Status where
        toJSON :: Status -> Value
    toJSON Status {Bool
    Integer
    Maybe Bool
    Maybe Integer
    Maybe String
    Maybe [Text]
    Maybe [Contributor]
    Maybe Object
    Maybe Text
    Maybe DisplayTextRange
    Maybe ExtendedEntities
    Maybe Entities
    Maybe Place
    Maybe Coordinates
    Maybe Status
    Text
    UTCTime
    User
    statusContributors :: Status -> Maybe [Contributor]
    statusCoordinates :: Status -> Maybe Coordinates
    statusCreatedAt :: Status -> UTCTime
    statusCurrentUserRetweet :: Status -> Maybe Integer
    statusEntities :: Status -> Maybe Entities
    statusExtendedEntities :: Status -> Maybe ExtendedEntities
    statusFavoriteCount :: Status -> Integer
    statusFavorited :: Status -> Maybe Bool
    statusFilterLevel :: Status -> Maybe Text
    statusId :: Status -> Integer
    statusInReplyToScreenName :: Status -> Maybe Text
    statusInReplyToStatusId :: Status -> Maybe Integer
    statusInReplyToUserId :: Status -> Maybe Integer
    statusLang :: Status -> Maybe String
    statusPlace :: Status -> Maybe Place
    statusPossiblySensitive :: Status -> Maybe Bool
    statusScopes :: Status -> Maybe Object
    statusQuotedStatusId :: Status -> Maybe Integer
    statusQuotedStatus :: Status -> Maybe Status
    statusRetweetCount :: Status -> Integer
    statusRetweeted :: Status -> Maybe Bool
    statusRetweetedStatus :: Status -> Maybe Status
    statusSource :: Status -> Text
    statusText :: Status -> Text
    statusTruncated :: Status -> Bool
    statusUser :: Status -> User
    statusWithheldCopyright :: Status -> Maybe Bool
    statusWithheldInCountries :: Status -> Maybe [Text]
    statusWithheldScope :: Status -> Maybe Text
    statusDisplayTextRange :: Status -> Maybe DisplayTextRange
    statusContributors :: Maybe [Contributor]
    statusCoordinates :: Maybe Coordinates
    statusCreatedAt :: UTCTime
    statusCurrentUserRetweet :: Maybe Integer
    statusEntities :: Maybe Entities
    statusExtendedEntities :: Maybe ExtendedEntities
    statusFavoriteCount :: Integer
    statusFavorited :: Maybe Bool
    statusFilterLevel :: Maybe Text
    statusId :: Integer
    statusInReplyToScreenName :: Maybe Text
    statusInReplyToStatusId :: Maybe Integer
    statusInReplyToUserId :: Maybe Integer
    statusLang :: Maybe String
    statusPlace :: Maybe Place
    statusPossiblySensitive :: Maybe Bool
    statusScopes :: Maybe Object
    statusQuotedStatusId :: Maybe Integer
    statusQuotedStatus :: Maybe Status
    statusRetweetCount :: Integer
    statusRetweeted :: Maybe Bool
    statusRetweetedStatus :: Maybe Status
    statusSource :: Text
    statusText :: Text
    statusTruncated :: Bool
    statusUser :: User
    statusWithheldCopyright :: Maybe Bool
    statusWithheldInCountries :: Maybe [Text]
    statusWithheldScope :: Maybe Text
    statusDisplayTextRange :: Maybe DisplayTextRange
    ..} =
            [Pair] -> Value
    object
                [ Key
    "contributors" Key -> Maybe [Contributor] -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe [Contributor]
    statusContributors
                , Key
    "coordinates" Key -> Maybe Coordinates -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Coordinates
    statusCoordinates
                , Key
    "created_at" Key -> TwitterTime -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= UTCTime -> TwitterTime
    TwitterTime UTCTime
    statusCreatedAt
                , Key
    "current_user_retweet"
                    Key -> Value -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= [Pair] -> Value
    object
                        [ Key
    "id" Key -> Maybe Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Integer
    statusCurrentUserRetweet
                        , Key
    "id_str" Key -> String -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Integer -> String
    forall a. Show a => a -> String
    show Maybe Integer
    statusCurrentUserRetweet
                        ]
                , Key
    "entities" Key -> Maybe Entities -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Entities
    statusEntities
                , Key
    "extended_entities" Key -> Maybe ExtendedEntities -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe ExtendedEntities
    statusExtendedEntities
                , Key
    "favorite_count" Key -> Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer
    statusFavoriteCount
                , Key
    "favorited" Key -> Maybe Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Bool
    statusFavorited
                , Key
    "filter_level" Key -> Maybe Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Text
    statusFilterLevel
                , Key
    "id" Key -> Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer
    statusId
                , Key
    "in_reply_to_screen_name" Key -> Maybe Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Text
    statusInReplyToScreenName
                , Key
    "in_reply_to_status_id" Key -> Maybe Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Integer
    statusInReplyToStatusId
                , Key
    "in_reply_to_user_id" Key -> Maybe Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Integer
    statusInReplyToUserId
                , Key
    "lang" Key -> Maybe String -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe String
    statusLang
                , Key
    "place" Key -> Maybe Place -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Place
    statusPlace
                , Key
    "possibly_sensitive" Key -> Maybe Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Bool
    statusPossiblySensitive
                , Key
    "scopes" Key -> Maybe Object -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Object
    statusScopes
                , Key
    "quoted_status_id" Key -> Maybe Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Integer
    statusQuotedStatusId
                , Key
    "quoted_status" Key -> Maybe Status -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Status
    statusQuotedStatus
                , Key
    "retweet_count" Key -> Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer
    statusRetweetCount
                , Key
    "retweeted" Key -> Maybe Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Bool
    statusRetweeted
                , Key
    "retweeted_status" Key -> Maybe Status -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Status
    statusRetweetedStatus
                , Key
    "source" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    statusSource
                , Key
    "text" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    statusText
                , Key
    "truncated" Key -> Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Bool
    statusTruncated
                , Key
    "user" Key -> User -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= User
    statusUser
                , Key
    "withheld_copyright" Key -> Maybe Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Bool
    statusWithheldCopyright
                , Key
    "withheld_in_countries" Key -> Maybe [Text] -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe [Text]
    statusWithheldInCountries
                , Key
    "withheld_scope" Key -> Maybe Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Text
    statusWithheldScope
                , Key
    "display_text_range" Key -> Maybe DisplayTextRange -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe DisplayTextRange
    statusDisplayTextRange
                ]

    data SearchResult body = SearchResult
        { forall body. SearchResult body -> body
    searchResultStatuses :: body
        , forall body. SearchResult body -> SearchMetadata
    searchResultSearchMetadata :: SearchMetadata
        }
        deriving (Int -> SearchResult body -> ShowS
    [SearchResult body] -> ShowS
    SearchResult body -> String
    (Int -> SearchResult body -> ShowS)
    -> (SearchResult body -> String)
    -> ([SearchResult body] -> ShowS)
    -> Show (SearchResult body)
    forall body. Show body => Int -> SearchResult body -> ShowS
    forall body. Show body => [SearchResult body] -> ShowS
    forall body. Show body => SearchResult body -> String
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: forall body. Show body => Int -> SearchResult body -> ShowS
    showsPrec :: Int -> SearchResult body -> ShowS
    $cshow :: forall body. Show body => SearchResult body -> String
    show :: SearchResult body -> String
    $cshowList :: forall body. Show body => [SearchResult body] -> ShowS
    showList :: [SearchResult body] -> ShowS
    Show, SearchResult body -> SearchResult body -> Bool
    (SearchResult body -> SearchResult body -> Bool)
    -> (SearchResult body -> SearchResult body -> Bool)
    -> Eq (SearchResult body)
    forall body.
    Eq body =>
    SearchResult body -> SearchResult body -> Bool
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: forall body.
    Eq body =>
    SearchResult body -> SearchResult body -> Bool
    == :: SearchResult body -> SearchResult body -> Bool
    $c/= :: forall body.
    Eq body =>
    SearchResult body -> SearchResult body -> Bool
    /= :: SearchResult body -> SearchResult body -> Bool
    Eq, Typeable (SearchResult body)
    Typeable (SearchResult body) =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g)
     -> SearchResult body
     -> c (SearchResult body))
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c (SearchResult body))
    -> (SearchResult body -> Constr)
    -> (SearchResult body -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c (SearchResult body)))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c (SearchResult body)))
    -> ((forall b. Data b => b -> b)
        -> SearchResult body -> SearchResult body)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> SearchResult body -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> SearchResult body -> r)
    -> (forall u.
        (forall d. Data d => d -> u) -> SearchResult body -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> SearchResult body -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d)
        -> SearchResult body -> m (SearchResult body))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> SearchResult body -> m (SearchResult body))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> SearchResult body -> m (SearchResult body))
    -> Data (SearchResult body)
    SearchResult body -> Constr
    SearchResult body -> DataType
    (forall b. Data b => b -> b)
    -> SearchResult body -> SearchResult body
    forall body. Data body => Typeable (SearchResult body)
    forall body. Data body => SearchResult body -> Constr
    forall body. Data body => SearchResult body -> DataType
    forall body.
    Data body =>
    (forall b. Data b => b -> b)
    -> SearchResult body -> SearchResult body
    forall body u.
    Data body =>
    Int -> (forall d. Data d => d -> u) -> SearchResult body -> u
    forall body u.
    Data body =>
    (forall d. Data d => d -> u) -> SearchResult body -> [u]
    forall body r r'.
    Data body =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchResult body -> r
    forall body r r'.
    Data body =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchResult body -> r
    forall body (m :: * -> *).
    (Data body, Monad m) =>
    (forall d. Data d => d -> m d)
    -> SearchResult body -> m (SearchResult body)
    forall body (m :: * -> *).
    (Data body, MonadPlus m) =>
    (forall d. Data d => d -> m d)
    -> SearchResult body -> m (SearchResult body)
    forall body (c :: * -> *).
    Data body =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (SearchResult body)
    forall body (c :: * -> *).
    Data body =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> SearchResult body
    -> c (SearchResult body)
    forall body (t :: * -> *) (c :: * -> *).
    (Data body, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (SearchResult body))
    forall body (t :: * -> * -> *) (c :: * -> *).
    (Data body, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (SearchResult body))
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u.
    Int -> (forall d. Data d => d -> u) -> SearchResult body -> u
    forall u. (forall d. Data d => d -> u) -> SearchResult body -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchResult body -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchResult body -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> SearchResult body -> m (SearchResult body)
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> SearchResult body -> m (SearchResult body)
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (SearchResult body)
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> SearchResult body
    -> c (SearchResult body)
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (SearchResult body))
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (SearchResult body))
    $cgfoldl :: forall body (c :: * -> *).
    Data body =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> SearchResult body
    -> c (SearchResult body)
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> SearchResult body
    -> c (SearchResult body)
    $cgunfold :: forall body (c :: * -> *).
    Data body =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (SearchResult body)
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (SearchResult body)
    $ctoConstr :: forall body. Data body => SearchResult body -> Constr
    toConstr :: SearchResult body -> Constr
    $cdataTypeOf :: forall body. Data body => SearchResult body -> DataType
    dataTypeOf :: SearchResult body -> DataType
    $cdataCast1 :: forall body (t :: * -> *) (c :: * -> *).
    (Data body, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (SearchResult body))
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (SearchResult body))
    $cdataCast2 :: forall body (t :: * -> * -> *) (c :: * -> *).
    (Data body, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (SearchResult body))
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (SearchResult body))
    $cgmapT :: forall body.
    Data body =>
    (forall b. Data b => b -> b)
    -> SearchResult body -> SearchResult body
    gmapT :: (forall b. Data b => b -> b)
    -> SearchResult body -> SearchResult body
    $cgmapQl :: forall body r r'.
    Data body =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchResult body -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchResult body -> r
    $cgmapQr :: forall body r r'.
    Data body =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchResult body -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchResult body -> r
    $cgmapQ :: forall body u.
    Data body =>
    (forall d. Data d => d -> u) -> SearchResult body -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> SearchResult body -> [u]
    $cgmapQi :: forall body u.
    Data body =>
    Int -> (forall d. Data d => d -> u) -> SearchResult body -> u
    gmapQi :: forall u.
    Int -> (forall d. Data d => d -> u) -> SearchResult body -> u
    $cgmapM :: forall body (m :: * -> *).
    (Data body, Monad m) =>
    (forall d. Data d => d -> m d)
    -> SearchResult body -> m (SearchResult body)
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> SearchResult body -> m (SearchResult body)
    $cgmapMp :: forall body (m :: * -> *).
    (Data body, MonadPlus m) =>
    (forall d. Data d => d -> m d)
    -> SearchResult body -> m (SearchResult body)
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> SearchResult body -> m (SearchResult body)
    $cgmapMo :: forall body (m :: * -> *).
    (Data body, MonadPlus m) =>
    (forall d. Data d => d -> m d)
    -> SearchResult body -> m (SearchResult body)
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> SearchResult body -> m (SearchResult body)
    Data, Typeable, (forall x. SearchResult body -> Rep (SearchResult body) x)
    -> (forall x. Rep (SearchResult body) x -> SearchResult body)
    -> Generic (SearchResult body)
    forall x. Rep (SearchResult body) x -> SearchResult body
    forall x. SearchResult body -> Rep (SearchResult body) x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    forall body x. Rep (SearchResult body) x -> SearchResult body
    forall body x. SearchResult body -> Rep (SearchResult body) x
    $cfrom :: forall body x. SearchResult body -> Rep (SearchResult body) x
    from :: forall x. SearchResult body -> Rep (SearchResult body) x
    $cto :: forall body x. Rep (SearchResult body) x -> SearchResult body
    to :: forall x. Rep (SearchResult body) x -> SearchResult body
    Generic)

    instance
        FromJSON body =>
        FromJSON (SearchResult body)
        where
        parseJSON :: Value -> Parser (SearchResult body)
    parseJSON (Object Object
    o) =
            Object -> Parser ()
    checkError Object
    o
                Parser ()
    -> Parser (SearchResult body) -> Parser (SearchResult body)
    forall a b. Parser a -> Parser b -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    >> body -> SearchMetadata -> SearchResult body
    forall body. body -> SearchMetadata -> SearchResult body
    SearchResult (body -> SearchMetadata -> SearchResult body)
    -> Parser body -> Parser (SearchMetadata -> SearchResult body)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser body
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "statuses"
                Parser (SearchMetadata -> SearchResult body)
    -> Parser SearchMetadata -> Parser (SearchResult body)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser SearchMetadata
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "search_metadata"
        parseJSON Value
    v = String -> Parser (SearchResult body)
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser (SearchResult body))
    -> String -> Parser (SearchResult body)
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse search result from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance
        ToJSON body =>
        ToJSON (SearchResult body)
        where
        toJSON :: SearchResult body -> Value
    toJSON SearchResult {body
    SearchMetadata
    searchResultStatuses :: forall body. SearchResult body -> body
    searchResultSearchMetadata :: forall body. SearchResult body -> SearchMetadata
    searchResultStatuses :: body
    searchResultSearchMetadata :: SearchMetadata
    ..} =
            [Pair] -> Value
    object
                [ Key
    "statuses" Key -> body -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= body
    searchResultStatuses
                , Key
    "search_metadata" Key -> SearchMetadata -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= SearchMetadata
    searchResultSearchMetadata
                ]

    data SearchStatus = SearchStatus
        { SearchStatus -> UTCTime
    searchStatusCreatedAt :: UTCTime
        , SearchStatus -> Integer
    searchStatusId :: StatusId
        , SearchStatus -> Text
    searchStatusText :: Text
        , SearchStatus -> Text
    searchStatusSource :: Text
        , SearchStatus -> User
    searchStatusUser :: User
        , SearchStatus -> Maybe Coordinates
    searchStatusCoordinates :: Maybe Coordinates
        }
        deriving (Int -> SearchStatus -> ShowS
    [SearchStatus] -> ShowS
    SearchStatus -> String
    (Int -> SearchStatus -> ShowS)
    -> (SearchStatus -> String)
    -> ([SearchStatus] -> ShowS)
    -> Show SearchStatus
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> SearchStatus -> ShowS
    showsPrec :: Int -> SearchStatus -> ShowS
    $cshow :: SearchStatus -> String
    show :: SearchStatus -> String
    $cshowList :: [SearchStatus] -> ShowS
    showList :: [SearchStatus] -> ShowS
    Show, SearchStatus -> SearchStatus -> Bool
    (SearchStatus -> SearchStatus -> Bool)
    -> (SearchStatus -> SearchStatus -> Bool) -> Eq SearchStatus
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: SearchStatus -> SearchStatus -> Bool
    == :: SearchStatus -> SearchStatus -> Bool
    $c/= :: SearchStatus -> SearchStatus -> Bool
    /= :: SearchStatus -> SearchStatus -> Bool
    Eq, Typeable SearchStatus
    Typeable SearchStatus =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> SearchStatus -> c SearchStatus)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c SearchStatus)
    -> (SearchStatus -> Constr)
    -> (SearchStatus -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c SearchStatus))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c SearchStatus))
    -> ((forall b. Data b => b -> b) -> SearchStatus -> SearchStatus)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> SearchStatus -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> SearchStatus -> r)
    -> (forall u. (forall d. Data d => d -> u) -> SearchStatus -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> SearchStatus -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> SearchStatus -> m SearchStatus)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> SearchStatus -> m SearchStatus)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> SearchStatus -> m SearchStatus)
    -> Data SearchStatus
    SearchStatus -> Constr
    SearchStatus -> DataType
    (forall b. Data b => b -> b) -> SearchStatus -> SearchStatus
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> SearchStatus -> u
    forall u. (forall d. Data d => d -> u) -> SearchStatus -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchStatus -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchStatus -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> SearchStatus -> m SearchStatus
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SearchStatus -> m SearchStatus
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SearchStatus
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> SearchStatus -> c SearchStatus
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SearchStatus)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c SearchStatus)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> SearchStatus -> c SearchStatus
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> SearchStatus -> c SearchStatus
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SearchStatus
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SearchStatus
    $ctoConstr :: SearchStatus -> Constr
    toConstr :: SearchStatus -> Constr
    $cdataTypeOf :: SearchStatus -> DataType
    dataTypeOf :: SearchStatus -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SearchStatus)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SearchStatus)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c SearchStatus)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c SearchStatus)
    $cgmapT :: (forall b. Data b => b -> b) -> SearchStatus -> SearchStatus
    gmapT :: (forall b. Data b => b -> b) -> SearchStatus -> SearchStatus
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchStatus -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchStatus -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchStatus -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchStatus -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> SearchStatus -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> SearchStatus -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SearchStatus -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SearchStatus -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> SearchStatus -> m SearchStatus
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> SearchStatus -> m SearchStatus
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SearchStatus -> m SearchStatus
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SearchStatus -> m SearchStatus
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SearchStatus -> m SearchStatus
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SearchStatus -> m SearchStatus
    Data, Typeable, (forall x. SearchStatus -> Rep SearchStatus x)
    -> (forall x. Rep SearchStatus x -> SearchStatus)
    -> Generic SearchStatus
    forall x. Rep SearchStatus x -> SearchStatus
    forall x. SearchStatus -> Rep SearchStatus x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. SearchStatus -> Rep SearchStatus x
    from :: forall x. SearchStatus -> Rep SearchStatus x
    $cto :: forall x. Rep SearchStatus x -> SearchStatus
    to :: forall x. Rep SearchStatus x -> SearchStatus
    Generic)

    instance FromJSON SearchStatus where
        parseJSON :: Value -> Parser SearchStatus
    parseJSON (Object Object
    o) =
            Object -> Parser ()
    checkError Object
    o
                Parser () -> Parser SearchStatus -> Parser SearchStatus
    forall a b. Parser a -> Parser b -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    >> UTCTime
    -> Integer
    -> Text
    -> Text
    -> User
    -> Maybe Coordinates
    -> SearchStatus
    SearchStatus (UTCTime
     -> Integer
     -> Text
     -> Text
     -> User
     -> Maybe Coordinates
     -> SearchStatus)
    -> Parser UTCTime
    -> Parser
         (Integer
          -> Text -> Text -> User -> Maybe Coordinates -> SearchStatus)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (Object
    o Object -> Key -> Parser TwitterTime
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "created_at" Parser TwitterTime
    -> (TwitterTime -> Parser UTCTime) -> Parser UTCTime
    forall a b. Parser a -> (a -> Parser b) -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= UTCTime -> Parser UTCTime
    forall a. a -> Parser a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (UTCTime -> Parser UTCTime)
    -> (TwitterTime -> UTCTime) -> TwitterTime -> Parser UTCTime
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . TwitterTime -> UTCTime
    fromTwitterTime)
                Parser
      (Integer
       -> Text -> Text -> User -> Maybe Coordinates -> SearchStatus)
    -> Parser Integer
    -> Parser
         (Text -> Text -> User -> Maybe Coordinates -> SearchStatus)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Integer
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "id"
                Parser (Text -> Text -> User -> Maybe Coordinates -> SearchStatus)
    -> Parser Text
    -> Parser (Text -> User -> Maybe Coordinates -> SearchStatus)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "text"
                Parser (Text -> User -> Maybe Coordinates -> SearchStatus)
    -> Parser Text
    -> Parser (User -> Maybe Coordinates -> SearchStatus)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "source"
                Parser (User -> Maybe Coordinates -> SearchStatus)
    -> Parser User -> Parser (Maybe Coordinates -> SearchStatus)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser User
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "user"
                Parser (Maybe Coordinates -> SearchStatus)
    -> Parser (Maybe Coordinates) -> Parser SearchStatus
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Coordinates)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "coordinates"
        parseJSON Value
    v = String -> Parser SearchStatus
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser SearchStatus) -> String -> Parser SearchStatus
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse status search result from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON SearchStatus where
        toJSON :: SearchStatus -> Value
    toJSON SearchStatus {Integer
    Maybe Coordinates
    Text
    UTCTime
    User
    searchStatusCreatedAt :: SearchStatus -> UTCTime
    searchStatusId :: SearchStatus -> Integer
    searchStatusText :: SearchStatus -> Text
    searchStatusSource :: SearchStatus -> Text
    searchStatusUser :: SearchStatus -> User
    searchStatusCoordinates :: SearchStatus -> Maybe Coordinates
    searchStatusCreatedAt :: UTCTime
    searchStatusId :: Integer
    searchStatusText :: Text
    searchStatusSource :: Text
    searchStatusUser :: User
    searchStatusCoordinates :: Maybe Coordinates
    ..} =
            [Pair] -> Value
    object
                [ Key
    "created_at" Key -> TwitterTime -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= UTCTime -> TwitterTime
    TwitterTime UTCTime
    searchStatusCreatedAt
                , Key
    "id" Key -> Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer
    searchStatusId
                , Key
    "text" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    searchStatusText
                , Key
    "source" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    searchStatusSource
                , Key
    "user" Key -> User -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= User
    searchStatusUser
                , Key
    "coordinates" Key -> Maybe Coordinates -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Coordinates
    searchStatusCoordinates
                ]

    data SearchMetadata = SearchMetadata
        { SearchMetadata -> Integer
    searchMetadataMaxId :: StatusId
        , SearchMetadata -> Integer
    searchMetadataSinceId :: StatusId
        , SearchMetadata -> Text
    searchMetadataRefreshURL :: URIString
        , SearchMetadata -> Maybe Text
    searchMetadataNextResults :: Maybe URIString
        , SearchMetadata -> Int
    searchMetadataCount :: Int
        , SearchMetadata -> Maybe Float
    searchMetadataCompletedIn :: Maybe Float
        , SearchMetadata -> String
    searchMetadataSinceIdStr :: String
        , SearchMetadata -> String
    searchMetadataQuery :: String
        , SearchMetadata -> String
    searchMetadataMaxIdStr :: String
        }
        deriving (Int -> SearchMetadata -> ShowS
    [SearchMetadata] -> ShowS
    SearchMetadata -> String
    (Int -> SearchMetadata -> ShowS)
    -> (SearchMetadata -> String)
    -> ([SearchMetadata] -> ShowS)
    -> Show SearchMetadata
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> SearchMetadata -> ShowS
    showsPrec :: Int -> SearchMetadata -> ShowS
    $cshow :: SearchMetadata -> String
    show :: SearchMetadata -> String
    $cshowList :: [SearchMetadata] -> ShowS
    showList :: [SearchMetadata] -> ShowS
    Show, SearchMetadata -> SearchMetadata -> Bool
    (SearchMetadata -> SearchMetadata -> Bool)
    -> (SearchMetadata -> SearchMetadata -> Bool) -> Eq SearchMetadata
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: SearchMetadata -> SearchMetadata -> Bool
    == :: SearchMetadata -> SearchMetadata -> Bool
    $c/= :: SearchMetadata -> SearchMetadata -> Bool
    /= :: SearchMetadata -> SearchMetadata -> Bool
    Eq, Typeable SearchMetadata
    Typeable SearchMetadata =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> SearchMetadata -> c SearchMetadata)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c SearchMetadata)
    -> (SearchMetadata -> Constr)
    -> (SearchMetadata -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c SearchMetadata))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c SearchMetadata))
    -> ((forall b. Data b => b -> b)
        -> SearchMetadata -> SearchMetadata)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> SearchMetadata -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> SearchMetadata -> r)
    -> (forall u.
        (forall d. Data d => d -> u) -> SearchMetadata -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> SearchMetadata -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d)
        -> SearchMetadata -> m SearchMetadata)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> SearchMetadata -> m SearchMetadata)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> SearchMetadata -> m SearchMetadata)
    -> Data SearchMetadata
    SearchMetadata -> Constr
    SearchMetadata -> DataType
    (forall b. Data b => b -> b) -> SearchMetadata -> SearchMetadata
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u.
    Int -> (forall d. Data d => d -> u) -> SearchMetadata -> u
    forall u. (forall d. Data d => d -> u) -> SearchMetadata -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchMetadata -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchMetadata -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> SearchMetadata -> m SearchMetadata
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> SearchMetadata -> m SearchMetadata
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SearchMetadata
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> SearchMetadata -> c SearchMetadata
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SearchMetadata)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c SearchMetadata)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> SearchMetadata -> c SearchMetadata
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> SearchMetadata -> c SearchMetadata
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SearchMetadata
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SearchMetadata
    $ctoConstr :: SearchMetadata -> Constr
    toConstr :: SearchMetadata -> Constr
    $cdataTypeOf :: SearchMetadata -> DataType
    dataTypeOf :: SearchMetadata -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SearchMetadata)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SearchMetadata)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c SearchMetadata)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c SearchMetadata)
    $cgmapT :: (forall b. Data b => b -> b) -> SearchMetadata -> SearchMetadata
    gmapT :: (forall b. Data b => b -> b) -> SearchMetadata -> SearchMetadata
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchMetadata -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchMetadata -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchMetadata -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SearchMetadata -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> SearchMetadata -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> SearchMetadata -> [u]
    $cgmapQi :: forall u.
    Int -> (forall d. Data d => d -> u) -> SearchMetadata -> u
    gmapQi :: forall u.
    Int -> (forall d. Data d => d -> u) -> SearchMetadata -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> SearchMetadata -> m SearchMetadata
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> SearchMetadata -> m SearchMetadata
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> SearchMetadata -> m SearchMetadata
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> SearchMetadata -> m SearchMetadata
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> SearchMetadata -> m SearchMetadata
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> SearchMetadata -> m SearchMetadata
    Data, Typeable, (forall x. SearchMetadata -> Rep SearchMetadata x)
    -> (forall x. Rep SearchMetadata x -> SearchMetadata)
    -> Generic SearchMetadata
    forall x. Rep SearchMetadata x -> SearchMetadata
    forall x. SearchMetadata -> Rep SearchMetadata x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. SearchMetadata -> Rep SearchMetadata x
    from :: forall x. SearchMetadata -> Rep SearchMetadata x
    $cto :: forall x. Rep SearchMetadata x -> SearchMetadata
    to :: forall x. Rep SearchMetadata x -> SearchMetadata
    Generic)

    instance FromJSON SearchMetadata where
        parseJSON :: Value -> Parser SearchMetadata
    parseJSON (Object Object
    o) =
            Object -> Parser ()
    checkError Object
    o
                Parser () -> Parser SearchMetadata -> Parser SearchMetadata
    forall a b. Parser a -> Parser b -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    >> Integer
    -> Integer
    -> Text
    -> Maybe Text
    -> Int
    -> Maybe Float
    -> String
    -> String
    -> String
    -> SearchMetadata
    SearchMetadata (Integer
     -> Integer
     -> Text
     -> Maybe Text
     -> Int
     -> Maybe Float
     -> String
     -> String
     -> String
     -> SearchMetadata)
    -> Parser Integer
    -> Parser
         (Integer
          -> Text
          -> Maybe Text
          -> Int
          -> Maybe Float
          -> String
          -> String
          -> String
          -> SearchMetadata)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser Integer
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "max_id"
                Parser
      (Integer
       -> Text
       -> Maybe Text
       -> Int
       -> Maybe Float
       -> String
       -> String
       -> String
       -> SearchMetadata)
    -> Parser Integer
    -> Parser
         (Text
          -> Maybe Text
          -> Int
          -> Maybe Float
          -> String
          -> String
          -> String
          -> SearchMetadata)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Integer
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "since_id"
                Parser
      (Text
       -> Maybe Text
       -> Int
       -> Maybe Float
       -> String
       -> String
       -> String
       -> SearchMetadata)
    -> Parser Text
    -> Parser
         (Maybe Text
          -> Int
          -> Maybe Float
          -> String
          -> String
          -> String
          -> SearchMetadata)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "refresh_url"
                Parser
      (Maybe Text
       -> Int
       -> Maybe Float
       -> String
       -> String
       -> String
       -> SearchMetadata)
    -> Parser (Maybe Text)
    -> Parser
         (Int
          -> Maybe Float -> String -> String -> String -> SearchMetadata)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Text)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "next_results"
                Parser
      (Int
       -> Maybe Float -> String -> String -> String -> SearchMetadata)
    -> Parser Int
    -> Parser
         (Maybe Float -> String -> String -> String -> SearchMetadata)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Int
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "count"
                Parser
      (Maybe Float -> String -> String -> String -> SearchMetadata)
    -> Parser (Maybe Float)
    -> Parser (String -> String -> String -> SearchMetadata)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Float)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "completed_in"
                Parser (String -> String -> String -> SearchMetadata)
    -> Parser String -> Parser (String -> String -> SearchMetadata)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser String
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "since_id_str"
                Parser (String -> String -> SearchMetadata)
    -> Parser String -> Parser (String -> SearchMetadata)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser String
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "query"
                Parser (String -> SearchMetadata)
    -> Parser String -> Parser SearchMetadata
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser String
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "max_id_str"
        parseJSON Value
    v = String -> Parser SearchMetadata
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser SearchMetadata)
    -> String -> Parser SearchMetadata
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse search metadata from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON SearchMetadata where
        toJSON :: SearchMetadata -> Value
    toJSON SearchMetadata {Int
    Integer
    String
    Maybe Float
    Maybe Text
    Text
    searchMetadataMaxId :: SearchMetadata -> Integer
    searchMetadataSinceId :: SearchMetadata -> Integer
    searchMetadataRefreshURL :: SearchMetadata -> Text
    searchMetadataNextResults :: SearchMetadata -> Maybe Text
    searchMetadataCount :: SearchMetadata -> Int
    searchMetadataCompletedIn :: SearchMetadata -> Maybe Float
    searchMetadataSinceIdStr :: SearchMetadata -> String
    searchMetadataQuery :: SearchMetadata -> String
    searchMetadataMaxIdStr :: SearchMetadata -> String
    searchMetadataMaxId :: Integer
    searchMetadataSinceId :: Integer
    searchMetadataRefreshURL :: Text
    searchMetadataNextResults :: Maybe Text
    searchMetadataCount :: Int
    searchMetadataCompletedIn :: Maybe Float
    searchMetadataSinceIdStr :: String
    searchMetadataQuery :: String
    searchMetadataMaxIdStr :: String
    ..} =
            [Pair] -> Value
    object
                [ Key
    "max_id" Key -> Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer
    searchMetadataMaxId
                , Key
    "since_id" Key -> Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer
    searchMetadataSinceId
                , Key
    "refresh_url" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    searchMetadataRefreshURL
                , Key
    "next_results" Key -> Maybe Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Text
    searchMetadataNextResults
                , Key
    "count" Key -> Int -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Int
    searchMetadataCount
                , Key
    "completed_in" Key -> Maybe Float -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Float
    searchMetadataCompletedIn
                , Key
    "since_id_str" Key -> String -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= String
    searchMetadataSinceIdStr
                , Key
    "query" Key -> String -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= String
    searchMetadataQuery
                , Key
    "max_id_str" Key -> String -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= String
    searchMetadataMaxIdStr
                ]

    data RetweetedStatus = RetweetedStatus
        { RetweetedStatus -> UTCTime
    rsCreatedAt :: UTCTime
        , RetweetedStatus -> Integer
    rsId :: StatusId
        , RetweetedStatus -> Text
    rsText :: Text
        , RetweetedStatus -> Text
    rsSource :: Text
        , RetweetedStatus -> Bool
    rsTruncated :: Bool
        , RetweetedStatus -> Maybe Entities
    rsEntities :: Maybe Entities
        , RetweetedStatus -> User
    rsUser :: User
        , RetweetedStatus -> Status
    rsRetweetedStatus :: Status
        , RetweetedStatus -> Maybe Coordinates
    rsCoordinates :: Maybe Coordinates
        }
        deriving (Int -> RetweetedStatus -> ShowS
    [RetweetedStatus] -> ShowS
    RetweetedStatus -> String
    (Int -> RetweetedStatus -> ShowS)
    -> (RetweetedStatus -> String)
    -> ([RetweetedStatus] -> ShowS)
    -> Show RetweetedStatus
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> RetweetedStatus -> ShowS
    showsPrec :: Int -> RetweetedStatus -> ShowS
    $cshow :: RetweetedStatus -> String
    show :: RetweetedStatus -> String
    $cshowList :: [RetweetedStatus] -> ShowS
    showList :: [RetweetedStatus] -> ShowS
    Show, RetweetedStatus -> RetweetedStatus -> Bool
    (RetweetedStatus -> RetweetedStatus -> Bool)
    -> (RetweetedStatus -> RetweetedStatus -> Bool)
    -> Eq RetweetedStatus
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: RetweetedStatus -> RetweetedStatus -> Bool
    == :: RetweetedStatus -> RetweetedStatus -> Bool
    $c/= :: RetweetedStatus -> RetweetedStatus -> Bool
    /= :: RetweetedStatus -> RetweetedStatus -> Bool
    Eq, Typeable RetweetedStatus
    Typeable RetweetedStatus =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> RetweetedStatus -> c RetweetedStatus)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c RetweetedStatus)
    -> (RetweetedStatus -> Constr)
    -> (RetweetedStatus -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c RetweetedStatus))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c RetweetedStatus))
    -> ((forall b. Data b => b -> b)
        -> RetweetedStatus -> RetweetedStatus)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> RetweetedStatus -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> RetweetedStatus -> r)
    -> (forall u.
        (forall d. Data d => d -> u) -> RetweetedStatus -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> RetweetedStatus -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d)
        -> RetweetedStatus -> m RetweetedStatus)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> RetweetedStatus -> m RetweetedStatus)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> RetweetedStatus -> m RetweetedStatus)
    -> Data RetweetedStatus
    RetweetedStatus -> Constr
    RetweetedStatus -> DataType
    (forall b. Data b => b -> b) -> RetweetedStatus -> RetweetedStatus
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u.
    Int -> (forall d. Data d => d -> u) -> RetweetedStatus -> u
    forall u. (forall d. Data d => d -> u) -> RetweetedStatus -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> RetweetedStatus -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> RetweetedStatus -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> RetweetedStatus -> m RetweetedStatus
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> RetweetedStatus -> m RetweetedStatus
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c RetweetedStatus
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> RetweetedStatus -> c RetweetedStatus
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c RetweetedStatus)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c RetweetedStatus)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> RetweetedStatus -> c RetweetedStatus
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> RetweetedStatus -> c RetweetedStatus
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c RetweetedStatus
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c RetweetedStatus
    $ctoConstr :: RetweetedStatus -> Constr
    toConstr :: RetweetedStatus -> Constr
    $cdataTypeOf :: RetweetedStatus -> DataType
    dataTypeOf :: RetweetedStatus -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c RetweetedStatus)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c RetweetedStatus)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c RetweetedStatus)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c RetweetedStatus)
    $cgmapT :: (forall b. Data b => b -> b) -> RetweetedStatus -> RetweetedStatus
    gmapT :: (forall b. Data b => b -> b) -> RetweetedStatus -> RetweetedStatus
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> RetweetedStatus -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> RetweetedStatus -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> RetweetedStatus -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> RetweetedStatus -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> RetweetedStatus -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> RetweetedStatus -> [u]
    $cgmapQi :: forall u.
    Int -> (forall d. Data d => d -> u) -> RetweetedStatus -> u
    gmapQi :: forall u.
    Int -> (forall d. Data d => d -> u) -> RetweetedStatus -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> RetweetedStatus -> m RetweetedStatus
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> RetweetedStatus -> m RetweetedStatus
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> RetweetedStatus -> m RetweetedStatus
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> RetweetedStatus -> m RetweetedStatus
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> RetweetedStatus -> m RetweetedStatus
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> RetweetedStatus -> m RetweetedStatus
    Data, Typeable, (forall x. RetweetedStatus -> Rep RetweetedStatus x)
    -> (forall x. Rep RetweetedStatus x -> RetweetedStatus)
    -> Generic RetweetedStatus
    forall x. Rep RetweetedStatus x -> RetweetedStatus
    forall x. RetweetedStatus -> Rep RetweetedStatus x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. RetweetedStatus -> Rep RetweetedStatus x
    from :: forall x. RetweetedStatus -> Rep RetweetedStatus x
    $cto :: forall x. Rep RetweetedStatus x -> RetweetedStatus
    to :: forall x. Rep RetweetedStatus x -> RetweetedStatus
    Generic)

    instance FromJSON RetweetedStatus where
        parseJSON :: Value -> Parser RetweetedStatus
    parseJSON (Object Object
    o) =
            Object -> Parser ()
    checkError Object
    o
                Parser () -> Parser RetweetedStatus -> Parser RetweetedStatus
    forall a b. Parser a -> Parser b -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    >> UTCTime
    -> Integer
    -> Text
    -> Text
    -> Bool
    -> Maybe Entities
    -> User
    -> Status
    -> Maybe Coordinates
    -> RetweetedStatus
    RetweetedStatus (UTCTime
     -> Integer
     -> Text
     -> Text
     -> Bool
     -> Maybe Entities
     -> User
     -> Status
     -> Maybe Coordinates
     -> RetweetedStatus)
    -> Parser UTCTime
    -> Parser
         (Integer
          -> Text
          -> Text
          -> Bool
          -> Maybe Entities
          -> User
          -> Status
          -> Maybe Coordinates
          -> RetweetedStatus)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (Object
    o Object -> Key -> Parser TwitterTime
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "created_at" Parser TwitterTime
    -> (TwitterTime -> Parser UTCTime) -> Parser UTCTime
    forall a b. Parser a -> (a -> Parser b) -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= UTCTime -> Parser UTCTime
    forall a. a -> Parser a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (UTCTime -> Parser UTCTime)
    -> (TwitterTime -> UTCTime) -> TwitterTime -> Parser UTCTime
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . TwitterTime -> UTCTime
    fromTwitterTime)
                Parser
      (Integer
       -> Text
       -> Text
       -> Bool
       -> Maybe Entities
       -> User
       -> Status
       -> Maybe Coordinates
       -> RetweetedStatus)
    -> Parser Integer
    -> Parser
         (Text
          -> Text
          -> Bool
          -> Maybe Entities
          -> User
          -> Status
          -> Maybe Coordinates
          -> RetweetedStatus)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Integer
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "id"
                Parser
      (Text
       -> Text
       -> Bool
       -> Maybe Entities
       -> User
       -> Status
       -> Maybe Coordinates
       -> RetweetedStatus)
    -> Parser Text
    -> Parser
         (Text
          -> Bool
          -> Maybe Entities
          -> User
          -> Status
          -> Maybe Coordinates
          -> RetweetedStatus)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "text"
                Parser
      (Text
       -> Bool
       -> Maybe Entities
       -> User
       -> Status
       -> Maybe Coordinates
       -> RetweetedStatus)
    -> Parser Text
    -> Parser
         (Bool
          -> Maybe Entities
          -> User
          -> Status
          -> Maybe Coordinates
          -> RetweetedStatus)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "source"
                Parser
      (Bool
       -> Maybe Entities
       -> User
       -> Status
       -> Maybe Coordinates
       -> RetweetedStatus)
    -> Parser Bool
    -> Parser
         (Maybe Entities
          -> User -> Status -> Maybe Coordinates -> RetweetedStatus)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Bool
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "truncated"
                Parser
      (Maybe Entities
       -> User -> Status -> Maybe Coordinates -> RetweetedStatus)
    -> Parser (Maybe Entities)
    -> Parser (User -> Status -> Maybe Coordinates -> RetweetedStatus)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Entities)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "entities"
                Parser (User -> Status -> Maybe Coordinates -> RetweetedStatus)
    -> Parser User
    -> Parser (Status -> Maybe Coordinates -> RetweetedStatus)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser User
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "user"
                Parser (Status -> Maybe Coordinates -> RetweetedStatus)
    -> Parser Status -> Parser (Maybe Coordinates -> RetweetedStatus)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Status
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "retweeted_status"
                Parser (Maybe Coordinates -> RetweetedStatus)
    -> Parser (Maybe Coordinates) -> Parser RetweetedStatus
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Coordinates)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "coordinates"
        parseJSON Value
    v = String -> Parser RetweetedStatus
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser RetweetedStatus)
    -> String -> Parser RetweetedStatus
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse retweeted status from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON RetweetedStatus where
        toJSON :: RetweetedStatus -> Value
    toJSON RetweetedStatus {Bool
    Integer
    Maybe Entities
    Maybe Coordinates
    Text
    UTCTime
    User
    Status
    rsCreatedAt :: RetweetedStatus -> UTCTime
    rsId :: RetweetedStatus -> Integer
    rsText :: RetweetedStatus -> Text
    rsSource :: RetweetedStatus -> Text
    rsTruncated :: RetweetedStatus -> Bool
    rsEntities :: RetweetedStatus -> Maybe Entities
    rsUser :: RetweetedStatus -> User
    rsRetweetedStatus :: RetweetedStatus -> Status
    rsCoordinates :: RetweetedStatus -> Maybe Coordinates
    rsCreatedAt :: UTCTime
    rsId :: Integer
    rsText :: Text
    rsSource :: Text
    rsTruncated :: Bool
    rsEntities :: Maybe Entities
    rsUser :: User
    rsRetweetedStatus :: Status
    rsCoordinates :: Maybe Coordinates
    ..} =
            [Pair] -> Value
    object
                [ Key
    "created_at" Key -> TwitterTime -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= UTCTime -> TwitterTime
    TwitterTime UTCTime
    rsCreatedAt
                , Key
    "id" Key -> Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer
    rsId
                , Key
    "text" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    rsText
                , Key
    "source" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    rsSource
                , Key
    "truncated" Key -> Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Bool
    rsTruncated
                , Key
    "entities" Key -> Maybe Entities -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Entities
    rsEntities
                , Key
    "user" Key -> User -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= User
    rsUser
                , Key
    "retweeted_status" Key -> Status -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Status
    rsRetweetedStatus
                , Key
    "coordinates" Key -> Maybe Coordinates -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Coordinates
    rsCoordinates
                ]

    type EventId = Integer

    data DirectMessage = DirectMessage
        { DirectMessage -> Integer
    dmId :: EventId
        , DirectMessage -> UTCTime
    dmCreatedTimestamp :: UTCTime
        , DirectMessage -> Integer
    dmTargetRecipientId :: UserId
        , DirectMessage -> Integer
    dmSenderId :: UserId
        , DirectMessage -> Text
    dmText :: Text
        , DirectMessage -> Entities
    dmEntities :: Entities
        }
        deriving (Int -> DirectMessage -> ShowS
    [DirectMessage] -> ShowS
    DirectMessage -> String
    (Int -> DirectMessage -> ShowS)
    -> (DirectMessage -> String)
    -> ([DirectMessage] -> ShowS)
    -> Show DirectMessage
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> DirectMessage -> ShowS
    showsPrec :: Int -> DirectMessage -> ShowS
    $cshow :: DirectMessage -> String
    show :: DirectMessage -> String
    $cshowList :: [DirectMessage] -> ShowS
    showList :: [DirectMessage] -> ShowS
    Show, DirectMessage -> DirectMessage -> Bool
    (DirectMessage -> DirectMessage -> Bool)
    -> (DirectMessage -> DirectMessage -> Bool) -> Eq DirectMessage
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: DirectMessage -> DirectMessage -> Bool
    == :: DirectMessage -> DirectMessage -> Bool
    $c/= :: DirectMessage -> DirectMessage -> Bool
    /= :: DirectMessage -> DirectMessage -> Bool
    Eq, Typeable DirectMessage
    Typeable DirectMessage =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> DirectMessage -> c DirectMessage)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c DirectMessage)
    -> (DirectMessage -> Constr)
    -> (DirectMessage -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c DirectMessage))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c DirectMessage))
    -> ((forall b. Data b => b -> b) -> DirectMessage -> DirectMessage)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> DirectMessage -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> DirectMessage -> r)
    -> (forall u. (forall d. Data d => d -> u) -> DirectMessage -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> DirectMessage -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> DirectMessage -> m DirectMessage)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> DirectMessage -> m DirectMessage)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> DirectMessage -> m DirectMessage)
    -> Data DirectMessage
    DirectMessage -> Constr
    DirectMessage -> DataType
    (forall b. Data b => b -> b) -> DirectMessage -> DirectMessage
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> DirectMessage -> u
    forall u. (forall d. Data d => d -> u) -> DirectMessage -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> DirectMessage -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> DirectMessage -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> DirectMessage -> m DirectMessage
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> DirectMessage -> m DirectMessage
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c DirectMessage
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> DirectMessage -> c DirectMessage
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c DirectMessage)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c DirectMessage)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> DirectMessage -> c DirectMessage
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> DirectMessage -> c DirectMessage
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c DirectMessage
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c DirectMessage
    $ctoConstr :: DirectMessage -> Constr
    toConstr :: DirectMessage -> Constr
    $cdataTypeOf :: DirectMessage -> DataType
    dataTypeOf :: DirectMessage -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c DirectMessage)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c DirectMessage)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c DirectMessage)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c DirectMessage)
    $cgmapT :: (forall b. Data b => b -> b) -> DirectMessage -> DirectMessage
    gmapT :: (forall b. Data b => b -> b) -> DirectMessage -> DirectMessage
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> DirectMessage -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> DirectMessage -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> DirectMessage -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> DirectMessage -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> DirectMessage -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> DirectMessage -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> DirectMessage -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> DirectMessage -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> DirectMessage -> m DirectMessage
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> DirectMessage -> m DirectMessage
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> DirectMessage -> m DirectMessage
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> DirectMessage -> m DirectMessage
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> DirectMessage -> m DirectMessage
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> DirectMessage -> m DirectMessage
    Data, Typeable, (forall x. DirectMessage -> Rep DirectMessage x)
    -> (forall x. Rep DirectMessage x -> DirectMessage)
    -> Generic DirectMessage
    forall x. Rep DirectMessage x -> DirectMessage
    forall x. DirectMessage -> Rep DirectMessage x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. DirectMessage -> Rep DirectMessage x
    from :: forall x. DirectMessage -> Rep DirectMessage x
    $cto :: forall x. Rep DirectMessage x -> DirectMessage
    to :: forall x. Rep DirectMessage x -> DirectMessage
    Generic)

    parseIntegral :: Integral a => Text -> Parser a
    parseIntegral :: forall a. Integral a => Text -> Parser a
    parseIntegral Text
    v = (String -> Parser a)
    -> ((a, Text) -> Parser a) -> Either String (a, Text) -> Parser a
    forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
    either (\String
    _ -> String -> Parser a
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser a) -> String -> Parser a
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse stringized int: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Text -> String
    forall a. Show a => a -> String
    show Text
    v) (a -> Parser a
    forall a. a -> Parser a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (a -> Parser a) -> ((a, Text) -> a) -> (a, Text) -> Parser a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (a, Text) -> a
    forall a b. (a, b) -> a
    fst) (Either String (a, Text) -> Parser a)
    -> Either String (a, Text) -> Parser a
    forall a b. (a -> b) -> a -> b
    $ Reader a
    forall a. Integral a => Reader a
    decimal Text
    v

    epochMsToUTCTime :: Int64 -> UTCTime
    epochMsToUTCTime :: Int64 -> UTCTime
    epochMsToUTCTime = POSIXTime -> UTCTime
    posixSecondsToUTCTime (POSIXTime -> UTCTime) -> (Int64 -> POSIXTime) -> Int64 -> UTCTime
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Rational -> POSIXTime
    forall a. Fractional a => Rational -> a
    fromRational (Rational -> POSIXTime)
    -> (Int64 -> Rational) -> Int64 -> POSIXTime
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Integer -> Integer -> Rational
    forall a. Integral a => a -> a -> Ratio a
    % Integer
    1000) (Integer -> Rational) -> (Int64 -> Integer) -> Int64 -> Rational
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int64 -> Integer
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral

    parseUnixTimeString :: Text -> Parser UTCTime
    parseUnixTimeString :: Text -> Parser UTCTime
    parseUnixTimeString = (Int64 -> UTCTime) -> Parser Int64 -> Parser UTCTime
    forall a b. (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap Int64 -> UTCTime
    epochMsToUTCTime (Parser Int64 -> Parser UTCTime)
    -> (Text -> Parser Int64) -> Text -> Parser UTCTime
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Text -> Parser Int64
    forall a. Integral a => Text -> Parser a
    parseIntegral

    unixTimeToEpochInt :: UTCTime -> Int
    unixTimeToEpochInt :: UTCTime -> Int
    unixTimeToEpochInt = POSIXTime -> Int
    forall b. Integral b => POSIXTime -> b
    forall a b. (RealFrac a, Integral b) => a -> b
    floor (POSIXTime -> Int) -> (UTCTime -> POSIXTime) -> UTCTime -> Int
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (POSIXTime -> POSIXTime -> POSIXTime
    forall a. Num a => a -> a -> a
    * POSIXTime
    1000) (POSIXTime -> POSIXTime)
    -> (UTCTime -> POSIXTime) -> UTCTime -> POSIXTime
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . UTCTime -> POSIXTime
    utcTimeToPOSIXSeconds

    instance FromJSON DirectMessage where
        parseJSON :: Value -> Parser DirectMessage
    parseJSON (Object Object
    o) = do
            _ <- Object -> Parser ()
    checkError Object
    o
            messageCreate <- o .: "message_create"
            messageData <- messageCreate .: "message_data"

            DirectMessage
                <$> (o .: "id" >>= parseIntegral)
                <*> (o .: "created_timestamp" >>= parseUnixTimeString)
                <*> (messageCreate .: "target" >>= (.: "recipient_id") >>= parseIntegral)
                <*> (messageCreate .: "sender_id" >>= parseIntegral)
                <*> messageData .: "text"
                <*> messageData .: "entities"
        parseJSON Value
    v = String -> Parser DirectMessage
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser DirectMessage) -> String -> Parser DirectMessage
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse direct message create event from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON DirectMessage where
        toJSON :: DirectMessage -> Value
    toJSON DirectMessage {Integer
    Text
    UTCTime
    Entities
    dmId :: DirectMessage -> Integer
    dmCreatedTimestamp :: DirectMessage -> UTCTime
    dmTargetRecipientId :: DirectMessage -> Integer
    dmSenderId :: DirectMessage -> Integer
    dmText :: DirectMessage -> Text
    dmEntities :: DirectMessage -> Entities
    dmId :: Integer
    dmCreatedTimestamp :: UTCTime
    dmTargetRecipientId :: Integer
    dmSenderId :: Integer
    dmText :: Text
    dmEntities :: Entities
    ..} =
            [Pair] -> Value
    object
                [ Key
    "id" Key -> String -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer -> String
    forall a. Show a => a -> String
    show Integer
    dmId
                , Key
    "created_timestamp" Key -> String -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Int -> String
    forall a. Show a => a -> String
    show (UTCTime -> Int
    unixTimeToEpochInt UTCTime
    dmCreatedTimestamp)
                , Key
    "message_create"
                    Key -> Value -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= [Pair] -> Value
    object
                        [ Key
    "message_data" Key -> Value -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= [Pair] -> Value
    object [Key
    "text" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    dmText, Key
    "entities" Key -> Entities -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Entities
    dmEntities]
                        , Key
    "target" Key -> Value -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= [Pair] -> Value
    object [Key
    "recipient_id" Key -> String -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer -> String
    forall a. Show a => a -> String
    show Integer
    dmTargetRecipientId]
                        , Key
    "sender_id" Key -> String -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer -> String
    forall a. Show a => a -> String
    show Integer
    dmSenderId
                        ]
                ]

    data EventType
        = Favorite
        | Unfavorite
        | ListCreated
        | ListUpdated
        | ListMemberAdded
        | UserUpdate
        | Block
        | Unblock
        | Follow
        deriving (Int -> EventType -> ShowS
    [EventType] -> ShowS
    EventType -> String
    (Int -> EventType -> ShowS)
    -> (EventType -> String)
    -> ([EventType] -> ShowS)
    -> Show EventType
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> EventType -> ShowS
    showsPrec :: Int -> EventType -> ShowS
    $cshow :: EventType -> String
    show :: EventType -> String
    $cshowList :: [EventType] -> ShowS
    showList :: [EventType] -> ShowS
    Show, EventType -> EventType -> Bool
    (EventType -> EventType -> Bool)
    -> (EventType -> EventType -> Bool) -> Eq EventType
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: EventType -> EventType -> Bool
    == :: EventType -> EventType -> Bool
    $c/= :: EventType -> EventType -> Bool
    /= :: EventType -> EventType -> Bool
    Eq, Typeable EventType
    Typeable EventType =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> EventType -> c EventType)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c EventType)
    -> (EventType -> Constr)
    -> (EventType -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c EventType))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EventType))
    -> ((forall b. Data b => b -> b) -> EventType -> EventType)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> EventType -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> EventType -> r)
    -> (forall u. (forall d. Data d => d -> u) -> EventType -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> EventType -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> EventType -> m EventType)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> EventType -> m EventType)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> EventType -> m EventType)
    -> Data EventType
    EventType -> Constr
    EventType -> DataType
    (forall b. Data b => b -> b) -> EventType -> EventType
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> EventType -> u
    forall u. (forall d. Data d => d -> u) -> EventType -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> EventType -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> EventType -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> EventType -> m EventType
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> EventType -> m EventType
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c EventType
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> EventType -> c EventType
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c EventType)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EventType)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> EventType -> c EventType
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> EventType -> c EventType
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c EventType
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c EventType
    $ctoConstr :: EventType -> Constr
    toConstr :: EventType -> Constr
    $cdataTypeOf :: EventType -> DataType
    dataTypeOf :: EventType -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c EventType)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c EventType)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EventType)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EventType)
    $cgmapT :: (forall b. Data b => b -> b) -> EventType -> EventType
    gmapT :: (forall b. Data b => b -> b) -> EventType -> EventType
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> EventType -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> EventType -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> EventType -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> EventType -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> EventType -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> EventType -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> EventType -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> EventType -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> EventType -> m EventType
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> EventType -> m EventType
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> EventType -> m EventType
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> EventType -> m EventType
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> EventType -> m EventType
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> EventType -> m EventType
    Data, Typeable, (forall x. EventType -> Rep EventType x)
    -> (forall x. Rep EventType x -> EventType) -> Generic EventType
    forall x. Rep EventType x -> EventType
    forall x. EventType -> Rep EventType x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. EventType -> Rep EventType x
    from :: forall x. EventType -> Rep EventType x
    $cto :: forall x. Rep EventType x -> EventType
    to :: forall x. Rep EventType x -> EventType
    Generic)

    data EventTarget = ETUser User | ETStatus Status | ETList List | ETUnknown Value
        deriving (Int -> EventTarget -> ShowS
    [EventTarget] -> ShowS
    EventTarget -> String
    (Int -> EventTarget -> ShowS)
    -> (EventTarget -> String)
    -> ([EventTarget] -> ShowS)
    -> Show EventTarget
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> EventTarget -> ShowS
    showsPrec :: Int -> EventTarget -> ShowS
    $cshow :: EventTarget -> String
    show :: EventTarget -> String
    $cshowList :: [EventTarget] -> ShowS
    showList :: [EventTarget] -> ShowS
    Show, EventTarget -> EventTarget -> Bool
    (EventTarget -> EventTarget -> Bool)
    -> (EventTarget -> EventTarget -> Bool) -> Eq EventTarget
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: EventTarget -> EventTarget -> Bool
    == :: EventTarget -> EventTarget -> Bool
    $c/= :: EventTarget -> EventTarget -> Bool
    /= :: EventTarget -> EventTarget -> Bool
    Eq, Typeable EventTarget
    Typeable EventTarget =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> EventTarget -> c EventTarget)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c EventTarget)
    -> (EventTarget -> Constr)
    -> (EventTarget -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c EventTarget))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c EventTarget))
    -> ((forall b. Data b => b -> b) -> EventTarget -> EventTarget)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> EventTarget -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> EventTarget -> r)
    -> (forall u. (forall d. Data d => d -> u) -> EventTarget -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> EventTarget -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> EventTarget -> m EventTarget)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> EventTarget -> m EventTarget)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> EventTarget -> m EventTarget)
    -> Data EventTarget
    EventTarget -> Constr
    EventTarget -> DataType
    (forall b. Data b => b -> b) -> EventTarget -> EventTarget
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> EventTarget -> u
    forall u. (forall d. Data d => d -> u) -> EventTarget -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> EventTarget -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> EventTarget -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> EventTarget -> m EventTarget
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> EventTarget -> m EventTarget
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c EventTarget
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> EventTarget -> c EventTarget
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c EventTarget)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c EventTarget)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> EventTarget -> c EventTarget
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> EventTarget -> c EventTarget
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c EventTarget
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c EventTarget
    $ctoConstr :: EventTarget -> Constr
    toConstr :: EventTarget -> Constr
    $cdataTypeOf :: EventTarget -> DataType
    dataTypeOf :: EventTarget -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c EventTarget)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c EventTarget)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c EventTarget)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c EventTarget)
    $cgmapT :: (forall b. Data b => b -> b) -> EventTarget -> EventTarget
    gmapT :: (forall b. Data b => b -> b) -> EventTarget -> EventTarget
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> EventTarget -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> EventTarget -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> EventTarget -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> EventTarget -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> EventTarget -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> EventTarget -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> EventTarget -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> EventTarget -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> EventTarget -> m EventTarget
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> EventTarget -> m EventTarget
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> EventTarget -> m EventTarget
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> EventTarget -> m EventTarget
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> EventTarget -> m EventTarget
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> EventTarget -> m EventTarget
    Data, Typeable, (forall x. EventTarget -> Rep EventTarget x)
    -> (forall x. Rep EventTarget x -> EventTarget)
    -> Generic EventTarget
    forall x. Rep EventTarget x -> EventTarget
    forall x. EventTarget -> Rep EventTarget x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. EventTarget -> Rep EventTarget x
    from :: forall x. EventTarget -> Rep EventTarget x
    $cto :: forall x. Rep EventTarget x -> EventTarget
    to :: forall x. Rep EventTarget x -> EventTarget
    Generic)

    instance FromJSON EventTarget where
        parseJSON :: Value -> Parser EventTarget
    parseJSON v :: Value
    v@(Object Object
    o) =
            Object -> Parser ()
    checkError Object
    o
                Parser () -> Parser EventTarget -> Parser EventTarget
    forall a b. Parser a -> Parser b -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    >> User -> EventTarget
    ETUser (User -> EventTarget) -> Parser User -> Parser EventTarget
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Value -> Parser User
    forall a. FromJSON a => Value -> Parser a
    parseJSON Value
    v
                Parser EventTarget -> Parser EventTarget -> Parser EventTarget
    forall a. Parser a -> Parser a -> Parser a
    forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
    <|> Status -> EventTarget
    ETStatus (Status -> EventTarget) -> Parser Status -> Parser EventTarget
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Value -> Parser Status
    forall a. FromJSON a => Value -> Parser a
    parseJSON Value
    v
                Parser EventTarget -> Parser EventTarget -> Parser EventTarget
    forall a. Parser a -> Parser a -> Parser a
    forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
    <|> List -> EventTarget
    ETList (List -> EventTarget) -> Parser List -> Parser EventTarget
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Value -> Parser List
    forall a. FromJSON a => Value -> Parser a
    parseJSON Value
    v
                Parser EventTarget -> Parser EventTarget -> Parser EventTarget
    forall a. Parser a -> Parser a -> Parser a
    forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
    <|> EventTarget -> Parser EventTarget
    forall a. a -> Parser a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (Value -> EventTarget
    ETUnknown Value
    v)
        parseJSON Value
    v = String -> Parser EventTarget
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser EventTarget) -> String -> Parser EventTarget
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse event target from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON EventTarget where
        toJSON :: EventTarget -> Value
    toJSON (ETUser User
    u) = User -> Value
    forall a. ToJSON a => a -> Value
    toJSON User
    u
        toJSON (ETStatus Status
    s) = Status -> Value
    forall a. ToJSON a => a -> Value
    toJSON Status
    s
        toJSON (ETList List
    l) = List -> Value
    forall a. ToJSON a => a -> Value
    toJSON List
    l
        toJSON (ETUnknown Value
    v) = Value
    v

    data Event = Event
        { Event -> UTCTime
    evCreatedAt :: UTCTime
        , Event -> Maybe EventTarget
    evTargetObject :: Maybe EventTarget
        , Event -> Text
    evEvent :: Text
        , Event -> EventTarget
    evTarget :: EventTarget
        , Event -> EventTarget
    evSource :: EventTarget
        }
        deriving (Int -> Event -> ShowS
    [Event] -> ShowS
    Event -> String
    (Int -> Event -> ShowS)
    -> (Event -> String) -> ([Event] -> ShowS) -> Show Event
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Event -> ShowS
    showsPrec :: Int -> Event -> ShowS
    $cshow :: Event -> String
    show :: Event -> String
    $cshowList :: [Event] -> ShowS
    showList :: [Event] -> ShowS
    Show, Event -> Event -> Bool
    (Event -> Event -> Bool) -> (Event -> Event -> Bool) -> Eq Event
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Event -> Event -> Bool
    == :: Event -> Event -> Bool
    $c/= :: Event -> Event -> Bool
    /= :: Event -> Event -> Bool
    Eq, Typeable Event
    Typeable Event =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> Event -> c Event)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c Event)
    -> (Event -> Constr)
    -> (Event -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c Event))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Event))
    -> ((forall b. Data b => b -> b) -> Event -> Event)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Event -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Event -> r)
    -> (forall u. (forall d. Data d => d -> u) -> Event -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> Event -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> Event -> m Event)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Event -> m Event)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Event -> m Event)
    -> Data Event
    Event -> Constr
    Event -> DataType
    (forall b. Data b => b -> b) -> Event -> Event
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> Event -> u
    forall u. (forall d. Data d => d -> u) -> Event -> [u]
    forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Event -> r
    forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Event -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Event -> m Event
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Event -> m Event
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Event
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Event -> c Event
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Event)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Event)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Event -> c Event
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Event -> c Event
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Event
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Event
    $ctoConstr :: Event -> Constr
    toConstr :: Event -> Constr
    $cdataTypeOf :: Event -> DataType
    dataTypeOf :: Event -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Event)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Event)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Event)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Event)
    $cgmapT :: (forall b. Data b => b -> b) -> Event -> Event
    gmapT :: (forall b. Data b => b -> b) -> Event -> Event
    $cgmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Event -> r
    gmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Event -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Event -> r
    gmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Event -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> Event -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> Event -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Event -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Event -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Event -> m Event
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Event -> m Event
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Event -> m Event
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Event -> m Event
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Event -> m Event
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Event -> m Event
    Data, Typeable, (forall x. Event -> Rep Event x)
    -> (forall x. Rep Event x -> Event) -> Generic Event
    forall x. Rep Event x -> Event
    forall x. Event -> Rep Event x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. Event -> Rep Event x
    from :: forall x. Event -> Rep Event x
    $cto :: forall x. Rep Event x -> Event
    to :: forall x. Rep Event x -> Event
    Generic)

    instance FromJSON Event where
        parseJSON :: Value -> Parser Event
    parseJSON (Object Object
    o) =
            Object -> Parser ()
    checkError Object
    o
                Parser () -> Parser Event -> Parser Event
    forall a b. Parser a -> Parser b -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    >> UTCTime
    -> Maybe EventTarget -> Text -> EventTarget -> EventTarget -> Event
    Event (UTCTime
     -> Maybe EventTarget
     -> Text
     -> EventTarget
     -> EventTarget
     -> Event)
    -> Parser UTCTime
    -> Parser
         (Maybe EventTarget -> Text -> EventTarget -> EventTarget -> Event)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (Object
    o Object -> Key -> Parser TwitterTime
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "created_at" Parser TwitterTime
    -> (TwitterTime -> Parser UTCTime) -> Parser UTCTime
    forall a b. Parser a -> (a -> Parser b) -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= UTCTime -> Parser UTCTime
    forall a. a -> Parser a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (UTCTime -> Parser UTCTime)
    -> (TwitterTime -> UTCTime) -> TwitterTime -> Parser UTCTime
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . TwitterTime -> UTCTime
    fromTwitterTime)
                Parser
      (Maybe EventTarget -> Text -> EventTarget -> EventTarget -> Event)
    -> Parser (Maybe EventTarget)
    -> Parser (Text -> EventTarget -> EventTarget -> Event)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe EventTarget)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "target_object"
                Parser (Text -> EventTarget -> EventTarget -> Event)
    -> Parser Text -> Parser (EventTarget -> EventTarget -> Event)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "event"
                Parser (EventTarget -> EventTarget -> Event)
    -> Parser EventTarget -> Parser (EventTarget -> Event)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser EventTarget
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "target"
                Parser (EventTarget -> Event) -> Parser EventTarget -> Parser Event
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser EventTarget
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "source"
        parseJSON Value
    v = String -> Parser Event
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser Event) -> String -> Parser Event
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse event from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON Event where
        toJSON :: Event -> Value
    toJSON Event {Maybe EventTarget
    Text
    UTCTime
    EventTarget
    evCreatedAt :: Event -> UTCTime
    evTargetObject :: Event -> Maybe EventTarget
    evEvent :: Event -> Text
    evTarget :: Event -> EventTarget
    evSource :: Event -> EventTarget
    evCreatedAt :: UTCTime
    evTargetObject :: Maybe EventTarget
    evEvent :: Text
    evTarget :: EventTarget
    evSource :: EventTarget
    ..} =
            [Pair] -> Value
    object
                [ Key
    "created_at" Key -> TwitterTime -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= UTCTime -> TwitterTime
    TwitterTime UTCTime
    evCreatedAt
                , Key
    "target_object" Key -> Maybe EventTarget -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe EventTarget
    evTargetObject
                , Key
    "event" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    evEvent
                , Key
    "target" Key -> EventTarget -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= EventTarget
    evTarget
                , Key
    "source" Key -> EventTarget -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= EventTarget
    evSource
                ]

    data Delete = Delete
        { Delete -> Integer
    delId :: StatusId
        , Delete -> Integer
    delUserId :: UserId
        }
        deriving (Int -> Delete -> ShowS
    [Delete] -> ShowS
    Delete -> String
    (Int -> Delete -> ShowS)
    -> (Delete -> String) -> ([Delete] -> ShowS) -> Show Delete
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Delete -> ShowS
    showsPrec :: Int -> Delete -> ShowS
    $cshow :: Delete -> String
    show :: Delete -> String
    $cshowList :: [Delete] -> ShowS
    showList :: [Delete] -> ShowS
    Show, Delete -> Delete -> Bool
    (Delete -> Delete -> Bool)
    -> (Delete -> Delete -> Bool) -> Eq Delete
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Delete -> Delete -> Bool
    == :: Delete -> Delete -> Bool
    $c/= :: Delete -> Delete -> Bool
    /= :: Delete -> Delete -> Bool
    Eq, Typeable Delete
    Typeable Delete =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> Delete -> c Delete)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c Delete)
    -> (Delete -> Constr)
    -> (Delete -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c Delete))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Delete))
    -> ((forall b. Data b => b -> b) -> Delete -> Delete)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> Delete -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> Delete -> r)
    -> (forall u. (forall d. Data d => d -> u) -> Delete -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> Delete -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> Delete -> m Delete)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Delete -> m Delete)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Delete -> m Delete)
    -> Data Delete
    Delete -> Constr
    Delete -> DataType
    (forall b. Data b => b -> b) -> Delete -> Delete
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> Delete -> u
    forall u. (forall d. Data d => d -> u) -> Delete -> [u]
    forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Delete -> r
    forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Delete -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Delete -> m Delete
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Delete -> m Delete
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Delete
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Delete -> c Delete
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Delete)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Delete)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Delete -> c Delete
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Delete -> c Delete
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Delete
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Delete
    $ctoConstr :: Delete -> Constr
    toConstr :: Delete -> Constr
    $cdataTypeOf :: Delete -> DataType
    dataTypeOf :: Delete -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Delete)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Delete)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Delete)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Delete)
    $cgmapT :: (forall b. Data b => b -> b) -> Delete -> Delete
    gmapT :: (forall b. Data b => b -> b) -> Delete -> Delete
    $cgmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Delete -> r
    gmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Delete -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Delete -> r
    gmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Delete -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> Delete -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> Delete -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Delete -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Delete -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Delete -> m Delete
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Delete -> m Delete
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Delete -> m Delete
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Delete -> m Delete
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Delete -> m Delete
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Delete -> m Delete
    Data, Typeable, (forall x. Delete -> Rep Delete x)
    -> (forall x. Rep Delete x -> Delete) -> Generic Delete
    forall x. Rep Delete x -> Delete
    forall x. Delete -> Rep Delete x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. Delete -> Rep Delete x
    from :: forall x. Delete -> Rep Delete x
    $cto :: forall x. Rep Delete x -> Delete
    to :: forall x. Rep Delete x -> Delete
    Generic)

    instance FromJSON Delete where
        parseJSON :: Value -> Parser Delete
    parseJSON (Object Object
    o) =
            Object -> Parser ()
    checkError Object
    o Parser () -> Parser Delete -> Parser Delete
    forall a b. Parser a -> Parser b -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    >> do
                s <- Object
    o Object -> Key -> Parser Object
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "delete" Parser Object -> (Object -> Parser Object) -> Parser Object
    forall a b. Parser a -> (a -> Parser b) -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= (Object -> Key -> Parser Object
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "status")
                Delete <$> s .: "id"
                    <*> s .: "user_id"
        parseJSON Value
    v = String -> Parser Delete
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser Delete) -> String -> Parser Delete
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse delete from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON Delete where
        toJSON :: Delete -> Value
    toJSON Delete {Integer
    delId :: Delete -> Integer
    delUserId :: Delete -> Integer
    delId :: Integer
    delUserId :: Integer
    ..} =
            [Pair] -> Value
    object
                [ Key
    "delete"
                    Key -> Value -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= [Pair] -> Value
    object
                        [ Key
    "status"
                            Key -> Value -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= [Pair] -> Value
    object
                                [ Key
    "id" Key -> Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer
    delId
                                , Key
    "user_id" Key -> Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer
    delUserId
                                ]
                        ]
                ]

    -- | This type represents the Twitter user.
    -- See <https://dev.twitter.com/docs/platform-objects/users>.
    data User = User
        { User -> Bool
    userContributorsEnabled :: Bool
        , User -> UTCTime
    userCreatedAt :: UTCTime
        , User -> Bool
    userDefaultProfile :: Bool
        , User -> Bool
    userDefaultProfileImage :: Bool
        , User -> Maybe Text
    userDescription :: Maybe Text
        , User -> Maybe Text
    userEmail :: Maybe Text
        , User -> Int
    userFavoritesCount :: Int
        , User -> Maybe Bool
    userFollowRequestSent :: Maybe Bool
        , User -> Maybe Bool
    userFollowing :: Maybe Bool
        , User -> Int
    userFollowersCount :: Int
        , User -> Int
    userFriendsCount :: Int
        , User -> Bool
    userGeoEnabled :: Bool
        , User -> Integer
    userId :: UserId
        , User -> Bool
    userIsTranslator :: Bool
        , User -> Maybe String
    userLang :: Maybe LanguageCode
        , User -> Int
    userListedCount :: Int
        , User -> Maybe Text
    userLocation :: Maybe Text
        , User -> Text
    userName :: Text
        , User -> Maybe Bool
    userNotifications :: Maybe Bool
        , User -> Maybe Text
    userProfileBackgroundColor :: Maybe Text
        , User -> Maybe Text
    userProfileBackgroundImageURL :: Maybe URIString
        , User -> Maybe Text
    userProfileBackgroundImageURLHttps :: Maybe URIString
        , User -> Maybe Bool
    userProfileBackgroundTile :: Maybe Bool
        , User -> Maybe Text
    userProfileBannerURL :: Maybe URIString
        , User -> Maybe Text
    userProfileImageURL :: Maybe URIString
        , User -> Maybe Text
    userProfileImageURLHttps :: Maybe URIString
        , User -> Text
    userProfileLinkColor :: Text
        , User -> Text
    userProfileSidebarBorderColor :: Text
        , User -> Text
    userProfileSidebarFillColor :: Text
        , User -> Text
    userProfileTextColor :: Text
        , User -> Bool
    userProfileUseBackgroundImage :: Bool
        , User -> Bool
    userProtected :: Bool
        , User -> Text
    userScreenName :: Text
        , User -> Maybe Bool
    userShowAllInlineMedia :: Maybe Bool
        , User -> Int
    userStatusesCount :: Int
        , User -> Maybe Text
    userTimeZone :: Maybe Text
        , User -> Maybe Text
    userURL :: Maybe URIString
        , User -> Maybe Int
    userUtcOffset :: Maybe Int
        , User -> Bool
    userVerified :: Bool
        , User -> Maybe [Text]
    userWithheldInCountries :: Maybe [Text]
        , User -> Maybe Text
    userWithheldScope :: Maybe Text
        }
        deriving (Int -> User -> ShowS
    [User] -> ShowS
    User -> String
    (Int -> User -> ShowS)
    -> (User -> String) -> ([User] -> ShowS) -> Show User
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> User -> ShowS
    showsPrec :: Int -> User -> ShowS
    $cshow :: User -> String
    show :: User -> String
    $cshowList :: [User] -> ShowS
    showList :: [User] -> ShowS
    Show, User -> User -> Bool
    (User -> User -> Bool) -> (User -> User -> Bool) -> Eq User
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: User -> User -> Bool
    == :: User -> User -> Bool
    $c/= :: User -> User -> Bool
    /= :: User -> User -> Bool
    Eq, Typeable User
    Typeable User =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> User -> c User)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c User)
    -> (User -> Constr)
    -> (User -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c User))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c User))
    -> ((forall b. Data b => b -> b) -> User -> User)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> User -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> User -> r)
    -> (forall u. (forall d. Data d => d -> u) -> User -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> User -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> User -> m User)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> User -> m User)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> User -> m User)
    -> Data User
    User -> Constr
    User -> DataType
    (forall b. Data b => b -> b) -> User -> User
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> User -> u
    forall u. (forall d. Data d => d -> u) -> User -> [u]
    forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> User -> r
    forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> User -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> User -> m User
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> User -> m User
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c User
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> User -> c User
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c User)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c User)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> User -> c User
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> User -> c User
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c User
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c User
    $ctoConstr :: User -> Constr
    toConstr :: User -> Constr
    $cdataTypeOf :: User -> DataType
    dataTypeOf :: User -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c User)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c User)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c User)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c User)
    $cgmapT :: (forall b. Data b => b -> b) -> User -> User
    gmapT :: (forall b. Data b => b -> b) -> User -> User
    $cgmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> User -> r
    gmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> User -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> User -> r
    gmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> User -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> User -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> User -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> User -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> User -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> User -> m User
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> User -> m User
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> User -> m User
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> User -> m User
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> User -> m User
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> User -> m User
    Data, Typeable, (forall x. User -> Rep User x)
    -> (forall x. Rep User x -> User) -> Generic User
    forall x. Rep User x -> User
    forall x. User -> Rep User x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. User -> Rep User x
    from :: forall x. User -> Rep User x
    $cto :: forall x. Rep User x -> User
    to :: forall x. Rep User x -> User
    Generic)

    instance FromJSON User where
        parseJSON :: Value -> Parser User
    parseJSON (Object Object
    o) =
            Object -> Parser ()
    checkError Object
    o
                Parser () -> Parser User -> Parser User
    forall a b. Parser a -> Parser b -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    >> Bool
    -> UTCTime
    -> Bool
    -> Bool
    -> Maybe Text
    -> Maybe Text
    -> Int
    -> Maybe Bool
    -> Maybe Bool
    -> Int
    -> Int
    -> Bool
    -> Integer
    -> Bool
    -> Maybe String
    -> Int
    -> Maybe Text
    -> Text
    -> Maybe Bool
    -> Maybe Text
    -> Maybe Text
    -> Maybe Text
    -> Maybe Bool
    -> Maybe Text
    -> Maybe Text
    -> Maybe Text
    -> Text
    -> Text
    -> Text
    -> Text
    -> Bool
    -> Bool
    -> Text
    -> Maybe Bool
    -> Int
    -> Maybe Text
    -> Maybe Text
    -> Maybe Int
    -> Bool
    -> Maybe [Text]
    -> Maybe Text
    -> User
    User (Bool
     -> UTCTime
     -> Bool
     -> Bool
     -> Maybe Text
     -> Maybe Text
     -> Int
     -> Maybe Bool
     -> Maybe Bool
     -> Int
     -> Int
     -> Bool
     -> Integer
     -> Bool
     -> Maybe String
     -> Int
     -> Maybe Text
     -> Text
     -> Maybe Bool
     -> Maybe Text
     -> Maybe Text
     -> Maybe Text
     -> Maybe Bool
     -> Maybe Text
     -> Maybe Text
     -> Maybe Text
     -> Text
     -> Text
     -> Text
     -> Text
     -> Bool
     -> Bool
     -> Text
     -> Maybe Bool
     -> Int
     -> Maybe Text
     -> Maybe Text
     -> Maybe Int
     -> Bool
     -> Maybe [Text]
     -> Maybe Text
     -> User)
    -> Parser Bool
    -> Parser
         (UTCTime
          -> Bool
          -> Bool
          -> Maybe Text
          -> Maybe Text
          -> Int
          -> Maybe Bool
          -> Maybe Bool
          -> Int
          -> Int
          -> Bool
          -> Integer
          -> Bool
          -> Maybe String
          -> Int
          -> Maybe Text
          -> Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser Bool
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "contributors_enabled"
                Parser
      (UTCTime
       -> Bool
       -> Bool
       -> Maybe Text
       -> Maybe Text
       -> Int
       -> Maybe Bool
       -> Maybe Bool
       -> Int
       -> Int
       -> Bool
       -> Integer
       -> Bool
       -> Maybe String
       -> Int
       -> Maybe Text
       -> Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser UTCTime
    -> Parser
         (Bool
          -> Bool
          -> Maybe Text
          -> Maybe Text
          -> Int
          -> Maybe Bool
          -> Maybe Bool
          -> Int
          -> Int
          -> Bool
          -> Integer
          -> Bool
          -> Maybe String
          -> Int
          -> Maybe Text
          -> Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> (Object
    o Object -> Key -> Parser TwitterTime
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "created_at" Parser TwitterTime
    -> (TwitterTime -> Parser UTCTime) -> Parser UTCTime
    forall a b. Parser a -> (a -> Parser b) -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= UTCTime -> Parser UTCTime
    forall a. a -> Parser a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (UTCTime -> Parser UTCTime)
    -> (TwitterTime -> UTCTime) -> TwitterTime -> Parser UTCTime
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . TwitterTime -> UTCTime
    fromTwitterTime)
                Parser
      (Bool
       -> Bool
       -> Maybe Text
       -> Maybe Text
       -> Int
       -> Maybe Bool
       -> Maybe Bool
       -> Int
       -> Int
       -> Bool
       -> Integer
       -> Bool
       -> Maybe String
       -> Int
       -> Maybe Text
       -> Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Bool
    -> Parser
         (Bool
          -> Maybe Text
          -> Maybe Text
          -> Int
          -> Maybe Bool
          -> Maybe Bool
          -> Int
          -> Int
          -> Bool
          -> Integer
          -> Bool
          -> Maybe String
          -> Int
          -> Maybe Text
          -> Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Bool
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "default_profile"
                Parser
      (Bool
       -> Maybe Text
       -> Maybe Text
       -> Int
       -> Maybe Bool
       -> Maybe Bool
       -> Int
       -> Int
       -> Bool
       -> Integer
       -> Bool
       -> Maybe String
       -> Int
       -> Maybe Text
       -> Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Bool
    -> Parser
         (Maybe Text
          -> Maybe Text
          -> Int
          -> Maybe Bool
          -> Maybe Bool
          -> Int
          -> Int
          -> Bool
          -> Integer
          -> Bool
          -> Maybe String
          -> Int
          -> Maybe Text
          -> Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Bool
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "default_profile_image"
                Parser
      (Maybe Text
       -> Maybe Text
       -> Int
       -> Maybe Bool
       -> Maybe Bool
       -> Int
       -> Int
       -> Bool
       -> Integer
       -> Bool
       -> Maybe String
       -> Int
       -> Maybe Text
       -> Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser (Maybe Text)
    -> Parser
         (Maybe Text
          -> Int
          -> Maybe Bool
          -> Maybe Bool
          -> Int
          -> Int
          -> Bool
          -> Integer
          -> Bool
          -> Maybe String
          -> Int
          -> Maybe Text
          -> Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Text)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "description"
                Parser
      (Maybe Text
       -> Int
       -> Maybe Bool
       -> Maybe Bool
       -> Int
       -> Int
       -> Bool
       -> Integer
       -> Bool
       -> Maybe String
       -> Int
       -> Maybe Text
       -> Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser (Maybe Text)
    -> Parser
         (Int
          -> Maybe Bool
          -> Maybe Bool
          -> Int
          -> Int
          -> Bool
          -> Integer
          -> Bool
          -> Maybe String
          -> Int
          -> Maybe Text
          -> Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> (Maybe (Maybe Text) -> Maybe Text)
    -> Parser (Maybe (Maybe Text)) -> Parser (Maybe Text)
    forall a b. (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap Maybe (Maybe Text) -> Maybe Text
    forall (m :: * -> *) a. Monad m => m (m a) -> m a
    join (Object
    o Object -> Key -> Parser (Maybe (Maybe Text))
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "email") -- The field can be a null value
                Parser
      (Int
       -> Maybe Bool
       -> Maybe Bool
       -> Int
       -> Int
       -> Bool
       -> Integer
       -> Bool
       -> Maybe String
       -> Int
       -> Maybe Text
       -> Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Int
    -> Parser
         (Maybe Bool
          -> Maybe Bool
          -> Int
          -> Int
          -> Bool
          -> Integer
          -> Bool
          -> Maybe String
          -> Int
          -> Maybe Text
          -> Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Int
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "favourites_count"
                Parser
      (Maybe Bool
       -> Maybe Bool
       -> Int
       -> Int
       -> Bool
       -> Integer
       -> Bool
       -> Maybe String
       -> Int
       -> Maybe Text
       -> Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser (Maybe Bool)
    -> Parser
         (Maybe Bool
          -> Int
          -> Int
          -> Bool
          -> Integer
          -> Bool
          -> Maybe String
          -> Int
          -> Maybe Text
          -> Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe (Maybe Bool))
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "follow_request_sent" Parser (Maybe (Maybe Bool)) -> Maybe Bool -> Parser (Maybe Bool)
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= Maybe Bool
    forall a. Maybe a
    Nothing
                Parser
      (Maybe Bool
       -> Int
       -> Int
       -> Bool
       -> Integer
       -> Bool
       -> Maybe String
       -> Int
       -> Maybe Text
       -> Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser (Maybe Bool)
    -> Parser
         (Int
          -> Int
          -> Bool
          -> Integer
          -> Bool
          -> Maybe String
          -> Int
          -> Maybe Text
          -> Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe (Maybe Bool))
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "following" Parser (Maybe (Maybe Bool)) -> Maybe Bool -> Parser (Maybe Bool)
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= Maybe Bool
    forall a. Maybe a
    Nothing
                Parser
      (Int
       -> Int
       -> Bool
       -> Integer
       -> Bool
       -> Maybe String
       -> Int
       -> Maybe Text
       -> Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Int
    -> Parser
         (Int
          -> Bool
          -> Integer
          -> Bool
          -> Maybe String
          -> Int
          -> Maybe Text
          -> Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Int
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "followers_count"
                Parser
      (Int
       -> Bool
       -> Integer
       -> Bool
       -> Maybe String
       -> Int
       -> Maybe Text
       -> Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Int
    -> Parser
         (Bool
          -> Integer
          -> Bool
          -> Maybe String
          -> Int
          -> Maybe Text
          -> Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Int
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "friends_count"
                Parser
      (Bool
       -> Integer
       -> Bool
       -> Maybe String
       -> Int
       -> Maybe Text
       -> Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Bool
    -> Parser
         (Integer
          -> Bool
          -> Maybe String
          -> Int
          -> Maybe Text
          -> Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Bool
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "geo_enabled"
                Parser
      (Integer
       -> Bool
       -> Maybe String
       -> Int
       -> Maybe Text
       -> Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Integer
    -> Parser
         (Bool
          -> Maybe String
          -> Int
          -> Maybe Text
          -> Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Integer
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "id"
                Parser
      (Bool
       -> Maybe String
       -> Int
       -> Maybe Text
       -> Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Bool
    -> Parser
         (Maybe String
          -> Int
          -> Maybe Text
          -> Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Bool
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "is_translator"
                Parser
      (Maybe String
       -> Int
       -> Maybe Text
       -> Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser (Maybe String)
    -> Parser
         (Int
          -> Maybe Text
          -> Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe String)
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "lang"
                Parser
      (Int
       -> Maybe Text
       -> Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Int
    -> Parser
         (Maybe Text
          -> Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Int
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "listed_count"
                Parser
      (Maybe Text
       -> Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser (Maybe Text)
    -> Parser
         (Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Text)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "location"
                Parser
      (Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Text
    -> Parser
         (Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "name"
                Parser
      (Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser (Maybe Bool)
    -> Parser
         (Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe (Maybe Bool))
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "notifications" Parser (Maybe (Maybe Bool)) -> Maybe Bool -> Parser (Maybe Bool)
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= Maybe Bool
    forall a. Maybe a
    Nothing
                Parser
      (Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser (Maybe Text)
    -> Parser
         (Maybe Text
          -> Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Text)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "profile_background_color"
                Parser
      (Maybe Text
       -> Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser (Maybe Text)
    -> Parser
         (Maybe Text
          -> Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Text)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "profile_background_image_url"
                Parser
      (Maybe Text
       -> Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser (Maybe Text)
    -> Parser
         (Maybe Bool
          -> Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Text)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "profile_background_image_url_https"
                Parser
      (Maybe Bool
       -> Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser (Maybe Bool)
    -> Parser
         (Maybe Text
          -> Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Bool)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "profile_background_tile"
                Parser
      (Maybe Text
       -> Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser (Maybe Text)
    -> Parser
         (Maybe Text
          -> Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Text)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "profile_banner_url"
                Parser
      (Maybe Text
       -> Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser (Maybe Text)
    -> Parser
         (Maybe Text
          -> Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Text)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "profile_image_url"
                Parser
      (Maybe Text
       -> Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser (Maybe Text)
    -> Parser
         (Text
          -> Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Text)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "profile_image_url_https"
                Parser
      (Text
       -> Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Text
    -> Parser
         (Text
          -> Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "profile_link_color"
                Parser
      (Text
       -> Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Text
    -> Parser
         (Text
          -> Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "profile_sidebar_border_color"
                Parser
      (Text
       -> Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Text
    -> Parser
         (Text
          -> Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "profile_sidebar_fill_color"
                Parser
      (Text
       -> Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Text
    -> Parser
         (Bool
          -> Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "profile_text_color"
                Parser
      (Bool
       -> Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Bool
    -> Parser
         (Bool
          -> Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Bool
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "profile_use_background_image"
                Parser
      (Bool
       -> Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Bool
    -> Parser
         (Text
          -> Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Bool
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "protected"
                Parser
      (Text
       -> Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Text
    -> Parser
         (Maybe Bool
          -> Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "screen_name"
                Parser
      (Maybe Bool
       -> Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser (Maybe Bool)
    -> Parser
         (Int
          -> Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Bool)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "show_all_inline_media"
                Parser
      (Int
       -> Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser Int
    -> Parser
         (Maybe Text
          -> Maybe Text
          -> Maybe Int
          -> Bool
          -> Maybe [Text]
          -> Maybe Text
          -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Int
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "statuses_count"
                Parser
      (Maybe Text
       -> Maybe Text
       -> Maybe Int
       -> Bool
       -> Maybe [Text]
       -> Maybe Text
       -> User)
    -> Parser (Maybe Text)
    -> Parser
         (Maybe Text
          -> Maybe Int -> Bool -> Maybe [Text] -> Maybe Text -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Text)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "time_zone"
                Parser
      (Maybe Text
       -> Maybe Int -> Bool -> Maybe [Text] -> Maybe Text -> User)
    -> Parser (Maybe Text)
    -> Parser (Maybe Int -> Bool -> Maybe [Text] -> Maybe Text -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe (Maybe Text))
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "url" Parser (Maybe (Maybe Text)) -> Maybe Text -> Parser (Maybe Text)
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= Maybe Text
    forall a. Maybe a
    Nothing
                Parser (Maybe Int -> Bool -> Maybe [Text] -> Maybe Text -> User)
    -> Parser (Maybe Int)
    -> Parser (Bool -> Maybe [Text] -> Maybe Text -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Int)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "utc_offset"
                Parser (Bool -> Maybe [Text] -> Maybe Text -> User)
    -> Parser Bool -> Parser (Maybe [Text] -> Maybe Text -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Bool
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "verified"
                Parser (Maybe [Text] -> Maybe Text -> User)
    -> Parser (Maybe [Text]) -> Parser (Maybe Text -> User)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe [Text])
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "withheld_in_countries"
                Parser (Maybe Text -> User) -> Parser (Maybe Text) -> Parser User
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Text)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "withheld_scope"
        parseJSON Value
    v = String -> Parser User
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser User) -> String -> Parser User
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse user from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON User where
        toJSON :: User -> Value
    toJSON User {Bool
    Int
    Integer
    Maybe Bool
    Maybe Int
    Maybe String
    Maybe [Text]
    Maybe Text
    Text
    UTCTime
    userContributorsEnabled :: User -> Bool
    userCreatedAt :: User -> UTCTime
    userDefaultProfile :: User -> Bool
    userDefaultProfileImage :: User -> Bool
    userDescription :: User -> Maybe Text
    userEmail :: User -> Maybe Text
    userFavoritesCount :: User -> Int
    userFollowRequestSent :: User -> Maybe Bool
    userFollowing :: User -> Maybe Bool
    userFollowersCount :: User -> Int
    userFriendsCount :: User -> Int
    userGeoEnabled :: User -> Bool
    userId :: User -> Integer
    userIsTranslator :: User -> Bool
    userLang :: User -> Maybe String
    userListedCount :: User -> Int
    userLocation :: User -> Maybe Text
    userName :: User -> Text
    userNotifications :: User -> Maybe Bool
    userProfileBackgroundColor :: User -> Maybe Text
    userProfileBackgroundImageURL :: User -> Maybe Text
    userProfileBackgroundImageURLHttps :: User -> Maybe Text
    userProfileBackgroundTile :: User -> Maybe Bool
    userProfileBannerURL :: User -> Maybe Text
    userProfileImageURL :: User -> Maybe Text
    userProfileImageURLHttps :: User -> Maybe Text
    userProfileLinkColor :: User -> Text
    userProfileSidebarBorderColor :: User -> Text
    userProfileSidebarFillColor :: User -> Text
    userProfileTextColor :: User -> Text
    userProfileUseBackgroundImage :: User -> Bool
    userProtected :: User -> Bool
    userScreenName :: User -> Text
    userShowAllInlineMedia :: User -> Maybe Bool
    userStatusesCount :: User -> Int
    userTimeZone :: User -> Maybe Text
    userURL :: User -> Maybe Text
    userUtcOffset :: User -> Maybe Int
    userVerified :: User -> Bool
    userWithheldInCountries :: User -> Maybe [Text]
    userWithheldScope :: User -> Maybe Text
    userContributorsEnabled :: Bool
    userCreatedAt :: UTCTime
    userDefaultProfile :: Bool
    userDefaultProfileImage :: Bool
    userDescription :: Maybe Text
    userEmail :: Maybe Text
    userFavoritesCount :: Int
    userFollowRequestSent :: Maybe Bool
    userFollowing :: Maybe Bool
    userFollowersCount :: Int
    userFriendsCount :: Int
    userGeoEnabled :: Bool
    userId :: Integer
    userIsTranslator :: Bool
    userLang :: Maybe String
    userListedCount :: Int
    userLocation :: Maybe Text
    userName :: Text
    userNotifications :: Maybe Bool
    userProfileBackgroundColor :: Maybe Text
    userProfileBackgroundImageURL :: Maybe Text
    userProfileBackgroundImageURLHttps :: Maybe Text
    userProfileBackgroundTile :: Maybe Bool
    userProfileBannerURL :: Maybe Text
    userProfileImageURL :: Maybe Text
    userProfileImageURLHttps :: Maybe Text
    userProfileLinkColor :: Text
    userProfileSidebarBorderColor :: Text
    userProfileSidebarFillColor :: Text
    userProfileTextColor :: Text
    userProfileUseBackgroundImage :: Bool
    userProtected :: Bool
    userScreenName :: Text
    userShowAllInlineMedia :: Maybe Bool
    userStatusesCount :: Int
    userTimeZone :: Maybe Text
    userURL :: Maybe Text
    userUtcOffset :: Maybe Int
    userVerified :: Bool
    userWithheldInCountries :: Maybe [Text]
    userWithheldScope :: Maybe Text
    ..} =
            [Pair] -> Value
    object
                [ Key
    "contributors_enabled" Key -> Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Bool
    userContributorsEnabled
                , Key
    "created_at" Key -> TwitterTime -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= UTCTime -> TwitterTime
    TwitterTime UTCTime
    userCreatedAt
                , Key
    "default_profile" Key -> Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Bool
    userDefaultProfile
                , Key
    "default_profile_image" Key -> Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Bool
    userDefaultProfileImage
                , Key
    "description" Key -> Maybe Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Text
    userDescription
                , Key
    "email" Key -> Maybe Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Text
    userEmail
                , Key
    "favourites_count" Key -> Int -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Int
    userFavoritesCount
                , Key
    "follow_request_sent" Key -> Maybe Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Bool
    userFollowRequestSent
                , Key
    "following" Key -> Maybe Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Bool
    userFollowing
                , Key
    "followers_count" Key -> Int -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Int
    userFollowersCount
                , Key
    "friends_count" Key -> Int -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Int
    userFriendsCount
                , Key
    "geo_enabled" Key -> Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Bool
    userGeoEnabled
                , Key
    "id" Key -> Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer
    userId
                , Key
    "is_translator" Key -> Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Bool
    userIsTranslator
                , Key
    "lang" Key -> Maybe String -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe String
    userLang
                , Key
    "listed_count" Key -> Int -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Int
    userListedCount
                , Key
    "location" Key -> Maybe Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Text
    userLocation
                , Key
    "name" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    userName
                , Key
    "notifications" Key -> Maybe Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Bool
    userNotifications
                , Key
    "profile_background_color" Key -> Maybe Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Text
    userProfileBackgroundColor
                , Key
    "profile_background_image_url" Key -> Maybe Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Text
    userProfileBackgroundImageURL
                , Key
    "profile_background_image_url_https" Key -> Maybe Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Text
    userProfileBackgroundImageURLHttps
                , Key
    "profile_background_tile" Key -> Maybe Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Bool
    userProfileBackgroundTile
                , Key
    "profile_banner_url" Key -> Maybe Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Text
    userProfileBannerURL
                , Key
    "profile_image_url" Key -> Maybe Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Text
    userProfileImageURL
                , Key
    "profile_image_url_https" Key -> Maybe Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Text
    userProfileImageURLHttps
                , Key
    "profile_link_color" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    userProfileLinkColor
                , Key
    "profile_sidebar_border_color" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    userProfileSidebarBorderColor
                , Key
    "profile_sidebar_fill_color" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    userProfileSidebarFillColor
                , Key
    "profile_text_color" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    userProfileTextColor
                , Key
    "profile_use_background_image" Key -> Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Bool
    userProfileUseBackgroundImage
                , Key
    "protected" Key -> Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Bool
    userProtected
                , Key
    "screen_name" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    userScreenName
                , Key
    "show_all_inline_media" Key -> Maybe Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Bool
    userShowAllInlineMedia
                , Key
    "statuses_count" Key -> Int -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Int
    userStatusesCount
                , Key
    "time_zone" Key -> Maybe Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Text
    userTimeZone
                , Key
    "url" Key -> Maybe Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Text
    userURL
                , Key
    "utc_offset" Key -> Maybe Int -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Int
    userUtcOffset
                , Key
    "verified" Key -> Bool -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Bool
    userVerified
                , Key
    "withheld_in_countries" Key -> Maybe [Text] -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe [Text]
    userWithheldInCountries
                , Key
    "withheld_scope" Key -> Maybe Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Text
    userWithheldScope
                ]

    data List = List
        { List -> Int
    listId :: Int
        , List -> Text
    listName :: Text
        , List -> Text
    listFullName :: Text
        , List -> Int
    listMemberCount :: Int
        , List -> Int
    listSubscriberCount :: Int
        , List -> Text
    listMode :: Text
        , List -> User
    listUser :: User
        }
        deriving (Int -> List -> ShowS
    [List] -> ShowS
    List -> String
    (Int -> List -> ShowS)
    -> (List -> String) -> ([List] -> ShowS) -> Show List
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> List -> ShowS
    showsPrec :: Int -> List -> ShowS
    $cshow :: List -> String
    show :: List -> String
    $cshowList :: [List] -> ShowS
    showList :: [List] -> ShowS
    Show, List -> List -> Bool
    (List -> List -> Bool) -> (List -> List -> Bool) -> Eq List
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: List -> List -> Bool
    == :: List -> List -> Bool
    $c/= :: List -> List -> Bool
    /= :: List -> List -> Bool
    Eq, Typeable List
    Typeable List =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> List -> c List)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c List)
    -> (List -> Constr)
    -> (List -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c List))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c List))
    -> ((forall b. Data b => b -> b) -> List -> List)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> List -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> List -> r)
    -> (forall u. (forall d. Data d => d -> u) -> List -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> List -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> List -> m List)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> List -> m List)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> List -> m List)
    -> Data List
    List -> Constr
    List -> DataType
    (forall b. Data b => b -> b) -> List -> List
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> List -> u
    forall u. (forall d. Data d => d -> u) -> List -> [u]
    forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> List -> r
    forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> List -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> List -> m List
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> List -> m List
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c List
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> List -> c List
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c List)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c List)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> List -> c List
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> List -> c List
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c List
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c List
    $ctoConstr :: List -> Constr
    toConstr :: List -> Constr
    $cdataTypeOf :: List -> DataType
    dataTypeOf :: List -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c List)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c List)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c List)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c List)
    $cgmapT :: (forall b. Data b => b -> b) -> List -> List
    gmapT :: (forall b. Data b => b -> b) -> List -> List
    $cgmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> List -> r
    gmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> List -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> List -> r
    gmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> List -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> List -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> List -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> List -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> List -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> List -> m List
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> List -> m List
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> List -> m List
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> List -> m List
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> List -> m List
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> List -> m List
    Data, Typeable, (forall x. List -> Rep List x)
    -> (forall x. Rep List x -> List) -> Generic List
    forall x. Rep List x -> List
    forall x. List -> Rep List x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. List -> Rep List x
    from :: forall x. List -> Rep List x
    $cto :: forall x. Rep List x -> List
    to :: forall x. Rep List x -> List
    Generic)

    instance FromJSON List where
        parseJSON :: Value -> Parser List
    parseJSON (Object Object
    o) =
            Object -> Parser ()
    checkError Object
    o
                Parser () -> Parser List -> Parser List
    forall a b. Parser a -> Parser b -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    >> Int -> Text -> Text -> Int -> Int -> Text -> User -> List
    List (Int -> Text -> Text -> Int -> Int -> Text -> User -> List)
    -> Parser Int
    -> Parser (Text -> Text -> Int -> Int -> Text -> User -> List)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser Int
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "id"
                Parser (Text -> Text -> Int -> Int -> Text -> User -> List)
    -> Parser Text
    -> Parser (Text -> Int -> Int -> Text -> User -> List)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "name"
                Parser (Text -> Int -> Int -> Text -> User -> List)
    -> Parser Text -> Parser (Int -> Int -> Text -> User -> List)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "full_name"
                Parser (Int -> Int -> Text -> User -> List)
    -> Parser Int -> Parser (Int -> Text -> User -> List)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Int
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "member_count"
                Parser (Int -> Text -> User -> List)
    -> Parser Int -> Parser (Text -> User -> List)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Int
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "subscriber_count"
                Parser (Text -> User -> List)
    -> Parser Text -> Parser (User -> List)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "mode"
                Parser (User -> List) -> Parser User -> Parser List
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser User
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "user"
        parseJSON Value
    v = String -> Parser List
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser List) -> String -> Parser List
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse List from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON List where
        toJSON :: List -> Value
    toJSON List {Int
    Text
    User
    listId :: List -> Int
    listName :: List -> Text
    listFullName :: List -> Text
    listMemberCount :: List -> Int
    listSubscriberCount :: List -> Int
    listMode :: List -> Text
    listUser :: List -> User
    listId :: Int
    listName :: Text
    listFullName :: Text
    listMemberCount :: Int
    listSubscriberCount :: Int
    listMode :: Text
    listUser :: User
    ..} =
            [Pair] -> Value
    object
                [ Key
    "id" Key -> Int -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Int
    listId
                , Key
    "name" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    listName
                , Key
    "full_name" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    listFullName
                , Key
    "member_count" Key -> Int -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Int
    listMemberCount
                , Key
    "subscriber_count" Key -> Int -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Int
    listSubscriberCount
                , Key
    "mode" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    listMode
                , Key
    "user" Key -> User -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= User
    listUser
                ]

    -- | Hashtag entity.
    -- See <https://dev.twitter.com/docs/platform-objects/entities#obj-hashtags>.
    data HashTagEntity = HashTagEntity
        { -- | The Hashtag text
          HashTagEntity -> Text
    hashTagText :: Text
        }
        deriving (Int -> HashTagEntity -> ShowS
    [HashTagEntity] -> ShowS
    HashTagEntity -> String
    (Int -> HashTagEntity -> ShowS)
    -> (HashTagEntity -> String)
    -> ([HashTagEntity] -> ShowS)
    -> Show HashTagEntity
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> HashTagEntity -> ShowS
    showsPrec :: Int -> HashTagEntity -> ShowS
    $cshow :: HashTagEntity -> String
    show :: HashTagEntity -> String
    $cshowList :: [HashTagEntity] -> ShowS
    showList :: [HashTagEntity] -> ShowS
    Show, HashTagEntity -> HashTagEntity -> Bool
    (HashTagEntity -> HashTagEntity -> Bool)
    -> (HashTagEntity -> HashTagEntity -> Bool) -> Eq HashTagEntity
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: HashTagEntity -> HashTagEntity -> Bool
    == :: HashTagEntity -> HashTagEntity -> Bool
    $c/= :: HashTagEntity -> HashTagEntity -> Bool
    /= :: HashTagEntity -> HashTagEntity -> Bool
    Eq, Typeable HashTagEntity
    Typeable HashTagEntity =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> HashTagEntity -> c HashTagEntity)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c HashTagEntity)
    -> (HashTagEntity -> Constr)
    -> (HashTagEntity -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c HashTagEntity))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c HashTagEntity))
    -> ((forall b. Data b => b -> b) -> HashTagEntity -> HashTagEntity)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> HashTagEntity -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> HashTagEntity -> r)
    -> (forall u. (forall d. Data d => d -> u) -> HashTagEntity -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> HashTagEntity -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> HashTagEntity -> m HashTagEntity)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> HashTagEntity -> m HashTagEntity)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> HashTagEntity -> m HashTagEntity)
    -> Data HashTagEntity
    HashTagEntity -> Constr
    HashTagEntity -> DataType
    (forall b. Data b => b -> b) -> HashTagEntity -> HashTagEntity
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> HashTagEntity -> u
    forall u. (forall d. Data d => d -> u) -> HashTagEntity -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> HashTagEntity -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> HashTagEntity -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> HashTagEntity -> m HashTagEntity
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> HashTagEntity -> m HashTagEntity
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c HashTagEntity
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> HashTagEntity -> c HashTagEntity
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c HashTagEntity)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c HashTagEntity)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> HashTagEntity -> c HashTagEntity
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> HashTagEntity -> c HashTagEntity
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c HashTagEntity
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c HashTagEntity
    $ctoConstr :: HashTagEntity -> Constr
    toConstr :: HashTagEntity -> Constr
    $cdataTypeOf :: HashTagEntity -> DataType
    dataTypeOf :: HashTagEntity -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c HashTagEntity)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c HashTagEntity)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c HashTagEntity)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c HashTagEntity)
    $cgmapT :: (forall b. Data b => b -> b) -> HashTagEntity -> HashTagEntity
    gmapT :: (forall b. Data b => b -> b) -> HashTagEntity -> HashTagEntity
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> HashTagEntity -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> HashTagEntity -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> HashTagEntity -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> HashTagEntity -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> HashTagEntity -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> HashTagEntity -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> HashTagEntity -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> HashTagEntity -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> HashTagEntity -> m HashTagEntity
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> HashTagEntity -> m HashTagEntity
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> HashTagEntity -> m HashTagEntity
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> HashTagEntity -> m HashTagEntity
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> HashTagEntity -> m HashTagEntity
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> HashTagEntity -> m HashTagEntity
    Data, Typeable, (forall x. HashTagEntity -> Rep HashTagEntity x)
    -> (forall x. Rep HashTagEntity x -> HashTagEntity)
    -> Generic HashTagEntity
    forall x. Rep HashTagEntity x -> HashTagEntity
    forall x. HashTagEntity -> Rep HashTagEntity x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. HashTagEntity -> Rep HashTagEntity x
    from :: forall x. HashTagEntity -> Rep HashTagEntity x
    $cto :: forall x. Rep HashTagEntity x -> HashTagEntity
    to :: forall x. Rep HashTagEntity x -> HashTagEntity
    Generic)

    instance FromJSON HashTagEntity where
        parseJSON :: Value -> Parser HashTagEntity
    parseJSON (Object Object
    o) =
            Text -> HashTagEntity
    HashTagEntity (Text -> HashTagEntity) -> Parser Text -> Parser HashTagEntity
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "text"
        parseJSON Value
    v = String -> Parser HashTagEntity
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser HashTagEntity) -> String -> Parser HashTagEntity
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse hashtag entity from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON HashTagEntity where
        toJSON :: HashTagEntity -> Value
    toJSON HashTagEntity {Text
    hashTagText :: HashTagEntity -> Text
    hashTagText :: Text
    ..} = [Pair] -> Value
    object [Key
    "text" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    hashTagText]

    -- | User mention entity.
    -- See <https://dev.twitter.com/docs/platform-objects/entities#obj-usermention>.
    data UserEntity = UserEntity
        { UserEntity -> Integer
    userEntityUserId :: UserId
        , UserEntity -> Text
    userEntityUserName :: UserName
        , UserEntity -> Text
    userEntityUserScreenName :: Text
        }
        deriving (Int -> UserEntity -> ShowS
    [UserEntity] -> ShowS
    UserEntity -> String
    (Int -> UserEntity -> ShowS)
    -> (UserEntity -> String)
    -> ([UserEntity] -> ShowS)
    -> Show UserEntity
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> UserEntity -> ShowS
    showsPrec :: Int -> UserEntity -> ShowS
    $cshow :: UserEntity -> String
    show :: UserEntity -> String
    $cshowList :: [UserEntity] -> ShowS
    showList :: [UserEntity] -> ShowS
    Show, UserEntity -> UserEntity -> Bool
    (UserEntity -> UserEntity -> Bool)
    -> (UserEntity -> UserEntity -> Bool) -> Eq UserEntity
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: UserEntity -> UserEntity -> Bool
    == :: UserEntity -> UserEntity -> Bool
    $c/= :: UserEntity -> UserEntity -> Bool
    /= :: UserEntity -> UserEntity -> Bool
    Eq, Typeable UserEntity
    Typeable UserEntity =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> UserEntity -> c UserEntity)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c UserEntity)
    -> (UserEntity -> Constr)
    -> (UserEntity -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c UserEntity))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c UserEntity))
    -> ((forall b. Data b => b -> b) -> UserEntity -> UserEntity)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> UserEntity -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> UserEntity -> r)
    -> (forall u. (forall d. Data d => d -> u) -> UserEntity -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> UserEntity -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> UserEntity -> m UserEntity)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> UserEntity -> m UserEntity)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> UserEntity -> m UserEntity)
    -> Data UserEntity
    UserEntity -> Constr
    UserEntity -> DataType
    (forall b. Data b => b -> b) -> UserEntity -> UserEntity
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> UserEntity -> u
    forall u. (forall d. Data d => d -> u) -> UserEntity -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> UserEntity -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> UserEntity -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> UserEntity -> m UserEntity
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> UserEntity -> m UserEntity
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c UserEntity
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> UserEntity -> c UserEntity
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c UserEntity)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UserEntity)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> UserEntity -> c UserEntity
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> UserEntity -> c UserEntity
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c UserEntity
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c UserEntity
    $ctoConstr :: UserEntity -> Constr
    toConstr :: UserEntity -> Constr
    $cdataTypeOf :: UserEntity -> DataType
    dataTypeOf :: UserEntity -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c UserEntity)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c UserEntity)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UserEntity)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UserEntity)
    $cgmapT :: (forall b. Data b => b -> b) -> UserEntity -> UserEntity
    gmapT :: (forall b. Data b => b -> b) -> UserEntity -> UserEntity
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> UserEntity -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> UserEntity -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> UserEntity -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> UserEntity -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> UserEntity -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> UserEntity -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> UserEntity -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> UserEntity -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> UserEntity -> m UserEntity
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> UserEntity -> m UserEntity
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> UserEntity -> m UserEntity
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> UserEntity -> m UserEntity
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> UserEntity -> m UserEntity
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> UserEntity -> m UserEntity
    Data, Typeable, (forall x. UserEntity -> Rep UserEntity x)
    -> (forall x. Rep UserEntity x -> UserEntity) -> Generic UserEntity
    forall x. Rep UserEntity x -> UserEntity
    forall x. UserEntity -> Rep UserEntity x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. UserEntity -> Rep UserEntity x
    from :: forall x. UserEntity -> Rep UserEntity x
    $cto :: forall x. Rep UserEntity x -> UserEntity
    to :: forall x. Rep UserEntity x -> UserEntity
    Generic)

    instance FromJSON UserEntity where
        parseJSON :: Value -> Parser UserEntity
    parseJSON (Object Object
    o) =
            Integer -> Text -> Text -> UserEntity
    UserEntity (Integer -> Text -> Text -> UserEntity)
    -> Parser Integer -> Parser (Text -> Text -> UserEntity)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser Integer
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "id"
                Parser (Text -> Text -> UserEntity)
    -> Parser Text -> Parser (Text -> UserEntity)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "name"
                Parser (Text -> UserEntity) -> Parser Text -> Parser UserEntity
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "screen_name"
        parseJSON Value
    v = String -> Parser UserEntity
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser UserEntity) -> String -> Parser UserEntity
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse user entity from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON UserEntity where
        toJSON :: UserEntity -> Value
    toJSON UserEntity {Integer
    Text
    userEntityUserId :: UserEntity -> Integer
    userEntityUserName :: UserEntity -> Text
    userEntityUserScreenName :: UserEntity -> Text
    userEntityUserId :: Integer
    userEntityUserName :: Text
    userEntityUserScreenName :: Text
    ..} =
            [Pair] -> Value
    object
                [ Key
    "id" Key -> Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer
    userEntityUserId
                , Key
    "name" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    userEntityUserName
                , Key
    "screen_name" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    userEntityUserScreenName
                ]

    -- | URL entity.
    -- See <https://dev.twitter.com/docs/platform-objects/entities#obj-url>.
    data URLEntity = URLEntity
        { -- | The URL that was extracted
          URLEntity -> Text
    ueURL :: URIString
        , -- | The fully resolved URL (only for t.co links)
          URLEntity -> Text
    ueExpanded :: URIString
        , -- | Not a URL but a string to display instead of the URL (only for t.co links)
          URLEntity -> Text
    ueDisplay :: Text
        }
        deriving (Int -> URLEntity -> ShowS
    [URLEntity] -> ShowS
    URLEntity -> String
    (Int -> URLEntity -> ShowS)
    -> (URLEntity -> String)
    -> ([URLEntity] -> ShowS)
    -> Show URLEntity
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> URLEntity -> ShowS
    showsPrec :: Int -> URLEntity -> ShowS
    $cshow :: URLEntity -> String
    show :: URLEntity -> String
    $cshowList :: [URLEntity] -> ShowS
    showList :: [URLEntity] -> ShowS
    Show, URLEntity -> URLEntity -> Bool
    (URLEntity -> URLEntity -> Bool)
    -> (URLEntity -> URLEntity -> Bool) -> Eq URLEntity
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: URLEntity -> URLEntity -> Bool
    == :: URLEntity -> URLEntity -> Bool
    $c/= :: URLEntity -> URLEntity -> Bool
    /= :: URLEntity -> URLEntity -> Bool
    Eq, Typeable URLEntity
    Typeable URLEntity =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> URLEntity -> c URLEntity)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c URLEntity)
    -> (URLEntity -> Constr)
    -> (URLEntity -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c URLEntity))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URLEntity))
    -> ((forall b. Data b => b -> b) -> URLEntity -> URLEntity)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> URLEntity -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> URLEntity -> r)
    -> (forall u. (forall d. Data d => d -> u) -> URLEntity -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> URLEntity -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> URLEntity -> m URLEntity)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> URLEntity -> m URLEntity)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> URLEntity -> m URLEntity)
    -> Data URLEntity
    URLEntity -> Constr
    URLEntity -> DataType
    (forall b. Data b => b -> b) -> URLEntity -> URLEntity
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> URLEntity -> u
    forall u. (forall d. Data d => d -> u) -> URLEntity -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> URLEntity -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> URLEntity -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> URLEntity -> m URLEntity
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> URLEntity -> m URLEntity
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c URLEntity
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> URLEntity -> c URLEntity
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c URLEntity)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URLEntity)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> URLEntity -> c URLEntity
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> URLEntity -> c URLEntity
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c URLEntity
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c URLEntity
    $ctoConstr :: URLEntity -> Constr
    toConstr :: URLEntity -> Constr
    $cdataTypeOf :: URLEntity -> DataType
    dataTypeOf :: URLEntity -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c URLEntity)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c URLEntity)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URLEntity)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URLEntity)
    $cgmapT :: (forall b. Data b => b -> b) -> URLEntity -> URLEntity
    gmapT :: (forall b. Data b => b -> b) -> URLEntity -> URLEntity
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> URLEntity -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> URLEntity -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> URLEntity -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> URLEntity -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> URLEntity -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> URLEntity -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> URLEntity -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> URLEntity -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> URLEntity -> m URLEntity
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> URLEntity -> m URLEntity
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> URLEntity -> m URLEntity
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> URLEntity -> m URLEntity
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> URLEntity -> m URLEntity
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> URLEntity -> m URLEntity
    Data, Typeable, (forall x. URLEntity -> Rep URLEntity x)
    -> (forall x. Rep URLEntity x -> URLEntity) -> Generic URLEntity
    forall x. Rep URLEntity x -> URLEntity
    forall x. URLEntity -> Rep URLEntity x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. URLEntity -> Rep URLEntity x
    from :: forall x. URLEntity -> Rep URLEntity x
    $cto :: forall x. Rep URLEntity x -> URLEntity
    to :: forall x. Rep URLEntity x -> URLEntity
    Generic)

    instance FromJSON URLEntity where
        parseJSON :: Value -> Parser URLEntity
    parseJSON (Object Object
    o) =
            Text -> Text -> Text -> URLEntity
    URLEntity (Text -> Text -> Text -> URLEntity)
    -> Parser Text -> Parser (Text -> Text -> URLEntity)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "url"
                Parser (Text -> Text -> URLEntity)
    -> Parser Text -> Parser (Text -> URLEntity)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "expanded_url"
                Parser (Text -> URLEntity) -> Parser Text -> Parser URLEntity
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "display_url"
        parseJSON Value
    v = String -> Parser URLEntity
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser URLEntity) -> String -> Parser URLEntity
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse url entity from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON URLEntity where
        toJSON :: URLEntity -> Value
    toJSON URLEntity {Text
    ueURL :: URLEntity -> Text
    ueExpanded :: URLEntity -> Text
    ueDisplay :: URLEntity -> Text
    ueURL :: Text
    ueExpanded :: Text
    ueDisplay :: Text
    ..} =
            [Pair] -> Value
    object
                [ Key
    "url" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    ueURL
                , Key
    "expanded_url" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    ueExpanded
                , Key
    "display_url" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    ueDisplay
                ]

    data MediaEntity = MediaEntity
        { MediaEntity -> Text
    meType :: Text
        , MediaEntity -> Integer
    meId :: StatusId
        , MediaEntity -> HashMap Text MediaSize
    meSizes :: HashMap Text MediaSize
        , MediaEntity -> Text
    meMediaURL :: URIString
        , MediaEntity -> Text
    meMediaURLHttps :: URIString
        , MediaEntity -> URLEntity
    meURL :: URLEntity
        }
        deriving (Int -> MediaEntity -> ShowS
    [MediaEntity] -> ShowS
    MediaEntity -> String
    (Int -> MediaEntity -> ShowS)
    -> (MediaEntity -> String)
    -> ([MediaEntity] -> ShowS)
    -> Show MediaEntity
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> MediaEntity -> ShowS
    showsPrec :: Int -> MediaEntity -> ShowS
    $cshow :: MediaEntity -> String
    show :: MediaEntity -> String
    $cshowList :: [MediaEntity] -> ShowS
    showList :: [MediaEntity] -> ShowS
    Show, MediaEntity -> MediaEntity -> Bool
    (MediaEntity -> MediaEntity -> Bool)
    -> (MediaEntity -> MediaEntity -> Bool) -> Eq MediaEntity
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: MediaEntity -> MediaEntity -> Bool
    == :: MediaEntity -> MediaEntity -> Bool
    $c/= :: MediaEntity -> MediaEntity -> Bool
    /= :: MediaEntity -> MediaEntity -> Bool
    Eq, Typeable MediaEntity
    Typeable MediaEntity =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> MediaEntity -> c MediaEntity)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c MediaEntity)
    -> (MediaEntity -> Constr)
    -> (MediaEntity -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c MediaEntity))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c MediaEntity))
    -> ((forall b. Data b => b -> b) -> MediaEntity -> MediaEntity)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> MediaEntity -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> MediaEntity -> r)
    -> (forall u. (forall d. Data d => d -> u) -> MediaEntity -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> MediaEntity -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> MediaEntity -> m MediaEntity)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> MediaEntity -> m MediaEntity)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> MediaEntity -> m MediaEntity)
    -> Data MediaEntity
    MediaEntity -> Constr
    MediaEntity -> DataType
    (forall b. Data b => b -> b) -> MediaEntity -> MediaEntity
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> MediaEntity -> u
    forall u. (forall d. Data d => d -> u) -> MediaEntity -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> MediaEntity -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> MediaEntity -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> MediaEntity -> m MediaEntity
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> MediaEntity -> m MediaEntity
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c MediaEntity
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> MediaEntity -> c MediaEntity
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c MediaEntity)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c MediaEntity)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> MediaEntity -> c MediaEntity
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> MediaEntity -> c MediaEntity
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c MediaEntity
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c MediaEntity
    $ctoConstr :: MediaEntity -> Constr
    toConstr :: MediaEntity -> Constr
    $cdataTypeOf :: MediaEntity -> DataType
    dataTypeOf :: MediaEntity -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c MediaEntity)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c MediaEntity)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c MediaEntity)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c MediaEntity)
    $cgmapT :: (forall b. Data b => b -> b) -> MediaEntity -> MediaEntity
    gmapT :: (forall b. Data b => b -> b) -> MediaEntity -> MediaEntity
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> MediaEntity -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> MediaEntity -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> MediaEntity -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> MediaEntity -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> MediaEntity -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> MediaEntity -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> MediaEntity -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> MediaEntity -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> MediaEntity -> m MediaEntity
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> MediaEntity -> m MediaEntity
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> MediaEntity -> m MediaEntity
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> MediaEntity -> m MediaEntity
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> MediaEntity -> m MediaEntity
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> MediaEntity -> m MediaEntity
    Data, Typeable, (forall x. MediaEntity -> Rep MediaEntity x)
    -> (forall x. Rep MediaEntity x -> MediaEntity)
    -> Generic MediaEntity
    forall x. Rep MediaEntity x -> MediaEntity
    forall x. MediaEntity -> Rep MediaEntity x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. MediaEntity -> Rep MediaEntity x
    from :: forall x. MediaEntity -> Rep MediaEntity x
    $cto :: forall x. Rep MediaEntity x -> MediaEntity
    to :: forall x. Rep MediaEntity x -> MediaEntity
    Generic)

    instance FromJSON MediaEntity where
        parseJSON :: Value -> Parser MediaEntity
    parseJSON v :: Value
    v@(Object Object
    o) =
            Text
    -> Integer
    -> HashMap Text MediaSize
    -> Text
    -> Text
    -> URLEntity
    -> MediaEntity
    MediaEntity (Text
     -> Integer
     -> HashMap Text MediaSize
     -> Text
     -> Text
     -> URLEntity
     -> MediaEntity)
    -> Parser Text
    -> Parser
         (Integer
          -> HashMap Text MediaSize
          -> Text
          -> Text
          -> URLEntity
          -> MediaEntity)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "type"
                Parser
      (Integer
       -> HashMap Text MediaSize
       -> Text
       -> Text
       -> URLEntity
       -> MediaEntity)
    -> Parser Integer
    -> Parser
         (HashMap Text MediaSize
          -> Text -> Text -> URLEntity -> MediaEntity)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Integer
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "id"
                Parser
      (HashMap Text MediaSize
       -> Text -> Text -> URLEntity -> MediaEntity)
    -> Parser (HashMap Text MediaSize)
    -> Parser (Text -> Text -> URLEntity -> MediaEntity)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (HashMap Text MediaSize)
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "sizes"
                Parser (Text -> Text -> URLEntity -> MediaEntity)
    -> Parser Text -> Parser (Text -> URLEntity -> MediaEntity)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "media_url"
                Parser (Text -> URLEntity -> MediaEntity)
    -> Parser Text -> Parser (URLEntity -> MediaEntity)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "media_url_https"
                Parser (URLEntity -> MediaEntity)
    -> Parser URLEntity -> Parser MediaEntity
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Value -> Parser URLEntity
    forall a. FromJSON a => Value -> Parser a
    parseJSON Value
    v
        parseJSON Value
    v = String -> Parser MediaEntity
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser MediaEntity) -> String -> Parser MediaEntity
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse media entity from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON MediaEntity where
        toJSON :: MediaEntity -> Value
    toJSON MediaEntity {Integer
    Text
    HashMap Text MediaSize
    URLEntity
    meType :: MediaEntity -> Text
    meId :: MediaEntity -> Integer
    meSizes :: MediaEntity -> HashMap Text MediaSize
    meMediaURL :: MediaEntity -> Text
    meMediaURLHttps :: MediaEntity -> Text
    meURL :: MediaEntity -> URLEntity
    meType :: Text
    meId :: Integer
    meSizes :: HashMap Text MediaSize
    meMediaURL :: Text
    meMediaURLHttps :: Text
    meURL :: URLEntity
    ..} =
            [Pair] -> Value
    object
                [ Key
    "type" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    meType
                , Key
    "id" Key -> Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer
    meId
                , Key
    "sizes" Key -> HashMap Text MediaSize -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= HashMap Text MediaSize
    meSizes
                , Key
    "media_url" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    meMediaURL
                , Key
    "media_url_https" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    meMediaURLHttps
                , Key
    "url" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= URLEntity -> Text
    ueURL URLEntity
    meURL
                , Key
    "expanded_url" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= URLEntity -> Text
    ueExpanded URLEntity
    meURL
                , Key
    "display_url" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= URLEntity -> Text
    ueDisplay URLEntity
    meURL
                ]

    -- | Size entity.
    -- See <https://dev.twitter.com/docs/platform-objects/entities#obj-size>.
    data MediaSize = MediaSize
        { MediaSize -> Int
    msWidth :: Int
        , MediaSize -> Int
    msHeight :: Int
        , MediaSize -> Text
    msResize :: Text
        }
        deriving (Int -> MediaSize -> ShowS
    [MediaSize] -> ShowS
    MediaSize -> String
    (Int -> MediaSize -> ShowS)
    -> (MediaSize -> String)
    -> ([MediaSize] -> ShowS)
    -> Show MediaSize
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> MediaSize -> ShowS
    showsPrec :: Int -> MediaSize -> ShowS
    $cshow :: MediaSize -> String
    show :: MediaSize -> String
    $cshowList :: [MediaSize] -> ShowS
    showList :: [MediaSize] -> ShowS
    Show, MediaSize -> MediaSize -> Bool
    (MediaSize -> MediaSize -> Bool)
    -> (MediaSize -> MediaSize -> Bool) -> Eq MediaSize
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: MediaSize -> MediaSize -> Bool
    == :: MediaSize -> MediaSize -> Bool
    $c/= :: MediaSize -> MediaSize -> Bool
    /= :: MediaSize -> MediaSize -> Bool
    Eq, Typeable MediaSize
    Typeable MediaSize =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> MediaSize -> c MediaSize)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c MediaSize)
    -> (MediaSize -> Constr)
    -> (MediaSize -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c MediaSize))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MediaSize))
    -> ((forall b. Data b => b -> b) -> MediaSize -> MediaSize)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> MediaSize -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> MediaSize -> r)
    -> (forall u. (forall d. Data d => d -> u) -> MediaSize -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> MediaSize -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> MediaSize -> m MediaSize)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> MediaSize -> m MediaSize)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> MediaSize -> m MediaSize)
    -> Data MediaSize
    MediaSize -> Constr
    MediaSize -> DataType
    (forall b. Data b => b -> b) -> MediaSize -> MediaSize
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> MediaSize -> u
    forall u. (forall d. Data d => d -> u) -> MediaSize -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> MediaSize -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> MediaSize -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> MediaSize -> m MediaSize
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> MediaSize -> m MediaSize
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c MediaSize
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> MediaSize -> c MediaSize
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c MediaSize)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MediaSize)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> MediaSize -> c MediaSize
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> MediaSize -> c MediaSize
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c MediaSize
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c MediaSize
    $ctoConstr :: MediaSize -> Constr
    toConstr :: MediaSize -> Constr
    $cdataTypeOf :: MediaSize -> DataType
    dataTypeOf :: MediaSize -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c MediaSize)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c MediaSize)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MediaSize)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MediaSize)
    $cgmapT :: (forall b. Data b => b -> b) -> MediaSize -> MediaSize
    gmapT :: (forall b. Data b => b -> b) -> MediaSize -> MediaSize
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> MediaSize -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> MediaSize -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> MediaSize -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> MediaSize -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> MediaSize -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> MediaSize -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> MediaSize -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> MediaSize -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> MediaSize -> m MediaSize
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> MediaSize -> m MediaSize
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> MediaSize -> m MediaSize
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> MediaSize -> m MediaSize
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> MediaSize -> m MediaSize
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> MediaSize -> m MediaSize
    Data, Typeable, (forall x. MediaSize -> Rep MediaSize x)
    -> (forall x. Rep MediaSize x -> MediaSize) -> Generic MediaSize
    forall x. Rep MediaSize x -> MediaSize
    forall x. MediaSize -> Rep MediaSize x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. MediaSize -> Rep MediaSize x
    from :: forall x. MediaSize -> Rep MediaSize x
    $cto :: forall x. Rep MediaSize x -> MediaSize
    to :: forall x. Rep MediaSize x -> MediaSize
    Generic)

    instance FromJSON MediaSize where
        parseJSON :: Value -> Parser MediaSize
    parseJSON (Object Object
    o) =
            Int -> Int -> Text -> MediaSize
    MediaSize (Int -> Int -> Text -> MediaSize)
    -> Parser Int -> Parser (Int -> Text -> MediaSize)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser Int
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "w"
                Parser (Int -> Text -> MediaSize)
    -> Parser Int -> Parser (Text -> MediaSize)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Int
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "h"
                Parser (Text -> MediaSize) -> Parser Text -> Parser MediaSize
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "resize"
        parseJSON Value
    v = String -> Parser MediaSize
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser MediaSize) -> String -> Parser MediaSize
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse media size from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON MediaSize where
        toJSON :: MediaSize -> Value
    toJSON MediaSize {Int
    Text
    msWidth :: MediaSize -> Int
    msHeight :: MediaSize -> Int
    msResize :: MediaSize -> Text
    msWidth :: Int
    msHeight :: Int
    msResize :: Text
    ..} =
            [Pair] -> Value
    object
                [ Key
    "w" Key -> Int -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Int
    msWidth
                , Key
    "h" Key -> Int -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Int
    msHeight
                , Key
    "resize" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    msResize
                ]

    data Coordinates = Coordinates
        { Coordinates -> [Double]
    coordinates :: [Double]
        , Coordinates -> Text
    coordinatesType :: Text
        }
        deriving (Int -> Coordinates -> ShowS
    [Coordinates] -> ShowS
    Coordinates -> String
    (Int -> Coordinates -> ShowS)
    -> (Coordinates -> String)
    -> ([Coordinates] -> ShowS)
    -> Show Coordinates
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Coordinates -> ShowS
    showsPrec :: Int -> Coordinates -> ShowS
    $cshow :: Coordinates -> String
    show :: Coordinates -> String
    $cshowList :: [Coordinates] -> ShowS
    showList :: [Coordinates] -> ShowS
    Show, Coordinates -> Coordinates -> Bool
    (Coordinates -> Coordinates -> Bool)
    -> (Coordinates -> Coordinates -> Bool) -> Eq Coordinates
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Coordinates -> Coordinates -> Bool
    == :: Coordinates -> Coordinates -> Bool
    $c/= :: Coordinates -> Coordinates -> Bool
    /= :: Coordinates -> Coordinates -> Bool
    Eq, Typeable Coordinates
    Typeable Coordinates =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> Coordinates -> c Coordinates)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c Coordinates)
    -> (Coordinates -> Constr)
    -> (Coordinates -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c Coordinates))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c Coordinates))
    -> ((forall b. Data b => b -> b) -> Coordinates -> Coordinates)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> Coordinates -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> Coordinates -> r)
    -> (forall u. (forall d. Data d => d -> u) -> Coordinates -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> Coordinates -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> Coordinates -> m Coordinates)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Coordinates -> m Coordinates)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Coordinates -> m Coordinates)
    -> Data Coordinates
    Coordinates -> Constr
    Coordinates -> DataType
    (forall b. Data b => b -> b) -> Coordinates -> Coordinates
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> Coordinates -> u
    forall u. (forall d. Data d => d -> u) -> Coordinates -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Coordinates -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Coordinates -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Coordinates -> m Coordinates
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Coordinates -> m Coordinates
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Coordinates
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Coordinates -> c Coordinates
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Coordinates)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Coordinates)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Coordinates -> c Coordinates
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Coordinates -> c Coordinates
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Coordinates
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Coordinates
    $ctoConstr :: Coordinates -> Constr
    toConstr :: Coordinates -> Constr
    $cdataTypeOf :: Coordinates -> DataType
    dataTypeOf :: Coordinates -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Coordinates)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Coordinates)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Coordinates)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Coordinates)
    $cgmapT :: (forall b. Data b => b -> b) -> Coordinates -> Coordinates
    gmapT :: (forall b. Data b => b -> b) -> Coordinates -> Coordinates
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Coordinates -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Coordinates -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Coordinates -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Coordinates -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> Coordinates -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> Coordinates -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Coordinates -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Coordinates -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Coordinates -> m Coordinates
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Coordinates -> m Coordinates
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Coordinates -> m Coordinates
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Coordinates -> m Coordinates
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Coordinates -> m Coordinates
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Coordinates -> m Coordinates
    Data, Typeable, (forall x. Coordinates -> Rep Coordinates x)
    -> (forall x. Rep Coordinates x -> Coordinates)
    -> Generic Coordinates
    forall x. Rep Coordinates x -> Coordinates
    forall x. Coordinates -> Rep Coordinates x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. Coordinates -> Rep Coordinates x
    from :: forall x. Coordinates -> Rep Coordinates x
    $cto :: forall x. Rep Coordinates x -> Coordinates
    to :: forall x. Rep Coordinates x -> Coordinates
    Generic)

    instance FromJSON Coordinates where
        parseJSON :: Value -> Parser Coordinates
    parseJSON (Object Object
    o) =
            [Double] -> Text -> Coordinates
    Coordinates ([Double] -> Text -> Coordinates)
    -> Parser [Double] -> Parser (Text -> Coordinates)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser [Double]
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "coordinates"
                Parser (Text -> Coordinates) -> Parser Text -> Parser Coordinates
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "type"
        parseJSON Value
    v = String -> Parser Coordinates
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser Coordinates) -> String -> Parser Coordinates
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse coordinates from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON Coordinates where
        toJSON :: Coordinates -> Value
    toJSON Coordinates {[Double]
    Text
    coordinates :: Coordinates -> [Double]
    coordinatesType :: Coordinates -> Text
    coordinates :: [Double]
    coordinatesType :: Text
    ..} =
            [Pair] -> Value
    object
                [ Key
    "coordinates" Key -> [Double] -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= [Double]
    coordinates
                , Key
    "type" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    coordinatesType
                ]

    -- | This type represents a place, named locations with corresponding geo coordinates.
    -- See <https://dev.twitter.com/docs/platform-objects/places>.
    data Place = Place
        { Place -> HashMap Text Text
    placeAttributes :: HashMap Text Text
        , Place -> Maybe BoundingBox
    placeBoundingBox :: Maybe BoundingBox
        , Place -> Text
    placeCountry :: Text
        , Place -> Text
    placeCountryCode :: Text
        , Place -> Text
    placeFullName :: Text
        , Place -> Text
    placeId :: Text
        , Place -> Text
    placeName :: Text
        , Place -> Text
    placeType :: Text
        , Place -> Text
    placeURL :: Text
        }
        deriving (Int -> Place -> ShowS
    [Place] -> ShowS
    Place -> String
    (Int -> Place -> ShowS)
    -> (Place -> String) -> ([Place] -> ShowS) -> Show Place
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Place -> ShowS
    showsPrec :: Int -> Place -> ShowS
    $cshow :: Place -> String
    show :: Place -> String
    $cshowList :: [Place] -> ShowS
    showList :: [Place] -> ShowS
    Show, Place -> Place -> Bool
    (Place -> Place -> Bool) -> (Place -> Place -> Bool) -> Eq Place
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Place -> Place -> Bool
    == :: Place -> Place -> Bool
    $c/= :: Place -> Place -> Bool
    /= :: Place -> Place -> Bool
    Eq, Typeable Place
    Typeable Place =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> Place -> c Place)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c Place)
    -> (Place -> Constr)
    -> (Place -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c Place))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Place))
    -> ((forall b. Data b => b -> b) -> Place -> Place)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Place -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Place -> r)
    -> (forall u. (forall d. Data d => d -> u) -> Place -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> Place -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> Place -> m Place)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Place -> m Place)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Place -> m Place)
    -> Data Place
    Place -> Constr
    Place -> DataType
    (forall b. Data b => b -> b) -> Place -> Place
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> Place -> u
    forall u. (forall d. Data d => d -> u) -> Place -> [u]
    forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Place -> r
    forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Place -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Place -> m Place
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Place -> m Place
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Place
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Place -> c Place
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Place)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Place)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Place -> c Place
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Place -> c Place
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Place
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Place
    $ctoConstr :: Place -> Constr
    toConstr :: Place -> Constr
    $cdataTypeOf :: Place -> DataType
    dataTypeOf :: Place -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Place)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Place)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Place)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Place)
    $cgmapT :: (forall b. Data b => b -> b) -> Place -> Place
    gmapT :: (forall b. Data b => b -> b) -> Place -> Place
    $cgmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Place -> r
    gmapQl :: forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Place -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Place -> r
    gmapQr :: forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Place -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> Place -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> Place -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Place -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Place -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Place -> m Place
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Place -> m Place
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Place -> m Place
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Place -> m Place
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Place -> m Place
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Place -> m Place
    Data, Typeable, (forall x. Place -> Rep Place x)
    -> (forall x. Rep Place x -> Place) -> Generic Place
    forall x. Rep Place x -> Place
    forall x. Place -> Rep Place x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. Place -> Rep Place x
    from :: forall x. Place -> Rep Place x
    $cto :: forall x. Rep Place x -> Place
    to :: forall x. Rep Place x -> Place
    Generic)

    instance FromJSON Place where
        parseJSON :: Value -> Parser Place
    parseJSON (Object Object
    o) =
            HashMap Text Text
    -> Maybe BoundingBox
    -> Text
    -> Text
    -> Text
    -> Text
    -> Text
    -> Text
    -> Text
    -> Place
    Place (HashMap Text Text
     -> Maybe BoundingBox
     -> Text
     -> Text
     -> Text
     -> Text
     -> Text
     -> Text
     -> Text
     -> Place)
    -> Parser (HashMap Text Text)
    -> Parser
         (Maybe BoundingBox
          -> Text -> Text -> Text -> Text -> Text -> Text -> Text -> Place)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser (HashMap Text Text)
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "attributes"
                Parser
      (Maybe BoundingBox
       -> Text -> Text -> Text -> Text -> Text -> Text -> Text -> Place)
    -> Parser (Maybe BoundingBox)
    -> Parser
         (Text -> Text -> Text -> Text -> Text -> Text -> Text -> Place)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe BoundingBox)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "bounding_box"
                Parser
      (Text -> Text -> Text -> Text -> Text -> Text -> Text -> Place)
    -> Parser Text
    -> Parser (Text -> Text -> Text -> Text -> Text -> Text -> Place)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "country"
                Parser (Text -> Text -> Text -> Text -> Text -> Text -> Place)
    -> Parser Text
    -> Parser (Text -> Text -> Text -> Text -> Text -> Place)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "country_code"
                Parser (Text -> Text -> Text -> Text -> Text -> Place)
    -> Parser Text -> Parser (Text -> Text -> Text -> Text -> Place)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "full_name"
                Parser (Text -> Text -> Text -> Text -> Place)
    -> Parser Text -> Parser (Text -> Text -> Text -> Place)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "id"
                Parser (Text -> Text -> Text -> Place)
    -> Parser Text -> Parser (Text -> Text -> Place)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "name"
                Parser (Text -> Text -> Place)
    -> Parser Text -> Parser (Text -> Place)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "place_type"
                Parser (Text -> Place) -> Parser Text -> Parser Place
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "url"
        parseJSON Value
    v = String -> Parser Place
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser Place) -> String -> Parser Place
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse place from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON Place where
        toJSON :: Place -> Value
    toJSON Place {Maybe BoundingBox
    Text
    HashMap Text Text
    placeAttributes :: Place -> HashMap Text Text
    placeBoundingBox :: Place -> Maybe BoundingBox
    placeCountry :: Place -> Text
    placeCountryCode :: Place -> Text
    placeFullName :: Place -> Text
    placeId :: Place -> Text
    placeName :: Place -> Text
    placeType :: Place -> Text
    placeURL :: Place -> Text
    placeAttributes :: HashMap Text Text
    placeBoundingBox :: Maybe BoundingBox
    placeCountry :: Text
    placeCountryCode :: Text
    placeFullName :: Text
    placeId :: Text
    placeName :: Text
    placeType :: Text
    placeURL :: Text
    ..} =
            [Pair] -> Value
    object
                [ Key
    "attributes" Key -> HashMap Text Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= HashMap Text Text
    placeAttributes
                , Key
    "bounding_box" Key -> Maybe BoundingBox -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe BoundingBox
    placeBoundingBox
                , Key
    "country" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    placeCountry
                , Key
    "country_code" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    placeCountryCode
                , Key
    "full_name" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    placeFullName
                , Key
    "id" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    placeId
                , Key
    "name" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    placeName
                , Key
    "place_type" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    placeType
                , Key
    "url" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    placeURL
                ]

    -- | A bounding box of coordinates which encloses the place.
    -- See <https://dev.twitter.com/docs/platform-objects/places#obj-boundingbox>.
    data BoundingBox = BoundingBox
        { BoundingBox -> [[[Double]]]
    boundingBoxCoordinates :: [[[Double]]]
        , BoundingBox -> Text
    boundingBoxType :: Text
        }
        deriving (Int -> BoundingBox -> ShowS
    [BoundingBox] -> ShowS
    BoundingBox -> String
    (Int -> BoundingBox -> ShowS)
    -> (BoundingBox -> String)
    -> ([BoundingBox] -> ShowS)
    -> Show BoundingBox
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> BoundingBox -> ShowS
    showsPrec :: Int -> BoundingBox -> ShowS
    $cshow :: BoundingBox -> String
    show :: BoundingBox -> String
    $cshowList :: [BoundingBox] -> ShowS
    showList :: [BoundingBox] -> ShowS
    Show, BoundingBox -> BoundingBox -> Bool
    (BoundingBox -> BoundingBox -> Bool)
    -> (BoundingBox -> BoundingBox -> Bool) -> Eq BoundingBox
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: BoundingBox -> BoundingBox -> Bool
    == :: BoundingBox -> BoundingBox -> Bool
    $c/= :: BoundingBox -> BoundingBox -> Bool
    /= :: BoundingBox -> BoundingBox -> Bool
    Eq, Typeable BoundingBox
    Typeable BoundingBox =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> BoundingBox -> c BoundingBox)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c BoundingBox)
    -> (BoundingBox -> Constr)
    -> (BoundingBox -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c BoundingBox))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c BoundingBox))
    -> ((forall b. Data b => b -> b) -> BoundingBox -> BoundingBox)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> BoundingBox -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> BoundingBox -> r)
    -> (forall u. (forall d. Data d => d -> u) -> BoundingBox -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> BoundingBox -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> BoundingBox -> m BoundingBox)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> BoundingBox -> m BoundingBox)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> BoundingBox -> m BoundingBox)
    -> Data BoundingBox
    BoundingBox -> Constr
    BoundingBox -> DataType
    (forall b. Data b => b -> b) -> BoundingBox -> BoundingBox
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> BoundingBox -> u
    forall u. (forall d. Data d => d -> u) -> BoundingBox -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> BoundingBox -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> BoundingBox -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> BoundingBox -> m BoundingBox
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BoundingBox -> m BoundingBox
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c BoundingBox
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> BoundingBox -> c BoundingBox
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c BoundingBox)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c BoundingBox)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> BoundingBox -> c BoundingBox
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> BoundingBox -> c BoundingBox
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c BoundingBox
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c BoundingBox
    $ctoConstr :: BoundingBox -> Constr
    toConstr :: BoundingBox -> Constr
    $cdataTypeOf :: BoundingBox -> DataType
    dataTypeOf :: BoundingBox -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c BoundingBox)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c BoundingBox)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c BoundingBox)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c BoundingBox)
    $cgmapT :: (forall b. Data b => b -> b) -> BoundingBox -> BoundingBox
    gmapT :: (forall b. Data b => b -> b) -> BoundingBox -> BoundingBox
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> BoundingBox -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> BoundingBox -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> BoundingBox -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> BoundingBox -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> BoundingBox -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> BoundingBox -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> BoundingBox -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> BoundingBox -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> BoundingBox -> m BoundingBox
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> BoundingBox -> m BoundingBox
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BoundingBox -> m BoundingBox
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BoundingBox -> m BoundingBox
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BoundingBox -> m BoundingBox
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BoundingBox -> m BoundingBox
    Data, Typeable, (forall x. BoundingBox -> Rep BoundingBox x)
    -> (forall x. Rep BoundingBox x -> BoundingBox)
    -> Generic BoundingBox
    forall x. Rep BoundingBox x -> BoundingBox
    forall x. BoundingBox -> Rep BoundingBox x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. BoundingBox -> Rep BoundingBox x
    from :: forall x. BoundingBox -> Rep BoundingBox x
    $cto :: forall x. Rep BoundingBox x -> BoundingBox
    to :: forall x. Rep BoundingBox x -> BoundingBox
    Generic)

    instance FromJSON BoundingBox where
        parseJSON :: Value -> Parser BoundingBox
    parseJSON (Object Object
    o) =
            [[[Double]]] -> Text -> BoundingBox
    BoundingBox ([[[Double]]] -> Text -> BoundingBox)
    -> Parser [[[Double]]] -> Parser (Text -> BoundingBox)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser [[[Double]]]
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "coordinates"
                Parser (Text -> BoundingBox) -> Parser Text -> Parser BoundingBox
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "type"
        parseJSON Value
    v = String -> Parser BoundingBox
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser BoundingBox) -> String -> Parser BoundingBox
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse bounding box from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON BoundingBox where
        toJSON :: BoundingBox -> Value
    toJSON BoundingBox {[[[Double]]]
    Text
    boundingBoxCoordinates :: BoundingBox -> [[[Double]]]
    boundingBoxType :: BoundingBox -> Text
    boundingBoxCoordinates :: [[[Double]]]
    boundingBoxType :: Text
    ..} =
            [Pair] -> Value
    object
                [ Key
    "coordinates" Key -> [[[Double]]] -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= [[[Double]]]
    boundingBoxCoordinates
                , Key
    "type" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    boundingBoxType
                ]

    -- | Entity handling.
    -- See <https://dev.twitter.com/docs/platform-objects/entities>.
    data Entities = Entities
        { Entities -> [Entity HashTagEntity]
    enHashTags :: [Entity HashTagEntity]
        , Entities -> [Entity UserEntity]
    enUserMentions :: [Entity UserEntity]
        , Entities -> [Entity URLEntity]
    enURLs :: [Entity URLEntity]
        , Entities -> [Entity MediaEntity]
    enMedia :: [Entity MediaEntity]
        }
        deriving (Int -> Entities -> ShowS
    [Entities] -> ShowS
    Entities -> String
    (Int -> Entities -> ShowS)
    -> (Entities -> String) -> ([Entities] -> ShowS) -> Show Entities
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Entities -> ShowS
    showsPrec :: Int -> Entities -> ShowS
    $cshow :: Entities -> String
    show :: Entities -> String
    $cshowList :: [Entities] -> ShowS
    showList :: [Entities] -> ShowS
    Show, Entities -> Entities -> Bool
    (Entities -> Entities -> Bool)
    -> (Entities -> Entities -> Bool) -> Eq Entities
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Entities -> Entities -> Bool
    == :: Entities -> Entities -> Bool
    $c/= :: Entities -> Entities -> Bool
    /= :: Entities -> Entities -> Bool
    Eq, Typeable Entities
    Typeable Entities =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> Entities -> c Entities)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c Entities)
    -> (Entities -> Constr)
    -> (Entities -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c Entities))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Entities))
    -> ((forall b. Data b => b -> b) -> Entities -> Entities)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> Entities -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> Entities -> r)
    -> (forall u. (forall d. Data d => d -> u) -> Entities -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> Entities -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> Entities -> m Entities)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Entities -> m Entities)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Entities -> m Entities)
    -> Data Entities
    Entities -> Constr
    Entities -> DataType
    (forall b. Data b => b -> b) -> Entities -> Entities
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> Entities -> u
    forall u. (forall d. Data d => d -> u) -> Entities -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Entities -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Entities -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Entities -> m Entities
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Entities -> m Entities
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Entities
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Entities -> c Entities
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Entities)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Entities)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Entities -> c Entities
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Entities -> c Entities
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Entities
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Entities
    $ctoConstr :: Entities -> Constr
    toConstr :: Entities -> Constr
    $cdataTypeOf :: Entities -> DataType
    dataTypeOf :: Entities -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Entities)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Entities)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Entities)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Entities)
    $cgmapT :: (forall b. Data b => b -> b) -> Entities -> Entities
    gmapT :: (forall b. Data b => b -> b) -> Entities -> Entities
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Entities -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Entities -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Entities -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Entities -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> Entities -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> Entities -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Entities -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Entities -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Entities -> m Entities
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Entities -> m Entities
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Entities -> m Entities
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Entities -> m Entities
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Entities -> m Entities
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Entities -> m Entities
    Data, Typeable, (forall x. Entities -> Rep Entities x)
    -> (forall x. Rep Entities x -> Entities) -> Generic Entities
    forall x. Rep Entities x -> Entities
    forall x. Entities -> Rep Entities x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. Entities -> Rep Entities x
    from :: forall x. Entities -> Rep Entities x
    $cto :: forall x. Rep Entities x -> Entities
    to :: forall x. Rep Entities x -> Entities
    Generic)

    instance FromJSON Entities where
        parseJSON :: Value -> Parser Entities
    parseJSON (Object Object
    o) =
            [Entity HashTagEntity]
    -> [Entity UserEntity]
    -> [Entity URLEntity]
    -> [Entity MediaEntity]
    -> Entities
    Entities ([Entity HashTagEntity]
     -> [Entity UserEntity]
     -> [Entity URLEntity]
     -> [Entity MediaEntity]
     -> Entities)
    -> Parser [Entity HashTagEntity]
    -> Parser
         ([Entity UserEntity]
          -> [Entity URLEntity] -> [Entity MediaEntity] -> Entities)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser (Maybe [Entity HashTagEntity])
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "hashtags" Parser (Maybe [Entity HashTagEntity])
    -> [Entity HashTagEntity] -> Parser [Entity HashTagEntity]
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= []
                Parser
      ([Entity UserEntity]
       -> [Entity URLEntity] -> [Entity MediaEntity] -> Entities)
    -> Parser [Entity UserEntity]
    -> Parser ([Entity URLEntity] -> [Entity MediaEntity] -> Entities)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe [Entity UserEntity])
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "user_mentions" Parser (Maybe [Entity UserEntity])
    -> [Entity UserEntity] -> Parser [Entity UserEntity]
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= []
                Parser ([Entity URLEntity] -> [Entity MediaEntity] -> Entities)
    -> Parser [Entity URLEntity]
    -> Parser ([Entity MediaEntity] -> Entities)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe [Entity URLEntity])
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "urls" Parser (Maybe [Entity URLEntity])
    -> [Entity URLEntity] -> Parser [Entity URLEntity]
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= []
                Parser ([Entity MediaEntity] -> Entities)
    -> Parser [Entity MediaEntity] -> Parser Entities
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe [Entity MediaEntity])
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "media" Parser (Maybe [Entity MediaEntity])
    -> [Entity MediaEntity] -> Parser [Entity MediaEntity]
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= []
        parseJSON Value
    v = String -> Parser Entities
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser Entities) -> String -> Parser Entities
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse entities from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON Entities where
        toJSON :: Entities -> Value
    toJSON Entities {[Entity MediaEntity]
    [Entity URLEntity]
    [Entity UserEntity]
    [Entity HashTagEntity]
    enHashTags :: Entities -> [Entity HashTagEntity]
    enUserMentions :: Entities -> [Entity UserEntity]
    enURLs :: Entities -> [Entity URLEntity]
    enMedia :: Entities -> [Entity MediaEntity]
    enHashTags :: [Entity HashTagEntity]
    enUserMentions :: [Entity UserEntity]
    enURLs :: [Entity URLEntity]
    enMedia :: [Entity MediaEntity]
    ..} =
            [Pair] -> Value
    object
                [ Key
    "hashtags" Key -> [Entity HashTagEntity] -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= [Entity HashTagEntity]
    enHashTags
                , Key
    "user_mentions" Key -> [Entity UserEntity] -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= [Entity UserEntity]
    enUserMentions
                , Key
    "urls" Key -> [Entity URLEntity] -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= [Entity URLEntity]
    enURLs
                , Key
    "media" Key -> [Entity MediaEntity] -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= [Entity MediaEntity]
    enMedia
                ]

    -- | The character positions the Entity was extracted from
    --
    --   This is experimental implementation.
    --   This may be replaced by more definite types.
    type EntityIndices = [Int]

    data Entity a = Entity
        { -- | The detail information of the specific entity types (HashTag, URL, User)
          forall a. Entity a -> a
    entityBody :: a
        , -- | The character positions the Entity was extracted from
          forall a. Entity a -> EntityIndices
    entityIndices :: EntityIndices
        }
        deriving (Int -> Entity a -> ShowS
    [Entity a] -> ShowS
    Entity a -> String
    (Int -> Entity a -> ShowS)
    -> (Entity a -> String) -> ([Entity a] -> ShowS) -> Show (Entity a)
    forall a. Show a => Int -> Entity a -> ShowS
    forall a. Show a => [Entity a] -> ShowS
    forall a. Show a => Entity a -> String
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: forall a. Show a => Int -> Entity a -> ShowS
    showsPrec :: Int -> Entity a -> ShowS
    $cshow :: forall a. Show a => Entity a -> String
    show :: Entity a -> String
    $cshowList :: forall a. Show a => [Entity a] -> ShowS
    showList :: [Entity a] -> ShowS
    Show, Entity a -> Entity a -> Bool
    (Entity a -> Entity a -> Bool)
    -> (Entity a -> Entity a -> Bool) -> Eq (Entity a)
    forall a. Eq a => Entity a -> Entity a -> Bool
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: forall a. Eq a => Entity a -> Entity a -> Bool
    == :: Entity a -> Entity a -> Bool
    $c/= :: forall a. Eq a => Entity a -> Entity a -> Bool
    /= :: Entity a -> Entity a -> Bool
    Eq, Typeable (Entity a)
    Typeable (Entity a) =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> Entity a -> c (Entity a))
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c (Entity a))
    -> (Entity a -> Constr)
    -> (Entity a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c (Entity a)))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c (Entity a)))
    -> ((forall b. Data b => b -> b) -> Entity a -> Entity a)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> Entity a -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> Entity a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> Entity a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> Entity a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> Entity a -> m (Entity a))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Entity a -> m (Entity a))
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Entity a -> m (Entity a))
    -> Data (Entity a)
    Entity a -> Constr
    Entity a -> DataType
    (forall b. Data b => b -> b) -> Entity a -> Entity a
    forall a. Data a => Typeable (Entity a)
    forall a. Data a => Entity a -> Constr
    forall a. Data a => Entity a -> DataType
    forall a.
    Data a =>
    (forall b. Data b => b -> b) -> Entity a -> Entity a
    forall a u.
    Data a =>
    Int -> (forall d. Data d => d -> u) -> Entity a -> u
    forall a u.
    Data a =>
    (forall d. Data d => d -> u) -> Entity a -> [u]
    forall a r r'.
    Data a =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Entity a -> r
    forall a r r'.
    Data a =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Entity a -> r
    forall a (m :: * -> *).
    (Data a, Monad m) =>
    (forall d. Data d => d -> m d) -> Entity a -> m (Entity a)
    forall a (m :: * -> *).
    (Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> Entity a -> m (Entity a)
    forall a (c :: * -> *).
    Data a =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Entity a)
    forall a (c :: * -> *).
    Data a =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Entity a -> c (Entity a)
    forall a (t :: * -> *) (c :: * -> *).
    (Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (Entity a))
    forall a (t :: * -> * -> *) (c :: * -> *).
    (Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Entity a))
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> Entity a -> u
    forall u. (forall d. Data d => d -> u) -> Entity a -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Entity a -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Entity a -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Entity a -> m (Entity a)
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Entity a -> m (Entity a)
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Entity a)
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Entity a -> c (Entity a)
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (Entity a))
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Entity a))
    $cgfoldl :: forall a (c :: * -> *).
    Data a =>
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Entity a -> c (Entity a)
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Entity a -> c (Entity a)
    $cgunfold :: forall a (c :: * -> *).
    Data a =>
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Entity a)
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Entity a)
    $ctoConstr :: forall a. Data a => Entity a -> Constr
    toConstr :: Entity a -> Constr
    $cdataTypeOf :: forall a. Data a => Entity a -> DataType
    dataTypeOf :: Entity a -> DataType
    $cdataCast1 :: forall a (t :: * -> *) (c :: * -> *).
    (Data a, Typeable t) =>
    (forall d. Data d => c (t d)) -> Maybe (c (Entity a))
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (Entity a))
    $cdataCast2 :: forall a (t :: * -> * -> *) (c :: * -> *).
    (Data a, Typeable t) =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Entity a))
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Entity a))
    $cgmapT :: forall a.
    Data a =>
    (forall b. Data b => b -> b) -> Entity a -> Entity a
    gmapT :: (forall b. Data b => b -> b) -> Entity a -> Entity a
    $cgmapQl :: forall a r r'.
    Data a =>
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Entity a -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Entity a -> r
    $cgmapQr :: forall a r r'.
    Data a =>
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Entity a -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Entity a -> r
    $cgmapQ :: forall a u.
    Data a =>
    (forall d. Data d => d -> u) -> Entity a -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> Entity a -> [u]
    $cgmapQi :: forall a u.
    Data a =>
    Int -> (forall d. Data d => d -> u) -> Entity a -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Entity a -> u
    $cgmapM :: forall a (m :: * -> *).
    (Data a, Monad m) =>
    (forall d. Data d => d -> m d) -> Entity a -> m (Entity a)
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Entity a -> m (Entity a)
    $cgmapMp :: forall a (m :: * -> *).
    (Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> Entity a -> m (Entity a)
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Entity a -> m (Entity a)
    $cgmapMo :: forall a (m :: * -> *).
    (Data a, MonadPlus m) =>
    (forall d. Data d => d -> m d) -> Entity a -> m (Entity a)
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Entity a -> m (Entity a)
    Data, Typeable, (forall x. Entity a -> Rep (Entity a) x)
    -> (forall x. Rep (Entity a) x -> Entity a) -> Generic (Entity a)
    forall x. Rep (Entity a) x -> Entity a
    forall x. Entity a -> Rep (Entity a) x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    forall a x. Rep (Entity a) x -> Entity a
    forall a x. Entity a -> Rep (Entity a) x
    $cfrom :: forall a x. Entity a -> Rep (Entity a) x
    from :: forall x. Entity a -> Rep (Entity a) x
    $cto :: forall a x. Rep (Entity a) x -> Entity a
    to :: forall x. Rep (Entity a) x -> Entity a
    Generic, (forall a. Entity a -> Rep1 Entity a)
    -> (forall a. Rep1 Entity a -> Entity a) -> Generic1 Entity
    forall a. Rep1 Entity a -> Entity a
    forall a. Entity a -> Rep1 Entity a
    forall k (f :: k -> *).
    (forall (a :: k). f a -> Rep1 f a)
    -> (forall (a :: k). Rep1 f a -> f a) -> Generic1 f
    $cfrom1 :: forall a. Entity a -> Rep1 Entity a
    from1 :: forall a. Entity a -> Rep1 Entity a
    $cto1 :: forall a. Rep1 Entity a -> Entity a
    to1 :: forall a. Rep1 Entity a -> Entity a
    Generic1)

    instance FromJSON a => FromJSON (Entity a) where
        parseJSON :: Value -> Parser (Entity a)
    parseJSON v :: Value
    v@(Object Object
    o) =
            a -> EntityIndices -> Entity a
    forall a. a -> EntityIndices -> Entity a
    Entity (a -> EntityIndices -> Entity a)
    -> Parser a -> Parser (EntityIndices -> Entity a)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Value -> Parser a
    forall a. FromJSON a => Value -> Parser a
    parseJSON Value
    v
                Parser (EntityIndices -> Entity a)
    -> Parser EntityIndices -> Parser (Entity a)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser EntityIndices
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "indices"
        parseJSON Value
    v = String -> Parser (Entity a)
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser (Entity a)) -> String -> Parser (Entity a)
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse entity wrapper from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON a => ToJSON (Entity a) where
        toJSON :: Entity a -> Value
    toJSON Entity {a
    EntityIndices
    entityBody :: forall a. Entity a -> a
    entityIndices :: forall a. Entity a -> EntityIndices
    entityBody :: a
    entityIndices :: EntityIndices
    ..} =
            case a -> Value
    forall a. ToJSON a => a -> Value
    toJSON a
    entityBody of
                (Object Object
    o) -> Object -> Value
    Object (Object -> Value) -> Object -> Value
    forall a b. (a -> b) -> a -> b
    $ Key -> Value -> Object -> Object
    forall v. Key -> v -> KeyMap v -> KeyMap v
    KeyMap.insert Key
    "indices" (EntityIndices -> Value
    forall a. ToJSON a => a -> Value
    toJSON EntityIndices
    entityIndices) Object
    o
                Value
    _ -> String -> Value
    forall a. HasCallStack => String -> a
    error String
    "Entity body must produce an object."

    data ExtendedEntities = ExtendedEntities
        { ExtendedEntities -> [Entity ExtendedEntity]
    exeMedia :: [Entity ExtendedEntity]
        }
        deriving (Int -> ExtendedEntities -> ShowS
    [ExtendedEntities] -> ShowS
    ExtendedEntities -> String
    (Int -> ExtendedEntities -> ShowS)
    -> (ExtendedEntities -> String)
    -> ([ExtendedEntities] -> ShowS)
    -> Show ExtendedEntities
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ExtendedEntities -> ShowS
    showsPrec :: Int -> ExtendedEntities -> ShowS
    $cshow :: ExtendedEntities -> String
    show :: ExtendedEntities -> String
    $cshowList :: [ExtendedEntities] -> ShowS
    showList :: [ExtendedEntities] -> ShowS
    Show, ExtendedEntities -> ExtendedEntities -> Bool
    (ExtendedEntities -> ExtendedEntities -> Bool)
    -> (ExtendedEntities -> ExtendedEntities -> Bool)
    -> Eq ExtendedEntities
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: ExtendedEntities -> ExtendedEntities -> Bool
    == :: ExtendedEntities -> ExtendedEntities -> Bool
    $c/= :: ExtendedEntities -> ExtendedEntities -> Bool
    /= :: ExtendedEntities -> ExtendedEntities -> Bool
    Eq, Typeable ExtendedEntities
    Typeable ExtendedEntities =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> ExtendedEntities -> c ExtendedEntities)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c ExtendedEntities)
    -> (ExtendedEntities -> Constr)
    -> (ExtendedEntities -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c ExtendedEntities))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c ExtendedEntities))
    -> ((forall b. Data b => b -> b)
        -> ExtendedEntities -> ExtendedEntities)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> ExtendedEntities -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> ExtendedEntities -> r)
    -> (forall u.
        (forall d. Data d => d -> u) -> ExtendedEntities -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> ExtendedEntities -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d)
        -> ExtendedEntities -> m ExtendedEntities)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> ExtendedEntities -> m ExtendedEntities)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> ExtendedEntities -> m ExtendedEntities)
    -> Data ExtendedEntities
    ExtendedEntities -> Constr
    ExtendedEntities -> DataType
    (forall b. Data b => b -> b)
    -> ExtendedEntities -> ExtendedEntities
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u.
    Int -> (forall d. Data d => d -> u) -> ExtendedEntities -> u
    forall u. (forall d. Data d => d -> u) -> ExtendedEntities -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ExtendedEntities -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ExtendedEntities -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> ExtendedEntities -> m ExtendedEntities
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> ExtendedEntities -> m ExtendedEntities
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ExtendedEntities
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ExtendedEntities -> c ExtendedEntities
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ExtendedEntities)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c ExtendedEntities)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ExtendedEntities -> c ExtendedEntities
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ExtendedEntities -> c ExtendedEntities
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ExtendedEntities
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ExtendedEntities
    $ctoConstr :: ExtendedEntities -> Constr
    toConstr :: ExtendedEntities -> Constr
    $cdataTypeOf :: ExtendedEntities -> DataType
    dataTypeOf :: ExtendedEntities -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ExtendedEntities)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ExtendedEntities)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c ExtendedEntities)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c ExtendedEntities)
    $cgmapT :: (forall b. Data b => b -> b)
    -> ExtendedEntities -> ExtendedEntities
    gmapT :: (forall b. Data b => b -> b)
    -> ExtendedEntities -> ExtendedEntities
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ExtendedEntities -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ExtendedEntities -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ExtendedEntities -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ExtendedEntities -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> ExtendedEntities -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> ExtendedEntities -> [u]
    $cgmapQi :: forall u.
    Int -> (forall d. Data d => d -> u) -> ExtendedEntities -> u
    gmapQi :: forall u.
    Int -> (forall d. Data d => d -> u) -> ExtendedEntities -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> ExtendedEntities -> m ExtendedEntities
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> ExtendedEntities -> m ExtendedEntities
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> ExtendedEntities -> m ExtendedEntities
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> ExtendedEntities -> m ExtendedEntities
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> ExtendedEntities -> m ExtendedEntities
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> ExtendedEntities -> m ExtendedEntities
    Data, Typeable, (forall x. ExtendedEntities -> Rep ExtendedEntities x)
    -> (forall x. Rep ExtendedEntities x -> ExtendedEntities)
    -> Generic ExtendedEntities
    forall x. Rep ExtendedEntities x -> ExtendedEntities
    forall x. ExtendedEntities -> Rep ExtendedEntities x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. ExtendedEntities -> Rep ExtendedEntities x
    from :: forall x. ExtendedEntities -> Rep ExtendedEntities x
    $cto :: forall x. Rep ExtendedEntities x -> ExtendedEntities
    to :: forall x. Rep ExtendedEntities x -> ExtendedEntities
    Generic)

    instance FromJSON ExtendedEntities where
        parseJSON :: Value -> Parser ExtendedEntities
    parseJSON (Object Object
    o) =
            [Entity ExtendedEntity] -> ExtendedEntities
    ExtendedEntities ([Entity ExtendedEntity] -> ExtendedEntities)
    -> Parser [Entity ExtendedEntity] -> Parser ExtendedEntities
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser (Maybe [Entity ExtendedEntity])
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "media" Parser (Maybe [Entity ExtendedEntity])
    -> [Entity ExtendedEntity] -> Parser [Entity ExtendedEntity]
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= []
        parseJSON Value
    v = String -> Parser ExtendedEntities
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser ExtendedEntities)
    -> String -> Parser ExtendedEntities
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse extended entity from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON ExtendedEntities where
        toJSON :: ExtendedEntities -> Value
    toJSON ExtendedEntities {[Entity ExtendedEntity]
    exeMedia :: ExtendedEntities -> [Entity ExtendedEntity]
    exeMedia :: [Entity ExtendedEntity]
    ..} = [Pair] -> Value
    object [Key
    "media" Key -> [Entity ExtendedEntity] -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= [Entity ExtendedEntity]
    exeMedia]

    -- "video_info": {
    --   "aspect_ratio": [
    --     9,
    --     16
    --   ],
    --   "duration_millis": 10704,
    --   "variants": [
    --     {
    --       "bitrate": 320000,
    --       "content_type": "video/mp4",
    --       "url": "https://video.twimg.com/ext_tw_video/869317980307415040/pu/vid/180x320/FMei8yCw7yc_Z7e-.mp4"
    --     },
    --     {
    --       "bitrate": 2176000,
    --       "content_type": "video/mp4",
    --       "url": "https://video.twimg.com/ext_tw_video/869317980307415040/pu/vid/720x1280/octt5pFbISkef8RB.mp4"
    --     },
    --     {
    --       "bitrate": 832000,
    --       "content_type": "video/mp4",
    --       "url": "https://video.twimg.com/ext_tw_video/869317980307415040/pu/vid/360x640/2OmqK74SQ9jNX8mZ.mp4"
    --     },
    --     {
    --       "content_type": "application/x-mpegURL",
    --       "url": "https://video.twimg.com/ext_tw_video/869317980307415040/pu/pl/wcJQJ2nxiFU4ZZng.m3u8"
    --     }
    --   ]
    -- }

    data Variant = Variant
        { Variant -> Maybe Int
    vBitrate :: Maybe Int
        , Variant -> Text
    vContentType :: Text
        , Variant -> Text
    vUrl :: URIString
        }
        deriving (Int -> Variant -> ShowS
    [Variant] -> ShowS
    Variant -> String
    (Int -> Variant -> ShowS)
    -> (Variant -> String) -> ([Variant] -> ShowS) -> Show Variant
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Variant -> ShowS
    showsPrec :: Int -> Variant -> ShowS
    $cshow :: Variant -> String
    show :: Variant -> String
    $cshowList :: [Variant] -> ShowS
    showList :: [Variant] -> ShowS
    Show, Variant -> Variant -> Bool
    (Variant -> Variant -> Bool)
    -> (Variant -> Variant -> Bool) -> Eq Variant
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Variant -> Variant -> Bool
    == :: Variant -> Variant -> Bool
    $c/= :: Variant -> Variant -> Bool
    /= :: Variant -> Variant -> Bool
    Eq, Typeable Variant
    Typeable Variant =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> Variant -> c Variant)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c Variant)
    -> (Variant -> Constr)
    -> (Variant -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c Variant))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Variant))
    -> ((forall b. Data b => b -> b) -> Variant -> Variant)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> Variant -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> Variant -> r)
    -> (forall u. (forall d. Data d => d -> u) -> Variant -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> Variant -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> Variant -> m Variant)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Variant -> m Variant)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Variant -> m Variant)
    -> Data Variant
    Variant -> Constr
    Variant -> DataType
    (forall b. Data b => b -> b) -> Variant -> Variant
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> Variant -> u
    forall u. (forall d. Data d => d -> u) -> Variant -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Variant -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Variant -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Variant -> m Variant
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Variant -> m Variant
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Variant
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Variant -> c Variant
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Variant)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Variant)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Variant -> c Variant
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Variant -> c Variant
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Variant
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Variant
    $ctoConstr :: Variant -> Constr
    toConstr :: Variant -> Constr
    $cdataTypeOf :: Variant -> DataType
    dataTypeOf :: Variant -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Variant)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Variant)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Variant)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Variant)
    $cgmapT :: (forall b. Data b => b -> b) -> Variant -> Variant
    gmapT :: (forall b. Data b => b -> b) -> Variant -> Variant
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Variant -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Variant -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Variant -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Variant -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> Variant -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> Variant -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Variant -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Variant -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Variant -> m Variant
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Variant -> m Variant
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Variant -> m Variant
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Variant -> m Variant
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Variant -> m Variant
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Variant -> m Variant
    Data, Typeable, (forall x. Variant -> Rep Variant x)
    -> (forall x. Rep Variant x -> Variant) -> Generic Variant
    forall x. Rep Variant x -> Variant
    forall x. Variant -> Rep Variant x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. Variant -> Rep Variant x
    from :: forall x. Variant -> Rep Variant x
    $cto :: forall x. Rep Variant x -> Variant
    to :: forall x. Rep Variant x -> Variant
    Generic)

    instance FromJSON Variant where
        parseJSON :: Value -> Parser Variant
    parseJSON (Object Object
    o) =
            Maybe Int -> Text -> Text -> Variant
    Variant (Maybe Int -> Text -> Text -> Variant)
    -> Parser (Maybe Int) -> Parser (Text -> Text -> Variant)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser (Maybe Int)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "bitrate"
                Parser (Text -> Text -> Variant)
    -> Parser Text -> Parser (Text -> Variant)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "content_type"
                Parser (Text -> Variant) -> Parser Text -> Parser Variant
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "url"
        parseJSON Value
    v = String -> Parser Variant
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser Variant) -> String -> Parser Variant
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse variant from:" String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON Variant where
        toJSON :: Variant -> Value
    toJSON Variant {Maybe Int
    Text
    vBitrate :: Variant -> Maybe Int
    vContentType :: Variant -> Text
    vUrl :: Variant -> Text
    vBitrate :: Maybe Int
    vContentType :: Text
    vUrl :: Text
    ..} =
            [Pair] -> Value
    object
                [ Key
    "bitrate" Key -> Maybe Int -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Int
    vBitrate
                , Key
    "content_type" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    vContentType
                , Key
    "url" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    vUrl
                ]

    data VideoInfo = VideoInfo
        { VideoInfo -> EntityIndices
    vsAspectRatio :: [Int]
        , VideoInfo -> Maybe Int
    vsDurationMillis :: Maybe Int
        , VideoInfo -> [Variant]
    vsVariants :: [Variant]
        }
        deriving (Int -> VideoInfo -> ShowS
    [VideoInfo] -> ShowS
    VideoInfo -> String
    (Int -> VideoInfo -> ShowS)
    -> (VideoInfo -> String)
    -> ([VideoInfo] -> ShowS)
    -> Show VideoInfo
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> VideoInfo -> ShowS
    showsPrec :: Int -> VideoInfo -> ShowS
    $cshow :: VideoInfo -> String
    show :: VideoInfo -> String
    $cshowList :: [VideoInfo] -> ShowS
    showList :: [VideoInfo] -> ShowS
    Show, VideoInfo -> VideoInfo -> Bool
    (VideoInfo -> VideoInfo -> Bool)
    -> (VideoInfo -> VideoInfo -> Bool) -> Eq VideoInfo
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: VideoInfo -> VideoInfo -> Bool
    == :: VideoInfo -> VideoInfo -> Bool
    $c/= :: VideoInfo -> VideoInfo -> Bool
    /= :: VideoInfo -> VideoInfo -> Bool
    Eq, Typeable VideoInfo
    Typeable VideoInfo =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> VideoInfo -> c VideoInfo)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c VideoInfo)
    -> (VideoInfo -> Constr)
    -> (VideoInfo -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c VideoInfo))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VideoInfo))
    -> ((forall b. Data b => b -> b) -> VideoInfo -> VideoInfo)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> VideoInfo -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> VideoInfo -> r)
    -> (forall u. (forall d. Data d => d -> u) -> VideoInfo -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> VideoInfo -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> VideoInfo -> m VideoInfo)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> VideoInfo -> m VideoInfo)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> VideoInfo -> m VideoInfo)
    -> Data VideoInfo
    VideoInfo -> Constr
    VideoInfo -> DataType
    (forall b. Data b => b -> b) -> VideoInfo -> VideoInfo
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> VideoInfo -> u
    forall u. (forall d. Data d => d -> u) -> VideoInfo -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> VideoInfo -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> VideoInfo -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> VideoInfo -> m VideoInfo
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> VideoInfo -> m VideoInfo
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c VideoInfo
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> VideoInfo -> c VideoInfo
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c VideoInfo)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VideoInfo)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> VideoInfo -> c VideoInfo
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> VideoInfo -> c VideoInfo
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c VideoInfo
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c VideoInfo
    $ctoConstr :: VideoInfo -> Constr
    toConstr :: VideoInfo -> Constr
    $cdataTypeOf :: VideoInfo -> DataType
    dataTypeOf :: VideoInfo -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c VideoInfo)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c VideoInfo)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VideoInfo)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VideoInfo)
    $cgmapT :: (forall b. Data b => b -> b) -> VideoInfo -> VideoInfo
    gmapT :: (forall b. Data b => b -> b) -> VideoInfo -> VideoInfo
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> VideoInfo -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> VideoInfo -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> VideoInfo -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> VideoInfo -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> VideoInfo -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> VideoInfo -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> VideoInfo -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> VideoInfo -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> VideoInfo -> m VideoInfo
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> VideoInfo -> m VideoInfo
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> VideoInfo -> m VideoInfo
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> VideoInfo -> m VideoInfo
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> VideoInfo -> m VideoInfo
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> VideoInfo -> m VideoInfo
    Data, Typeable, (forall x. VideoInfo -> Rep VideoInfo x)
    -> (forall x. Rep VideoInfo x -> VideoInfo) -> Generic VideoInfo
    forall x. Rep VideoInfo x -> VideoInfo
    forall x. VideoInfo -> Rep VideoInfo x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. VideoInfo -> Rep VideoInfo x
    from :: forall x. VideoInfo -> Rep VideoInfo x
    $cto :: forall x. Rep VideoInfo x -> VideoInfo
    to :: forall x. Rep VideoInfo x -> VideoInfo
    Generic)

    instance FromJSON VideoInfo where
        parseJSON :: Value -> Parser VideoInfo
    parseJSON (Object Object
    o) =
            EntityIndices -> Maybe Int -> [Variant] -> VideoInfo
    VideoInfo (EntityIndices -> Maybe Int -> [Variant] -> VideoInfo)
    -> Parser EntityIndices
    -> Parser (Maybe Int -> [Variant] -> VideoInfo)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser (Maybe EntityIndices)
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "aspect_ratio" Parser (Maybe EntityIndices)
    -> EntityIndices -> Parser EntityIndices
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= []
                Parser (Maybe Int -> [Variant] -> VideoInfo)
    -> Parser (Maybe Int) -> Parser ([Variant] -> VideoInfo)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Int)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "duration_millis"
                Parser ([Variant] -> VideoInfo)
    -> Parser [Variant] -> Parser VideoInfo
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe [Variant])
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "variants" Parser (Maybe [Variant]) -> [Variant] -> Parser [Variant]
    forall a. Parser (Maybe a) -> a -> Parser a
    .!= []
        parseJSON Value
    v = String -> Parser VideoInfo
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser VideoInfo) -> String -> Parser VideoInfo
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse video info from:" String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON VideoInfo where
        toJSON :: VideoInfo -> Value
    toJSON VideoInfo {EntityIndices
    [Variant]
    Maybe Int
    vsAspectRatio :: VideoInfo -> EntityIndices
    vsDurationMillis :: VideoInfo -> Maybe Int
    vsVariants :: VideoInfo -> [Variant]
    vsAspectRatio :: EntityIndices
    vsDurationMillis :: Maybe Int
    vsVariants :: [Variant]
    ..} =
            [Pair] -> Value
    object
                [ Key
    "aspect_ratio" Key -> EntityIndices -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= EntityIndices
    vsAspectRatio
                , Key
    "duration_millis" Key -> Maybe Int -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Int
    vsDurationMillis
                , Key
    "variants" Key -> [Variant] -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= [Variant]
    vsVariants
                ]

    -- Extended entities are like entities, but contain special media features like
    -- video or multiple photos
    data ExtendedEntity = ExtendedEntity
        { ExtendedEntity -> Integer
    exeID :: StatusId
        , ExtendedEntity -> Text
    exeMediaUrl :: URIString
        , ExtendedEntity -> Text
    exeMediaUrlHttps :: URIString
        , ExtendedEntity -> HashMap Text MediaSize
    exeSizes :: HashMap Text MediaSize
        , ExtendedEntity -> Text
    exeType :: Text
        , ExtendedEntity -> Maybe VideoInfo
    exeVideoInfo :: Maybe VideoInfo
        , ExtendedEntity -> Maybe Double
    exeDurationMillis :: Maybe Double
        , ExtendedEntity -> Maybe String
    exeExtAltText :: Maybe String
        , ExtendedEntity -> URLEntity
    exeURL :: URLEntity
        }
        deriving (Int -> ExtendedEntity -> ShowS
    [ExtendedEntity] -> ShowS
    ExtendedEntity -> String
    (Int -> ExtendedEntity -> ShowS)
    -> (ExtendedEntity -> String)
    -> ([ExtendedEntity] -> ShowS)
    -> Show ExtendedEntity
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ExtendedEntity -> ShowS
    showsPrec :: Int -> ExtendedEntity -> ShowS
    $cshow :: ExtendedEntity -> String
    show :: ExtendedEntity -> String
    $cshowList :: [ExtendedEntity] -> ShowS
    showList :: [ExtendedEntity] -> ShowS
    Show, ExtendedEntity -> ExtendedEntity -> Bool
    (ExtendedEntity -> ExtendedEntity -> Bool)
    -> (ExtendedEntity -> ExtendedEntity -> Bool) -> Eq ExtendedEntity
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: ExtendedEntity -> ExtendedEntity -> Bool
    == :: ExtendedEntity -> ExtendedEntity -> Bool
    $c/= :: ExtendedEntity -> ExtendedEntity -> Bool
    /= :: ExtendedEntity -> ExtendedEntity -> Bool
    Eq, Typeable ExtendedEntity
    Typeable ExtendedEntity =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> ExtendedEntity -> c ExtendedEntity)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c ExtendedEntity)
    -> (ExtendedEntity -> Constr)
    -> (ExtendedEntity -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c ExtendedEntity))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c ExtendedEntity))
    -> ((forall b. Data b => b -> b)
        -> ExtendedEntity -> ExtendedEntity)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> ExtendedEntity -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> ExtendedEntity -> r)
    -> (forall u.
        (forall d. Data d => d -> u) -> ExtendedEntity -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> ExtendedEntity -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d)
        -> ExtendedEntity -> m ExtendedEntity)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> ExtendedEntity -> m ExtendedEntity)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> ExtendedEntity -> m ExtendedEntity)
    -> Data ExtendedEntity
    ExtendedEntity -> Constr
    ExtendedEntity -> DataType
    (forall b. Data b => b -> b) -> ExtendedEntity -> ExtendedEntity
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u.
    Int -> (forall d. Data d => d -> u) -> ExtendedEntity -> u
    forall u. (forall d. Data d => d -> u) -> ExtendedEntity -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ExtendedEntity -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ExtendedEntity -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> ExtendedEntity -> m ExtendedEntity
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> ExtendedEntity -> m ExtendedEntity
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ExtendedEntity
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ExtendedEntity -> c ExtendedEntity
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ExtendedEntity)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c ExtendedEntity)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ExtendedEntity -> c ExtendedEntity
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ExtendedEntity -> c ExtendedEntity
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ExtendedEntity
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ExtendedEntity
    $ctoConstr :: ExtendedEntity -> Constr
    toConstr :: ExtendedEntity -> Constr
    $cdataTypeOf :: ExtendedEntity -> DataType
    dataTypeOf :: ExtendedEntity -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ExtendedEntity)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ExtendedEntity)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c ExtendedEntity)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c ExtendedEntity)
    $cgmapT :: (forall b. Data b => b -> b) -> ExtendedEntity -> ExtendedEntity
    gmapT :: (forall b. Data b => b -> b) -> ExtendedEntity -> ExtendedEntity
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ExtendedEntity -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ExtendedEntity -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ExtendedEntity -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ExtendedEntity -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> ExtendedEntity -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> ExtendedEntity -> [u]
    $cgmapQi :: forall u.
    Int -> (forall d. Data d => d -> u) -> ExtendedEntity -> u
    gmapQi :: forall u.
    Int -> (forall d. Data d => d -> u) -> ExtendedEntity -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> ExtendedEntity -> m ExtendedEntity
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> ExtendedEntity -> m ExtendedEntity
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> ExtendedEntity -> m ExtendedEntity
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> ExtendedEntity -> m ExtendedEntity
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> ExtendedEntity -> m ExtendedEntity
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> ExtendedEntity -> m ExtendedEntity
    Data, Typeable, (forall x. ExtendedEntity -> Rep ExtendedEntity x)
    -> (forall x. Rep ExtendedEntity x -> ExtendedEntity)
    -> Generic ExtendedEntity
    forall x. Rep ExtendedEntity x -> ExtendedEntity
    forall x. ExtendedEntity -> Rep ExtendedEntity x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. ExtendedEntity -> Rep ExtendedEntity x
    from :: forall x. ExtendedEntity -> Rep ExtendedEntity x
    $cto :: forall x. Rep ExtendedEntity x -> ExtendedEntity
    to :: forall x. Rep ExtendedEntity x -> ExtendedEntity
    Generic)

    instance FromJSON ExtendedEntity where
        parseJSON :: Value -> Parser ExtendedEntity
    parseJSON v :: Value
    v@(Object Object
    o) =
            Integer
    -> Text
    -> Text
    -> HashMap Text MediaSize
    -> Text
    -> Maybe VideoInfo
    -> Maybe Double
    -> Maybe String
    -> URLEntity
    -> ExtendedEntity
    ExtendedEntity (Integer
     -> Text
     -> Text
     -> HashMap Text MediaSize
     -> Text
     -> Maybe VideoInfo
     -> Maybe Double
     -> Maybe String
     -> URLEntity
     -> ExtendedEntity)
    -> Parser Integer
    -> Parser
         (Text
          -> Text
          -> HashMap Text MediaSize
          -> Text
          -> Maybe VideoInfo
          -> Maybe Double
          -> Maybe String
          -> URLEntity
          -> ExtendedEntity)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser Integer
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "id"
                Parser
      (Text
       -> Text
       -> HashMap Text MediaSize
       -> Text
       -> Maybe VideoInfo
       -> Maybe Double
       -> Maybe String
       -> URLEntity
       -> ExtendedEntity)
    -> Parser Text
    -> Parser
         (Text
          -> HashMap Text MediaSize
          -> Text
          -> Maybe VideoInfo
          -> Maybe Double
          -> Maybe String
          -> URLEntity
          -> ExtendedEntity)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "media_url"
                Parser
      (Text
       -> HashMap Text MediaSize
       -> Text
       -> Maybe VideoInfo
       -> Maybe Double
       -> Maybe String
       -> URLEntity
       -> ExtendedEntity)
    -> Parser Text
    -> Parser
         (HashMap Text MediaSize
          -> Text
          -> Maybe VideoInfo
          -> Maybe Double
          -> Maybe String
          -> URLEntity
          -> ExtendedEntity)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "media_url_https"
                Parser
      (HashMap Text MediaSize
       -> Text
       -> Maybe VideoInfo
       -> Maybe Double
       -> Maybe String
       -> URLEntity
       -> ExtendedEntity)
    -> Parser (HashMap Text MediaSize)
    -> Parser
         (Text
          -> Maybe VideoInfo
          -> Maybe Double
          -> Maybe String
          -> URLEntity
          -> ExtendedEntity)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (HashMap Text MediaSize)
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "sizes"
                Parser
      (Text
       -> Maybe VideoInfo
       -> Maybe Double
       -> Maybe String
       -> URLEntity
       -> ExtendedEntity)
    -> Parser Text
    -> Parser
         (Maybe VideoInfo
          -> Maybe Double -> Maybe String -> URLEntity -> ExtendedEntity)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "type"
                Parser
      (Maybe VideoInfo
       -> Maybe Double -> Maybe String -> URLEntity -> ExtendedEntity)
    -> Parser (Maybe VideoInfo)
    -> Parser
         (Maybe Double -> Maybe String -> URLEntity -> ExtendedEntity)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe VideoInfo)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "video_info"
                Parser
      (Maybe Double -> Maybe String -> URLEntity -> ExtendedEntity)
    -> Parser (Maybe Double)
    -> Parser (Maybe String -> URLEntity -> ExtendedEntity)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Double)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "duration_millis"
                Parser (Maybe String -> URLEntity -> ExtendedEntity)
    -> Parser (Maybe String) -> Parser (URLEntity -> ExtendedEntity)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe String)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "ext_alt_text"
                Parser (URLEntity -> ExtendedEntity)
    -> Parser URLEntity -> Parser ExtendedEntity
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Value -> Parser URLEntity
    forall a. FromJSON a => Value -> Parser a
    parseJSON Value
    v
        parseJSON Value
    v = String -> Parser ExtendedEntity
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser ExtendedEntity)
    -> String -> Parser ExtendedEntity
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse extended entity from:" String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON ExtendedEntity where
        toJSON :: ExtendedEntity -> Value
    toJSON ExtendedEntity {Integer
    Maybe Double
    Maybe String
    Maybe VideoInfo
    Text
    HashMap Text MediaSize
    URLEntity
    exeID :: ExtendedEntity -> Integer
    exeMediaUrl :: ExtendedEntity -> Text
    exeMediaUrlHttps :: ExtendedEntity -> Text
    exeSizes :: ExtendedEntity -> HashMap Text MediaSize
    exeType :: ExtendedEntity -> Text
    exeVideoInfo :: ExtendedEntity -> Maybe VideoInfo
    exeDurationMillis :: ExtendedEntity -> Maybe Double
    exeExtAltText :: ExtendedEntity -> Maybe String
    exeURL :: ExtendedEntity -> URLEntity
    exeID :: Integer
    exeMediaUrl :: Text
    exeMediaUrlHttps :: Text
    exeSizes :: HashMap Text MediaSize
    exeType :: Text
    exeVideoInfo :: Maybe VideoInfo
    exeDurationMillis :: Maybe Double
    exeExtAltText :: Maybe String
    exeURL :: URLEntity
    ..} =
            [Pair] -> Value
    object
                [ Key
    "id" Key -> Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer
    exeID
                , Key
    "media_url" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    exeMediaUrl
                , Key
    "media_url_https" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    exeMediaUrlHttps
                , Key
    "sizes" Key -> HashMap Text MediaSize -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= HashMap Text MediaSize
    exeSizes
                , Key
    "type" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    exeType
                , Key
    "video_info" Key -> Maybe VideoInfo -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe VideoInfo
    exeVideoInfo
                , Key
    "duration_millis" Key -> Maybe Double -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Double
    exeDurationMillis
                , Key
    "ext_alt_text" Key -> Maybe String -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe String
    exeExtAltText
                , Key
    "url" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= URLEntity -> Text
    ueURL URLEntity
    exeURL
                , Key
    "expanded_url" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= URLEntity -> Text
    ueExpanded URLEntity
    exeURL
                , Key
    "display_url" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= URLEntity -> Text
    ueDisplay URLEntity
    exeURL
                ]

    data Contributor = Contributor
        { Contributor -> Integer
    contributorId :: UserId
        , Contributor -> Maybe Text
    contributorScreenName :: Maybe Text
        }
        deriving (Int -> Contributor -> ShowS
    [Contributor] -> ShowS
    Contributor -> String
    (Int -> Contributor -> ShowS)
    -> (Contributor -> String)
    -> ([Contributor] -> ShowS)
    -> Show Contributor
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Contributor -> ShowS
    showsPrec :: Int -> Contributor -> ShowS
    $cshow :: Contributor -> String
    show :: Contributor -> String
    $cshowList :: [Contributor] -> ShowS
    showList :: [Contributor] -> ShowS
    Show, Contributor -> Contributor -> Bool
    (Contributor -> Contributor -> Bool)
    -> (Contributor -> Contributor -> Bool) -> Eq Contributor
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Contributor -> Contributor -> Bool
    == :: Contributor -> Contributor -> Bool
    $c/= :: Contributor -> Contributor -> Bool
    /= :: Contributor -> Contributor -> Bool
    Eq, Typeable Contributor
    Typeable Contributor =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> Contributor -> c Contributor)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c Contributor)
    -> (Contributor -> Constr)
    -> (Contributor -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c Contributor))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c Contributor))
    -> ((forall b. Data b => b -> b) -> Contributor -> Contributor)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> Contributor -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> Contributor -> r)
    -> (forall u. (forall d. Data d => d -> u) -> Contributor -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> Contributor -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> Contributor -> m Contributor)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Contributor -> m Contributor)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Contributor -> m Contributor)
    -> Data Contributor
    Contributor -> Constr
    Contributor -> DataType
    (forall b. Data b => b -> b) -> Contributor -> Contributor
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> Contributor -> u
    forall u. (forall d. Data d => d -> u) -> Contributor -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Contributor -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Contributor -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Contributor -> m Contributor
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Contributor -> m Contributor
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Contributor
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Contributor -> c Contributor
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Contributor)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Contributor)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Contributor -> c Contributor
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Contributor -> c Contributor
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Contributor
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Contributor
    $ctoConstr :: Contributor -> Constr
    toConstr :: Contributor -> Constr
    $cdataTypeOf :: Contributor -> DataType
    dataTypeOf :: Contributor -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Contributor)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Contributor)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Contributor)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Contributor)
    $cgmapT :: (forall b. Data b => b -> b) -> Contributor -> Contributor
    gmapT :: (forall b. Data b => b -> b) -> Contributor -> Contributor
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Contributor -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Contributor -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Contributor -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Contributor -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> Contributor -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> Contributor -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Contributor -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Contributor -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Contributor -> m Contributor
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Contributor -> m Contributor
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Contributor -> m Contributor
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Contributor -> m Contributor
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Contributor -> m Contributor
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Contributor -> m Contributor
    Data, Typeable, (forall x. Contributor -> Rep Contributor x)
    -> (forall x. Rep Contributor x -> Contributor)
    -> Generic Contributor
    forall x. Rep Contributor x -> Contributor
    forall x. Contributor -> Rep Contributor x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. Contributor -> Rep Contributor x
    from :: forall x. Contributor -> Rep Contributor x
    $cto :: forall x. Rep Contributor x -> Contributor
    to :: forall x. Rep Contributor x -> Contributor
    Generic)

    instance FromJSON Contributor where
        parseJSON :: Value -> Parser Contributor
    parseJSON (Object Object
    o) =
            Integer -> Maybe Text -> Contributor
    Contributor (Integer -> Maybe Text -> Contributor)
    -> Parser Integer -> Parser (Maybe Text -> Contributor)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser Integer
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "id"
                Parser (Maybe Text -> Contributor)
    -> Parser (Maybe Text) -> Parser Contributor
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser (Maybe Text)
    forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
    .:? Key
    "screen_name"
        parseJSON v :: Value
    v@(Number Scientific
    _) =
            Integer -> Maybe Text -> Contributor
    Contributor (Integer -> Maybe Text -> Contributor)
    -> Parser Integer -> Parser (Maybe Text -> Contributor)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Value -> Parser Integer
    forall a. FromJSON a => Value -> Parser a
    parseJSON Value
    v Parser (Maybe Text -> Contributor)
    -> Parser (Maybe Text) -> Parser Contributor
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Maybe Text -> Parser (Maybe Text)
    forall a. a -> Parser a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure Maybe Text
    forall a. Maybe a
    Nothing
        parseJSON Value
    v = String -> Parser Contributor
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser Contributor) -> String -> Parser Contributor
    forall a b. (a -> b) -> a -> b
    $ String
    "couldn't parse contributor from: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON Contributor where
        toJSON :: Contributor -> Value
    toJSON Contributor {Integer
    Maybe Text
    contributorId :: Contributor -> Integer
    contributorScreenName :: Contributor -> Maybe Text
    contributorId :: Integer
    contributorScreenName :: Maybe Text
    ..} =
            [Pair] -> Value
    object
                [ Key
    "id" Key -> Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer
    contributorId
                , Key
    "screen_name" Key -> Maybe Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Maybe Text
    contributorScreenName
                ]

    -- | Image size type. This type is included in the API response of \"\/1.1\/media\/upload.json\".
    data ImageSizeType = ImageSizeType
        { ImageSizeType -> Int
    imageSizeTypeWidth :: Int
        , ImageSizeType -> Int
    imageSizeTypeHeight :: Int
        , ImageSizeType -> Text
    imageSizeTypeType :: Text
        }
        deriving (Int -> ImageSizeType -> ShowS
    [ImageSizeType] -> ShowS
    ImageSizeType -> String
    (Int -> ImageSizeType -> ShowS)
    -> (ImageSizeType -> String)
    -> ([ImageSizeType] -> ShowS)
    -> Show ImageSizeType
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> ImageSizeType -> ShowS
    showsPrec :: Int -> ImageSizeType -> ShowS
    $cshow :: ImageSizeType -> String
    show :: ImageSizeType -> String
    $cshowList :: [ImageSizeType] -> ShowS
    showList :: [ImageSizeType] -> ShowS
    Show, ImageSizeType -> ImageSizeType -> Bool
    (ImageSizeType -> ImageSizeType -> Bool)
    -> (ImageSizeType -> ImageSizeType -> Bool) -> Eq ImageSizeType
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: ImageSizeType -> ImageSizeType -> Bool
    == :: ImageSizeType -> ImageSizeType -> Bool
    $c/= :: ImageSizeType -> ImageSizeType -> Bool
    /= :: ImageSizeType -> ImageSizeType -> Bool
    Eq, Typeable ImageSizeType
    Typeable ImageSizeType =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> ImageSizeType -> c ImageSizeType)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c ImageSizeType)
    -> (ImageSizeType -> Constr)
    -> (ImageSizeType -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c ImageSizeType))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c ImageSizeType))
    -> ((forall b. Data b => b -> b) -> ImageSizeType -> ImageSizeType)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> ImageSizeType -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> ImageSizeType -> r)
    -> (forall u. (forall d. Data d => d -> u) -> ImageSizeType -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> ImageSizeType -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> ImageSizeType -> m ImageSizeType)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> ImageSizeType -> m ImageSizeType)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> ImageSizeType -> m ImageSizeType)
    -> Data ImageSizeType
    ImageSizeType -> Constr
    ImageSizeType -> DataType
    (forall b. Data b => b -> b) -> ImageSizeType -> ImageSizeType
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> ImageSizeType -> u
    forall u. (forall d. Data d => d -> u) -> ImageSizeType -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ImageSizeType -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ImageSizeType -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ImageSizeType -> m ImageSizeType
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ImageSizeType -> m ImageSizeType
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ImageSizeType
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ImageSizeType -> c ImageSizeType
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ImageSizeType)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c ImageSizeType)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ImageSizeType -> c ImageSizeType
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ImageSizeType -> c ImageSizeType
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ImageSizeType
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ImageSizeType
    $ctoConstr :: ImageSizeType -> Constr
    toConstr :: ImageSizeType -> Constr
    $cdataTypeOf :: ImageSizeType -> DataType
    dataTypeOf :: ImageSizeType -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ImageSizeType)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ImageSizeType)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c ImageSizeType)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c ImageSizeType)
    $cgmapT :: (forall b. Data b => b -> b) -> ImageSizeType -> ImageSizeType
    gmapT :: (forall b. Data b => b -> b) -> ImageSizeType -> ImageSizeType
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ImageSizeType -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ImageSizeType -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ImageSizeType -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ImageSizeType -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> ImageSizeType -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> ImageSizeType -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ImageSizeType -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ImageSizeType -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ImageSizeType -> m ImageSizeType
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ImageSizeType -> m ImageSizeType
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ImageSizeType -> m ImageSizeType
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ImageSizeType -> m ImageSizeType
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ImageSizeType -> m ImageSizeType
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ImageSizeType -> m ImageSizeType
    Data, Typeable, (forall x. ImageSizeType -> Rep ImageSizeType x)
    -> (forall x. Rep ImageSizeType x -> ImageSizeType)
    -> Generic ImageSizeType
    forall x. Rep ImageSizeType x -> ImageSizeType
    forall x. ImageSizeType -> Rep ImageSizeType x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. ImageSizeType -> Rep ImageSizeType x
    from :: forall x. ImageSizeType -> Rep ImageSizeType x
    $cto :: forall x. Rep ImageSizeType x -> ImageSizeType
    to :: forall x. Rep ImageSizeType x -> ImageSizeType
    Generic)

    instance FromJSON ImageSizeType where
        parseJSON :: Value -> Parser ImageSizeType
    parseJSON (Object Object
    o) =
            Int -> Int -> Text -> ImageSizeType
    ImageSizeType (Int -> Int -> Text -> ImageSizeType)
    -> Parser Int -> Parser (Int -> Text -> ImageSizeType)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser Int
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "w"
                Parser (Int -> Text -> ImageSizeType)
    -> Parser Int -> Parser (Text -> ImageSizeType)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Int
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "h"
                Parser (Text -> ImageSizeType)
    -> Parser Text -> Parser ImageSizeType
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Text
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "image_type"
        parseJSON Value
    v = String -> Parser ImageSizeType
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser ImageSizeType) -> String -> Parser ImageSizeType
    forall a b. (a -> b) -> a -> b
    $ String
    "unknown value: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON ImageSizeType where
        toJSON :: ImageSizeType -> Value
    toJSON ImageSizeType {Int
    Text
    imageSizeTypeWidth :: ImageSizeType -> Int
    imageSizeTypeHeight :: ImageSizeType -> Int
    imageSizeTypeType :: ImageSizeType -> Text
    imageSizeTypeWidth :: Int
    imageSizeTypeHeight :: Int
    imageSizeTypeType :: Text
    ..} =
            [Pair] -> Value
    object
                [ Key
    "w" Key -> Int -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Int
    imageSizeTypeWidth
                , Key
    "h" Key -> Int -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Int
    imageSizeTypeHeight
                , Key
    "image_type" Key -> Text -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Text
    imageSizeTypeType
                ]

    -- | This type is represents the API response of \"\/1.1\/media\/upload.json\".
    -- See <https://dev.twitter.com/docs/api/multiple-media-extended-entities>.
    data UploadedMedia = UploadedMedia
        { UploadedMedia -> Integer
    uploadedMediaId :: Integer
        , UploadedMedia -> Integer
    uploadedMediaSize :: Integer
        , UploadedMedia -> ImageSizeType
    uploadedMediaImage :: ImageSizeType
        }
        deriving (Int -> UploadedMedia -> ShowS
    [UploadedMedia] -> ShowS
    UploadedMedia -> String
    (Int -> UploadedMedia -> ShowS)
    -> (UploadedMedia -> String)
    -> ([UploadedMedia] -> ShowS)
    -> Show UploadedMedia
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> UploadedMedia -> ShowS
    showsPrec :: Int -> UploadedMedia -> ShowS
    $cshow :: UploadedMedia -> String
    show :: UploadedMedia -> String
    $cshowList :: [UploadedMedia] -> ShowS
    showList :: [UploadedMedia] -> ShowS
    Show, UploadedMedia -> UploadedMedia -> Bool
    (UploadedMedia -> UploadedMedia -> Bool)
    -> (UploadedMedia -> UploadedMedia -> Bool) -> Eq UploadedMedia
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: UploadedMedia -> UploadedMedia -> Bool
    == :: UploadedMedia -> UploadedMedia -> Bool
    $c/= :: UploadedMedia -> UploadedMedia -> Bool
    /= :: UploadedMedia -> UploadedMedia -> Bool
    Eq, Typeable UploadedMedia
    Typeable UploadedMedia =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> UploadedMedia -> c UploadedMedia)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c UploadedMedia)
    -> (UploadedMedia -> Constr)
    -> (UploadedMedia -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c UploadedMedia))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c UploadedMedia))
    -> ((forall b. Data b => b -> b) -> UploadedMedia -> UploadedMedia)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> UploadedMedia -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> UploadedMedia -> r)
    -> (forall u. (forall d. Data d => d -> u) -> UploadedMedia -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> UploadedMedia -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> UploadedMedia -> m UploadedMedia)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> UploadedMedia -> m UploadedMedia)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> UploadedMedia -> m UploadedMedia)
    -> Data UploadedMedia
    UploadedMedia -> Constr
    UploadedMedia -> DataType
    (forall b. Data b => b -> b) -> UploadedMedia -> UploadedMedia
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> UploadedMedia -> u
    forall u. (forall d. Data d => d -> u) -> UploadedMedia -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> UploadedMedia -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> UploadedMedia -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> UploadedMedia -> m UploadedMedia
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> UploadedMedia -> m UploadedMedia
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c UploadedMedia
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> UploadedMedia -> c UploadedMedia
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c UploadedMedia)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c UploadedMedia)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> UploadedMedia -> c UploadedMedia
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> UploadedMedia -> c UploadedMedia
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c UploadedMedia
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c UploadedMedia
    $ctoConstr :: UploadedMedia -> Constr
    toConstr :: UploadedMedia -> Constr
    $cdataTypeOf :: UploadedMedia -> DataType
    dataTypeOf :: UploadedMedia -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c UploadedMedia)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c UploadedMedia)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c UploadedMedia)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c UploadedMedia)
    $cgmapT :: (forall b. Data b => b -> b) -> UploadedMedia -> UploadedMedia
    gmapT :: (forall b. Data b => b -> b) -> UploadedMedia -> UploadedMedia
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> UploadedMedia -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> UploadedMedia -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> UploadedMedia -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> UploadedMedia -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> UploadedMedia -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> UploadedMedia -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> UploadedMedia -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> UploadedMedia -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> UploadedMedia -> m UploadedMedia
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> UploadedMedia -> m UploadedMedia
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> UploadedMedia -> m UploadedMedia
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> UploadedMedia -> m UploadedMedia
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> UploadedMedia -> m UploadedMedia
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> UploadedMedia -> m UploadedMedia
    Data, Typeable, (forall x. UploadedMedia -> Rep UploadedMedia x)
    -> (forall x. Rep UploadedMedia x -> UploadedMedia)
    -> Generic UploadedMedia
    forall x. Rep UploadedMedia x -> UploadedMedia
    forall x. UploadedMedia -> Rep UploadedMedia x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. UploadedMedia -> Rep UploadedMedia x
    from :: forall x. UploadedMedia -> Rep UploadedMedia x
    $cto :: forall x. Rep UploadedMedia x -> UploadedMedia
    to :: forall x. Rep UploadedMedia x -> UploadedMedia
    Generic)

    instance FromJSON UploadedMedia where
        parseJSON :: Value -> Parser UploadedMedia
    parseJSON (Object Object
    o) =
            Integer -> Integer -> ImageSizeType -> UploadedMedia
    UploadedMedia (Integer -> Integer -> ImageSizeType -> UploadedMedia)
    -> Parser Integer
    -> Parser (Integer -> ImageSizeType -> UploadedMedia)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Object
    o Object -> Key -> Parser Integer
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "media_id"
                Parser (Integer -> ImageSizeType -> UploadedMedia)
    -> Parser Integer -> Parser (ImageSizeType -> UploadedMedia)
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser Integer
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "size"
                Parser (ImageSizeType -> UploadedMedia)
    -> Parser ImageSizeType -> Parser UploadedMedia
    forall a b. Parser (a -> b) -> Parser a -> Parser b
    forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
    <*> Object
    o Object -> Key -> Parser ImageSizeType
    forall a. FromJSON a => Object -> Key -> Parser a
    .: Key
    "image"
        parseJSON Value
    v = String -> Parser UploadedMedia
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser UploadedMedia) -> String -> Parser UploadedMedia
    forall a b. (a -> b) -> a -> b
    $ String
    "unknown value: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ Value -> String
    forall a. Show a => a -> String
    show Value
    v

    instance ToJSON UploadedMedia where
        toJSON :: UploadedMedia -> Value
    toJSON UploadedMedia {Integer
    ImageSizeType
    uploadedMediaId :: UploadedMedia -> Integer
    uploadedMediaSize :: UploadedMedia -> Integer
    uploadedMediaImage :: UploadedMedia -> ImageSizeType
    uploadedMediaId :: Integer
    uploadedMediaSize :: Integer
    uploadedMediaImage :: ImageSizeType
    ..} =
            [Pair] -> Value
    object
                [ Key
    "media_id" Key -> Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer
    uploadedMediaId
                , Key
    "size" Key -> Integer -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= Integer
    uploadedMediaSize
                , Key
    "image" Key -> ImageSizeType -> Pair
    forall v. ToJSON v => Key -> v -> Pair
    forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
    .= ImageSizeType
    uploadedMediaImage
                ]

    -- | unicode code point indices, identifying the inclusive start and exclusive end of the displayable content of the Tweet.
    data DisplayTextRange = DisplayTextRange
        { DisplayTextRange -> Int
    displayTextRangeStart :: Int
        , -- | exclusive
          DisplayTextRange -> Int
    displayTextRangeEnd :: Int
        }
        deriving (Int -> DisplayTextRange -> ShowS
    [DisplayTextRange] -> ShowS
    DisplayTextRange -> String
    (Int -> DisplayTextRange -> ShowS)
    -> (DisplayTextRange -> String)
    -> ([DisplayTextRange] -> ShowS)
    -> Show DisplayTextRange
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> DisplayTextRange -> ShowS
    showsPrec :: Int -> DisplayTextRange -> ShowS
    $cshow :: DisplayTextRange -> String
    show :: DisplayTextRange -> String
    $cshowList :: [DisplayTextRange] -> ShowS
    showList :: [DisplayTextRange] -> ShowS
    Show, DisplayTextRange -> DisplayTextRange -> Bool
    (DisplayTextRange -> DisplayTextRange -> Bool)
    -> (DisplayTextRange -> DisplayTextRange -> Bool)
    -> Eq DisplayTextRange
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: DisplayTextRange -> DisplayTextRange -> Bool
    == :: DisplayTextRange -> DisplayTextRange -> Bool
    $c/= :: DisplayTextRange -> DisplayTextRange -> Bool
    /= :: DisplayTextRange -> DisplayTextRange -> Bool
    Eq, Eq DisplayTextRange
    Eq DisplayTextRange =>
    (DisplayTextRange -> DisplayTextRange -> Ordering)
    -> (DisplayTextRange -> DisplayTextRange -> Bool)
    -> (DisplayTextRange -> DisplayTextRange -> Bool)
    -> (DisplayTextRange -> DisplayTextRange -> Bool)
    -> (DisplayTextRange -> DisplayTextRange -> Bool)
    -> (DisplayTextRange -> DisplayTextRange -> DisplayTextRange)
    -> (DisplayTextRange -> DisplayTextRange -> DisplayTextRange)
    -> Ord DisplayTextRange
    DisplayTextRange -> DisplayTextRange -> Bool
    DisplayTextRange -> DisplayTextRange -> Ordering
    DisplayTextRange -> DisplayTextRange -> DisplayTextRange
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: DisplayTextRange -> DisplayTextRange -> Ordering
    compare :: DisplayTextRange -> DisplayTextRange -> Ordering
    $c< :: DisplayTextRange -> DisplayTextRange -> Bool
    < :: DisplayTextRange -> DisplayTextRange -> Bool
    $c<= :: DisplayTextRange -> DisplayTextRange -> Bool
    <= :: DisplayTextRange -> DisplayTextRange -> Bool
    $c> :: DisplayTextRange -> DisplayTextRange -> Bool
    > :: DisplayTextRange -> DisplayTextRange -> Bool
    $c>= :: DisplayTextRange -> DisplayTextRange -> Bool
    >= :: DisplayTextRange -> DisplayTextRange -> Bool
    $cmax :: DisplayTextRange -> DisplayTextRange -> DisplayTextRange
    max :: DisplayTextRange -> DisplayTextRange -> DisplayTextRange
    $cmin :: DisplayTextRange -> DisplayTextRange -> DisplayTextRange
    min :: DisplayTextRange -> DisplayTextRange -> DisplayTextRange
    Ord, Typeable DisplayTextRange
    Typeable DisplayTextRange =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> DisplayTextRange -> c DisplayTextRange)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c DisplayTextRange)
    -> (DisplayTextRange -> Constr)
    -> (DisplayTextRange -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c DisplayTextRange))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c DisplayTextRange))
    -> ((forall b. Data b => b -> b)
        -> DisplayTextRange -> DisplayTextRange)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> DisplayTextRange -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> DisplayTextRange -> r)
    -> (forall u.
        (forall d. Data d => d -> u) -> DisplayTextRange -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> DisplayTextRange -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d)
        -> DisplayTextRange -> m DisplayTextRange)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> DisplayTextRange -> m DisplayTextRange)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d)
        -> DisplayTextRange -> m DisplayTextRange)
    -> Data DisplayTextRange
    DisplayTextRange -> Constr
    DisplayTextRange -> DataType
    (forall b. Data b => b -> b)
    -> DisplayTextRange -> DisplayTextRange
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u.
    Int -> (forall d. Data d => d -> u) -> DisplayTextRange -> u
    forall u. (forall d. Data d => d -> u) -> DisplayTextRange -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> DisplayTextRange -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> DisplayTextRange -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> DisplayTextRange -> m DisplayTextRange
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> DisplayTextRange -> m DisplayTextRange
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c DisplayTextRange
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> DisplayTextRange -> c DisplayTextRange
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c DisplayTextRange)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c DisplayTextRange)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> DisplayTextRange -> c DisplayTextRange
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> DisplayTextRange -> c DisplayTextRange
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c DisplayTextRange
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c DisplayTextRange
    $ctoConstr :: DisplayTextRange -> Constr
    toConstr :: DisplayTextRange -> Constr
    $cdataTypeOf :: DisplayTextRange -> DataType
    dataTypeOf :: DisplayTextRange -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c DisplayTextRange)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c DisplayTextRange)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c DisplayTextRange)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c DisplayTextRange)
    $cgmapT :: (forall b. Data b => b -> b)
    -> DisplayTextRange -> DisplayTextRange
    gmapT :: (forall b. Data b => b -> b)
    -> DisplayTextRange -> DisplayTextRange
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> DisplayTextRange -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> DisplayTextRange -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> DisplayTextRange -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> DisplayTextRange -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> DisplayTextRange -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> DisplayTextRange -> [u]
    $cgmapQi :: forall u.
    Int -> (forall d. Data d => d -> u) -> DisplayTextRange -> u
    gmapQi :: forall u.
    Int -> (forall d. Data d => d -> u) -> DisplayTextRange -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> DisplayTextRange -> m DisplayTextRange
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> DisplayTextRange -> m DisplayTextRange
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> DisplayTextRange -> m DisplayTextRange
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> DisplayTextRange -> m DisplayTextRange
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> DisplayTextRange -> m DisplayTextRange
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> DisplayTextRange -> m DisplayTextRange
    Data, Typeable, (forall x. DisplayTextRange -> Rep DisplayTextRange x)
    -> (forall x. Rep DisplayTextRange x -> DisplayTextRange)
    -> Generic DisplayTextRange
    forall x. Rep DisplayTextRange x -> DisplayTextRange
    forall x. DisplayTextRange -> Rep DisplayTextRange x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. DisplayTextRange -> Rep DisplayTextRange x
    from :: forall x. DisplayTextRange -> Rep DisplayTextRange x
    $cto :: forall x. Rep DisplayTextRange x -> DisplayTextRange
    to :: forall x. Rep DisplayTextRange x -> DisplayTextRange
    Generic)

    instance FromJSON DisplayTextRange where
        parseJSON :: Value -> Parser DisplayTextRange
    parseJSON Value
    v = do
            Value -> Parser EntityIndices
    forall a. FromJSON a => Value -> Parser a
    parseJSON Value
    v Parser EntityIndices
    -> (EntityIndices -> Parser DisplayTextRange)
    -> Parser DisplayTextRange
    forall a b. Parser a -> (a -> Parser b) -> Parser b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= \case
                [Int
    s, Int
    e] -> DisplayTextRange -> Parser DisplayTextRange
    forall a. a -> Parser a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (DisplayTextRange -> Parser DisplayTextRange)
    -> DisplayTextRange -> Parser DisplayTextRange
    forall a b. (a -> b) -> a -> b
    $ Int -> Int -> DisplayTextRange
    DisplayTextRange Int
    s Int
    e
                EntityIndices
    unexpected ->
                    String -> Parser DisplayTextRange
    forall a. String -> Parser a
    forall (m :: * -> *) a. MonadFail m => String -> m a
    fail (String -> Parser DisplayTextRange)
    -> String -> Parser DisplayTextRange
    forall a b. (a -> b) -> a -> b
    $ String
    "parsing DisplayTextRange failed, expected [Int, Int], but got: " String -> ShowS
    forall a. [a] -> [a] -> [a]
    ++ EntityIndices -> String
    forall a. Show a => a -> String
    show EntityIndices
    unexpected
    instance ToJSON DisplayTextRange where
        toJSON :: DisplayTextRange -> Value
    toJSON (DisplayTextRange Int
    s Int
    e) = EntityIndices -> Value
    forall a. ToJSON a => a -> Value
    toJSON [Int
    s, Int
    e]