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