{-# 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.CognitoIdentityProvider.Types.ProviderDescription where
import Amazonka.CognitoIdentityProvider.Types.IdentityProviderTypeType
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 ProviderDescription = ProviderDescription'
{
ProviderDescription -> Maybe POSIX
creationDate :: Prelude.Maybe Data.POSIX,
ProviderDescription -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Data.POSIX,
ProviderDescription -> Maybe Text
providerName :: Prelude.Maybe Prelude.Text,
ProviderDescription -> Maybe IdentityProviderTypeType
providerType :: Prelude.Maybe IdentityProviderTypeType
}
deriving (ProviderDescription -> ProviderDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProviderDescription -> ProviderDescription -> Bool
$c/= :: ProviderDescription -> ProviderDescription -> Bool
== :: ProviderDescription -> ProviderDescription -> Bool
$c== :: ProviderDescription -> ProviderDescription -> Bool
Prelude.Eq, ReadPrec [ProviderDescription]
ReadPrec ProviderDescription
Int -> ReadS ProviderDescription
ReadS [ProviderDescription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProviderDescription]
$creadListPrec :: ReadPrec [ProviderDescription]
readPrec :: ReadPrec ProviderDescription
$creadPrec :: ReadPrec ProviderDescription
readList :: ReadS [ProviderDescription]
$creadList :: ReadS [ProviderDescription]
readsPrec :: Int -> ReadS ProviderDescription
$creadsPrec :: Int -> ReadS ProviderDescription
Prelude.Read, Int -> ProviderDescription -> ShowS
[ProviderDescription] -> ShowS
ProviderDescription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProviderDescription] -> ShowS
$cshowList :: [ProviderDescription] -> ShowS
show :: ProviderDescription -> String
$cshow :: ProviderDescription -> String
showsPrec :: Int -> ProviderDescription -> ShowS
$cshowsPrec :: Int -> ProviderDescription -> ShowS
Prelude.Show, forall x. Rep ProviderDescription x -> ProviderDescription
forall x. ProviderDescription -> Rep ProviderDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProviderDescription x -> ProviderDescription
$cfrom :: forall x. ProviderDescription -> Rep ProviderDescription x
Prelude.Generic)
newProviderDescription ::
ProviderDescription
newProviderDescription :: ProviderDescription
newProviderDescription =
ProviderDescription'
{ $sel:creationDate:ProviderDescription' :: Maybe POSIX
creationDate =
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedDate:ProviderDescription' :: Maybe POSIX
lastModifiedDate = forall a. Maybe a
Prelude.Nothing,
$sel:providerName:ProviderDescription' :: Maybe Text
providerName = forall a. Maybe a
Prelude.Nothing,
$sel:providerType:ProviderDescription' :: Maybe IdentityProviderTypeType
providerType = forall a. Maybe a
Prelude.Nothing
}
providerDescription_creationDate :: Lens.Lens' ProviderDescription (Prelude.Maybe Prelude.UTCTime)
providerDescription_creationDate :: Lens' ProviderDescription (Maybe UTCTime)
providerDescription_creationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProviderDescription' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:ProviderDescription' :: ProviderDescription -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: ProviderDescription
s@ProviderDescription' {} Maybe POSIX
a -> ProviderDescription
s {$sel:creationDate:ProviderDescription' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: ProviderDescription) 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
providerDescription_lastModifiedDate :: Lens.Lens' ProviderDescription (Prelude.Maybe Prelude.UTCTime)
providerDescription_lastModifiedDate :: Lens' ProviderDescription (Maybe UTCTime)
providerDescription_lastModifiedDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProviderDescription' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:ProviderDescription' :: ProviderDescription -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: ProviderDescription
s@ProviderDescription' {} Maybe POSIX
a -> ProviderDescription
s {$sel:lastModifiedDate:ProviderDescription' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: ProviderDescription) 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
providerDescription_providerName :: Lens.Lens' ProviderDescription (Prelude.Maybe Prelude.Text)
providerDescription_providerName :: Lens' ProviderDescription (Maybe Text)
providerDescription_providerName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProviderDescription' {Maybe Text
providerName :: Maybe Text
$sel:providerName:ProviderDescription' :: ProviderDescription -> Maybe Text
providerName} -> Maybe Text
providerName) (\s :: ProviderDescription
s@ProviderDescription' {} Maybe Text
a -> ProviderDescription
s {$sel:providerName:ProviderDescription' :: Maybe Text
providerName = Maybe Text
a} :: ProviderDescription)
providerDescription_providerType :: Lens.Lens' ProviderDescription (Prelude.Maybe IdentityProviderTypeType)
providerDescription_providerType :: Lens' ProviderDescription (Maybe IdentityProviderTypeType)
providerDescription_providerType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProviderDescription' {Maybe IdentityProviderTypeType
providerType :: Maybe IdentityProviderTypeType
$sel:providerType:ProviderDescription' :: ProviderDescription -> Maybe IdentityProviderTypeType
providerType} -> Maybe IdentityProviderTypeType
providerType) (\s :: ProviderDescription
s@ProviderDescription' {} Maybe IdentityProviderTypeType
a -> ProviderDescription
s {$sel:providerType:ProviderDescription' :: Maybe IdentityProviderTypeType
providerType = Maybe IdentityProviderTypeType
a} :: ProviderDescription)
instance Data.FromJSON ProviderDescription where
parseJSON :: Value -> Parser ProviderDescription
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ProviderDescription"
( \Object
x ->
Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe IdentityProviderTypeType
-> ProviderDescription
ProviderDescription'
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
"CreationDate")
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
"ProviderName")
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
"ProviderType")
)
instance Prelude.Hashable ProviderDescription where
hashWithSalt :: Int -> ProviderDescription -> Int
hashWithSalt Int
_salt ProviderDescription' {Maybe Text
Maybe POSIX
Maybe IdentityProviderTypeType
providerType :: Maybe IdentityProviderTypeType
providerName :: Maybe Text
lastModifiedDate :: Maybe POSIX
creationDate :: Maybe POSIX
$sel:providerType:ProviderDescription' :: ProviderDescription -> Maybe IdentityProviderTypeType
$sel:providerName:ProviderDescription' :: ProviderDescription -> Maybe Text
$sel:lastModifiedDate:ProviderDescription' :: ProviderDescription -> Maybe POSIX
$sel:creationDate:ProviderDescription' :: ProviderDescription -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
providerName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IdentityProviderTypeType
providerType
instance Prelude.NFData ProviderDescription where
rnf :: ProviderDescription -> ()
rnf ProviderDescription' {Maybe Text
Maybe POSIX
Maybe IdentityProviderTypeType
providerType :: Maybe IdentityProviderTypeType
providerName :: Maybe Text
lastModifiedDate :: Maybe POSIX
creationDate :: Maybe POSIX
$sel:providerType:ProviderDescription' :: ProviderDescription -> Maybe IdentityProviderTypeType
$sel:providerName:ProviderDescription' :: ProviderDescription -> Maybe Text
$sel:lastModifiedDate:ProviderDescription' :: ProviderDescription -> Maybe POSIX
$sel:creationDate:ProviderDescription' :: ProviderDescription -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationDate
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 Text
providerName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IdentityProviderTypeType
providerType