module Stratosphere.Bedrock.GuardrailVersion (
GuardrailVersion(..), mkGuardrailVersion
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data GuardrailVersion
=
GuardrailVersion {GuardrailVersion -> ()
haddock_workaround_ :: (),
GuardrailVersion -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
GuardrailVersion -> Value Text
guardrailIdentifier :: (Value Prelude.Text)}
deriving stock (GuardrailVersion -> GuardrailVersion -> Bool
(GuardrailVersion -> GuardrailVersion -> Bool)
-> (GuardrailVersion -> GuardrailVersion -> Bool)
-> Eq GuardrailVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GuardrailVersion -> GuardrailVersion -> Bool
== :: GuardrailVersion -> GuardrailVersion -> Bool
$c/= :: GuardrailVersion -> GuardrailVersion -> Bool
/= :: GuardrailVersion -> GuardrailVersion -> Bool
Prelude.Eq, Int -> GuardrailVersion -> ShowS
[GuardrailVersion] -> ShowS
GuardrailVersion -> String
(Int -> GuardrailVersion -> ShowS)
-> (GuardrailVersion -> String)
-> ([GuardrailVersion] -> ShowS)
-> Show GuardrailVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GuardrailVersion -> ShowS
showsPrec :: Int -> GuardrailVersion -> ShowS
$cshow :: GuardrailVersion -> String
show :: GuardrailVersion -> String
$cshowList :: [GuardrailVersion] -> ShowS
showList :: [GuardrailVersion] -> ShowS
Prelude.Show)
mkGuardrailVersion :: Value Prelude.Text -> GuardrailVersion
mkGuardrailVersion :: Value Text -> GuardrailVersion
mkGuardrailVersion Value Text
guardrailIdentifier
= GuardrailVersion
{haddock_workaround_ :: ()
haddock_workaround_ = (),
guardrailIdentifier :: Value Text
guardrailIdentifier = Value Text
guardrailIdentifier,
description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties GuardrailVersion where
toResourceProperties :: GuardrailVersion -> ResourceProperties
toResourceProperties GuardrailVersion {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GuardrailVersion -> ()
description :: GuardrailVersion -> Maybe (Value Text)
guardrailIdentifier :: GuardrailVersion -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
guardrailIdentifier :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Bedrock::GuardrailVersion",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
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
"GuardrailIdentifier" 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
guardrailIdentifier]
([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]))}
instance JSON.ToJSON GuardrailVersion where
toJSON :: GuardrailVersion -> Value
toJSON GuardrailVersion {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GuardrailVersion -> ()
description :: GuardrailVersion -> Maybe (Value Text)
guardrailIdentifier :: GuardrailVersion -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
guardrailIdentifier :: 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
"GuardrailIdentifier" 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
guardrailIdentifier]
([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])))
instance Property "Description" GuardrailVersion where
type PropertyType "Description" GuardrailVersion = Value Prelude.Text
set :: PropertyType "Description" GuardrailVersion
-> GuardrailVersion -> GuardrailVersion
set PropertyType "Description" GuardrailVersion
newValue GuardrailVersion {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GuardrailVersion -> ()
description :: GuardrailVersion -> Maybe (Value Text)
guardrailIdentifier :: GuardrailVersion -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
guardrailIdentifier :: Value Text
..}
= GuardrailVersion {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" GuardrailVersion
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
guardrailIdentifier :: Value Text
haddock_workaround_ :: ()
guardrailIdentifier :: Value Text
..}
instance Property "GuardrailIdentifier" GuardrailVersion where
type PropertyType "GuardrailIdentifier" GuardrailVersion = Value Prelude.Text
set :: PropertyType "GuardrailIdentifier" GuardrailVersion
-> GuardrailVersion -> GuardrailVersion
set PropertyType "GuardrailIdentifier" GuardrailVersion
newValue GuardrailVersion {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GuardrailVersion -> ()
description :: GuardrailVersion -> Maybe (Value Text)
guardrailIdentifier :: GuardrailVersion -> Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
guardrailIdentifier :: Value Text
..}
= GuardrailVersion {guardrailIdentifier :: Value Text
guardrailIdentifier = PropertyType "GuardrailIdentifier" GuardrailVersion
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
..}