module Stratosphere.S3.StorageLens.AdvancedDataProtectionMetricsProperty (
AdvancedDataProtectionMetricsProperty(..),
mkAdvancedDataProtectionMetricsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AdvancedDataProtectionMetricsProperty
=
AdvancedDataProtectionMetricsProperty {AdvancedDataProtectionMetricsProperty -> ()
haddock_workaround_ :: (),
AdvancedDataProtectionMetricsProperty -> Maybe (Value Bool)
isEnabled :: (Prelude.Maybe (Value Prelude.Bool))}
deriving stock (AdvancedDataProtectionMetricsProperty
-> AdvancedDataProtectionMetricsProperty -> Bool
(AdvancedDataProtectionMetricsProperty
-> AdvancedDataProtectionMetricsProperty -> Bool)
-> (AdvancedDataProtectionMetricsProperty
-> AdvancedDataProtectionMetricsProperty -> Bool)
-> Eq AdvancedDataProtectionMetricsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AdvancedDataProtectionMetricsProperty
-> AdvancedDataProtectionMetricsProperty -> Bool
== :: AdvancedDataProtectionMetricsProperty
-> AdvancedDataProtectionMetricsProperty -> Bool
$c/= :: AdvancedDataProtectionMetricsProperty
-> AdvancedDataProtectionMetricsProperty -> Bool
/= :: AdvancedDataProtectionMetricsProperty
-> AdvancedDataProtectionMetricsProperty -> Bool
Prelude.Eq, Int -> AdvancedDataProtectionMetricsProperty -> ShowS
[AdvancedDataProtectionMetricsProperty] -> ShowS
AdvancedDataProtectionMetricsProperty -> String
(Int -> AdvancedDataProtectionMetricsProperty -> ShowS)
-> (AdvancedDataProtectionMetricsProperty -> String)
-> ([AdvancedDataProtectionMetricsProperty] -> ShowS)
-> Show AdvancedDataProtectionMetricsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AdvancedDataProtectionMetricsProperty -> ShowS
showsPrec :: Int -> AdvancedDataProtectionMetricsProperty -> ShowS
$cshow :: AdvancedDataProtectionMetricsProperty -> String
show :: AdvancedDataProtectionMetricsProperty -> String
$cshowList :: [AdvancedDataProtectionMetricsProperty] -> ShowS
showList :: [AdvancedDataProtectionMetricsProperty] -> ShowS
Prelude.Show)
mkAdvancedDataProtectionMetricsProperty ::
AdvancedDataProtectionMetricsProperty
mkAdvancedDataProtectionMetricsProperty :: AdvancedDataProtectionMetricsProperty
mkAdvancedDataProtectionMetricsProperty
= AdvancedDataProtectionMetricsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), isEnabled :: Maybe (Value Bool)
isEnabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AdvancedDataProtectionMetricsProperty where
toResourceProperties :: AdvancedDataProtectionMetricsProperty -> ResourceProperties
toResourceProperties AdvancedDataProtectionMetricsProperty {Maybe (Value Bool)
()
haddock_workaround_ :: AdvancedDataProtectionMetricsProperty -> ()
isEnabled :: AdvancedDataProtectionMetricsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
isEnabled :: Maybe (Value Bool)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::S3::StorageLens.AdvancedDataProtectionMetrics",
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 AdvancedDataProtectionMetricsProperty where
toJSON :: AdvancedDataProtectionMetricsProperty -> Value
toJSON AdvancedDataProtectionMetricsProperty {Maybe (Value Bool)
()
haddock_workaround_ :: AdvancedDataProtectionMetricsProperty -> ()
isEnabled :: AdvancedDataProtectionMetricsProperty -> 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" AdvancedDataProtectionMetricsProperty where
type PropertyType "IsEnabled" AdvancedDataProtectionMetricsProperty = Value Prelude.Bool
set :: PropertyType "IsEnabled" AdvancedDataProtectionMetricsProperty
-> AdvancedDataProtectionMetricsProperty
-> AdvancedDataProtectionMetricsProperty
set PropertyType "IsEnabled" AdvancedDataProtectionMetricsProperty
newValue AdvancedDataProtectionMetricsProperty {Maybe (Value Bool)
()
haddock_workaround_ :: AdvancedDataProtectionMetricsProperty -> ()
isEnabled :: AdvancedDataProtectionMetricsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
isEnabled :: Maybe (Value Bool)
..}
= AdvancedDataProtectionMetricsProperty
{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" AdvancedDataProtectionMetricsProperty
Value Bool
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}