{-# 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.GroupType 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 GroupType = GroupType'
{
GroupType -> Maybe POSIX
creationDate :: Prelude.Maybe Data.POSIX,
GroupType -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
GroupType -> Maybe Text
groupName :: Prelude.Maybe Prelude.Text,
GroupType -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Data.POSIX,
GroupType -> Maybe Natural
precedence :: Prelude.Maybe Prelude.Natural,
GroupType -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
GroupType -> Maybe Text
userPoolId :: Prelude.Maybe Prelude.Text
}
deriving (GroupType -> GroupType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GroupType -> GroupType -> Bool
$c/= :: GroupType -> GroupType -> Bool
== :: GroupType -> GroupType -> Bool
$c== :: GroupType -> GroupType -> Bool
Prelude.Eq, ReadPrec [GroupType]
ReadPrec GroupType
Int -> ReadS GroupType
ReadS [GroupType]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GroupType]
$creadListPrec :: ReadPrec [GroupType]
readPrec :: ReadPrec GroupType
$creadPrec :: ReadPrec GroupType
readList :: ReadS [GroupType]
$creadList :: ReadS [GroupType]
readsPrec :: Int -> ReadS GroupType
$creadsPrec :: Int -> ReadS GroupType
Prelude.Read, Int -> GroupType -> ShowS
[GroupType] -> ShowS
GroupType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GroupType] -> ShowS
$cshowList :: [GroupType] -> ShowS
show :: GroupType -> String
$cshow :: GroupType -> String
showsPrec :: Int -> GroupType -> ShowS
$cshowsPrec :: Int -> GroupType -> ShowS
Prelude.Show, forall x. Rep GroupType x -> GroupType
forall x. GroupType -> Rep GroupType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GroupType x -> GroupType
$cfrom :: forall x. GroupType -> Rep GroupType x
Prelude.Generic)
newGroupType ::
GroupType
newGroupType :: GroupType
newGroupType =
GroupType'
{ $sel:creationDate:GroupType' :: Maybe POSIX
creationDate = forall a. Maybe a
Prelude.Nothing,
$sel:description:GroupType' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:groupName:GroupType' :: Maybe Text
groupName = forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedDate:GroupType' :: Maybe POSIX
lastModifiedDate = forall a. Maybe a
Prelude.Nothing,
$sel:precedence:GroupType' :: Maybe Natural
precedence = forall a. Maybe a
Prelude.Nothing,
$sel:roleArn:GroupType' :: Maybe Text
roleArn = forall a. Maybe a
Prelude.Nothing,
$sel:userPoolId:GroupType' :: Maybe Text
userPoolId = forall a. Maybe a
Prelude.Nothing
}
groupType_creationDate :: Lens.Lens' GroupType (Prelude.Maybe Prelude.UTCTime)
groupType_creationDate :: Lens' GroupType (Maybe UTCTime)
groupType_creationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupType' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:GroupType' :: GroupType -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: GroupType
s@GroupType' {} Maybe POSIX
a -> GroupType
s {$sel:creationDate:GroupType' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: GroupType) 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
groupType_description :: Lens.Lens' GroupType (Prelude.Maybe Prelude.Text)
groupType_description :: Lens' GroupType (Maybe Text)
groupType_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupType' {Maybe Text
description :: Maybe Text
$sel:description:GroupType' :: GroupType -> Maybe Text
description} -> Maybe Text
description) (\s :: GroupType
s@GroupType' {} Maybe Text
a -> GroupType
s {$sel:description:GroupType' :: Maybe Text
description = Maybe Text
a} :: GroupType)
groupType_groupName :: Lens.Lens' GroupType (Prelude.Maybe Prelude.Text)
groupType_groupName :: Lens' GroupType (Maybe Text)
groupType_groupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupType' {Maybe Text
groupName :: Maybe Text
$sel:groupName:GroupType' :: GroupType -> Maybe Text
groupName} -> Maybe Text
groupName) (\s :: GroupType
s@GroupType' {} Maybe Text
a -> GroupType
s {$sel:groupName:GroupType' :: Maybe Text
groupName = Maybe Text
a} :: GroupType)
groupType_lastModifiedDate :: Lens.Lens' GroupType (Prelude.Maybe Prelude.UTCTime)
groupType_lastModifiedDate :: Lens' GroupType (Maybe UTCTime)
groupType_lastModifiedDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupType' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:GroupType' :: GroupType -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: GroupType
s@GroupType' {} Maybe POSIX
a -> GroupType
s {$sel:lastModifiedDate:GroupType' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: GroupType) 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
groupType_precedence :: Lens.Lens' GroupType (Prelude.Maybe Prelude.Natural)
groupType_precedence :: Lens' GroupType (Maybe Natural)
groupType_precedence = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupType' {Maybe Natural
precedence :: Maybe Natural
$sel:precedence:GroupType' :: GroupType -> Maybe Natural
precedence} -> Maybe Natural
precedence) (\s :: GroupType
s@GroupType' {} Maybe Natural
a -> GroupType
s {$sel:precedence:GroupType' :: Maybe Natural
precedence = Maybe Natural
a} :: GroupType)
groupType_roleArn :: Lens.Lens' GroupType (Prelude.Maybe Prelude.Text)
groupType_roleArn :: Lens' GroupType (Maybe Text)
groupType_roleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupType' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:GroupType' :: GroupType -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: GroupType
s@GroupType' {} Maybe Text
a -> GroupType
s {$sel:roleArn:GroupType' :: Maybe Text
roleArn = Maybe Text
a} :: GroupType)
groupType_userPoolId :: Lens.Lens' GroupType (Prelude.Maybe Prelude.Text)
groupType_userPoolId :: Lens' GroupType (Maybe Text)
groupType_userPoolId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupType' {Maybe Text
userPoolId :: Maybe Text
$sel:userPoolId:GroupType' :: GroupType -> Maybe Text
userPoolId} -> Maybe Text
userPoolId) (\s :: GroupType
s@GroupType' {} Maybe Text
a -> GroupType
s {$sel:userPoolId:GroupType' :: Maybe Text
userPoolId = Maybe Text
a} :: GroupType)
instance Data.FromJSON GroupType where
parseJSON :: Value -> Parser GroupType
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"GroupType"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> GroupType
GroupType'
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
"Description")
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
"GroupName")
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
"Precedence")
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
"RoleArn")
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
"UserPoolId")
)
instance Prelude.Hashable GroupType where
hashWithSalt :: Int -> GroupType -> Int
hashWithSalt Int
_salt GroupType' {Maybe Natural
Maybe Text
Maybe POSIX
userPoolId :: Maybe Text
roleArn :: Maybe Text
precedence :: Maybe Natural
lastModifiedDate :: Maybe POSIX
groupName :: Maybe Text
description :: Maybe Text
creationDate :: Maybe POSIX
$sel:userPoolId:GroupType' :: GroupType -> Maybe Text
$sel:roleArn:GroupType' :: GroupType -> Maybe Text
$sel:precedence:GroupType' :: GroupType -> Maybe Natural
$sel:lastModifiedDate:GroupType' :: GroupType -> Maybe POSIX
$sel:groupName:GroupType' :: GroupType -> Maybe Text
$sel:description:GroupType' :: GroupType -> Maybe Text
$sel:creationDate:GroupType' :: GroupType -> 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 Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
precedence
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userPoolId
instance Prelude.NFData GroupType where
rnf :: GroupType -> ()
rnf GroupType' {Maybe Natural
Maybe Text
Maybe POSIX
userPoolId :: Maybe Text
roleArn :: Maybe Text
precedence :: Maybe Natural
lastModifiedDate :: Maybe POSIX
groupName :: Maybe Text
description :: Maybe Text
creationDate :: Maybe POSIX
$sel:userPoolId:GroupType' :: GroupType -> Maybe Text
$sel:roleArn:GroupType' :: GroupType -> Maybe Text
$sel:precedence:GroupType' :: GroupType -> Maybe Natural
$sel:lastModifiedDate:GroupType' :: GroupType -> Maybe POSIX
$sel:groupName:GroupType' :: GroupType -> Maybe Text
$sel:description:GroupType' :: GroupType -> Maybe Text
$sel:creationDate:GroupType' :: GroupType -> 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 Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
groupName
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 Natural
precedence
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roleArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
userPoolId