module Stratosphere.Bedrock.Agent.CustomOrchestrationProperty (
        module Exports, CustomOrchestrationProperty(..),
        mkCustomOrchestrationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Bedrock.Agent.OrchestrationExecutorProperty as Exports
import Stratosphere.ResourceProperties
data CustomOrchestrationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-customorchestration.html>
    CustomOrchestrationProperty {CustomOrchestrationProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-customorchestration.html#cfn-bedrock-agent-customorchestration-executor>
                                 CustomOrchestrationProperty -> Maybe OrchestrationExecutorProperty
executor :: (Prelude.Maybe OrchestrationExecutorProperty)}
  deriving stock (CustomOrchestrationProperty -> CustomOrchestrationProperty -> Bool
(CustomOrchestrationProperty
 -> CustomOrchestrationProperty -> Bool)
-> (CustomOrchestrationProperty
    -> CustomOrchestrationProperty -> Bool)
-> Eq CustomOrchestrationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CustomOrchestrationProperty -> CustomOrchestrationProperty -> Bool
== :: CustomOrchestrationProperty -> CustomOrchestrationProperty -> Bool
$c/= :: CustomOrchestrationProperty -> CustomOrchestrationProperty -> Bool
/= :: CustomOrchestrationProperty -> CustomOrchestrationProperty -> Bool
Prelude.Eq, Int -> CustomOrchestrationProperty -> ShowS
[CustomOrchestrationProperty] -> ShowS
CustomOrchestrationProperty -> String
(Int -> CustomOrchestrationProperty -> ShowS)
-> (CustomOrchestrationProperty -> String)
-> ([CustomOrchestrationProperty] -> ShowS)
-> Show CustomOrchestrationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CustomOrchestrationProperty -> ShowS
showsPrec :: Int -> CustomOrchestrationProperty -> ShowS
$cshow :: CustomOrchestrationProperty -> String
show :: CustomOrchestrationProperty -> String
$cshowList :: [CustomOrchestrationProperty] -> ShowS
showList :: [CustomOrchestrationProperty] -> ShowS
Prelude.Show)
mkCustomOrchestrationProperty :: CustomOrchestrationProperty
mkCustomOrchestrationProperty :: CustomOrchestrationProperty
mkCustomOrchestrationProperty
  = CustomOrchestrationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), executor :: Maybe OrchestrationExecutorProperty
executor = Maybe OrchestrationExecutorProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CustomOrchestrationProperty where
  toResourceProperties :: CustomOrchestrationProperty -> ResourceProperties
toResourceProperties CustomOrchestrationProperty {Maybe OrchestrationExecutorProperty
()
haddock_workaround_ :: CustomOrchestrationProperty -> ()
executor :: CustomOrchestrationProperty -> Maybe OrchestrationExecutorProperty
haddock_workaround_ :: ()
executor :: Maybe OrchestrationExecutorProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Bedrock::Agent.CustomOrchestration",
         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 -> OrchestrationExecutorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Executor" (OrchestrationExecutorProperty -> (Key, Value))
-> Maybe OrchestrationExecutorProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OrchestrationExecutorProperty
executor])}
instance JSON.ToJSON CustomOrchestrationProperty where
  toJSON :: CustomOrchestrationProperty -> Value
toJSON CustomOrchestrationProperty {Maybe OrchestrationExecutorProperty
()
haddock_workaround_ :: CustomOrchestrationProperty -> ()
executor :: CustomOrchestrationProperty -> Maybe OrchestrationExecutorProperty
haddock_workaround_ :: ()
executor :: Maybe OrchestrationExecutorProperty
..}
    = [(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 -> OrchestrationExecutorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Executor" (OrchestrationExecutorProperty -> (Key, Value))
-> Maybe OrchestrationExecutorProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OrchestrationExecutorProperty
executor]))
instance Property "Executor" CustomOrchestrationProperty where
  type PropertyType "Executor" CustomOrchestrationProperty = OrchestrationExecutorProperty
  set :: PropertyType "Executor" CustomOrchestrationProperty
-> CustomOrchestrationProperty -> CustomOrchestrationProperty
set PropertyType "Executor" CustomOrchestrationProperty
newValue CustomOrchestrationProperty {Maybe OrchestrationExecutorProperty
()
haddock_workaround_ :: CustomOrchestrationProperty -> ()
executor :: CustomOrchestrationProperty -> Maybe OrchestrationExecutorProperty
haddock_workaround_ :: ()
executor :: Maybe OrchestrationExecutorProperty
..}
    = CustomOrchestrationProperty
        {executor :: Maybe OrchestrationExecutorProperty
executor = OrchestrationExecutorProperty
-> Maybe OrchestrationExecutorProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Executor" CustomOrchestrationProperty
OrchestrationExecutorProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}