{-# 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.Lens as Lens
import Amazonka.MemoryDb.Types.ACLPendingChanges
import qualified Amazonka.Prelude as Prelude
data ACL = ACL'
{
ACL -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
ACL -> Maybe [Text]
userNames :: Prelude.Maybe [Prelude.Text],
ACL -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
ACL -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ACL -> Maybe ACLPendingChanges
pendingChanges :: Prelude.Maybe ACLPendingChanges,
ACL -> Maybe Text
minimumEngineVersion :: Prelude.Maybe Prelude.Text,
ACL -> Maybe [Text]
clusters :: Prelude.Maybe [Prelude.Text]
}
deriving (ACL -> ACL -> Bool
(ACL -> ACL -> Bool) -> (ACL -> ACL -> Bool) -> Eq ACL
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]
(Int -> ReadS ACL)
-> ReadS [ACL] -> ReadPrec ACL -> ReadPrec [ACL] -> Read 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
(Int -> ACL -> ShowS)
-> (ACL -> String) -> ([ACL] -> ShowS) -> Show ACL
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. ACL -> Rep ACL x)
-> (forall x. Rep ACL x -> ACL) -> Generic ACL
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' :: Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe ACLPendingChanges
-> Maybe Text
-> Maybe [Text]
-> ACL
ACL'
{ $sel:status:ACL' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:userNames:ACL' :: Maybe [Text]
userNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:arn:ACL' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:ACL' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:pendingChanges:ACL' :: Maybe ACLPendingChanges
pendingChanges = Maybe ACLPendingChanges
forall a. Maybe a
Prelude.Nothing,
$sel:minimumEngineVersion:ACL' :: Maybe Text
minimumEngineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clusters:ACL' :: Maybe [Text]
clusters = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
acl_status :: Lens.Lens' ACL (Prelude.Maybe Prelude.Text)
acl_status :: (Maybe Text -> f (Maybe Text)) -> ACL -> f ACL
acl_status = (ACL -> Maybe Text)
-> (ACL -> Maybe Text -> ACL)
-> Lens ACL ACL (Maybe Text) (Maybe Text)
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 :: (Maybe [Text] -> f (Maybe [Text])) -> ACL -> f ACL
acl_userNames = (ACL -> Maybe [Text])
-> (ACL -> Maybe [Text] -> ACL)
-> Lens ACL ACL (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text])) -> ACL -> f ACL)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ACL
-> f ACL
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
acl_arn :: Lens.Lens' ACL (Prelude.Maybe Prelude.Text)
acl_arn :: (Maybe Text -> f (Maybe Text)) -> ACL -> f ACL
acl_arn = (ACL -> Maybe Text)
-> (ACL -> Maybe Text -> ACL)
-> Lens ACL ACL (Maybe Text) (Maybe Text)
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_name :: Lens.Lens' ACL (Prelude.Maybe Prelude.Text)
acl_name :: (Maybe Text -> f (Maybe Text)) -> ACL -> f ACL
acl_name = (ACL -> Maybe Text)
-> (ACL -> Maybe Text -> ACL)
-> Lens ACL ACL (Maybe Text) (Maybe Text)
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 :: (Maybe ACLPendingChanges -> f (Maybe ACLPendingChanges))
-> ACL -> f ACL
acl_pendingChanges = (ACL -> Maybe ACLPendingChanges)
-> (ACL -> Maybe ACLPendingChanges -> ACL)
-> Lens ACL ACL (Maybe ACLPendingChanges) (Maybe ACLPendingChanges)
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_minimumEngineVersion :: Lens.Lens' ACL (Prelude.Maybe Prelude.Text)
acl_minimumEngineVersion :: (Maybe Text -> f (Maybe Text)) -> ACL -> f ACL
acl_minimumEngineVersion = (ACL -> Maybe Text)
-> (ACL -> Maybe Text -> ACL)
-> Lens ACL ACL (Maybe Text) (Maybe Text)
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_clusters :: Lens.Lens' ACL (Prelude.Maybe [Prelude.Text])
acl_clusters :: (Maybe [Text] -> f (Maybe [Text])) -> ACL -> f ACL
acl_clusters = (ACL -> Maybe [Text])
-> (ACL -> Maybe [Text] -> ACL)
-> Lens ACL ACL (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text])) -> ACL -> f ACL)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ACL
-> f ACL
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON ACL where
parseJSON :: Value -> Parser ACL
parseJSON =
String -> (Object -> Parser ACL) -> Value -> Parser ACL
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ACL"
( \Object
x ->
Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe ACLPendingChanges
-> Maybe Text
-> Maybe [Text]
-> ACL
ACL'
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe ACLPendingChanges
-> Maybe Text
-> Maybe [Text]
-> ACL)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe ACLPendingChanges
-> Maybe Text
-> Maybe [Text]
-> ACL)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe ACLPendingChanges
-> Maybe Text
-> Maybe [Text]
-> ACL)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe ACLPendingChanges
-> Maybe Text
-> Maybe [Text]
-> ACL)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UserNames" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe Text
-> Maybe ACLPendingChanges
-> Maybe Text
-> Maybe [Text]
-> ACL)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe ACLPendingChanges -> Maybe Text -> Maybe [Text] -> ACL)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ARN")
Parser
(Maybe Text
-> Maybe ACLPendingChanges -> Maybe Text -> Maybe [Text] -> ACL)
-> Parser (Maybe Text)
-> Parser
(Maybe ACLPendingChanges -> Maybe Text -> Maybe [Text] -> ACL)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
Parser
(Maybe ACLPendingChanges -> Maybe Text -> Maybe [Text] -> ACL)
-> Parser (Maybe ACLPendingChanges)
-> Parser (Maybe Text -> Maybe [Text] -> ACL)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ACLPendingChanges)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PendingChanges")
Parser (Maybe Text -> Maybe [Text] -> ACL)
-> Parser (Maybe Text) -> Parser (Maybe [Text] -> ACL)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MinimumEngineVersion")
Parser (Maybe [Text] -> ACL) -> Parser (Maybe [Text]) -> Parser ACL
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Clusters" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable ACL
instance Prelude.NFData ACL