module Stratosphere.S3.Bucket.MetricsConfigurationProperty (
        module Exports, MetricsConfigurationProperty(..),
        mkMetricsConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.S3.Bucket.TagFilterProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MetricsConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metricsconfiguration.html>
    MetricsConfigurationProperty {MetricsConfigurationProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metricsconfiguration.html#cfn-s3-bucket-metricsconfiguration-accesspointarn>
                                  MetricsConfigurationProperty -> Maybe (Value Text)
accessPointArn :: (Prelude.Maybe (Value Prelude.Text)),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metricsconfiguration.html#cfn-s3-bucket-metricsconfiguration-id>
                                  MetricsConfigurationProperty -> Value Text
id :: (Value Prelude.Text),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metricsconfiguration.html#cfn-s3-bucket-metricsconfiguration-prefix>
                                  MetricsConfigurationProperty -> Maybe (Value Text)
prefix :: (Prelude.Maybe (Value Prelude.Text)),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-metricsconfiguration.html#cfn-s3-bucket-metricsconfiguration-tagfilters>
                                  MetricsConfigurationProperty -> Maybe [TagFilterProperty]
tagFilters :: (Prelude.Maybe [TagFilterProperty])}
  deriving stock (MetricsConfigurationProperty
-> MetricsConfigurationProperty -> Bool
(MetricsConfigurationProperty
 -> MetricsConfigurationProperty -> Bool)
-> (MetricsConfigurationProperty
    -> MetricsConfigurationProperty -> Bool)
-> Eq MetricsConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MetricsConfigurationProperty
-> MetricsConfigurationProperty -> Bool
== :: MetricsConfigurationProperty
-> MetricsConfigurationProperty -> Bool
$c/= :: MetricsConfigurationProperty
-> MetricsConfigurationProperty -> Bool
/= :: MetricsConfigurationProperty
-> MetricsConfigurationProperty -> Bool
Prelude.Eq, Int -> MetricsConfigurationProperty -> ShowS
[MetricsConfigurationProperty] -> ShowS
MetricsConfigurationProperty -> String
(Int -> MetricsConfigurationProperty -> ShowS)
-> (MetricsConfigurationProperty -> String)
-> ([MetricsConfigurationProperty] -> ShowS)
-> Show MetricsConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MetricsConfigurationProperty -> ShowS
showsPrec :: Int -> MetricsConfigurationProperty -> ShowS
$cshow :: MetricsConfigurationProperty -> String
show :: MetricsConfigurationProperty -> String
$cshowList :: [MetricsConfigurationProperty] -> ShowS
showList :: [MetricsConfigurationProperty] -> ShowS
Prelude.Show)
mkMetricsConfigurationProperty ::
  Value Prelude.Text -> MetricsConfigurationProperty
mkMetricsConfigurationProperty :: Value Text -> MetricsConfigurationProperty
mkMetricsConfigurationProperty Value Text
id
  = MetricsConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), id :: Value Text
id = Value Text
id,
       accessPointArn :: Maybe (Value Text)
accessPointArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, 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 MetricsConfigurationProperty where
  toResourceProperties :: MetricsConfigurationProperty -> ResourceProperties
toResourceProperties MetricsConfigurationProperty {Maybe [TagFilterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricsConfigurationProperty -> ()
accessPointArn :: MetricsConfigurationProperty -> Maybe (Value Text)
id :: MetricsConfigurationProperty -> Value Text
prefix :: MetricsConfigurationProperty -> Maybe (Value Text)
tagFilters :: MetricsConfigurationProperty -> Maybe [TagFilterProperty]
haddock_workaround_ :: ()
accessPointArn :: Maybe (Value Text)
id :: Value Text
prefix :: Maybe (Value Text)
tagFilters :: Maybe [TagFilterProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3::Bucket.MetricsConfiguration",
         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]
                           ([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
"AccessPointArn" (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)
accessPointArn,
                               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 MetricsConfigurationProperty where
  toJSON :: MetricsConfigurationProperty -> Value
toJSON MetricsConfigurationProperty {Maybe [TagFilterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricsConfigurationProperty -> ()
accessPointArn :: MetricsConfigurationProperty -> Maybe (Value Text)
id :: MetricsConfigurationProperty -> Value Text
prefix :: MetricsConfigurationProperty -> Maybe (Value Text)
tagFilters :: MetricsConfigurationProperty -> Maybe [TagFilterProperty]
haddock_workaround_ :: ()
accessPointArn :: Maybe (Value Text)
id :: Value Text
prefix :: Maybe (Value Text)
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]
              ([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
"AccessPointArn" (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)
accessPointArn,
                  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 "AccessPointArn" MetricsConfigurationProperty where
  type PropertyType "AccessPointArn" MetricsConfigurationProperty = Value Prelude.Text
  set :: PropertyType "AccessPointArn" MetricsConfigurationProperty
-> MetricsConfigurationProperty -> MetricsConfigurationProperty
set PropertyType "AccessPointArn" MetricsConfigurationProperty
newValue MetricsConfigurationProperty {Maybe [TagFilterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricsConfigurationProperty -> ()
accessPointArn :: MetricsConfigurationProperty -> Maybe (Value Text)
id :: MetricsConfigurationProperty -> Value Text
prefix :: MetricsConfigurationProperty -> Maybe (Value Text)
tagFilters :: MetricsConfigurationProperty -> Maybe [TagFilterProperty]
haddock_workaround_ :: ()
accessPointArn :: Maybe (Value Text)
id :: Value Text
prefix :: Maybe (Value Text)
tagFilters :: Maybe [TagFilterProperty]
..}
    = MetricsConfigurationProperty
        {accessPointArn :: Maybe (Value Text)
accessPointArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AccessPointArn" MetricsConfigurationProperty
Value Text
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 "Id" MetricsConfigurationProperty where
  type PropertyType "Id" MetricsConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Id" MetricsConfigurationProperty
-> MetricsConfigurationProperty -> MetricsConfigurationProperty
set PropertyType "Id" MetricsConfigurationProperty
newValue MetricsConfigurationProperty {Maybe [TagFilterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricsConfigurationProperty -> ()
accessPointArn :: MetricsConfigurationProperty -> Maybe (Value Text)
id :: MetricsConfigurationProperty -> Value Text
prefix :: MetricsConfigurationProperty -> Maybe (Value Text)
tagFilters :: MetricsConfigurationProperty -> Maybe [TagFilterProperty]
haddock_workaround_ :: ()
accessPointArn :: Maybe (Value Text)
id :: Value Text
prefix :: Maybe (Value Text)
tagFilters :: Maybe [TagFilterProperty]
..}
    = MetricsConfigurationProperty {id :: Value Text
id = PropertyType "Id" MetricsConfigurationProperty
Value Text
newValue, Maybe [TagFilterProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
accessPointArn :: Maybe (Value Text)
prefix :: Maybe (Value Text)
tagFilters :: Maybe [TagFilterProperty]
haddock_workaround_ :: ()
accessPointArn :: Maybe (Value Text)
prefix :: Maybe (Value Text)
tagFilters :: Maybe [TagFilterProperty]
..}
instance Property "Prefix" MetricsConfigurationProperty where
  type PropertyType "Prefix" MetricsConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Prefix" MetricsConfigurationProperty
-> MetricsConfigurationProperty -> MetricsConfigurationProperty
set PropertyType "Prefix" MetricsConfigurationProperty
newValue MetricsConfigurationProperty {Maybe [TagFilterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricsConfigurationProperty -> ()
accessPointArn :: MetricsConfigurationProperty -> Maybe (Value Text)
id :: MetricsConfigurationProperty -> Value Text
prefix :: MetricsConfigurationProperty -> Maybe (Value Text)
tagFilters :: MetricsConfigurationProperty -> Maybe [TagFilterProperty]
haddock_workaround_ :: ()
accessPointArn :: Maybe (Value Text)
id :: Value Text
prefix :: Maybe (Value Text)
tagFilters :: Maybe [TagFilterProperty]
..}
    = MetricsConfigurationProperty {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" MetricsConfigurationProperty
Value Text
newValue, Maybe [TagFilterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
accessPointArn :: Maybe (Value Text)
id :: Value Text
tagFilters :: Maybe [TagFilterProperty]
haddock_workaround_ :: ()
accessPointArn :: Maybe (Value Text)
id :: Value Text
tagFilters :: Maybe [TagFilterProperty]
..}
instance Property "TagFilters" MetricsConfigurationProperty where
  type PropertyType "TagFilters" MetricsConfigurationProperty = [TagFilterProperty]
  set :: PropertyType "TagFilters" MetricsConfigurationProperty
-> MetricsConfigurationProperty -> MetricsConfigurationProperty
set PropertyType "TagFilters" MetricsConfigurationProperty
newValue MetricsConfigurationProperty {Maybe [TagFilterProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MetricsConfigurationProperty -> ()
accessPointArn :: MetricsConfigurationProperty -> Maybe (Value Text)
id :: MetricsConfigurationProperty -> Value Text
prefix :: MetricsConfigurationProperty -> Maybe (Value Text)
tagFilters :: MetricsConfigurationProperty -> Maybe [TagFilterProperty]
haddock_workaround_ :: ()
accessPointArn :: Maybe (Value Text)
id :: Value Text
prefix :: Maybe (Value Text)
tagFilters :: Maybe [TagFilterProperty]
..}
    = MetricsConfigurationProperty
        {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" MetricsConfigurationProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
accessPointArn :: Maybe (Value Text)
id :: Value Text
prefix :: Maybe (Value Text)
haddock_workaround_ :: ()
accessPointArn :: Maybe (Value Text)
id :: Value Text
prefix :: Maybe (Value Text)
..}