{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SecurityHub.Types.AwsApiGatewayV2RouteSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsApiGatewayV2RouteSettings = AwsApiGatewayV2RouteSettings'
{
AwsApiGatewayV2RouteSettings -> Maybe Bool
dataTraceEnabled :: Prelude.Maybe Prelude.Bool,
AwsApiGatewayV2RouteSettings -> Maybe Int
throttlingBurstLimit :: Prelude.Maybe Prelude.Int,
AwsApiGatewayV2RouteSettings -> Maybe Text
loggingLevel :: Prelude.Maybe Prelude.Text,
AwsApiGatewayV2RouteSettings -> Maybe Double
throttlingRateLimit :: Prelude.Maybe Prelude.Double,
AwsApiGatewayV2RouteSettings -> Maybe Bool
detailedMetricsEnabled :: Prelude.Maybe Prelude.Bool
}
deriving (AwsApiGatewayV2RouteSettings
-> AwsApiGatewayV2RouteSettings -> Bool
(AwsApiGatewayV2RouteSettings
-> AwsApiGatewayV2RouteSettings -> Bool)
-> (AwsApiGatewayV2RouteSettings
-> AwsApiGatewayV2RouteSettings -> Bool)
-> Eq AwsApiGatewayV2RouteSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsApiGatewayV2RouteSettings
-> AwsApiGatewayV2RouteSettings -> Bool
$c/= :: AwsApiGatewayV2RouteSettings
-> AwsApiGatewayV2RouteSettings -> Bool
== :: AwsApiGatewayV2RouteSettings
-> AwsApiGatewayV2RouteSettings -> Bool
$c== :: AwsApiGatewayV2RouteSettings
-> AwsApiGatewayV2RouteSettings -> Bool
Prelude.Eq, ReadPrec [AwsApiGatewayV2RouteSettings]
ReadPrec AwsApiGatewayV2RouteSettings
Int -> ReadS AwsApiGatewayV2RouteSettings
ReadS [AwsApiGatewayV2RouteSettings]
(Int -> ReadS AwsApiGatewayV2RouteSettings)
-> ReadS [AwsApiGatewayV2RouteSettings]
-> ReadPrec AwsApiGatewayV2RouteSettings
-> ReadPrec [AwsApiGatewayV2RouteSettings]
-> Read AwsApiGatewayV2RouteSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsApiGatewayV2RouteSettings]
$creadListPrec :: ReadPrec [AwsApiGatewayV2RouteSettings]
readPrec :: ReadPrec AwsApiGatewayV2RouteSettings
$creadPrec :: ReadPrec AwsApiGatewayV2RouteSettings
readList :: ReadS [AwsApiGatewayV2RouteSettings]
$creadList :: ReadS [AwsApiGatewayV2RouteSettings]
readsPrec :: Int -> ReadS AwsApiGatewayV2RouteSettings
$creadsPrec :: Int -> ReadS AwsApiGatewayV2RouteSettings
Prelude.Read, Int -> AwsApiGatewayV2RouteSettings -> ShowS
[AwsApiGatewayV2RouteSettings] -> ShowS
AwsApiGatewayV2RouteSettings -> String
(Int -> AwsApiGatewayV2RouteSettings -> ShowS)
-> (AwsApiGatewayV2RouteSettings -> String)
-> ([AwsApiGatewayV2RouteSettings] -> ShowS)
-> Show AwsApiGatewayV2RouteSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsApiGatewayV2RouteSettings] -> ShowS
$cshowList :: [AwsApiGatewayV2RouteSettings] -> ShowS
show :: AwsApiGatewayV2RouteSettings -> String
$cshow :: AwsApiGatewayV2RouteSettings -> String
showsPrec :: Int -> AwsApiGatewayV2RouteSettings -> ShowS
$cshowsPrec :: Int -> AwsApiGatewayV2RouteSettings -> ShowS
Prelude.Show, (forall x.
AwsApiGatewayV2RouteSettings -> Rep AwsApiGatewayV2RouteSettings x)
-> (forall x.
Rep AwsApiGatewayV2RouteSettings x -> AwsApiGatewayV2RouteSettings)
-> Generic AwsApiGatewayV2RouteSettings
forall x.
Rep AwsApiGatewayV2RouteSettings x -> AwsApiGatewayV2RouteSettings
forall x.
AwsApiGatewayV2RouteSettings -> Rep AwsApiGatewayV2RouteSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsApiGatewayV2RouteSettings x -> AwsApiGatewayV2RouteSettings
$cfrom :: forall x.
AwsApiGatewayV2RouteSettings -> Rep AwsApiGatewayV2RouteSettings x
Prelude.Generic)
newAwsApiGatewayV2RouteSettings ::
AwsApiGatewayV2RouteSettings
newAwsApiGatewayV2RouteSettings :: AwsApiGatewayV2RouteSettings
newAwsApiGatewayV2RouteSettings =
AwsApiGatewayV2RouteSettings' :: Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Double
-> Maybe Bool
-> AwsApiGatewayV2RouteSettings
AwsApiGatewayV2RouteSettings'
{ $sel:dataTraceEnabled:AwsApiGatewayV2RouteSettings' :: Maybe Bool
dataTraceEnabled =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:throttlingBurstLimit:AwsApiGatewayV2RouteSettings' :: Maybe Int
throttlingBurstLimit = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:loggingLevel:AwsApiGatewayV2RouteSettings' :: Maybe Text
loggingLevel = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:throttlingRateLimit:AwsApiGatewayV2RouteSettings' :: Maybe Double
throttlingRateLimit = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:detailedMetricsEnabled:AwsApiGatewayV2RouteSettings' :: Maybe Bool
detailedMetricsEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
awsApiGatewayV2RouteSettings_dataTraceEnabled :: Lens.Lens' AwsApiGatewayV2RouteSettings (Prelude.Maybe Prelude.Bool)
awsApiGatewayV2RouteSettings_dataTraceEnabled :: (Maybe Bool -> f (Maybe Bool))
-> AwsApiGatewayV2RouteSettings -> f AwsApiGatewayV2RouteSettings
awsApiGatewayV2RouteSettings_dataTraceEnabled = (AwsApiGatewayV2RouteSettings -> Maybe Bool)
-> (AwsApiGatewayV2RouteSettings
-> Maybe Bool -> AwsApiGatewayV2RouteSettings)
-> Lens
AwsApiGatewayV2RouteSettings
AwsApiGatewayV2RouteSettings
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiGatewayV2RouteSettings' {Maybe Bool
dataTraceEnabled :: Maybe Bool
$sel:dataTraceEnabled:AwsApiGatewayV2RouteSettings' :: AwsApiGatewayV2RouteSettings -> Maybe Bool
dataTraceEnabled} -> Maybe Bool
dataTraceEnabled) (\s :: AwsApiGatewayV2RouteSettings
s@AwsApiGatewayV2RouteSettings' {} Maybe Bool
a -> AwsApiGatewayV2RouteSettings
s {$sel:dataTraceEnabled:AwsApiGatewayV2RouteSettings' :: Maybe Bool
dataTraceEnabled = Maybe Bool
a} :: AwsApiGatewayV2RouteSettings)
awsApiGatewayV2RouteSettings_throttlingBurstLimit :: Lens.Lens' AwsApiGatewayV2RouteSettings (Prelude.Maybe Prelude.Int)
awsApiGatewayV2RouteSettings_throttlingBurstLimit :: (Maybe Int -> f (Maybe Int))
-> AwsApiGatewayV2RouteSettings -> f AwsApiGatewayV2RouteSettings
awsApiGatewayV2RouteSettings_throttlingBurstLimit = (AwsApiGatewayV2RouteSettings -> Maybe Int)
-> (AwsApiGatewayV2RouteSettings
-> Maybe Int -> AwsApiGatewayV2RouteSettings)
-> Lens
AwsApiGatewayV2RouteSettings
AwsApiGatewayV2RouteSettings
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiGatewayV2RouteSettings' {Maybe Int
throttlingBurstLimit :: Maybe Int
$sel:throttlingBurstLimit:AwsApiGatewayV2RouteSettings' :: AwsApiGatewayV2RouteSettings -> Maybe Int
throttlingBurstLimit} -> Maybe Int
throttlingBurstLimit) (\s :: AwsApiGatewayV2RouteSettings
s@AwsApiGatewayV2RouteSettings' {} Maybe Int
a -> AwsApiGatewayV2RouteSettings
s {$sel:throttlingBurstLimit:AwsApiGatewayV2RouteSettings' :: Maybe Int
throttlingBurstLimit = Maybe Int
a} :: AwsApiGatewayV2RouteSettings)
awsApiGatewayV2RouteSettings_loggingLevel :: Lens.Lens' AwsApiGatewayV2RouteSettings (Prelude.Maybe Prelude.Text)
awsApiGatewayV2RouteSettings_loggingLevel :: (Maybe Text -> f (Maybe Text))
-> AwsApiGatewayV2RouteSettings -> f AwsApiGatewayV2RouteSettings
awsApiGatewayV2RouteSettings_loggingLevel = (AwsApiGatewayV2RouteSettings -> Maybe Text)
-> (AwsApiGatewayV2RouteSettings
-> Maybe Text -> AwsApiGatewayV2RouteSettings)
-> Lens
AwsApiGatewayV2RouteSettings
AwsApiGatewayV2RouteSettings
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiGatewayV2RouteSettings' {Maybe Text
loggingLevel :: Maybe Text
$sel:loggingLevel:AwsApiGatewayV2RouteSettings' :: AwsApiGatewayV2RouteSettings -> Maybe Text
loggingLevel} -> Maybe Text
loggingLevel) (\s :: AwsApiGatewayV2RouteSettings
s@AwsApiGatewayV2RouteSettings' {} Maybe Text
a -> AwsApiGatewayV2RouteSettings
s {$sel:loggingLevel:AwsApiGatewayV2RouteSettings' :: Maybe Text
loggingLevel = Maybe Text
a} :: AwsApiGatewayV2RouteSettings)
awsApiGatewayV2RouteSettings_throttlingRateLimit :: Lens.Lens' AwsApiGatewayV2RouteSettings (Prelude.Maybe Prelude.Double)
awsApiGatewayV2RouteSettings_throttlingRateLimit :: (Maybe Double -> f (Maybe Double))
-> AwsApiGatewayV2RouteSettings -> f AwsApiGatewayV2RouteSettings
awsApiGatewayV2RouteSettings_throttlingRateLimit = (AwsApiGatewayV2RouteSettings -> Maybe Double)
-> (AwsApiGatewayV2RouteSettings
-> Maybe Double -> AwsApiGatewayV2RouteSettings)
-> Lens
AwsApiGatewayV2RouteSettings
AwsApiGatewayV2RouteSettings
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiGatewayV2RouteSettings' {Maybe Double
throttlingRateLimit :: Maybe Double
$sel:throttlingRateLimit:AwsApiGatewayV2RouteSettings' :: AwsApiGatewayV2RouteSettings -> Maybe Double
throttlingRateLimit} -> Maybe Double
throttlingRateLimit) (\s :: AwsApiGatewayV2RouteSettings
s@AwsApiGatewayV2RouteSettings' {} Maybe Double
a -> AwsApiGatewayV2RouteSettings
s {$sel:throttlingRateLimit:AwsApiGatewayV2RouteSettings' :: Maybe Double
throttlingRateLimit = Maybe Double
a} :: AwsApiGatewayV2RouteSettings)
awsApiGatewayV2RouteSettings_detailedMetricsEnabled :: Lens.Lens' AwsApiGatewayV2RouteSettings (Prelude.Maybe Prelude.Bool)
awsApiGatewayV2RouteSettings_detailedMetricsEnabled :: (Maybe Bool -> f (Maybe Bool))
-> AwsApiGatewayV2RouteSettings -> f AwsApiGatewayV2RouteSettings
awsApiGatewayV2RouteSettings_detailedMetricsEnabled = (AwsApiGatewayV2RouteSettings -> Maybe Bool)
-> (AwsApiGatewayV2RouteSettings
-> Maybe Bool -> AwsApiGatewayV2RouteSettings)
-> Lens
AwsApiGatewayV2RouteSettings
AwsApiGatewayV2RouteSettings
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiGatewayV2RouteSettings' {Maybe Bool
detailedMetricsEnabled :: Maybe Bool
$sel:detailedMetricsEnabled:AwsApiGatewayV2RouteSettings' :: AwsApiGatewayV2RouteSettings -> Maybe Bool
detailedMetricsEnabled} -> Maybe Bool
detailedMetricsEnabled) (\s :: AwsApiGatewayV2RouteSettings
s@AwsApiGatewayV2RouteSettings' {} Maybe Bool
a -> AwsApiGatewayV2RouteSettings
s {$sel:detailedMetricsEnabled:AwsApiGatewayV2RouteSettings' :: Maybe Bool
detailedMetricsEnabled = Maybe Bool
a} :: AwsApiGatewayV2RouteSettings)
instance Core.FromJSON AwsApiGatewayV2RouteSettings where
parseJSON :: Value -> Parser AwsApiGatewayV2RouteSettings
parseJSON =
String
-> (Object -> Parser AwsApiGatewayV2RouteSettings)
-> Value
-> Parser AwsApiGatewayV2RouteSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsApiGatewayV2RouteSettings"
( \Object
x ->
Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Double
-> Maybe Bool
-> AwsApiGatewayV2RouteSettings
AwsApiGatewayV2RouteSettings'
(Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Double
-> Maybe Bool
-> AwsApiGatewayV2RouteSettings)
-> Parser (Maybe Bool)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Double
-> Maybe Bool
-> AwsApiGatewayV2RouteSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DataTraceEnabled")
Parser
(Maybe Int
-> Maybe Text
-> Maybe Double
-> Maybe Bool
-> AwsApiGatewayV2RouteSettings)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Double -> Maybe Bool -> AwsApiGatewayV2RouteSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ThrottlingBurstLimit")
Parser
(Maybe Text
-> Maybe Double -> Maybe Bool -> AwsApiGatewayV2RouteSettings)
-> Parser (Maybe Text)
-> Parser
(Maybe Double -> Maybe Bool -> AwsApiGatewayV2RouteSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LoggingLevel")
Parser (Maybe Double -> Maybe Bool -> AwsApiGatewayV2RouteSettings)
-> Parser (Maybe Double)
-> Parser (Maybe Bool -> AwsApiGatewayV2RouteSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ThrottlingRateLimit")
Parser (Maybe Bool -> AwsApiGatewayV2RouteSettings)
-> Parser (Maybe Bool) -> Parser AwsApiGatewayV2RouteSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DetailedMetricsEnabled")
)
instance
Prelude.Hashable
AwsApiGatewayV2RouteSettings
instance Prelude.NFData AwsApiGatewayV2RouteSettings
instance Core.ToJSON AwsApiGatewayV2RouteSettings where
toJSON :: AwsApiGatewayV2RouteSettings -> Value
toJSON AwsApiGatewayV2RouteSettings' {Maybe Bool
Maybe Double
Maybe Int
Maybe Text
detailedMetricsEnabled :: Maybe Bool
throttlingRateLimit :: Maybe Double
loggingLevel :: Maybe Text
throttlingBurstLimit :: Maybe Int
dataTraceEnabled :: Maybe Bool
$sel:detailedMetricsEnabled:AwsApiGatewayV2RouteSettings' :: AwsApiGatewayV2RouteSettings -> Maybe Bool
$sel:throttlingRateLimit:AwsApiGatewayV2RouteSettings' :: AwsApiGatewayV2RouteSettings -> Maybe Double
$sel:loggingLevel:AwsApiGatewayV2RouteSettings' :: AwsApiGatewayV2RouteSettings -> Maybe Text
$sel:throttlingBurstLimit:AwsApiGatewayV2RouteSettings' :: AwsApiGatewayV2RouteSettings -> Maybe Int
$sel:dataTraceEnabled:AwsApiGatewayV2RouteSettings' :: AwsApiGatewayV2RouteSettings -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"DataTraceEnabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
dataTraceEnabled,
(Text
"ThrottlingBurstLimit" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
throttlingBurstLimit,
(Text
"LoggingLevel" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
loggingLevel,
(Text
"ThrottlingRateLimit" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
throttlingRateLimit,
(Text
"DetailedMetricsEnabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
detailedMetricsEnabled
]
)