module Stratosphere.MemoryDB.ACL (
ACL(..), mkACL
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data ACL
=
ACL {ACL -> ()
haddock_workaround_ :: (),
ACL -> Value Text
aCLName :: (Value Prelude.Text),
ACL -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
ACL -> Maybe (ValueList Text)
userNames :: (Prelude.Maybe (ValueList Prelude.Text))}
deriving stock (ACL -> ACL -> Bool
(ACL -> ACL -> Bool) -> (ACL -> ACL -> Bool) -> Eq ACL
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ACL -> ACL -> Bool
== :: ACL -> ACL -> Bool
$c/= :: ACL -> ACL -> Bool
/= :: ACL -> ACL -> Bool
Prelude.Eq, 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
$cshowsPrec :: Int -> ACL -> ShowS
showsPrec :: Int -> ACL -> ShowS
$cshow :: ACL -> String
show :: ACL -> String
$cshowList :: [ACL] -> ShowS
showList :: [ACL] -> ShowS
Prelude.Show)
mkACL :: Value Prelude.Text -> ACL
mkACL :: Value Text -> ACL
mkACL Value Text
aCLName
= ACL
{haddock_workaround_ :: ()
haddock_workaround_ = (), aCLName :: Value Text
aCLName = Value Text
aCLName,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing, userNames :: Maybe (ValueList Text)
userNames = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ACL where
toResourceProperties :: ACL -> ResourceProperties
toResourceProperties ACL {Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ACL -> ()
aCLName :: ACL -> Value Text
tags :: ACL -> Maybe [Tag]
userNames :: ACL -> Maybe (ValueList Text)
haddock_workaround_ :: ()
aCLName :: Value Text
tags :: Maybe [Tag]
userNames :: Maybe (ValueList Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::MemoryDB::ACL", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ACLName" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
aCLName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"UserNames" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
userNames]))}
instance JSON.ToJSON ACL where
toJSON :: ACL -> Value
toJSON ACL {Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ACL -> ()
aCLName :: ACL -> Value Text
tags :: ACL -> Maybe [Tag]
userNames :: ACL -> Maybe (ValueList Text)
haddock_workaround_ :: ()
aCLName :: Value Text
tags :: Maybe [Tag]
userNames :: Maybe (ValueList Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ACLName" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
aCLName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"UserNames" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
userNames])))
instance Property "ACLName" ACL where
type PropertyType "ACLName" ACL = Value Prelude.Text
set :: PropertyType "ACLName" ACL -> ACL -> ACL
set PropertyType "ACLName" ACL
newValue ACL {Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ACL -> ()
aCLName :: ACL -> Value Text
tags :: ACL -> Maybe [Tag]
userNames :: ACL -> Maybe (ValueList Text)
haddock_workaround_ :: ()
aCLName :: Value Text
tags :: Maybe [Tag]
userNames :: Maybe (ValueList Text)
..} = ACL {aCLName :: Value Text
aCLName = PropertyType "ACLName" ACL
Value Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
()
haddock_workaround_ :: ()
tags :: Maybe [Tag]
userNames :: Maybe (ValueList Text)
haddock_workaround_ :: ()
tags :: Maybe [Tag]
userNames :: Maybe (ValueList Text)
..}
instance Property "Tags" ACL where
type PropertyType "Tags" ACL = [Tag]
set :: PropertyType "Tags" ACL -> ACL -> ACL
set PropertyType "Tags" ACL
newValue ACL {Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ACL -> ()
aCLName :: ACL -> Value Text
tags :: ACL -> Maybe [Tag]
userNames :: ACL -> Maybe (ValueList Text)
haddock_workaround_ :: ()
aCLName :: Value Text
tags :: Maybe [Tag]
userNames :: Maybe (ValueList Text)
..} = ACL {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" ACL
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
aCLName :: Value Text
userNames :: Maybe (ValueList Text)
haddock_workaround_ :: ()
aCLName :: Value Text
userNames :: Maybe (ValueList Text)
..}
instance Property "UserNames" ACL where
type PropertyType "UserNames" ACL = ValueList Prelude.Text
set :: PropertyType "UserNames" ACL -> ACL -> ACL
set PropertyType "UserNames" ACL
newValue ACL {Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ACL -> ()
aCLName :: ACL -> Value Text
tags :: ACL -> Maybe [Tag]
userNames :: ACL -> Maybe (ValueList Text)
haddock_workaround_ :: ()
aCLName :: Value Text
tags :: Maybe [Tag]
userNames :: Maybe (ValueList Text)
..} = ACL {userNames :: Maybe (ValueList Text)
userNames = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "UserNames" ACL
ValueList Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
aCLName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
aCLName :: Value Text
tags :: Maybe [Tag]
..}