module Stratosphere.EMRServerless.Application.S3MonitoringConfigurationProperty (
        S3MonitoringConfigurationProperty(..),
        mkS3MonitoringConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data S3MonitoringConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-s3monitoringconfiguration.html>
    S3MonitoringConfigurationProperty {S3MonitoringConfigurationProperty -> ()
haddock_workaround_ :: (),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-s3monitoringconfiguration.html#cfn-emrserverless-application-s3monitoringconfiguration-encryptionkeyarn>
                                       S3MonitoringConfigurationProperty -> Maybe (Value Text)
encryptionKeyArn :: (Prelude.Maybe (Value Prelude.Text)),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-s3monitoringconfiguration.html#cfn-emrserverless-application-s3monitoringconfiguration-loguri>
                                       S3MonitoringConfigurationProperty -> Maybe (Value Text)
logUri :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (S3MonitoringConfigurationProperty
-> S3MonitoringConfigurationProperty -> Bool
(S3MonitoringConfigurationProperty
 -> S3MonitoringConfigurationProperty -> Bool)
-> (S3MonitoringConfigurationProperty
    -> S3MonitoringConfigurationProperty -> Bool)
-> Eq S3MonitoringConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: S3MonitoringConfigurationProperty
-> S3MonitoringConfigurationProperty -> Bool
== :: S3MonitoringConfigurationProperty
-> S3MonitoringConfigurationProperty -> Bool
$c/= :: S3MonitoringConfigurationProperty
-> S3MonitoringConfigurationProperty -> Bool
/= :: S3MonitoringConfigurationProperty
-> S3MonitoringConfigurationProperty -> Bool
Prelude.Eq, Int -> S3MonitoringConfigurationProperty -> ShowS
[S3MonitoringConfigurationProperty] -> ShowS
S3MonitoringConfigurationProperty -> String
(Int -> S3MonitoringConfigurationProperty -> ShowS)
-> (S3MonitoringConfigurationProperty -> String)
-> ([S3MonitoringConfigurationProperty] -> ShowS)
-> Show S3MonitoringConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> S3MonitoringConfigurationProperty -> ShowS
showsPrec :: Int -> S3MonitoringConfigurationProperty -> ShowS
$cshow :: S3MonitoringConfigurationProperty -> String
show :: S3MonitoringConfigurationProperty -> String
$cshowList :: [S3MonitoringConfigurationProperty] -> ShowS
showList :: [S3MonitoringConfigurationProperty] -> ShowS
Prelude.Show)
mkS3MonitoringConfigurationProperty ::
  S3MonitoringConfigurationProperty
mkS3MonitoringConfigurationProperty :: S3MonitoringConfigurationProperty
mkS3MonitoringConfigurationProperty
  = S3MonitoringConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), encryptionKeyArn :: Maybe (Value Text)
encryptionKeyArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       logUri :: Maybe (Value Text)
logUri = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties S3MonitoringConfigurationProperty where
  toResourceProperties :: S3MonitoringConfigurationProperty -> ResourceProperties
toResourceProperties S3MonitoringConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: S3MonitoringConfigurationProperty -> ()
encryptionKeyArn :: S3MonitoringConfigurationProperty -> Maybe (Value Text)
logUri :: S3MonitoringConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
encryptionKeyArn :: Maybe (Value Text)
logUri :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EMRServerless::Application.S3MonitoringConfiguration",
         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
"EncryptionKeyArn" (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)
encryptionKeyArn,
                            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
"LogUri" (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)
logUri])}
instance JSON.ToJSON S3MonitoringConfigurationProperty where
  toJSON :: S3MonitoringConfigurationProperty -> Value
toJSON S3MonitoringConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: S3MonitoringConfigurationProperty -> ()
encryptionKeyArn :: S3MonitoringConfigurationProperty -> Maybe (Value Text)
logUri :: S3MonitoringConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
encryptionKeyArn :: Maybe (Value Text)
logUri :: 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
"EncryptionKeyArn" (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)
encryptionKeyArn,
               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
"LogUri" (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)
logUri]))
instance Property "EncryptionKeyArn" S3MonitoringConfigurationProperty where
  type PropertyType "EncryptionKeyArn" S3MonitoringConfigurationProperty = Value Prelude.Text
  set :: PropertyType "EncryptionKeyArn" S3MonitoringConfigurationProperty
-> S3MonitoringConfigurationProperty
-> S3MonitoringConfigurationProperty
set PropertyType "EncryptionKeyArn" S3MonitoringConfigurationProperty
newValue S3MonitoringConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: S3MonitoringConfigurationProperty -> ()
encryptionKeyArn :: S3MonitoringConfigurationProperty -> Maybe (Value Text)
logUri :: S3MonitoringConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
encryptionKeyArn :: Maybe (Value Text)
logUri :: Maybe (Value Text)
..}
    = S3MonitoringConfigurationProperty
        {encryptionKeyArn :: Maybe (Value Text)
encryptionKeyArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EncryptionKeyArn" S3MonitoringConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
logUri :: Maybe (Value Text)
haddock_workaround_ :: ()
logUri :: Maybe (Value Text)
..}
instance Property "LogUri" S3MonitoringConfigurationProperty where
  type PropertyType "LogUri" S3MonitoringConfigurationProperty = Value Prelude.Text
  set :: PropertyType "LogUri" S3MonitoringConfigurationProperty
-> S3MonitoringConfigurationProperty
-> S3MonitoringConfigurationProperty
set PropertyType "LogUri" S3MonitoringConfigurationProperty
newValue S3MonitoringConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: S3MonitoringConfigurationProperty -> ()
encryptionKeyArn :: S3MonitoringConfigurationProperty -> Maybe (Value Text)
logUri :: S3MonitoringConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
encryptionKeyArn :: Maybe (Value Text)
logUri :: Maybe (Value Text)
..}
    = S3MonitoringConfigurationProperty
        {logUri :: Maybe (Value Text)
logUri = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LogUri" S3MonitoringConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
encryptionKeyArn :: Maybe (Value Text)
haddock_workaround_ :: ()
encryptionKeyArn :: Maybe (Value Text)
..}