module Stratosphere.LakeFormation.PrincipalPermissions.LFTagProperty (
LFTagProperty(..), mkLFTagProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LFTagProperty
=
LFTagProperty {LFTagProperty -> ()
haddock_workaround_ :: (),
LFTagProperty -> Maybe (Value Text)
tagKey :: (Prelude.Maybe (Value Prelude.Text)),
LFTagProperty -> Maybe (ValueList Text)
tagValues :: (Prelude.Maybe (ValueList Prelude.Text))}
deriving stock (LFTagProperty -> LFTagProperty -> Bool
(LFTagProperty -> LFTagProperty -> Bool)
-> (LFTagProperty -> LFTagProperty -> Bool) -> Eq LFTagProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LFTagProperty -> LFTagProperty -> Bool
== :: LFTagProperty -> LFTagProperty -> Bool
$c/= :: LFTagProperty -> LFTagProperty -> Bool
/= :: LFTagProperty -> LFTagProperty -> Bool
Prelude.Eq, Int -> LFTagProperty -> ShowS
[LFTagProperty] -> ShowS
LFTagProperty -> String
(Int -> LFTagProperty -> ShowS)
-> (LFTagProperty -> String)
-> ([LFTagProperty] -> ShowS)
-> Show LFTagProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LFTagProperty -> ShowS
showsPrec :: Int -> LFTagProperty -> ShowS
$cshow :: LFTagProperty -> String
show :: LFTagProperty -> String
$cshowList :: [LFTagProperty] -> ShowS
showList :: [LFTagProperty] -> ShowS
Prelude.Show)
mkLFTagProperty :: LFTagProperty
mkLFTagProperty :: LFTagProperty
mkLFTagProperty
= LFTagProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), tagKey :: Maybe (Value Text)
tagKey = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
tagValues :: Maybe (ValueList Text)
tagValues = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LFTagProperty where
toResourceProperties :: LFTagProperty -> ResourceProperties
toResourceProperties LFTagProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: LFTagProperty -> ()
tagKey :: LFTagProperty -> Maybe (Value Text)
tagValues :: LFTagProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
tagKey :: Maybe (Value Text)
tagValues :: Maybe (ValueList Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::LakeFormation::PrincipalPermissions.LFTag",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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
"TagKey" (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)
tagKey,
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
"TagValues" (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)
tagValues])}
instance JSON.ToJSON LFTagProperty where
toJSON :: LFTagProperty -> Value
toJSON LFTagProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: LFTagProperty -> ()
tagKey :: LFTagProperty -> Maybe (Value Text)
tagValues :: LFTagProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
tagKey :: Maybe (Value Text)
tagValues :: Maybe (ValueList Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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
"TagKey" (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)
tagKey,
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
"TagValues" (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)
tagValues]))
instance Property "TagKey" LFTagProperty where
type PropertyType "TagKey" LFTagProperty = Value Prelude.Text
set :: PropertyType "TagKey" LFTagProperty
-> LFTagProperty -> LFTagProperty
set PropertyType "TagKey" LFTagProperty
newValue LFTagProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: LFTagProperty -> ()
tagKey :: LFTagProperty -> Maybe (Value Text)
tagValues :: LFTagProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
tagKey :: Maybe (Value Text)
tagValues :: Maybe (ValueList Text)
..}
= LFTagProperty {tagKey :: Maybe (Value Text)
tagKey = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TagKey" LFTagProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
tagValues :: Maybe (ValueList Text)
haddock_workaround_ :: ()
tagValues :: Maybe (ValueList Text)
..}
instance Property "TagValues" LFTagProperty where
type PropertyType "TagValues" LFTagProperty = ValueList Prelude.Text
set :: PropertyType "TagValues" LFTagProperty
-> LFTagProperty -> LFTagProperty
set PropertyType "TagValues" LFTagProperty
newValue LFTagProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: LFTagProperty -> ()
tagKey :: LFTagProperty -> Maybe (Value Text)
tagValues :: LFTagProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
tagKey :: Maybe (Value Text)
tagValues :: Maybe (ValueList Text)
..}
= LFTagProperty {tagValues :: Maybe (ValueList Text)
tagValues = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TagValues" LFTagProperty
ValueList Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
tagKey :: Maybe (Value Text)
haddock_workaround_ :: ()
tagKey :: Maybe (Value Text)
..}