module Stratosphere.Wisdom.AIAgent.OrConditionProperty (
module Exports, OrConditionProperty(..), mkOrConditionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Wisdom.AIAgent.TagConditionProperty as Exports
import Stratosphere.ResourceProperties
data OrConditionProperty
=
OrConditionProperty {OrConditionProperty -> ()
haddock_workaround_ :: (),
OrConditionProperty -> Maybe [TagConditionProperty]
andConditions :: (Prelude.Maybe [TagConditionProperty]),
OrConditionProperty -> Maybe TagConditionProperty
tagCondition :: (Prelude.Maybe TagConditionProperty)}
deriving stock (OrConditionProperty -> OrConditionProperty -> Bool
(OrConditionProperty -> OrConditionProperty -> Bool)
-> (OrConditionProperty -> OrConditionProperty -> Bool)
-> Eq OrConditionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OrConditionProperty -> OrConditionProperty -> Bool
== :: OrConditionProperty -> OrConditionProperty -> Bool
$c/= :: OrConditionProperty -> OrConditionProperty -> Bool
/= :: OrConditionProperty -> OrConditionProperty -> Bool
Prelude.Eq, Int -> OrConditionProperty -> ShowS
[OrConditionProperty] -> ShowS
OrConditionProperty -> String
(Int -> OrConditionProperty -> ShowS)
-> (OrConditionProperty -> String)
-> ([OrConditionProperty] -> ShowS)
-> Show OrConditionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OrConditionProperty -> ShowS
showsPrec :: Int -> OrConditionProperty -> ShowS
$cshow :: OrConditionProperty -> String
show :: OrConditionProperty -> String
$cshowList :: [OrConditionProperty] -> ShowS
showList :: [OrConditionProperty] -> ShowS
Prelude.Show)
mkOrConditionProperty :: OrConditionProperty
mkOrConditionProperty :: OrConditionProperty
mkOrConditionProperty
= OrConditionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), andConditions :: Maybe [TagConditionProperty]
andConditions = Maybe [TagConditionProperty]
forall a. Maybe a
Prelude.Nothing,
tagCondition :: Maybe TagConditionProperty
tagCondition = Maybe TagConditionProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties OrConditionProperty where
toResourceProperties :: OrConditionProperty -> ResourceProperties
toResourceProperties OrConditionProperty {Maybe [TagConditionProperty]
Maybe TagConditionProperty
()
haddock_workaround_ :: OrConditionProperty -> ()
andConditions :: OrConditionProperty -> Maybe [TagConditionProperty]
tagCondition :: OrConditionProperty -> Maybe TagConditionProperty
haddock_workaround_ :: ()
andConditions :: Maybe [TagConditionProperty]
tagCondition :: Maybe TagConditionProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Wisdom::AIAgent.OrCondition",
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 -> [TagConditionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AndConditions" ([TagConditionProperty] -> (Key, Value))
-> Maybe [TagConditionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagConditionProperty]
andConditions,
Key -> TagConditionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TagCondition" (TagConditionProperty -> (Key, Value))
-> Maybe TagConditionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TagConditionProperty
tagCondition])}
instance JSON.ToJSON OrConditionProperty where
toJSON :: OrConditionProperty -> Value
toJSON OrConditionProperty {Maybe [TagConditionProperty]
Maybe TagConditionProperty
()
haddock_workaround_ :: OrConditionProperty -> ()
andConditions :: OrConditionProperty -> Maybe [TagConditionProperty]
tagCondition :: OrConditionProperty -> Maybe TagConditionProperty
haddock_workaround_ :: ()
andConditions :: Maybe [TagConditionProperty]
tagCondition :: Maybe TagConditionProperty
..}
= [(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 -> [TagConditionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AndConditions" ([TagConditionProperty] -> (Key, Value))
-> Maybe [TagConditionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagConditionProperty]
andConditions,
Key -> TagConditionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TagCondition" (TagConditionProperty -> (Key, Value))
-> Maybe TagConditionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TagConditionProperty
tagCondition]))
instance Property "AndConditions" OrConditionProperty where
type PropertyType "AndConditions" OrConditionProperty = [TagConditionProperty]
set :: PropertyType "AndConditions" OrConditionProperty
-> OrConditionProperty -> OrConditionProperty
set PropertyType "AndConditions" OrConditionProperty
newValue OrConditionProperty {Maybe [TagConditionProperty]
Maybe TagConditionProperty
()
haddock_workaround_ :: OrConditionProperty -> ()
andConditions :: OrConditionProperty -> Maybe [TagConditionProperty]
tagCondition :: OrConditionProperty -> Maybe TagConditionProperty
haddock_workaround_ :: ()
andConditions :: Maybe [TagConditionProperty]
tagCondition :: Maybe TagConditionProperty
..}
= OrConditionProperty {andConditions :: Maybe [TagConditionProperty]
andConditions = [TagConditionProperty] -> Maybe [TagConditionProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [TagConditionProperty]
PropertyType "AndConditions" OrConditionProperty
newValue, Maybe TagConditionProperty
()
haddock_workaround_ :: ()
tagCondition :: Maybe TagConditionProperty
haddock_workaround_ :: ()
tagCondition :: Maybe TagConditionProperty
..}
instance Property "TagCondition" OrConditionProperty where
type PropertyType "TagCondition" OrConditionProperty = TagConditionProperty
set :: PropertyType "TagCondition" OrConditionProperty
-> OrConditionProperty -> OrConditionProperty
set PropertyType "TagCondition" OrConditionProperty
newValue OrConditionProperty {Maybe [TagConditionProperty]
Maybe TagConditionProperty
()
haddock_workaround_ :: OrConditionProperty -> ()
andConditions :: OrConditionProperty -> Maybe [TagConditionProperty]
tagCondition :: OrConditionProperty -> Maybe TagConditionProperty
haddock_workaround_ :: ()
andConditions :: Maybe [TagConditionProperty]
tagCondition :: Maybe TagConditionProperty
..}
= OrConditionProperty {tagCondition :: Maybe TagConditionProperty
tagCondition = TagConditionProperty -> Maybe TagConditionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TagCondition" OrConditionProperty
TagConditionProperty
newValue, Maybe [TagConditionProperty]
()
haddock_workaround_ :: ()
andConditions :: Maybe [TagConditionProperty]
haddock_workaround_ :: ()
andConditions :: Maybe [TagConditionProperty]
..}