module Stratosphere.Bedrock.PromptVersion (
PromptVersion(..), mkPromptVersion
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PromptVersion
=
PromptVersion {PromptVersion -> ()
haddock_workaround_ :: (),
PromptVersion -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
PromptVersion -> Value Text
promptArn :: (Value Prelude.Text),
PromptVersion -> Maybe (Map Text (Value Text))
tags :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text)))}
deriving stock (PromptVersion -> PromptVersion -> Bool
(PromptVersion -> PromptVersion -> Bool)
-> (PromptVersion -> PromptVersion -> Bool) -> Eq PromptVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PromptVersion -> PromptVersion -> Bool
== :: PromptVersion -> PromptVersion -> Bool
$c/= :: PromptVersion -> PromptVersion -> Bool
/= :: PromptVersion -> PromptVersion -> Bool
Prelude.Eq, Int -> PromptVersion -> ShowS
[PromptVersion] -> ShowS
PromptVersion -> String
(Int -> PromptVersion -> ShowS)
-> (PromptVersion -> String)
-> ([PromptVersion] -> ShowS)
-> Show PromptVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PromptVersion -> ShowS
showsPrec :: Int -> PromptVersion -> ShowS
$cshow :: PromptVersion -> String
show :: PromptVersion -> String
$cshowList :: [PromptVersion] -> ShowS
showList :: [PromptVersion] -> ShowS
Prelude.Show)
mkPromptVersion :: Value Prelude.Text -> PromptVersion
mkPromptVersion :: Value Text -> PromptVersion
mkPromptVersion Value Text
promptArn
= PromptVersion
{haddock_workaround_ :: ()
haddock_workaround_ = (), promptArn :: Value Text
promptArn = Value Text
promptArn,
description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe (Map Text (Value Text))
tags = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PromptVersion where
toResourceProperties :: PromptVersion -> ResourceProperties
toResourceProperties PromptVersion {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PromptVersion -> ()
description :: PromptVersion -> Maybe (Value Text)
promptArn :: PromptVersion -> Value Text
tags :: PromptVersion -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
description :: Maybe (Value Text)
promptArn :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Bedrock::PromptVersion",
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
"PromptArn" 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
promptArn]
([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
"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 -> Map Text (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
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags]))}
instance JSON.ToJSON PromptVersion where
toJSON :: PromptVersion -> Value
toJSON PromptVersion {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PromptVersion -> ()
description :: PromptVersion -> Maybe (Value Text)
promptArn :: PromptVersion -> Value Text
tags :: PromptVersion -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
description :: Maybe (Value Text)
promptArn :: Value Text
tags :: Maybe (Map Text (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
"PromptArn" 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
promptArn]
([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
"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 -> Map Text (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
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags])))
instance Property "Description" PromptVersion where
type PropertyType "Description" PromptVersion = Value Prelude.Text
set :: PropertyType "Description" PromptVersion
-> PromptVersion -> PromptVersion
set PropertyType "Description" PromptVersion
newValue PromptVersion {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PromptVersion -> ()
description :: PromptVersion -> Maybe (Value Text)
promptArn :: PromptVersion -> Value Text
tags :: PromptVersion -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
description :: Maybe (Value Text)
promptArn :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
= PromptVersion {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" PromptVersion
Value Text
newValue, Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: ()
promptArn :: Value Text
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
promptArn :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
instance Property "PromptArn" PromptVersion where
type PropertyType "PromptArn" PromptVersion = Value Prelude.Text
set :: PropertyType "PromptArn" PromptVersion
-> PromptVersion -> PromptVersion
set PropertyType "PromptArn" PromptVersion
newValue PromptVersion {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PromptVersion -> ()
description :: PromptVersion -> Maybe (Value Text)
promptArn :: PromptVersion -> Value Text
tags :: PromptVersion -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
description :: Maybe (Value Text)
promptArn :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
= PromptVersion {promptArn :: Value Text
promptArn = PropertyType "PromptArn" PromptVersion
Value Text
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
description :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
..}
instance Property "Tags" PromptVersion where
type PropertyType "Tags" PromptVersion = Prelude.Map Prelude.Text (Value Prelude.Text)
set :: PropertyType "Tags" PromptVersion -> PromptVersion -> PromptVersion
set PropertyType "Tags" PromptVersion
newValue PromptVersion {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PromptVersion -> ()
description :: PromptVersion -> Maybe (Value Text)
promptArn :: PromptVersion -> Value Text
tags :: PromptVersion -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
description :: Maybe (Value Text)
promptArn :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
= PromptVersion {tags :: Maybe (Map Text (Value Text))
tags = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "Tags" PromptVersion
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
promptArn :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
promptArn :: Value Text
..}