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