module Stratosphere.Wisdom.AIAgent.TagConditionProperty (
TagConditionProperty(..), mkTagConditionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TagConditionProperty
=
TagConditionProperty {TagConditionProperty -> ()
haddock_workaround_ :: (),
TagConditionProperty -> Value Text
key :: (Value Prelude.Text),
TagConditionProperty -> Maybe (Value Text)
value :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (TagConditionProperty -> TagConditionProperty -> Bool
(TagConditionProperty -> TagConditionProperty -> Bool)
-> (TagConditionProperty -> TagConditionProperty -> Bool)
-> Eq TagConditionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TagConditionProperty -> TagConditionProperty -> Bool
== :: TagConditionProperty -> TagConditionProperty -> Bool
$c/= :: TagConditionProperty -> TagConditionProperty -> Bool
/= :: TagConditionProperty -> TagConditionProperty -> Bool
Prelude.Eq, Int -> TagConditionProperty -> ShowS
[TagConditionProperty] -> ShowS
TagConditionProperty -> String
(Int -> TagConditionProperty -> ShowS)
-> (TagConditionProperty -> String)
-> ([TagConditionProperty] -> ShowS)
-> Show TagConditionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TagConditionProperty -> ShowS
showsPrec :: Int -> TagConditionProperty -> ShowS
$cshow :: TagConditionProperty -> String
show :: TagConditionProperty -> String
$cshowList :: [TagConditionProperty] -> ShowS
showList :: [TagConditionProperty] -> ShowS
Prelude.Show)
mkTagConditionProperty ::
Value Prelude.Text -> TagConditionProperty
mkTagConditionProperty :: Value Text -> TagConditionProperty
mkTagConditionProperty Value Text
key
= TagConditionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), key :: Value Text
key = Value Text
key, value :: Maybe (Value Text)
value = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TagConditionProperty where
toResourceProperties :: TagConditionProperty -> ResourceProperties
toResourceProperties TagConditionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TagConditionProperty -> ()
key :: TagConditionProperty -> Value Text
value :: TagConditionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
key :: Value Text
value :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Wisdom::AIAgent.TagCondition",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
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
"Key" 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
key]
([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
"Value" (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)
value]))}
instance JSON.ToJSON TagConditionProperty where
toJSON :: TagConditionProperty -> Value
toJSON TagConditionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TagConditionProperty -> ()
key :: TagConditionProperty -> Value Text
value :: TagConditionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
key :: Value Text
value :: Maybe (Value 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
"Key" 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
key]
([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
"Value" (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)
value])))
instance Property "Key" TagConditionProperty where
type PropertyType "Key" TagConditionProperty = Value Prelude.Text
set :: PropertyType "Key" TagConditionProperty
-> TagConditionProperty -> TagConditionProperty
set PropertyType "Key" TagConditionProperty
newValue TagConditionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TagConditionProperty -> ()
key :: TagConditionProperty -> Value Text
value :: TagConditionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
key :: Value Text
value :: Maybe (Value Text)
..}
= TagConditionProperty {key :: Value Text
key = PropertyType "Key" TagConditionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
value :: Maybe (Value Text)
haddock_workaround_ :: ()
value :: Maybe (Value Text)
..}
instance Property "Value" TagConditionProperty where
type PropertyType "Value" TagConditionProperty = Value Prelude.Text
set :: PropertyType "Value" TagConditionProperty
-> TagConditionProperty -> TagConditionProperty
set PropertyType "Value" TagConditionProperty
newValue TagConditionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TagConditionProperty -> ()
key :: TagConditionProperty -> Value Text
value :: TagConditionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
key :: Value Text
value :: Maybe (Value Text)
..}
= TagConditionProperty {value :: Maybe (Value Text)
value = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Value" TagConditionProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
key :: Value Text
haddock_workaround_ :: ()
key :: Value Text
..}