{-# 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.MemoryDb.Types.ACL where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MemoryDb.Types.ACLPendingChanges
import qualified Amazonka.Prelude as Prelude
data ACL = ACL'
{
ACL -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
ACL -> Maybe [Text]
clusters :: Prelude.Maybe [Prelude.Text],
ACL -> Maybe Text
minimumEngineVersion :: Prelude.Maybe Prelude.Text,
ACL -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ACL -> Maybe ACLPendingChanges
pendingChanges :: Prelude.Maybe ACLPendingChanges,
ACL -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
ACL -> Maybe [Text]
userNames :: Prelude.Maybe [Prelude.Text]
}
deriving (ACL -> ACL -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ACL -> ACL -> Bool
$c/= :: ACL -> ACL -> Bool
== :: ACL -> ACL -> Bool
$c== :: ACL -> ACL -> Bool
Prelude.Eq, ReadPrec [ACL]
ReadPrec ACL
Int -> ReadS ACL
ReadS [ACL]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ACL]
$creadListPrec :: ReadPrec [ACL]
readPrec :: ReadPrec ACL
$creadPrec :: ReadPrec ACL
readList :: ReadS [ACL]
$creadList :: ReadS [ACL]
readsPrec :: Int -> ReadS ACL
$creadsPrec :: Int -> ReadS ACL
Prelude.Read, Int -> ACL -> ShowS
[ACL] -> ShowS
ACL -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ACL] -> ShowS
$cshowList :: [ACL] -> ShowS
show :: ACL -> String
$cshow :: ACL -> String
showsPrec :: Int -> ACL -> ShowS
$cshowsPrec :: Int -> ACL -> ShowS
Prelude.Show, forall x. Rep ACL x -> ACL
forall x. ACL -> Rep ACL x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ACL x -> ACL
$cfrom :: forall x. ACL -> Rep ACL x
Prelude.Generic)
newACL ::
ACL
newACL :: ACL
newACL =
ACL'
{ $sel:arn:ACL' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:clusters:ACL' :: Maybe [Text]
clusters = forall a. Maybe a
Prelude.Nothing,
$sel:minimumEngineVersion:ACL' :: Maybe Text
minimumEngineVersion = forall a. Maybe a
Prelude.Nothing,
$sel:name:ACL' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:pendingChanges:ACL' :: Maybe ACLPendingChanges
pendingChanges = forall a. Maybe a
Prelude.Nothing,
$sel:status:ACL' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing,
$sel:userNames:ACL' :: Maybe [Text]
userNames = forall a. Maybe a
Prelude.Nothing
}
acl_arn :: Lens.Lens' ACL (Prelude.Maybe Prelude.Text)
acl_arn :: Lens' ACL (Maybe Text)
acl_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ACL' {Maybe Text
arn :: Maybe Text
$sel:arn:ACL' :: ACL -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ACL
s@ACL' {} Maybe Text
a -> ACL
s {$sel:arn:ACL' :: Maybe Text
arn = Maybe Text
a} :: ACL)
acl_clusters :: Lens.Lens' ACL (Prelude.Maybe [Prelude.Text])
acl_clusters :: Lens' ACL (Maybe [Text])
acl_clusters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ACL' {Maybe [Text]
clusters :: Maybe [Text]
$sel:clusters:ACL' :: ACL -> Maybe [Text]
clusters} -> Maybe [Text]
clusters) (\s :: ACL
s@ACL' {} Maybe [Text]
a -> ACL
s {$sel:clusters:ACL' :: Maybe [Text]
clusters = Maybe [Text]
a} :: ACL) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
acl_minimumEngineVersion :: Lens.Lens' ACL (Prelude.Maybe Prelude.Text)
acl_minimumEngineVersion :: Lens' ACL (Maybe Text)
acl_minimumEngineVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ACL' {Maybe Text
minimumEngineVersion :: Maybe Text
$sel:minimumEngineVersion:ACL' :: ACL -> Maybe Text
minimumEngineVersion} -> Maybe Text
minimumEngineVersion) (\s :: ACL
s@ACL' {} Maybe Text
a -> ACL
s {$sel:minimumEngineVersion:ACL' :: Maybe Text
minimumEngineVersion = Maybe Text
a} :: ACL)
acl_name :: Lens.Lens' ACL (Prelude.Maybe Prelude.Text)
acl_name :: Lens' ACL (Maybe Text)
acl_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ACL' {Maybe Text
name :: Maybe Text
$sel:name:ACL' :: ACL -> Maybe Text
name} -> Maybe Text
name) (\s :: ACL
s@ACL' {} Maybe Text
a -> ACL
s {$sel:name:ACL' :: Maybe Text
name = Maybe Text
a} :: ACL)
acl_pendingChanges :: Lens.Lens' ACL (Prelude.Maybe ACLPendingChanges)
acl_pendingChanges :: Lens' ACL (Maybe ACLPendingChanges)
acl_pendingChanges = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ACL' {Maybe ACLPendingChanges
pendingChanges :: Maybe ACLPendingChanges
$sel:pendingChanges:ACL' :: ACL -> Maybe ACLPendingChanges
pendingChanges} -> Maybe ACLPendingChanges
pendingChanges) (\s :: ACL
s@ACL' {} Maybe ACLPendingChanges
a -> ACL
s {$sel:pendingChanges:ACL' :: Maybe ACLPendingChanges
pendingChanges = Maybe ACLPendingChanges
a} :: ACL)
acl_status :: Lens.Lens' ACL (Prelude.Maybe Prelude.Text)
acl_status :: Lens' ACL (Maybe Text)
acl_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ACL' {Maybe Text
status :: Maybe Text
$sel:status:ACL' :: ACL -> Maybe Text
status} -> Maybe Text
status) (\s :: ACL
s@ACL' {} Maybe Text
a -> ACL
s {$sel:status:ACL' :: Maybe Text
status = Maybe Text
a} :: ACL)
acl_userNames :: Lens.Lens' ACL (Prelude.Maybe [Prelude.Text])
acl_userNames :: Lens' ACL (Maybe [Text])
acl_userNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ACL' {Maybe [Text]
userNames :: Maybe [Text]
$sel:userNames:ACL' :: ACL -> Maybe [Text]
userNames} -> Maybe [Text]
userNames) (\s :: ACL
s@ACL' {} Maybe [Text]
a -> ACL
s {$sel:userNames:ACL' :: Maybe [Text]
userNames = Maybe [Text]
a} :: ACL) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON ACL where
parseJSON :: Value -> Parser ACL
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ACL"
( \Object
x ->
Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe ACLPendingChanges
-> Maybe Text
-> Maybe [Text]
-> ACL
ACL'
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
"ARN")
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
"Clusters" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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
"MinimumEngineVersion")
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
"Name")
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
"PendingChanges")
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
"Status")
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
"UserNames" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable ACL where
hashWithSalt :: Int -> ACL -> Int
hashWithSalt Int
_salt ACL' {Maybe [Text]
Maybe Text
Maybe ACLPendingChanges
userNames :: Maybe [Text]
status :: Maybe Text
pendingChanges :: Maybe ACLPendingChanges
name :: Maybe Text
minimumEngineVersion :: Maybe Text
clusters :: Maybe [Text]
arn :: Maybe Text
$sel:userNames:ACL' :: ACL -> Maybe [Text]
$sel:status:ACL' :: ACL -> Maybe Text
$sel:pendingChanges:ACL' :: ACL -> Maybe ACLPendingChanges
$sel:name:ACL' :: ACL -> Maybe Text
$sel:minimumEngineVersion:ACL' :: ACL -> Maybe Text
$sel:clusters:ACL' :: ACL -> Maybe [Text]
$sel:arn:ACL' :: ACL -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
clusters
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
minimumEngineVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ACLPendingChanges
pendingChanges
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
userNames
instance Prelude.NFData ACL where
rnf :: ACL -> ()
rnf ACL' {Maybe [Text]
Maybe Text
Maybe ACLPendingChanges
userNames :: Maybe [Text]
status :: Maybe Text
pendingChanges :: Maybe ACLPendingChanges
name :: Maybe Text
minimumEngineVersion :: Maybe Text
clusters :: Maybe [Text]
arn :: Maybe Text
$sel:userNames:ACL' :: ACL -> Maybe [Text]
$sel:status:ACL' :: ACL -> Maybe Text
$sel:pendingChanges:ACL' :: ACL -> Maybe ACLPendingChanges
$sel:name:ACL' :: ACL -> Maybe Text
$sel:minimumEngineVersion:ACL' :: ACL -> Maybe Text
$sel:clusters:ACL' :: ACL -> Maybe [Text]
$sel:arn:ACL' :: ACL -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
clusters
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
minimumEngineVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ACLPendingChanges
pendingChanges
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
userNames