module Stratosphere.S3.Bucket.AnalyticsConfigurationProperty (
module Exports, AnalyticsConfigurationProperty(..),
mkAnalyticsConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.S3.Bucket.StorageClassAnalysisProperty as Exports
import {-# SOURCE #-} Stratosphere.S3.Bucket.TagFilterProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AnalyticsConfigurationProperty
=
AnalyticsConfigurationProperty {AnalyticsConfigurationProperty -> ()
haddock_workaround_ :: (),
AnalyticsConfigurationProperty -> Value Text
id :: (Value Prelude.Text),
AnalyticsConfigurationProperty -> Maybe (Value Text)
prefix :: (Prelude.Maybe (Value Prelude.Text)),
AnalyticsConfigurationProperty -> StorageClassAnalysisProperty
storageClassAnalysis :: StorageClassAnalysisProperty,
AnalyticsConfigurationProperty -> Maybe [TagFilterProperty]
tagFilters :: (Prelude.Maybe [TagFilterProperty])}
deriving stock (AnalyticsConfigurationProperty
-> AnalyticsConfigurationProperty -> Bool
(AnalyticsConfigurationProperty
-> AnalyticsConfigurationProperty -> Bool)
-> (AnalyticsConfigurationProperty
-> AnalyticsConfigurationProperty -> Bool)
-> Eq AnalyticsConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AnalyticsConfigurationProperty
-> AnalyticsConfigurationProperty -> Bool
== :: AnalyticsConfigurationProperty
-> AnalyticsConfigurationProperty -> Bool
$c/= :: AnalyticsConfigurationProperty
-> AnalyticsConfigurationProperty -> Bool
/= :: AnalyticsConfigurationProperty
-> AnalyticsConfigurationProperty -> Bool
Prelude.Eq, Int -> AnalyticsConfigurationProperty -> ShowS
[AnalyticsConfigurationProperty] -> ShowS
AnalyticsConfigurationProperty -> String
(Int -> AnalyticsConfigurationProperty -> ShowS)
-> (AnalyticsConfigurationProperty -> String)
-> ([AnalyticsConfigurationProperty] -> ShowS)
-> Show AnalyticsConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AnalyticsConfigurationProperty -> ShowS
showsPrec :: Int -> AnalyticsConfigurationProperty -> ShowS
$cshow :: AnalyticsConfigurationProperty -> String
show :: AnalyticsConfigurationProperty -> String
$cshowList :: [AnalyticsConfigurationProperty] -> ShowS
showList :: [AnalyticsConfigurationProperty] -> ShowS
Prelude.Show)
mkAnalyticsConfigurationProperty ::
Value Prelude.Text
-> StorageClassAnalysisProperty -> AnalyticsConfigurationProperty
mkAnalyticsConfigurationProperty :: Value Text
-> StorageClassAnalysisProperty -> AnalyticsConfigurationProperty
mkAnalyticsConfigurationProperty Value Text
id StorageClassAnalysisProperty
storageClassAnalysis
= AnalyticsConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), id :: Value Text
id = Value Text
id,
storageClassAnalysis :: StorageClassAnalysisProperty
storageClassAnalysis = StorageClassAnalysisProperty
storageClassAnalysis,
prefix :: Maybe (Value Text)
prefix = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tagFilters :: Maybe [TagFilterProperty]
tagFilters = Maybe [TagFilterProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AnalyticsConfigurationProperty where
toResourceProperties :: AnalyticsConfigurationProperty -> ResourceProperties
toResourceProperties AnalyticsConfigurationProperty {Maybe [TagFilterProperty]
Maybe (Value Text)
()
Value Text
StorageClassAnalysisProperty
haddock_workaround_ :: AnalyticsConfigurationProperty -> ()
id :: AnalyticsConfigurationProperty -> Value Text
prefix :: AnalyticsConfigurationProperty -> Maybe (Value Text)
storageClassAnalysis :: AnalyticsConfigurationProperty -> StorageClassAnalysisProperty
tagFilters :: AnalyticsConfigurationProperty -> Maybe [TagFilterProperty]
haddock_workaround_ :: ()
id :: Value Text
prefix :: Maybe (Value Text)
storageClassAnalysis :: StorageClassAnalysisProperty
tagFilters :: Maybe [TagFilterProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::S3::Bucket.AnalyticsConfiguration",
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
"Id" 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
id,
Key
"StorageClassAnalysis" Key -> StorageClassAnalysisProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= StorageClassAnalysisProperty
storageClassAnalysis]
([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
"Prefix" (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)
prefix,
Key -> [TagFilterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TagFilters" ([TagFilterProperty] -> (Key, Value))
-> Maybe [TagFilterProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagFilterProperty]
tagFilters]))}
instance JSON.ToJSON AnalyticsConfigurationProperty where
toJSON :: AnalyticsConfigurationProperty -> Value
toJSON AnalyticsConfigurationProperty {Maybe [TagFilterProperty]
Maybe (Value Text)
()
Value Text
StorageClassAnalysisProperty
haddock_workaround_ :: AnalyticsConfigurationProperty -> ()
id :: AnalyticsConfigurationProperty -> Value Text
prefix :: AnalyticsConfigurationProperty -> Maybe (Value Text)
storageClassAnalysis :: AnalyticsConfigurationProperty -> StorageClassAnalysisProperty
tagFilters :: AnalyticsConfigurationProperty -> Maybe [TagFilterProperty]
haddock_workaround_ :: ()
id :: Value Text
prefix :: Maybe (Value Text)
storageClassAnalysis :: StorageClassAnalysisProperty
tagFilters :: Maybe [TagFilterProperty]
..}
= [(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
"Id" 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
id,
Key
"StorageClassAnalysis" Key -> StorageClassAnalysisProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= StorageClassAnalysisProperty
storageClassAnalysis]
([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
"Prefix" (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)
prefix,
Key -> [TagFilterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TagFilters" ([TagFilterProperty] -> (Key, Value))
-> Maybe [TagFilterProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagFilterProperty]
tagFilters])))
instance Property "Id" AnalyticsConfigurationProperty where
type PropertyType "Id" AnalyticsConfigurationProperty = Value Prelude.Text
set :: PropertyType "Id" AnalyticsConfigurationProperty
-> AnalyticsConfigurationProperty -> AnalyticsConfigurationProperty
set PropertyType "Id" AnalyticsConfigurationProperty
newValue AnalyticsConfigurationProperty {Maybe [TagFilterProperty]
Maybe (Value Text)
()
Value Text
StorageClassAnalysisProperty
haddock_workaround_ :: AnalyticsConfigurationProperty -> ()
id :: AnalyticsConfigurationProperty -> Value Text
prefix :: AnalyticsConfigurationProperty -> Maybe (Value Text)
storageClassAnalysis :: AnalyticsConfigurationProperty -> StorageClassAnalysisProperty
tagFilters :: AnalyticsConfigurationProperty -> Maybe [TagFilterProperty]
haddock_workaround_ :: ()
id :: Value Text
prefix :: Maybe (Value Text)
storageClassAnalysis :: StorageClassAnalysisProperty
tagFilters :: Maybe [TagFilterProperty]
..}
= AnalyticsConfigurationProperty {id :: Value Text
id = PropertyType "Id" AnalyticsConfigurationProperty
Value Text
newValue, Maybe [TagFilterProperty]
Maybe (Value Text)
()
StorageClassAnalysisProperty
haddock_workaround_ :: ()
prefix :: Maybe (Value Text)
storageClassAnalysis :: StorageClassAnalysisProperty
tagFilters :: Maybe [TagFilterProperty]
haddock_workaround_ :: ()
prefix :: Maybe (Value Text)
storageClassAnalysis :: StorageClassAnalysisProperty
tagFilters :: Maybe [TagFilterProperty]
..}
instance Property "Prefix" AnalyticsConfigurationProperty where
type PropertyType "Prefix" AnalyticsConfigurationProperty = Value Prelude.Text
set :: PropertyType "Prefix" AnalyticsConfigurationProperty
-> AnalyticsConfigurationProperty -> AnalyticsConfigurationProperty
set PropertyType "Prefix" AnalyticsConfigurationProperty
newValue AnalyticsConfigurationProperty {Maybe [TagFilterProperty]
Maybe (Value Text)
()
Value Text
StorageClassAnalysisProperty
haddock_workaround_ :: AnalyticsConfigurationProperty -> ()
id :: AnalyticsConfigurationProperty -> Value Text
prefix :: AnalyticsConfigurationProperty -> Maybe (Value Text)
storageClassAnalysis :: AnalyticsConfigurationProperty -> StorageClassAnalysisProperty
tagFilters :: AnalyticsConfigurationProperty -> Maybe [TagFilterProperty]
haddock_workaround_ :: ()
id :: Value Text
prefix :: Maybe (Value Text)
storageClassAnalysis :: StorageClassAnalysisProperty
tagFilters :: Maybe [TagFilterProperty]
..}
= AnalyticsConfigurationProperty
{prefix :: Maybe (Value Text)
prefix = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Prefix" AnalyticsConfigurationProperty
Value Text
newValue, Maybe [TagFilterProperty]
()
Value Text
StorageClassAnalysisProperty
haddock_workaround_ :: ()
id :: Value Text
storageClassAnalysis :: StorageClassAnalysisProperty
tagFilters :: Maybe [TagFilterProperty]
haddock_workaround_ :: ()
id :: Value Text
storageClassAnalysis :: StorageClassAnalysisProperty
tagFilters :: Maybe [TagFilterProperty]
..}
instance Property "StorageClassAnalysis" AnalyticsConfigurationProperty where
type PropertyType "StorageClassAnalysis" AnalyticsConfigurationProperty = StorageClassAnalysisProperty
set :: PropertyType "StorageClassAnalysis" AnalyticsConfigurationProperty
-> AnalyticsConfigurationProperty -> AnalyticsConfigurationProperty
set PropertyType "StorageClassAnalysis" AnalyticsConfigurationProperty
newValue AnalyticsConfigurationProperty {Maybe [TagFilterProperty]
Maybe (Value Text)
()
Value Text
StorageClassAnalysisProperty
haddock_workaround_ :: AnalyticsConfigurationProperty -> ()
id :: AnalyticsConfigurationProperty -> Value Text
prefix :: AnalyticsConfigurationProperty -> Maybe (Value Text)
storageClassAnalysis :: AnalyticsConfigurationProperty -> StorageClassAnalysisProperty
tagFilters :: AnalyticsConfigurationProperty -> Maybe [TagFilterProperty]
haddock_workaround_ :: ()
id :: Value Text
prefix :: Maybe (Value Text)
storageClassAnalysis :: StorageClassAnalysisProperty
tagFilters :: Maybe [TagFilterProperty]
..}
= AnalyticsConfigurationProperty
{storageClassAnalysis :: StorageClassAnalysisProperty
storageClassAnalysis = PropertyType "StorageClassAnalysis" AnalyticsConfigurationProperty
StorageClassAnalysisProperty
newValue, Maybe [TagFilterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
id :: Value Text
prefix :: Maybe (Value Text)
tagFilters :: Maybe [TagFilterProperty]
haddock_workaround_ :: ()
id :: Value Text
prefix :: Maybe (Value Text)
tagFilters :: Maybe [TagFilterProperty]
..}
instance Property "TagFilters" AnalyticsConfigurationProperty where
type PropertyType "TagFilters" AnalyticsConfigurationProperty = [TagFilterProperty]
set :: PropertyType "TagFilters" AnalyticsConfigurationProperty
-> AnalyticsConfigurationProperty -> AnalyticsConfigurationProperty
set PropertyType "TagFilters" AnalyticsConfigurationProperty
newValue AnalyticsConfigurationProperty {Maybe [TagFilterProperty]
Maybe (Value Text)
()
Value Text
StorageClassAnalysisProperty
haddock_workaround_ :: AnalyticsConfigurationProperty -> ()
id :: AnalyticsConfigurationProperty -> Value Text
prefix :: AnalyticsConfigurationProperty -> Maybe (Value Text)
storageClassAnalysis :: AnalyticsConfigurationProperty -> StorageClassAnalysisProperty
tagFilters :: AnalyticsConfigurationProperty -> Maybe [TagFilterProperty]
haddock_workaround_ :: ()
id :: Value Text
prefix :: Maybe (Value Text)
storageClassAnalysis :: StorageClassAnalysisProperty
tagFilters :: Maybe [TagFilterProperty]
..}
= AnalyticsConfigurationProperty
{tagFilters :: Maybe [TagFilterProperty]
tagFilters = [TagFilterProperty] -> Maybe [TagFilterProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [TagFilterProperty]
PropertyType "TagFilters" AnalyticsConfigurationProperty
newValue, Maybe (Value Text)
()
Value Text
StorageClassAnalysisProperty
haddock_workaround_ :: ()
id :: Value Text
prefix :: Maybe (Value Text)
storageClassAnalysis :: StorageClassAnalysisProperty
haddock_workaround_ :: ()
id :: Value Text
prefix :: Maybe (Value Text)
storageClassAnalysis :: StorageClassAnalysisProperty
..}