module Stratosphere.Bedrock.DataSource.ServerSideEncryptionConfigurationProperty (
        ServerSideEncryptionConfigurationProperty(..),
        mkServerSideEncryptionConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ServerSideEncryptionConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-datasource-serversideencryptionconfiguration.html>
    ServerSideEncryptionConfigurationProperty {ServerSideEncryptionConfigurationProperty -> ()
haddock_workaround_ :: (),
                                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-datasource-serversideencryptionconfiguration.html#cfn-bedrock-datasource-serversideencryptionconfiguration-kmskeyarn>
                                               ServerSideEncryptionConfigurationProperty -> Maybe (Value Text)
kmsKeyArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ServerSideEncryptionConfigurationProperty
-> ServerSideEncryptionConfigurationProperty -> Bool
(ServerSideEncryptionConfigurationProperty
 -> ServerSideEncryptionConfigurationProperty -> Bool)
-> (ServerSideEncryptionConfigurationProperty
    -> ServerSideEncryptionConfigurationProperty -> Bool)
-> Eq ServerSideEncryptionConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ServerSideEncryptionConfigurationProperty
-> ServerSideEncryptionConfigurationProperty -> Bool
== :: ServerSideEncryptionConfigurationProperty
-> ServerSideEncryptionConfigurationProperty -> Bool
$c/= :: ServerSideEncryptionConfigurationProperty
-> ServerSideEncryptionConfigurationProperty -> Bool
/= :: ServerSideEncryptionConfigurationProperty
-> ServerSideEncryptionConfigurationProperty -> Bool
Prelude.Eq, Int -> ServerSideEncryptionConfigurationProperty -> ShowS
[ServerSideEncryptionConfigurationProperty] -> ShowS
ServerSideEncryptionConfigurationProperty -> String
(Int -> ServerSideEncryptionConfigurationProperty -> ShowS)
-> (ServerSideEncryptionConfigurationProperty -> String)
-> ([ServerSideEncryptionConfigurationProperty] -> ShowS)
-> Show ServerSideEncryptionConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ServerSideEncryptionConfigurationProperty -> ShowS
showsPrec :: Int -> ServerSideEncryptionConfigurationProperty -> ShowS
$cshow :: ServerSideEncryptionConfigurationProperty -> String
show :: ServerSideEncryptionConfigurationProperty -> String
$cshowList :: [ServerSideEncryptionConfigurationProperty] -> ShowS
showList :: [ServerSideEncryptionConfigurationProperty] -> ShowS
Prelude.Show)
mkServerSideEncryptionConfigurationProperty ::
  ServerSideEncryptionConfigurationProperty
mkServerSideEncryptionConfigurationProperty :: ServerSideEncryptionConfigurationProperty
mkServerSideEncryptionConfigurationProperty
  = ServerSideEncryptionConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), kmsKeyArn :: Maybe (Value Text)
kmsKeyArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ServerSideEncryptionConfigurationProperty where
  toResourceProperties :: ServerSideEncryptionConfigurationProperty -> ResourceProperties
toResourceProperties ServerSideEncryptionConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: ServerSideEncryptionConfigurationProperty -> ()
kmsKeyArn :: ServerSideEncryptionConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Bedrock::DataSource.ServerSideEncryptionConfiguration",
         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 -> 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
"KmsKeyArn" (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)
kmsKeyArn])}
instance JSON.ToJSON ServerSideEncryptionConfigurationProperty where
  toJSON :: ServerSideEncryptionConfigurationProperty -> Value
toJSON ServerSideEncryptionConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: ServerSideEncryptionConfigurationProperty -> ()
kmsKeyArn :: ServerSideEncryptionConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyArn :: 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 -> 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
"KmsKeyArn" (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)
kmsKeyArn]))
instance Property "KmsKeyArn" ServerSideEncryptionConfigurationProperty where
  type PropertyType "KmsKeyArn" ServerSideEncryptionConfigurationProperty = Value Prelude.Text
  set :: PropertyType "KmsKeyArn" ServerSideEncryptionConfigurationProperty
-> ServerSideEncryptionConfigurationProperty
-> ServerSideEncryptionConfigurationProperty
set PropertyType "KmsKeyArn" ServerSideEncryptionConfigurationProperty
newValue ServerSideEncryptionConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: ServerSideEncryptionConfigurationProperty -> ()
kmsKeyArn :: ServerSideEncryptionConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyArn :: Maybe (Value Text)
..}
    = ServerSideEncryptionConfigurationProperty
        {kmsKeyArn :: Maybe (Value Text)
kmsKeyArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KmsKeyArn" ServerSideEncryptionConfigurationProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}