module Stratosphere.S3.StorageLens.DataExportProperty (
module Exports, DataExportProperty(..), mkDataExportProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.S3.StorageLens.CloudWatchMetricsProperty as Exports
import {-# SOURCE #-} Stratosphere.S3.StorageLens.S3BucketDestinationProperty as Exports
import Stratosphere.ResourceProperties
data DataExportProperty
=
DataExportProperty {DataExportProperty -> ()
haddock_workaround_ :: (),
DataExportProperty -> Maybe CloudWatchMetricsProperty
cloudWatchMetrics :: (Prelude.Maybe CloudWatchMetricsProperty),
DataExportProperty -> Maybe S3BucketDestinationProperty
s3BucketDestination :: (Prelude.Maybe S3BucketDestinationProperty)}
deriving stock (DataExportProperty -> DataExportProperty -> Bool
(DataExportProperty -> DataExportProperty -> Bool)
-> (DataExportProperty -> DataExportProperty -> Bool)
-> Eq DataExportProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DataExportProperty -> DataExportProperty -> Bool
== :: DataExportProperty -> DataExportProperty -> Bool
$c/= :: DataExportProperty -> DataExportProperty -> Bool
/= :: DataExportProperty -> DataExportProperty -> Bool
Prelude.Eq, Int -> DataExportProperty -> ShowS
[DataExportProperty] -> ShowS
DataExportProperty -> String
(Int -> DataExportProperty -> ShowS)
-> (DataExportProperty -> String)
-> ([DataExportProperty] -> ShowS)
-> Show DataExportProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DataExportProperty -> ShowS
showsPrec :: Int -> DataExportProperty -> ShowS
$cshow :: DataExportProperty -> String
show :: DataExportProperty -> String
$cshowList :: [DataExportProperty] -> ShowS
showList :: [DataExportProperty] -> ShowS
Prelude.Show)
mkDataExportProperty :: DataExportProperty
mkDataExportProperty :: DataExportProperty
mkDataExportProperty
= DataExportProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), cloudWatchMetrics :: Maybe CloudWatchMetricsProperty
cloudWatchMetrics = Maybe CloudWatchMetricsProperty
forall a. Maybe a
Prelude.Nothing,
s3BucketDestination :: Maybe S3BucketDestinationProperty
s3BucketDestination = Maybe S3BucketDestinationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DataExportProperty where
toResourceProperties :: DataExportProperty -> ResourceProperties
toResourceProperties DataExportProperty {Maybe CloudWatchMetricsProperty
Maybe S3BucketDestinationProperty
()
haddock_workaround_ :: DataExportProperty -> ()
cloudWatchMetrics :: DataExportProperty -> Maybe CloudWatchMetricsProperty
s3BucketDestination :: DataExportProperty -> Maybe S3BucketDestinationProperty
haddock_workaround_ :: ()
cloudWatchMetrics :: Maybe CloudWatchMetricsProperty
s3BucketDestination :: Maybe S3BucketDestinationProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::S3::StorageLens.DataExport",
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 -> CloudWatchMetricsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CloudWatchMetrics" (CloudWatchMetricsProperty -> (Key, Value))
-> Maybe CloudWatchMetricsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudWatchMetricsProperty
cloudWatchMetrics,
Key -> S3BucketDestinationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"S3BucketDestination" (S3BucketDestinationProperty -> (Key, Value))
-> Maybe S3BucketDestinationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3BucketDestinationProperty
s3BucketDestination])}
instance JSON.ToJSON DataExportProperty where
toJSON :: DataExportProperty -> Value
toJSON DataExportProperty {Maybe CloudWatchMetricsProperty
Maybe S3BucketDestinationProperty
()
haddock_workaround_ :: DataExportProperty -> ()
cloudWatchMetrics :: DataExportProperty -> Maybe CloudWatchMetricsProperty
s3BucketDestination :: DataExportProperty -> Maybe S3BucketDestinationProperty
haddock_workaround_ :: ()
cloudWatchMetrics :: Maybe CloudWatchMetricsProperty
s3BucketDestination :: Maybe S3BucketDestinationProperty
..}
= [(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 -> CloudWatchMetricsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CloudWatchMetrics" (CloudWatchMetricsProperty -> (Key, Value))
-> Maybe CloudWatchMetricsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudWatchMetricsProperty
cloudWatchMetrics,
Key -> S3BucketDestinationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"S3BucketDestination" (S3BucketDestinationProperty -> (Key, Value))
-> Maybe S3BucketDestinationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3BucketDestinationProperty
s3BucketDestination]))
instance Property "CloudWatchMetrics" DataExportProperty where
type PropertyType "CloudWatchMetrics" DataExportProperty = CloudWatchMetricsProperty
set :: PropertyType "CloudWatchMetrics" DataExportProperty
-> DataExportProperty -> DataExportProperty
set PropertyType "CloudWatchMetrics" DataExportProperty
newValue DataExportProperty {Maybe CloudWatchMetricsProperty
Maybe S3BucketDestinationProperty
()
haddock_workaround_ :: DataExportProperty -> ()
cloudWatchMetrics :: DataExportProperty -> Maybe CloudWatchMetricsProperty
s3BucketDestination :: DataExportProperty -> Maybe S3BucketDestinationProperty
haddock_workaround_ :: ()
cloudWatchMetrics :: Maybe CloudWatchMetricsProperty
s3BucketDestination :: Maybe S3BucketDestinationProperty
..}
= DataExportProperty
{cloudWatchMetrics :: Maybe CloudWatchMetricsProperty
cloudWatchMetrics = CloudWatchMetricsProperty -> Maybe CloudWatchMetricsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CloudWatchMetrics" DataExportProperty
CloudWatchMetricsProperty
newValue, Maybe S3BucketDestinationProperty
()
haddock_workaround_ :: ()
s3BucketDestination :: Maybe S3BucketDestinationProperty
haddock_workaround_ :: ()
s3BucketDestination :: Maybe S3BucketDestinationProperty
..}
instance Property "S3BucketDestination" DataExportProperty where
type PropertyType "S3BucketDestination" DataExportProperty = S3BucketDestinationProperty
set :: PropertyType "S3BucketDestination" DataExportProperty
-> DataExportProperty -> DataExportProperty
set PropertyType "S3BucketDestination" DataExportProperty
newValue DataExportProperty {Maybe CloudWatchMetricsProperty
Maybe S3BucketDestinationProperty
()
haddock_workaround_ :: DataExportProperty -> ()
cloudWatchMetrics :: DataExportProperty -> Maybe CloudWatchMetricsProperty
s3BucketDestination :: DataExportProperty -> Maybe S3BucketDestinationProperty
haddock_workaround_ :: ()
cloudWatchMetrics :: Maybe CloudWatchMetricsProperty
s3BucketDestination :: Maybe S3BucketDestinationProperty
..}
= DataExportProperty
{s3BucketDestination :: Maybe S3BucketDestinationProperty
s3BucketDestination = S3BucketDestinationProperty -> Maybe S3BucketDestinationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "S3BucketDestination" DataExportProperty
S3BucketDestinationProperty
newValue, Maybe CloudWatchMetricsProperty
()
haddock_workaround_ :: ()
cloudWatchMetrics :: Maybe CloudWatchMetricsProperty
haddock_workaround_ :: ()
cloudWatchMetrics :: Maybe CloudWatchMetricsProperty
..}