module Stratosphere.WAFv2.WebACL.VisibilityConfigProperty (
VisibilityConfigProperty(..), mkVisibilityConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data VisibilityConfigProperty
=
VisibilityConfigProperty {VisibilityConfigProperty -> ()
haddock_workaround_ :: (),
VisibilityConfigProperty -> Value Bool
cloudWatchMetricsEnabled :: (Value Prelude.Bool),
VisibilityConfigProperty -> Value Text
metricName :: (Value Prelude.Text),
VisibilityConfigProperty -> Value Bool
sampledRequestsEnabled :: (Value Prelude.Bool)}
deriving stock (VisibilityConfigProperty -> VisibilityConfigProperty -> Bool
(VisibilityConfigProperty -> VisibilityConfigProperty -> Bool)
-> (VisibilityConfigProperty -> VisibilityConfigProperty -> Bool)
-> Eq VisibilityConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VisibilityConfigProperty -> VisibilityConfigProperty -> Bool
== :: VisibilityConfigProperty -> VisibilityConfigProperty -> Bool
$c/= :: VisibilityConfigProperty -> VisibilityConfigProperty -> Bool
/= :: VisibilityConfigProperty -> VisibilityConfigProperty -> Bool
Prelude.Eq, Int -> VisibilityConfigProperty -> ShowS
[VisibilityConfigProperty] -> ShowS
VisibilityConfigProperty -> String
(Int -> VisibilityConfigProperty -> ShowS)
-> (VisibilityConfigProperty -> String)
-> ([VisibilityConfigProperty] -> ShowS)
-> Show VisibilityConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VisibilityConfigProperty -> ShowS
showsPrec :: Int -> VisibilityConfigProperty -> ShowS
$cshow :: VisibilityConfigProperty -> String
show :: VisibilityConfigProperty -> String
$cshowList :: [VisibilityConfigProperty] -> ShowS
showList :: [VisibilityConfigProperty] -> ShowS
Prelude.Show)
mkVisibilityConfigProperty ::
Value Prelude.Bool
-> Value Prelude.Text
-> Value Prelude.Bool -> VisibilityConfigProperty
mkVisibilityConfigProperty :: Value Bool -> Value Text -> Value Bool -> VisibilityConfigProperty
mkVisibilityConfigProperty
Value Bool
cloudWatchMetricsEnabled
Value Text
metricName
Value Bool
sampledRequestsEnabled
= VisibilityConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
cloudWatchMetricsEnabled :: Value Bool
cloudWatchMetricsEnabled = Value Bool
cloudWatchMetricsEnabled,
metricName :: Value Text
metricName = Value Text
metricName,
sampledRequestsEnabled :: Value Bool
sampledRequestsEnabled = Value Bool
sampledRequestsEnabled}
instance ToResourceProperties VisibilityConfigProperty where
toResourceProperties :: VisibilityConfigProperty -> ResourceProperties
toResourceProperties VisibilityConfigProperty {()
Value Bool
Value Text
haddock_workaround_ :: VisibilityConfigProperty -> ()
cloudWatchMetricsEnabled :: VisibilityConfigProperty -> Value Bool
metricName :: VisibilityConfigProperty -> Value Text
sampledRequestsEnabled :: VisibilityConfigProperty -> Value Bool
haddock_workaround_ :: ()
cloudWatchMetricsEnabled :: Value Bool
metricName :: Value Text
sampledRequestsEnabled :: Value Bool
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::WAFv2::WebACL.VisibilityConfig",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Key
"CloudWatchMetricsEnabled"
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..= Value Bool
cloudWatchMetricsEnabled,
Key
"MetricName" 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
metricName,
Key
"SampledRequestsEnabled" 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..= Value Bool
sampledRequestsEnabled]}
instance JSON.ToJSON VisibilityConfigProperty where
toJSON :: VisibilityConfigProperty -> Value
toJSON VisibilityConfigProperty {()
Value Bool
Value Text
haddock_workaround_ :: VisibilityConfigProperty -> ()
cloudWatchMetricsEnabled :: VisibilityConfigProperty -> Value Bool
metricName :: VisibilityConfigProperty -> Value Text
sampledRequestsEnabled :: VisibilityConfigProperty -> Value Bool
haddock_workaround_ :: ()
cloudWatchMetricsEnabled :: Value Bool
metricName :: Value Text
sampledRequestsEnabled :: Value Bool
..}
= [(Key, Value)] -> Value
JSON.object
[Key
"CloudWatchMetricsEnabled" 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..= Value Bool
cloudWatchMetricsEnabled,
Key
"MetricName" 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
metricName,
Key
"SampledRequestsEnabled" 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..= Value Bool
sampledRequestsEnabled]
instance Property "CloudWatchMetricsEnabled" VisibilityConfigProperty where
type PropertyType "CloudWatchMetricsEnabled" VisibilityConfigProperty = Value Prelude.Bool
set :: PropertyType "CloudWatchMetricsEnabled" VisibilityConfigProperty
-> VisibilityConfigProperty -> VisibilityConfigProperty
set PropertyType "CloudWatchMetricsEnabled" VisibilityConfigProperty
newValue VisibilityConfigProperty {()
Value Bool
Value Text
haddock_workaround_ :: VisibilityConfigProperty -> ()
cloudWatchMetricsEnabled :: VisibilityConfigProperty -> Value Bool
metricName :: VisibilityConfigProperty -> Value Text
sampledRequestsEnabled :: VisibilityConfigProperty -> Value Bool
haddock_workaround_ :: ()
cloudWatchMetricsEnabled :: Value Bool
metricName :: Value Text
sampledRequestsEnabled :: Value Bool
..}
= VisibilityConfigProperty
{cloudWatchMetricsEnabled :: Value Bool
cloudWatchMetricsEnabled = PropertyType "CloudWatchMetricsEnabled" VisibilityConfigProperty
Value Bool
newValue, ()
Value Bool
Value Text
haddock_workaround_ :: ()
metricName :: Value Text
sampledRequestsEnabled :: Value Bool
haddock_workaround_ :: ()
metricName :: Value Text
sampledRequestsEnabled :: Value Bool
..}
instance Property "MetricName" VisibilityConfigProperty where
type PropertyType "MetricName" VisibilityConfigProperty = Value Prelude.Text
set :: PropertyType "MetricName" VisibilityConfigProperty
-> VisibilityConfigProperty -> VisibilityConfigProperty
set PropertyType "MetricName" VisibilityConfigProperty
newValue VisibilityConfigProperty {()
Value Bool
Value Text
haddock_workaround_ :: VisibilityConfigProperty -> ()
cloudWatchMetricsEnabled :: VisibilityConfigProperty -> Value Bool
metricName :: VisibilityConfigProperty -> Value Text
sampledRequestsEnabled :: VisibilityConfigProperty -> Value Bool
haddock_workaround_ :: ()
cloudWatchMetricsEnabled :: Value Bool
metricName :: Value Text
sampledRequestsEnabled :: Value Bool
..}
= VisibilityConfigProperty {metricName :: Value Text
metricName = PropertyType "MetricName" VisibilityConfigProperty
Value Text
newValue, ()
Value Bool
haddock_workaround_ :: ()
cloudWatchMetricsEnabled :: Value Bool
sampledRequestsEnabled :: Value Bool
haddock_workaround_ :: ()
cloudWatchMetricsEnabled :: Value Bool
sampledRequestsEnabled :: Value Bool
..}
instance Property "SampledRequestsEnabled" VisibilityConfigProperty where
type PropertyType "SampledRequestsEnabled" VisibilityConfigProperty = Value Prelude.Bool
set :: PropertyType "SampledRequestsEnabled" VisibilityConfigProperty
-> VisibilityConfigProperty -> VisibilityConfigProperty
set PropertyType "SampledRequestsEnabled" VisibilityConfigProperty
newValue VisibilityConfigProperty {()
Value Bool
Value Text
haddock_workaround_ :: VisibilityConfigProperty -> ()
cloudWatchMetricsEnabled :: VisibilityConfigProperty -> Value Bool
metricName :: VisibilityConfigProperty -> Value Text
sampledRequestsEnabled :: VisibilityConfigProperty -> Value Bool
haddock_workaround_ :: ()
cloudWatchMetricsEnabled :: Value Bool
metricName :: Value Text
sampledRequestsEnabled :: Value Bool
..}
= VisibilityConfigProperty {sampledRequestsEnabled :: Value Bool
sampledRequestsEnabled = PropertyType "SampledRequestsEnabled" VisibilityConfigProperty
Value Bool
newValue, ()
Value Bool
Value Text
haddock_workaround_ :: ()
cloudWatchMetricsEnabled :: Value Bool
metricName :: Value Text
haddock_workaround_ :: ()
cloudWatchMetricsEnabled :: Value Bool
metricName :: Value Text
..}