module Stratosphere.S3Express.DirectoryBucket.ServerSideEncryptionByDefaultProperty (
        ServerSideEncryptionByDefaultProperty(..),
        mkServerSideEncryptionByDefaultProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ServerSideEncryptionByDefaultProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3express-directorybucket-serversideencryptionbydefault.html>
    ServerSideEncryptionByDefaultProperty {ServerSideEncryptionByDefaultProperty -> ()
haddock_workaround_ :: (),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3express-directorybucket-serversideencryptionbydefault.html#cfn-s3express-directorybucket-serversideencryptionbydefault-kmsmasterkeyid>
                                           ServerSideEncryptionByDefaultProperty -> Maybe (Value Text)
kMSMasterKeyID :: (Prelude.Maybe (Value Prelude.Text)),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3express-directorybucket-serversideencryptionbydefault.html#cfn-s3express-directorybucket-serversideencryptionbydefault-ssealgorithm>
                                           ServerSideEncryptionByDefaultProperty -> Value Text
sSEAlgorithm :: (Value Prelude.Text)}
  deriving stock (ServerSideEncryptionByDefaultProperty
-> ServerSideEncryptionByDefaultProperty -> Bool
(ServerSideEncryptionByDefaultProperty
 -> ServerSideEncryptionByDefaultProperty -> Bool)
-> (ServerSideEncryptionByDefaultProperty
    -> ServerSideEncryptionByDefaultProperty -> Bool)
-> Eq ServerSideEncryptionByDefaultProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ServerSideEncryptionByDefaultProperty
-> ServerSideEncryptionByDefaultProperty -> Bool
== :: ServerSideEncryptionByDefaultProperty
-> ServerSideEncryptionByDefaultProperty -> Bool
$c/= :: ServerSideEncryptionByDefaultProperty
-> ServerSideEncryptionByDefaultProperty -> Bool
/= :: ServerSideEncryptionByDefaultProperty
-> ServerSideEncryptionByDefaultProperty -> Bool
Prelude.Eq, Int -> ServerSideEncryptionByDefaultProperty -> ShowS
[ServerSideEncryptionByDefaultProperty] -> ShowS
ServerSideEncryptionByDefaultProperty -> String
(Int -> ServerSideEncryptionByDefaultProperty -> ShowS)
-> (ServerSideEncryptionByDefaultProperty -> String)
-> ([ServerSideEncryptionByDefaultProperty] -> ShowS)
-> Show ServerSideEncryptionByDefaultProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ServerSideEncryptionByDefaultProperty -> ShowS
showsPrec :: Int -> ServerSideEncryptionByDefaultProperty -> ShowS
$cshow :: ServerSideEncryptionByDefaultProperty -> String
show :: ServerSideEncryptionByDefaultProperty -> String
$cshowList :: [ServerSideEncryptionByDefaultProperty] -> ShowS
showList :: [ServerSideEncryptionByDefaultProperty] -> ShowS
Prelude.Show)
mkServerSideEncryptionByDefaultProperty ::
  Value Prelude.Text -> ServerSideEncryptionByDefaultProperty
mkServerSideEncryptionByDefaultProperty :: Value Text -> ServerSideEncryptionByDefaultProperty
mkServerSideEncryptionByDefaultProperty Value Text
sSEAlgorithm
  = ServerSideEncryptionByDefaultProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), sSEAlgorithm :: Value Text
sSEAlgorithm = Value Text
sSEAlgorithm,
       kMSMasterKeyID :: Maybe (Value Text)
kMSMasterKeyID = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ServerSideEncryptionByDefaultProperty where
  toResourceProperties :: ServerSideEncryptionByDefaultProperty -> ResourceProperties
toResourceProperties ServerSideEncryptionByDefaultProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServerSideEncryptionByDefaultProperty -> ()
kMSMasterKeyID :: ServerSideEncryptionByDefaultProperty -> Maybe (Value Text)
sSEAlgorithm :: ServerSideEncryptionByDefaultProperty -> Value Text
haddock_workaround_ :: ()
kMSMasterKeyID :: Maybe (Value Text)
sSEAlgorithm :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3Express::DirectoryBucket.ServerSideEncryptionByDefault",
         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
"SSEAlgorithm" 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
sSEAlgorithm]
                           ([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
"KMSMasterKeyID" (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)
kMSMasterKeyID]))}
instance JSON.ToJSON ServerSideEncryptionByDefaultProperty where
  toJSON :: ServerSideEncryptionByDefaultProperty -> Value
toJSON ServerSideEncryptionByDefaultProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServerSideEncryptionByDefaultProperty -> ()
kMSMasterKeyID :: ServerSideEncryptionByDefaultProperty -> Maybe (Value Text)
sSEAlgorithm :: ServerSideEncryptionByDefaultProperty -> Value Text
haddock_workaround_ :: ()
kMSMasterKeyID :: Maybe (Value Text)
sSEAlgorithm :: 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
"SSEAlgorithm" 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
sSEAlgorithm]
              ([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
"KMSMasterKeyID" (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)
kMSMasterKeyID])))
instance Property "KMSMasterKeyID" ServerSideEncryptionByDefaultProperty where
  type PropertyType "KMSMasterKeyID" ServerSideEncryptionByDefaultProperty = Value Prelude.Text
  set :: PropertyType "KMSMasterKeyID" ServerSideEncryptionByDefaultProperty
-> ServerSideEncryptionByDefaultProperty
-> ServerSideEncryptionByDefaultProperty
set PropertyType "KMSMasterKeyID" ServerSideEncryptionByDefaultProperty
newValue ServerSideEncryptionByDefaultProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServerSideEncryptionByDefaultProperty -> ()
kMSMasterKeyID :: ServerSideEncryptionByDefaultProperty -> Maybe (Value Text)
sSEAlgorithm :: ServerSideEncryptionByDefaultProperty -> Value Text
haddock_workaround_ :: ()
kMSMasterKeyID :: Maybe (Value Text)
sSEAlgorithm :: Value Text
..}
    = ServerSideEncryptionByDefaultProperty
        {kMSMasterKeyID :: Maybe (Value Text)
kMSMasterKeyID = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KMSMasterKeyID" ServerSideEncryptionByDefaultProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
sSEAlgorithm :: Value Text
haddock_workaround_ :: ()
sSEAlgorithm :: Value Text
..}
instance Property "SSEAlgorithm" ServerSideEncryptionByDefaultProperty where
  type PropertyType "SSEAlgorithm" ServerSideEncryptionByDefaultProperty = Value Prelude.Text
  set :: PropertyType "SSEAlgorithm" ServerSideEncryptionByDefaultProperty
-> ServerSideEncryptionByDefaultProperty
-> ServerSideEncryptionByDefaultProperty
set PropertyType "SSEAlgorithm" ServerSideEncryptionByDefaultProperty
newValue ServerSideEncryptionByDefaultProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServerSideEncryptionByDefaultProperty -> ()
kMSMasterKeyID :: ServerSideEncryptionByDefaultProperty -> Maybe (Value Text)
sSEAlgorithm :: ServerSideEncryptionByDefaultProperty -> Value Text
haddock_workaround_ :: ()
kMSMasterKeyID :: Maybe (Value Text)
sSEAlgorithm :: Value Text
..}
    = ServerSideEncryptionByDefaultProperty
        {sSEAlgorithm :: Value Text
sSEAlgorithm = PropertyType "SSEAlgorithm" ServerSideEncryptionByDefaultProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
kMSMasterKeyID :: Maybe (Value Text)
haddock_workaround_ :: ()
kMSMasterKeyID :: Maybe (Value Text)
..}