module Stratosphere.Bedrock.Prompt.TextS3LocationProperty (
TextS3LocationProperty(..), mkTextS3LocationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TextS3LocationProperty
=
TextS3LocationProperty {TextS3LocationProperty -> ()
haddock_workaround_ :: (),
TextS3LocationProperty -> Value Text
bucket :: (Value Prelude.Text),
TextS3LocationProperty -> Value Text
key :: (Value Prelude.Text),
TextS3LocationProperty -> Maybe (Value Text)
version :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (TextS3LocationProperty -> TextS3LocationProperty -> Bool
(TextS3LocationProperty -> TextS3LocationProperty -> Bool)
-> (TextS3LocationProperty -> TextS3LocationProperty -> Bool)
-> Eq TextS3LocationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TextS3LocationProperty -> TextS3LocationProperty -> Bool
== :: TextS3LocationProperty -> TextS3LocationProperty -> Bool
$c/= :: TextS3LocationProperty -> TextS3LocationProperty -> Bool
/= :: TextS3LocationProperty -> TextS3LocationProperty -> Bool
Prelude.Eq, Int -> TextS3LocationProperty -> ShowS
[TextS3LocationProperty] -> ShowS
TextS3LocationProperty -> String
(Int -> TextS3LocationProperty -> ShowS)
-> (TextS3LocationProperty -> String)
-> ([TextS3LocationProperty] -> ShowS)
-> Show TextS3LocationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TextS3LocationProperty -> ShowS
showsPrec :: Int -> TextS3LocationProperty -> ShowS
$cshow :: TextS3LocationProperty -> String
show :: TextS3LocationProperty -> String
$cshowList :: [TextS3LocationProperty] -> ShowS
showList :: [TextS3LocationProperty] -> ShowS
Prelude.Show)
mkTextS3LocationProperty ::
Value Prelude.Text -> Value Prelude.Text -> TextS3LocationProperty
mkTextS3LocationProperty :: Value Text -> Value Text -> TextS3LocationProperty
mkTextS3LocationProperty Value Text
bucket Value Text
key
= TextS3LocationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), bucket :: Value Text
bucket = Value Text
bucket, key :: Value Text
key = Value Text
key,
version :: Maybe (Value Text)
version = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TextS3LocationProperty where
toResourceProperties :: TextS3LocationProperty -> ResourceProperties
toResourceProperties TextS3LocationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TextS3LocationProperty -> ()
bucket :: TextS3LocationProperty -> Value Text
key :: TextS3LocationProperty -> Value Text
version :: TextS3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Value Text
key :: Value Text
version :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Bedrock::Prompt.TextS3Location",
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
"Bucket" 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
bucket, Key
"Key" 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
key]
([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
"Version" (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)
version]))}
instance JSON.ToJSON TextS3LocationProperty where
toJSON :: TextS3LocationProperty -> Value
toJSON TextS3LocationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TextS3LocationProperty -> ()
bucket :: TextS3LocationProperty -> Value Text
key :: TextS3LocationProperty -> Value Text
version :: TextS3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Value Text
key :: Value Text
version :: Maybe (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
"Bucket" 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
bucket, Key
"Key" 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
key]
([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
"Version" (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)
version])))
instance Property "Bucket" TextS3LocationProperty where
type PropertyType "Bucket" TextS3LocationProperty = Value Prelude.Text
set :: PropertyType "Bucket" TextS3LocationProperty
-> TextS3LocationProperty -> TextS3LocationProperty
set PropertyType "Bucket" TextS3LocationProperty
newValue TextS3LocationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TextS3LocationProperty -> ()
bucket :: TextS3LocationProperty -> Value Text
key :: TextS3LocationProperty -> Value Text
version :: TextS3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Value Text
key :: Value Text
version :: Maybe (Value Text)
..}
= TextS3LocationProperty {bucket :: Value Text
bucket = PropertyType "Bucket" TextS3LocationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
key :: Value Text
version :: Maybe (Value Text)
haddock_workaround_ :: ()
key :: Value Text
version :: Maybe (Value Text)
..}
instance Property "Key" TextS3LocationProperty where
type PropertyType "Key" TextS3LocationProperty = Value Prelude.Text
set :: PropertyType "Key" TextS3LocationProperty
-> TextS3LocationProperty -> TextS3LocationProperty
set PropertyType "Key" TextS3LocationProperty
newValue TextS3LocationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TextS3LocationProperty -> ()
bucket :: TextS3LocationProperty -> Value Text
key :: TextS3LocationProperty -> Value Text
version :: TextS3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Value Text
key :: Value Text
version :: Maybe (Value Text)
..}
= TextS3LocationProperty {key :: Value Text
key = PropertyType "Key" TextS3LocationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
bucket :: Value Text
version :: Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Value Text
version :: Maybe (Value Text)
..}
instance Property "Version" TextS3LocationProperty where
type PropertyType "Version" TextS3LocationProperty = Value Prelude.Text
set :: PropertyType "Version" TextS3LocationProperty
-> TextS3LocationProperty -> TextS3LocationProperty
set PropertyType "Version" TextS3LocationProperty
newValue TextS3LocationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TextS3LocationProperty -> ()
bucket :: TextS3LocationProperty -> Value Text
key :: TextS3LocationProperty -> Value Text
version :: TextS3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Value Text
key :: Value Text
version :: Maybe (Value Text)
..}
= TextS3LocationProperty {version :: Maybe (Value Text)
version = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Version" TextS3LocationProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
bucket :: Value Text
key :: Value Text
haddock_workaround_ :: ()
bucket :: Value Text
key :: Value Text
..}