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