module Stratosphere.QLDB.Ledger (
Ledger(..), mkLedger
) 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 Ledger
=
Ledger {Ledger -> ()
haddock_workaround_ :: (),
Ledger -> Maybe (Value Bool)
deletionProtection :: (Prelude.Maybe (Value Prelude.Bool)),
Ledger -> Maybe (Value Text)
kmsKey :: (Prelude.Maybe (Value Prelude.Text)),
Ledger -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
Ledger -> Value Text
permissionsMode :: (Value Prelude.Text),
Ledger -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (Ledger -> Ledger -> Bool
(Ledger -> Ledger -> Bool)
-> (Ledger -> Ledger -> Bool) -> Eq Ledger
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Ledger -> Ledger -> Bool
== :: Ledger -> Ledger -> Bool
$c/= :: Ledger -> Ledger -> Bool
/= :: Ledger -> Ledger -> Bool
Prelude.Eq, Int -> Ledger -> ShowS
[Ledger] -> ShowS
Ledger -> String
(Int -> Ledger -> ShowS)
-> (Ledger -> String) -> ([Ledger] -> ShowS) -> Show Ledger
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Ledger -> ShowS
showsPrec :: Int -> Ledger -> ShowS
$cshow :: Ledger -> String
show :: Ledger -> String
$cshowList :: [Ledger] -> ShowS
showList :: [Ledger] -> ShowS
Prelude.Show)
mkLedger :: Value Prelude.Text -> Ledger
mkLedger :: Value Text -> Ledger
mkLedger Value Text
permissionsMode
= Ledger
{haddock_workaround_ :: ()
haddock_workaround_ = (), permissionsMode :: Value Text
permissionsMode = Value Text
permissionsMode,
deletionProtection :: Maybe (Value Bool)
deletionProtection = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing, kmsKey :: Maybe (Value Text)
kmsKey = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Ledger where
toResourceProperties :: Ledger -> ResourceProperties
toResourceProperties Ledger {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Ledger -> ()
deletionProtection :: Ledger -> Maybe (Value Bool)
kmsKey :: Ledger -> Maybe (Value Text)
name :: Ledger -> Maybe (Value Text)
permissionsMode :: Ledger -> Value Text
tags :: Ledger -> Maybe [Tag]
haddock_workaround_ :: ()
deletionProtection :: Maybe (Value Bool)
kmsKey :: Maybe (Value Text)
name :: Maybe (Value Text)
permissionsMode :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::QLDB::Ledger", 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
"PermissionsMode" 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
permissionsMode]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeletionProtection" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
deletionProtection,
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..=) Key
"KmsKey" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
kmsKey,
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..=) Key
"Name" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
name,
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]))}
instance JSON.ToJSON Ledger where
toJSON :: Ledger -> Value
toJSON Ledger {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Ledger -> ()
deletionProtection :: Ledger -> Maybe (Value Bool)
kmsKey :: Ledger -> Maybe (Value Text)
name :: Ledger -> Maybe (Value Text)
permissionsMode :: Ledger -> Value Text
tags :: Ledger -> Maybe [Tag]
haddock_workaround_ :: ()
deletionProtection :: Maybe (Value Bool)
kmsKey :: Maybe (Value Text)
name :: Maybe (Value Text)
permissionsMode :: Value Text
tags :: Maybe [Tag]
..}
= [(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
"PermissionsMode" 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
permissionsMode]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeletionProtection" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
deletionProtection,
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..=) Key
"KmsKey" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
kmsKey,
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..=) Key
"Name" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
name,
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])))
instance Property "DeletionProtection" Ledger where
type PropertyType "DeletionProtection" Ledger = Value Prelude.Bool
set :: PropertyType "DeletionProtection" Ledger -> Ledger -> Ledger
set PropertyType "DeletionProtection" Ledger
newValue Ledger {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Ledger -> ()
deletionProtection :: Ledger -> Maybe (Value Bool)
kmsKey :: Ledger -> Maybe (Value Text)
name :: Ledger -> Maybe (Value Text)
permissionsMode :: Ledger -> Value Text
tags :: Ledger -> Maybe [Tag]
haddock_workaround_ :: ()
deletionProtection :: Maybe (Value Bool)
kmsKey :: Maybe (Value Text)
name :: Maybe (Value Text)
permissionsMode :: Value Text
tags :: Maybe [Tag]
..}
= Ledger {deletionProtection :: Maybe (Value Bool)
deletionProtection = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DeletionProtection" Ledger
Value Bool
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
kmsKey :: Maybe (Value Text)
name :: Maybe (Value Text)
permissionsMode :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
kmsKey :: Maybe (Value Text)
name :: Maybe (Value Text)
permissionsMode :: Value Text
tags :: Maybe [Tag]
..}
instance Property "KmsKey" Ledger where
type PropertyType "KmsKey" Ledger = Value Prelude.Text
set :: PropertyType "KmsKey" Ledger -> Ledger -> Ledger
set PropertyType "KmsKey" Ledger
newValue Ledger {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Ledger -> ()
deletionProtection :: Ledger -> Maybe (Value Bool)
kmsKey :: Ledger -> Maybe (Value Text)
name :: Ledger -> Maybe (Value Text)
permissionsMode :: Ledger -> Value Text
tags :: Ledger -> Maybe [Tag]
haddock_workaround_ :: ()
deletionProtection :: Maybe (Value Bool)
kmsKey :: Maybe (Value Text)
name :: Maybe (Value Text)
permissionsMode :: Value Text
tags :: Maybe [Tag]
..}
= Ledger {kmsKey :: Maybe (Value Text)
kmsKey = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KmsKey" Ledger
Value Text
newValue, Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
deletionProtection :: Maybe (Value Bool)
name :: Maybe (Value Text)
permissionsMode :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
deletionProtection :: Maybe (Value Bool)
name :: Maybe (Value Text)
permissionsMode :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Name" Ledger where
type PropertyType "Name" Ledger = Value Prelude.Text
set :: PropertyType "Name" Ledger -> Ledger -> Ledger
set PropertyType "Name" Ledger
newValue Ledger {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Ledger -> ()
deletionProtection :: Ledger -> Maybe (Value Bool)
kmsKey :: Ledger -> Maybe (Value Text)
name :: Ledger -> Maybe (Value Text)
permissionsMode :: Ledger -> Value Text
tags :: Ledger -> Maybe [Tag]
haddock_workaround_ :: ()
deletionProtection :: Maybe (Value Bool)
kmsKey :: Maybe (Value Text)
name :: Maybe (Value Text)
permissionsMode :: Value Text
tags :: Maybe [Tag]
..}
= Ledger {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" Ledger
Value Text
newValue, Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
deletionProtection :: Maybe (Value Bool)
kmsKey :: Maybe (Value Text)
permissionsMode :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
deletionProtection :: Maybe (Value Bool)
kmsKey :: Maybe (Value Text)
permissionsMode :: Value Text
tags :: Maybe [Tag]
..}
instance Property "PermissionsMode" Ledger where
type PropertyType "PermissionsMode" Ledger = Value Prelude.Text
set :: PropertyType "PermissionsMode" Ledger -> Ledger -> Ledger
set PropertyType "PermissionsMode" Ledger
newValue Ledger {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Ledger -> ()
deletionProtection :: Ledger -> Maybe (Value Bool)
kmsKey :: Ledger -> Maybe (Value Text)
name :: Ledger -> Maybe (Value Text)
permissionsMode :: Ledger -> Value Text
tags :: Ledger -> Maybe [Tag]
haddock_workaround_ :: ()
deletionProtection :: Maybe (Value Bool)
kmsKey :: Maybe (Value Text)
name :: Maybe (Value Text)
permissionsMode :: Value Text
tags :: Maybe [Tag]
..} = Ledger {permissionsMode :: Value Text
permissionsMode = PropertyType "PermissionsMode" Ledger
Value Text
newValue, Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
deletionProtection :: Maybe (Value Bool)
kmsKey :: Maybe (Value Text)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
deletionProtection :: Maybe (Value Bool)
kmsKey :: Maybe (Value Text)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" Ledger where
type PropertyType "Tags" Ledger = [Tag]
set :: PropertyType "Tags" Ledger -> Ledger -> Ledger
set PropertyType "Tags" Ledger
newValue Ledger {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Ledger -> ()
deletionProtection :: Ledger -> Maybe (Value Bool)
kmsKey :: Ledger -> Maybe (Value Text)
name :: Ledger -> Maybe (Value Text)
permissionsMode :: Ledger -> Value Text
tags :: Ledger -> Maybe [Tag]
haddock_workaround_ :: ()
deletionProtection :: Maybe (Value Bool)
kmsKey :: Maybe (Value Text)
name :: Maybe (Value Text)
permissionsMode :: Value Text
tags :: Maybe [Tag]
..}
= Ledger {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" Ledger
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
deletionProtection :: Maybe (Value Bool)
kmsKey :: Maybe (Value Text)
name :: Maybe (Value Text)
permissionsMode :: Value Text
haddock_workaround_ :: ()
deletionProtection :: Maybe (Value Bool)
kmsKey :: Maybe (Value Text)
name :: Maybe (Value Text)
permissionsMode :: Value Text
..}