{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CognitoSync.Types.IdentityPoolUsage where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data IdentityPoolUsage = IdentityPoolUsage'
{
IdentityPoolUsage -> Maybe Integer
dataStorage :: Prelude.Maybe Prelude.Integer,
IdentityPoolUsage -> Maybe Text
identityPoolId :: Prelude.Maybe Prelude.Text,
IdentityPoolUsage -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Data.POSIX,
IdentityPoolUsage -> Maybe Integer
syncSessionsCount :: Prelude.Maybe Prelude.Integer
}
deriving (IdentityPoolUsage -> IdentityPoolUsage -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IdentityPoolUsage -> IdentityPoolUsage -> Bool
$c/= :: IdentityPoolUsage -> IdentityPoolUsage -> Bool
== :: IdentityPoolUsage -> IdentityPoolUsage -> Bool
$c== :: IdentityPoolUsage -> IdentityPoolUsage -> Bool
Prelude.Eq, ReadPrec [IdentityPoolUsage]
ReadPrec IdentityPoolUsage
Int -> ReadS IdentityPoolUsage
ReadS [IdentityPoolUsage]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IdentityPoolUsage]
$creadListPrec :: ReadPrec [IdentityPoolUsage]
readPrec :: ReadPrec IdentityPoolUsage
$creadPrec :: ReadPrec IdentityPoolUsage
readList :: ReadS [IdentityPoolUsage]
$creadList :: ReadS [IdentityPoolUsage]
readsPrec :: Int -> ReadS IdentityPoolUsage
$creadsPrec :: Int -> ReadS IdentityPoolUsage
Prelude.Read, Int -> IdentityPoolUsage -> ShowS
[IdentityPoolUsage] -> ShowS
IdentityPoolUsage -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IdentityPoolUsage] -> ShowS
$cshowList :: [IdentityPoolUsage] -> ShowS
show :: IdentityPoolUsage -> String
$cshow :: IdentityPoolUsage -> String
showsPrec :: Int -> IdentityPoolUsage -> ShowS
$cshowsPrec :: Int -> IdentityPoolUsage -> ShowS
Prelude.Show, forall x. Rep IdentityPoolUsage x -> IdentityPoolUsage
forall x. IdentityPoolUsage -> Rep IdentityPoolUsage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IdentityPoolUsage x -> IdentityPoolUsage
$cfrom :: forall x. IdentityPoolUsage -> Rep IdentityPoolUsage x
Prelude.Generic)
newIdentityPoolUsage ::
IdentityPoolUsage
newIdentityPoolUsage :: IdentityPoolUsage
newIdentityPoolUsage =
IdentityPoolUsage'
{ $sel:dataStorage:IdentityPoolUsage' :: Maybe Integer
dataStorage = forall a. Maybe a
Prelude.Nothing,
$sel:identityPoolId:IdentityPoolUsage' :: Maybe Text
identityPoolId = forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedDate:IdentityPoolUsage' :: Maybe POSIX
lastModifiedDate = forall a. Maybe a
Prelude.Nothing,
$sel:syncSessionsCount:IdentityPoolUsage' :: Maybe Integer
syncSessionsCount = forall a. Maybe a
Prelude.Nothing
}
identityPoolUsage_dataStorage :: Lens.Lens' IdentityPoolUsage (Prelude.Maybe Prelude.Integer)
identityPoolUsage_dataStorage :: Lens' IdentityPoolUsage (Maybe Integer)
identityPoolUsage_dataStorage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityPoolUsage' {Maybe Integer
dataStorage :: Maybe Integer
$sel:dataStorage:IdentityPoolUsage' :: IdentityPoolUsage -> Maybe Integer
dataStorage} -> Maybe Integer
dataStorage) (\s :: IdentityPoolUsage
s@IdentityPoolUsage' {} Maybe Integer
a -> IdentityPoolUsage
s {$sel:dataStorage:IdentityPoolUsage' :: Maybe Integer
dataStorage = Maybe Integer
a} :: IdentityPoolUsage)
identityPoolUsage_identityPoolId :: Lens.Lens' IdentityPoolUsage (Prelude.Maybe Prelude.Text)
identityPoolUsage_identityPoolId :: Lens' IdentityPoolUsage (Maybe Text)
identityPoolUsage_identityPoolId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityPoolUsage' {Maybe Text
identityPoolId :: Maybe Text
$sel:identityPoolId:IdentityPoolUsage' :: IdentityPoolUsage -> Maybe Text
identityPoolId} -> Maybe Text
identityPoolId) (\s :: IdentityPoolUsage
s@IdentityPoolUsage' {} Maybe Text
a -> IdentityPoolUsage
s {$sel:identityPoolId:IdentityPoolUsage' :: Maybe Text
identityPoolId = Maybe Text
a} :: IdentityPoolUsage)
identityPoolUsage_lastModifiedDate :: Lens.Lens' IdentityPoolUsage (Prelude.Maybe Prelude.UTCTime)
identityPoolUsage_lastModifiedDate :: Lens' IdentityPoolUsage (Maybe UTCTime)
identityPoolUsage_lastModifiedDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityPoolUsage' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:IdentityPoolUsage' :: IdentityPoolUsage -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: IdentityPoolUsage
s@IdentityPoolUsage' {} Maybe POSIX
a -> IdentityPoolUsage
s {$sel:lastModifiedDate:IdentityPoolUsage' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: IdentityPoolUsage) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
identityPoolUsage_syncSessionsCount :: Lens.Lens' IdentityPoolUsage (Prelude.Maybe Prelude.Integer)
identityPoolUsage_syncSessionsCount :: Lens' IdentityPoolUsage (Maybe Integer)
identityPoolUsage_syncSessionsCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityPoolUsage' {Maybe Integer
syncSessionsCount :: Maybe Integer
$sel:syncSessionsCount:IdentityPoolUsage' :: IdentityPoolUsage -> Maybe Integer
syncSessionsCount} -> Maybe Integer
syncSessionsCount) (\s :: IdentityPoolUsage
s@IdentityPoolUsage' {} Maybe Integer
a -> IdentityPoolUsage
s {$sel:syncSessionsCount:IdentityPoolUsage' :: Maybe Integer
syncSessionsCount = Maybe Integer
a} :: IdentityPoolUsage)
instance Data.FromJSON IdentityPoolUsage where
parseJSON :: Value -> Parser IdentityPoolUsage
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"IdentityPoolUsage"
( \Object
x ->
Maybe Integer
-> Maybe Text -> Maybe POSIX -> Maybe Integer -> IdentityPoolUsage
IdentityPoolUsage'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DataStorage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"IdentityPoolId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastModifiedDate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SyncSessionsCount")
)
instance Prelude.Hashable IdentityPoolUsage where
hashWithSalt :: Int -> IdentityPoolUsage -> Int
hashWithSalt Int
_salt IdentityPoolUsage' {Maybe Integer
Maybe Text
Maybe POSIX
syncSessionsCount :: Maybe Integer
lastModifiedDate :: Maybe POSIX
identityPoolId :: Maybe Text
dataStorage :: Maybe Integer
$sel:syncSessionsCount:IdentityPoolUsage' :: IdentityPoolUsage -> Maybe Integer
$sel:lastModifiedDate:IdentityPoolUsage' :: IdentityPoolUsage -> Maybe POSIX
$sel:identityPoolId:IdentityPoolUsage' :: IdentityPoolUsage -> Maybe Text
$sel:dataStorage:IdentityPoolUsage' :: IdentityPoolUsage -> Maybe Integer
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
dataStorage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
identityPoolId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
syncSessionsCount
instance Prelude.NFData IdentityPoolUsage where
rnf :: IdentityPoolUsage -> ()
rnf IdentityPoolUsage' {Maybe Integer
Maybe Text
Maybe POSIX
syncSessionsCount :: Maybe Integer
lastModifiedDate :: Maybe POSIX
identityPoolId :: Maybe Text
dataStorage :: Maybe Integer
$sel:syncSessionsCount:IdentityPoolUsage' :: IdentityPoolUsage -> Maybe Integer
$sel:lastModifiedDate:IdentityPoolUsage' :: IdentityPoolUsage -> Maybe POSIX
$sel:identityPoolId:IdentityPoolUsage' :: IdentityPoolUsage -> Maybe Text
$sel:dataStorage:IdentityPoolUsage' :: IdentityPoolUsage -> Maybe Integer
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
dataStorage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
identityPoolId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
syncSessionsCount