module Stratosphere.KendraRanking.ExecutionPlan (
module Exports, ExecutionPlan(..), mkExecutionPlan
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.KendraRanking.ExecutionPlan.CapacityUnitsConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data ExecutionPlan
=
ExecutionPlan {ExecutionPlan -> ()
haddock_workaround_ :: (),
ExecutionPlan -> Maybe CapacityUnitsConfigurationProperty
capacityUnits :: (Prelude.Maybe CapacityUnitsConfigurationProperty),
ExecutionPlan -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
ExecutionPlan -> Value Text
name :: (Value Prelude.Text),
ExecutionPlan -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (ExecutionPlan -> ExecutionPlan -> Bool
(ExecutionPlan -> ExecutionPlan -> Bool)
-> (ExecutionPlan -> ExecutionPlan -> Bool) -> Eq ExecutionPlan
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ExecutionPlan -> ExecutionPlan -> Bool
== :: ExecutionPlan -> ExecutionPlan -> Bool
$c/= :: ExecutionPlan -> ExecutionPlan -> Bool
/= :: ExecutionPlan -> ExecutionPlan -> Bool
Prelude.Eq, Int -> ExecutionPlan -> ShowS
[ExecutionPlan] -> ShowS
ExecutionPlan -> String
(Int -> ExecutionPlan -> ShowS)
-> (ExecutionPlan -> String)
-> ([ExecutionPlan] -> ShowS)
-> Show ExecutionPlan
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ExecutionPlan -> ShowS
showsPrec :: Int -> ExecutionPlan -> ShowS
$cshow :: ExecutionPlan -> String
show :: ExecutionPlan -> String
$cshowList :: [ExecutionPlan] -> ShowS
showList :: [ExecutionPlan] -> ShowS
Prelude.Show)
mkExecutionPlan :: Value Prelude.Text -> ExecutionPlan
mkExecutionPlan :: Value Text -> ExecutionPlan
mkExecutionPlan Value Text
name
= ExecutionPlan
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
capacityUnits :: Maybe CapacityUnitsConfigurationProperty
capacityUnits = Maybe CapacityUnitsConfigurationProperty
forall a. Maybe a
Prelude.Nothing, description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ExecutionPlan where
toResourceProperties :: ExecutionPlan -> ResourceProperties
toResourceProperties ExecutionPlan {Maybe [Tag]
Maybe (Value Text)
Maybe CapacityUnitsConfigurationProperty
()
Value Text
haddock_workaround_ :: ExecutionPlan -> ()
capacityUnits :: ExecutionPlan -> Maybe CapacityUnitsConfigurationProperty
description :: ExecutionPlan -> Maybe (Value Text)
name :: ExecutionPlan -> Value Text
tags :: ExecutionPlan -> Maybe [Tag]
haddock_workaround_ :: ()
capacityUnits :: Maybe CapacityUnitsConfigurationProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::KendraRanking::ExecutionPlan",
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
"Name" 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
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> CapacityUnitsConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CapacityUnits" (CapacityUnitsConfigurationProperty -> (Key, Value))
-> Maybe CapacityUnitsConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapacityUnitsConfigurationProperty
capacityUnits,
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
"Description" (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)
description,
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 ExecutionPlan where
toJSON :: ExecutionPlan -> Value
toJSON ExecutionPlan {Maybe [Tag]
Maybe (Value Text)
Maybe CapacityUnitsConfigurationProperty
()
Value Text
haddock_workaround_ :: ExecutionPlan -> ()
capacityUnits :: ExecutionPlan -> Maybe CapacityUnitsConfigurationProperty
description :: ExecutionPlan -> Maybe (Value Text)
name :: ExecutionPlan -> Value Text
tags :: ExecutionPlan -> Maybe [Tag]
haddock_workaround_ :: ()
capacityUnits :: Maybe CapacityUnitsConfigurationProperty
description :: Maybe (Value Text)
name :: 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
"Name" 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
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> CapacityUnitsConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CapacityUnits" (CapacityUnitsConfigurationProperty -> (Key, Value))
-> Maybe CapacityUnitsConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapacityUnitsConfigurationProperty
capacityUnits,
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
"Description" (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)
description,
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 "CapacityUnits" ExecutionPlan where
type PropertyType "CapacityUnits" ExecutionPlan = CapacityUnitsConfigurationProperty
set :: PropertyType "CapacityUnits" ExecutionPlan
-> ExecutionPlan -> ExecutionPlan
set PropertyType "CapacityUnits" ExecutionPlan
newValue ExecutionPlan {Maybe [Tag]
Maybe (Value Text)
Maybe CapacityUnitsConfigurationProperty
()
Value Text
haddock_workaround_ :: ExecutionPlan -> ()
capacityUnits :: ExecutionPlan -> Maybe CapacityUnitsConfigurationProperty
description :: ExecutionPlan -> Maybe (Value Text)
name :: ExecutionPlan -> Value Text
tags :: ExecutionPlan -> Maybe [Tag]
haddock_workaround_ :: ()
capacityUnits :: Maybe CapacityUnitsConfigurationProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= ExecutionPlan {capacityUnits :: Maybe CapacityUnitsConfigurationProperty
capacityUnits = CapacityUnitsConfigurationProperty
-> Maybe CapacityUnitsConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CapacityUnits" ExecutionPlan
CapacityUnitsConfigurationProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Description" ExecutionPlan where
type PropertyType "Description" ExecutionPlan = Value Prelude.Text
set :: PropertyType "Description" ExecutionPlan
-> ExecutionPlan -> ExecutionPlan
set PropertyType "Description" ExecutionPlan
newValue ExecutionPlan {Maybe [Tag]
Maybe (Value Text)
Maybe CapacityUnitsConfigurationProperty
()
Value Text
haddock_workaround_ :: ExecutionPlan -> ()
capacityUnits :: ExecutionPlan -> Maybe CapacityUnitsConfigurationProperty
description :: ExecutionPlan -> Maybe (Value Text)
name :: ExecutionPlan -> Value Text
tags :: ExecutionPlan -> Maybe [Tag]
haddock_workaround_ :: ()
capacityUnits :: Maybe CapacityUnitsConfigurationProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= ExecutionPlan {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" ExecutionPlan
Value Text
newValue, Maybe [Tag]
Maybe CapacityUnitsConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
capacityUnits :: Maybe CapacityUnitsConfigurationProperty
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
capacityUnits :: Maybe CapacityUnitsConfigurationProperty
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Name" ExecutionPlan where
type PropertyType "Name" ExecutionPlan = Value Prelude.Text
set :: PropertyType "Name" ExecutionPlan -> ExecutionPlan -> ExecutionPlan
set PropertyType "Name" ExecutionPlan
newValue ExecutionPlan {Maybe [Tag]
Maybe (Value Text)
Maybe CapacityUnitsConfigurationProperty
()
Value Text
haddock_workaround_ :: ExecutionPlan -> ()
capacityUnits :: ExecutionPlan -> Maybe CapacityUnitsConfigurationProperty
description :: ExecutionPlan -> Maybe (Value Text)
name :: ExecutionPlan -> Value Text
tags :: ExecutionPlan -> Maybe [Tag]
haddock_workaround_ :: ()
capacityUnits :: Maybe CapacityUnitsConfigurationProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= ExecutionPlan {name :: Value Text
name = PropertyType "Name" ExecutionPlan
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe CapacityUnitsConfigurationProperty
()
haddock_workaround_ :: ()
capacityUnits :: Maybe CapacityUnitsConfigurationProperty
description :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
capacityUnits :: Maybe CapacityUnitsConfigurationProperty
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" ExecutionPlan where
type PropertyType "Tags" ExecutionPlan = [Tag]
set :: PropertyType "Tags" ExecutionPlan -> ExecutionPlan -> ExecutionPlan
set PropertyType "Tags" ExecutionPlan
newValue ExecutionPlan {Maybe [Tag]
Maybe (Value Text)
Maybe CapacityUnitsConfigurationProperty
()
Value Text
haddock_workaround_ :: ExecutionPlan -> ()
capacityUnits :: ExecutionPlan -> Maybe CapacityUnitsConfigurationProperty
description :: ExecutionPlan -> Maybe (Value Text)
name :: ExecutionPlan -> Value Text
tags :: ExecutionPlan -> Maybe [Tag]
haddock_workaround_ :: ()
capacityUnits :: Maybe CapacityUnitsConfigurationProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= ExecutionPlan {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" ExecutionPlan
newValue, Maybe (Value Text)
Maybe CapacityUnitsConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
capacityUnits :: Maybe CapacityUnitsConfigurationProperty
description :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
capacityUnits :: Maybe CapacityUnitsConfigurationProperty
description :: Maybe (Value Text)
name :: Value Text
..}