module Stratosphere.S3Tables.TableBucket.EncryptionConfigurationProperty (
        EncryptionConfigurationProperty(..),
        mkEncryptionConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EncryptionConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3tables-tablebucket-encryptionconfiguration.html>
    EncryptionConfigurationProperty {EncryptionConfigurationProperty -> ()
haddock_workaround_ :: (),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3tables-tablebucket-encryptionconfiguration.html#cfn-s3tables-tablebucket-encryptionconfiguration-kmskeyarn>
                                     EncryptionConfigurationProperty -> Maybe (Value Text)
kMSKeyArn :: (Prelude.Maybe (Value Prelude.Text)),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3tables-tablebucket-encryptionconfiguration.html#cfn-s3tables-tablebucket-encryptionconfiguration-ssealgorithm>
                                     EncryptionConfigurationProperty -> Maybe (Value Text)
sSEAlgorithm :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (EncryptionConfigurationProperty
-> EncryptionConfigurationProperty -> Bool
(EncryptionConfigurationProperty
 -> EncryptionConfigurationProperty -> Bool)
-> (EncryptionConfigurationProperty
    -> EncryptionConfigurationProperty -> Bool)
-> Eq EncryptionConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EncryptionConfigurationProperty
-> EncryptionConfigurationProperty -> Bool
== :: EncryptionConfigurationProperty
-> EncryptionConfigurationProperty -> Bool
$c/= :: EncryptionConfigurationProperty
-> EncryptionConfigurationProperty -> Bool
/= :: EncryptionConfigurationProperty
-> EncryptionConfigurationProperty -> Bool
Prelude.Eq, Int -> EncryptionConfigurationProperty -> ShowS
[EncryptionConfigurationProperty] -> ShowS
EncryptionConfigurationProperty -> String
(Int -> EncryptionConfigurationProperty -> ShowS)
-> (EncryptionConfigurationProperty -> String)
-> ([EncryptionConfigurationProperty] -> ShowS)
-> Show EncryptionConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EncryptionConfigurationProperty -> ShowS
showsPrec :: Int -> EncryptionConfigurationProperty -> ShowS
$cshow :: EncryptionConfigurationProperty -> String
show :: EncryptionConfigurationProperty -> String
$cshowList :: [EncryptionConfigurationProperty] -> ShowS
showList :: [EncryptionConfigurationProperty] -> ShowS
Prelude.Show)
mkEncryptionConfigurationProperty ::
  EncryptionConfigurationProperty
mkEncryptionConfigurationProperty :: EncryptionConfigurationProperty
mkEncryptionConfigurationProperty
  = EncryptionConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), kMSKeyArn :: Maybe (Value Text)
kMSKeyArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       sSEAlgorithm :: Maybe (Value Text)
sSEAlgorithm = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EncryptionConfigurationProperty where
  toResourceProperties :: EncryptionConfigurationProperty -> ResourceProperties
toResourceProperties EncryptionConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: EncryptionConfigurationProperty -> ()
kMSKeyArn :: EncryptionConfigurationProperty -> Maybe (Value Text)
sSEAlgorithm :: EncryptionConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
kMSKeyArn :: Maybe (Value Text)
sSEAlgorithm :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3Tables::TableBucket.EncryptionConfiguration",
         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,
                            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
"SSEAlgorithm" (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)
sSEAlgorithm])}
instance JSON.ToJSON EncryptionConfigurationProperty where
  toJSON :: EncryptionConfigurationProperty -> Value
toJSON EncryptionConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: EncryptionConfigurationProperty -> ()
kMSKeyArn :: EncryptionConfigurationProperty -> Maybe (Value Text)
sSEAlgorithm :: EncryptionConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
kMSKeyArn :: Maybe (Value Text)
sSEAlgorithm :: 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,
               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
"SSEAlgorithm" (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)
sSEAlgorithm]))
instance Property "KMSKeyArn" EncryptionConfigurationProperty where
  type PropertyType "KMSKeyArn" EncryptionConfigurationProperty = Value Prelude.Text
  set :: PropertyType "KMSKeyArn" EncryptionConfigurationProperty
-> EncryptionConfigurationProperty
-> EncryptionConfigurationProperty
set PropertyType "KMSKeyArn" EncryptionConfigurationProperty
newValue EncryptionConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: EncryptionConfigurationProperty -> ()
kMSKeyArn :: EncryptionConfigurationProperty -> Maybe (Value Text)
sSEAlgorithm :: EncryptionConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
kMSKeyArn :: Maybe (Value Text)
sSEAlgorithm :: Maybe (Value Text)
..}
    = EncryptionConfigurationProperty
        {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" EncryptionConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
sSEAlgorithm :: Maybe (Value Text)
haddock_workaround_ :: ()
sSEAlgorithm :: Maybe (Value Text)
..}
instance Property "SSEAlgorithm" EncryptionConfigurationProperty where
  type PropertyType "SSEAlgorithm" EncryptionConfigurationProperty = Value Prelude.Text
  set :: PropertyType "SSEAlgorithm" EncryptionConfigurationProperty
-> EncryptionConfigurationProperty
-> EncryptionConfigurationProperty
set PropertyType "SSEAlgorithm" EncryptionConfigurationProperty
newValue EncryptionConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: EncryptionConfigurationProperty -> ()
kMSKeyArn :: EncryptionConfigurationProperty -> Maybe (Value Text)
sSEAlgorithm :: EncryptionConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
kMSKeyArn :: Maybe (Value Text)
sSEAlgorithm :: Maybe (Value Text)
..}
    = EncryptionConfigurationProperty
        {sSEAlgorithm :: Maybe (Value Text)
sSEAlgorithm = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SSEAlgorithm" EncryptionConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
kMSKeyArn :: Maybe (Value Text)
haddock_workaround_ :: ()
kMSKeyArn :: Maybe (Value Text)
..}