{-# 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.APIGateway.Types.MethodSetting where
import Amazonka.APIGateway.Types.UnauthorizedCacheControlHeaderStrategy
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MethodSetting = MethodSetting'
{
MethodSetting -> Maybe Int
cacheTtlInSeconds :: Prelude.Maybe Prelude.Int,
MethodSetting -> Maybe Bool
dataTraceEnabled :: Prelude.Maybe Prelude.Bool,
MethodSetting -> Maybe Int
throttlingBurstLimit :: Prelude.Maybe Prelude.Int,
MethodSetting -> Maybe Bool
cacheDataEncrypted :: Prelude.Maybe Prelude.Bool,
MethodSetting -> Maybe Text
loggingLevel :: Prelude.Maybe Prelude.Text,
MethodSetting -> Maybe Bool
requireAuthorizationForCacheControl :: Prelude.Maybe Prelude.Bool,
MethodSetting -> Maybe Bool
cachingEnabled :: Prelude.Maybe Prelude.Bool,
MethodSetting -> Maybe Bool
metricsEnabled :: Prelude.Maybe Prelude.Bool,
MethodSetting -> Maybe Double
throttlingRateLimit :: Prelude.Maybe Prelude.Double,
:: Prelude.Maybe UnauthorizedCacheControlHeaderStrategy
}
deriving (MethodSetting -> MethodSetting -> Bool
(MethodSetting -> MethodSetting -> Bool)
-> (MethodSetting -> MethodSetting -> Bool) -> Eq MethodSetting
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MethodSetting -> MethodSetting -> Bool
$c/= :: MethodSetting -> MethodSetting -> Bool
== :: MethodSetting -> MethodSetting -> Bool
$c== :: MethodSetting -> MethodSetting -> Bool
Prelude.Eq, ReadPrec [MethodSetting]
ReadPrec MethodSetting
Int -> ReadS MethodSetting
ReadS [MethodSetting]
(Int -> ReadS MethodSetting)
-> ReadS [MethodSetting]
-> ReadPrec MethodSetting
-> ReadPrec [MethodSetting]
-> Read MethodSetting
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MethodSetting]
$creadListPrec :: ReadPrec [MethodSetting]
readPrec :: ReadPrec MethodSetting
$creadPrec :: ReadPrec MethodSetting
readList :: ReadS [MethodSetting]
$creadList :: ReadS [MethodSetting]
readsPrec :: Int -> ReadS MethodSetting
$creadsPrec :: Int -> ReadS MethodSetting
Prelude.Read, Int -> MethodSetting -> ShowS
[MethodSetting] -> ShowS
MethodSetting -> String
(Int -> MethodSetting -> ShowS)
-> (MethodSetting -> String)
-> ([MethodSetting] -> ShowS)
-> Show MethodSetting
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MethodSetting] -> ShowS
$cshowList :: [MethodSetting] -> ShowS
show :: MethodSetting -> String
$cshow :: MethodSetting -> String
showsPrec :: Int -> MethodSetting -> ShowS
$cshowsPrec :: Int -> MethodSetting -> ShowS
Prelude.Show, (forall x. MethodSetting -> Rep MethodSetting x)
-> (forall x. Rep MethodSetting x -> MethodSetting)
-> Generic MethodSetting
forall x. Rep MethodSetting x -> MethodSetting
forall x. MethodSetting -> Rep MethodSetting x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MethodSetting x -> MethodSetting
$cfrom :: forall x. MethodSetting -> Rep MethodSetting x
Prelude.Generic)
newMethodSetting ::
MethodSetting
newMethodSetting :: MethodSetting
newMethodSetting =
MethodSetting' :: Maybe Int
-> Maybe Bool
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy
-> MethodSetting
MethodSetting'
{ $sel:cacheTtlInSeconds:MethodSetting' :: Maybe Int
cacheTtlInSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:dataTraceEnabled:MethodSetting' :: Maybe Bool
dataTraceEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:throttlingBurstLimit:MethodSetting' :: Maybe Int
throttlingBurstLimit = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:cacheDataEncrypted:MethodSetting' :: Maybe Bool
cacheDataEncrypted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:loggingLevel:MethodSetting' :: Maybe Text
loggingLevel = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:requireAuthorizationForCacheControl:MethodSetting' :: Maybe Bool
requireAuthorizationForCacheControl =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:cachingEnabled:MethodSetting' :: Maybe Bool
cachingEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:metricsEnabled:MethodSetting' :: Maybe Bool
metricsEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:throttlingRateLimit:MethodSetting' :: Maybe Double
throttlingRateLimit = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:unauthorizedCacheControlHeaderStrategy:MethodSetting' :: Maybe UnauthorizedCacheControlHeaderStrategy
unauthorizedCacheControlHeaderStrategy =
Maybe UnauthorizedCacheControlHeaderStrategy
forall a. Maybe a
Prelude.Nothing
}
methodSetting_cacheTtlInSeconds :: Lens.Lens' MethodSetting (Prelude.Maybe Prelude.Int)
methodSetting_cacheTtlInSeconds :: (Maybe Int -> f (Maybe Int)) -> MethodSetting -> f MethodSetting
methodSetting_cacheTtlInSeconds = (MethodSetting -> Maybe Int)
-> (MethodSetting -> Maybe Int -> MethodSetting)
-> Lens MethodSetting MethodSetting (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MethodSetting' {Maybe Int
cacheTtlInSeconds :: Maybe Int
$sel:cacheTtlInSeconds:MethodSetting' :: MethodSetting -> Maybe Int
cacheTtlInSeconds} -> Maybe Int
cacheTtlInSeconds) (\s :: MethodSetting
s@MethodSetting' {} Maybe Int
a -> MethodSetting
s {$sel:cacheTtlInSeconds:MethodSetting' :: Maybe Int
cacheTtlInSeconds = Maybe Int
a} :: MethodSetting)
methodSetting_dataTraceEnabled :: Lens.Lens' MethodSetting (Prelude.Maybe Prelude.Bool)
methodSetting_dataTraceEnabled :: (Maybe Bool -> f (Maybe Bool)) -> MethodSetting -> f MethodSetting
methodSetting_dataTraceEnabled = (MethodSetting -> Maybe Bool)
-> (MethodSetting -> Maybe Bool -> MethodSetting)
-> Lens MethodSetting MethodSetting (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MethodSetting' {Maybe Bool
dataTraceEnabled :: Maybe Bool
$sel:dataTraceEnabled:MethodSetting' :: MethodSetting -> Maybe Bool
dataTraceEnabled} -> Maybe Bool
dataTraceEnabled) (\s :: MethodSetting
s@MethodSetting' {} Maybe Bool
a -> MethodSetting
s {$sel:dataTraceEnabled:MethodSetting' :: Maybe Bool
dataTraceEnabled = Maybe Bool
a} :: MethodSetting)
methodSetting_throttlingBurstLimit :: Lens.Lens' MethodSetting (Prelude.Maybe Prelude.Int)
methodSetting_throttlingBurstLimit :: (Maybe Int -> f (Maybe Int)) -> MethodSetting -> f MethodSetting
methodSetting_throttlingBurstLimit = (MethodSetting -> Maybe Int)
-> (MethodSetting -> Maybe Int -> MethodSetting)
-> Lens MethodSetting MethodSetting (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MethodSetting' {Maybe Int
throttlingBurstLimit :: Maybe Int
$sel:throttlingBurstLimit:MethodSetting' :: MethodSetting -> Maybe Int
throttlingBurstLimit} -> Maybe Int
throttlingBurstLimit) (\s :: MethodSetting
s@MethodSetting' {} Maybe Int
a -> MethodSetting
s {$sel:throttlingBurstLimit:MethodSetting' :: Maybe Int
throttlingBurstLimit = Maybe Int
a} :: MethodSetting)
methodSetting_cacheDataEncrypted :: Lens.Lens' MethodSetting (Prelude.Maybe Prelude.Bool)
methodSetting_cacheDataEncrypted :: (Maybe Bool -> f (Maybe Bool)) -> MethodSetting -> f MethodSetting
methodSetting_cacheDataEncrypted = (MethodSetting -> Maybe Bool)
-> (MethodSetting -> Maybe Bool -> MethodSetting)
-> Lens MethodSetting MethodSetting (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MethodSetting' {Maybe Bool
cacheDataEncrypted :: Maybe Bool
$sel:cacheDataEncrypted:MethodSetting' :: MethodSetting -> Maybe Bool
cacheDataEncrypted} -> Maybe Bool
cacheDataEncrypted) (\s :: MethodSetting
s@MethodSetting' {} Maybe Bool
a -> MethodSetting
s {$sel:cacheDataEncrypted:MethodSetting' :: Maybe Bool
cacheDataEncrypted = Maybe Bool
a} :: MethodSetting)
methodSetting_loggingLevel :: Lens.Lens' MethodSetting (Prelude.Maybe Prelude.Text)
methodSetting_loggingLevel :: (Maybe Text -> f (Maybe Text)) -> MethodSetting -> f MethodSetting
methodSetting_loggingLevel = (MethodSetting -> Maybe Text)
-> (MethodSetting -> Maybe Text -> MethodSetting)
-> Lens MethodSetting MethodSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MethodSetting' {Maybe Text
loggingLevel :: Maybe Text
$sel:loggingLevel:MethodSetting' :: MethodSetting -> Maybe Text
loggingLevel} -> Maybe Text
loggingLevel) (\s :: MethodSetting
s@MethodSetting' {} Maybe Text
a -> MethodSetting
s {$sel:loggingLevel:MethodSetting' :: Maybe Text
loggingLevel = Maybe Text
a} :: MethodSetting)
methodSetting_requireAuthorizationForCacheControl :: Lens.Lens' MethodSetting (Prelude.Maybe Prelude.Bool)
methodSetting_requireAuthorizationForCacheControl :: (Maybe Bool -> f (Maybe Bool)) -> MethodSetting -> f MethodSetting
methodSetting_requireAuthorizationForCacheControl = (MethodSetting -> Maybe Bool)
-> (MethodSetting -> Maybe Bool -> MethodSetting)
-> Lens MethodSetting MethodSetting (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MethodSetting' {Maybe Bool
requireAuthorizationForCacheControl :: Maybe Bool
$sel:requireAuthorizationForCacheControl:MethodSetting' :: MethodSetting -> Maybe Bool
requireAuthorizationForCacheControl} -> Maybe Bool
requireAuthorizationForCacheControl) (\s :: MethodSetting
s@MethodSetting' {} Maybe Bool
a -> MethodSetting
s {$sel:requireAuthorizationForCacheControl:MethodSetting' :: Maybe Bool
requireAuthorizationForCacheControl = Maybe Bool
a} :: MethodSetting)
methodSetting_cachingEnabled :: Lens.Lens' MethodSetting (Prelude.Maybe Prelude.Bool)
methodSetting_cachingEnabled :: (Maybe Bool -> f (Maybe Bool)) -> MethodSetting -> f MethodSetting
methodSetting_cachingEnabled = (MethodSetting -> Maybe Bool)
-> (MethodSetting -> Maybe Bool -> MethodSetting)
-> Lens MethodSetting MethodSetting (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MethodSetting' {Maybe Bool
cachingEnabled :: Maybe Bool
$sel:cachingEnabled:MethodSetting' :: MethodSetting -> Maybe Bool
cachingEnabled} -> Maybe Bool
cachingEnabled) (\s :: MethodSetting
s@MethodSetting' {} Maybe Bool
a -> MethodSetting
s {$sel:cachingEnabled:MethodSetting' :: Maybe Bool
cachingEnabled = Maybe Bool
a} :: MethodSetting)
methodSetting_metricsEnabled :: Lens.Lens' MethodSetting (Prelude.Maybe Prelude.Bool)
methodSetting_metricsEnabled :: (Maybe Bool -> f (Maybe Bool)) -> MethodSetting -> f MethodSetting
methodSetting_metricsEnabled = (MethodSetting -> Maybe Bool)
-> (MethodSetting -> Maybe Bool -> MethodSetting)
-> Lens MethodSetting MethodSetting (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MethodSetting' {Maybe Bool
metricsEnabled :: Maybe Bool
$sel:metricsEnabled:MethodSetting' :: MethodSetting -> Maybe Bool
metricsEnabled} -> Maybe Bool
metricsEnabled) (\s :: MethodSetting
s@MethodSetting' {} Maybe Bool
a -> MethodSetting
s {$sel:metricsEnabled:MethodSetting' :: Maybe Bool
metricsEnabled = Maybe Bool
a} :: MethodSetting)
methodSetting_throttlingRateLimit :: Lens.Lens' MethodSetting (Prelude.Maybe Prelude.Double)
methodSetting_throttlingRateLimit :: (Maybe Double -> f (Maybe Double))
-> MethodSetting -> f MethodSetting
methodSetting_throttlingRateLimit = (MethodSetting -> Maybe Double)
-> (MethodSetting -> Maybe Double -> MethodSetting)
-> Lens MethodSetting MethodSetting (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MethodSetting' {Maybe Double
throttlingRateLimit :: Maybe Double
$sel:throttlingRateLimit:MethodSetting' :: MethodSetting -> Maybe Double
throttlingRateLimit} -> Maybe Double
throttlingRateLimit) (\s :: MethodSetting
s@MethodSetting' {} Maybe Double
a -> MethodSetting
s {$sel:throttlingRateLimit:MethodSetting' :: Maybe Double
throttlingRateLimit = Maybe Double
a} :: MethodSetting)
methodSetting_unauthorizedCacheControlHeaderStrategy :: Lens.Lens' MethodSetting (Prelude.Maybe UnauthorizedCacheControlHeaderStrategy)
= (MethodSetting -> Maybe UnauthorizedCacheControlHeaderStrategy)
-> (MethodSetting
-> Maybe UnauthorizedCacheControlHeaderStrategy -> MethodSetting)
-> Lens
MethodSetting
MethodSetting
(Maybe UnauthorizedCacheControlHeaderStrategy)
(Maybe UnauthorizedCacheControlHeaderStrategy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MethodSetting' {Maybe UnauthorizedCacheControlHeaderStrategy
unauthorizedCacheControlHeaderStrategy :: Maybe UnauthorizedCacheControlHeaderStrategy
$sel:unauthorizedCacheControlHeaderStrategy:MethodSetting' :: MethodSetting -> Maybe UnauthorizedCacheControlHeaderStrategy
unauthorizedCacheControlHeaderStrategy} -> Maybe UnauthorizedCacheControlHeaderStrategy
unauthorizedCacheControlHeaderStrategy) (\s :: MethodSetting
s@MethodSetting' {} Maybe UnauthorizedCacheControlHeaderStrategy
a -> MethodSetting
s {$sel:unauthorizedCacheControlHeaderStrategy:MethodSetting' :: Maybe UnauthorizedCacheControlHeaderStrategy
unauthorizedCacheControlHeaderStrategy = Maybe UnauthorizedCacheControlHeaderStrategy
a} :: MethodSetting)
instance Core.FromJSON MethodSetting where
parseJSON :: Value -> Parser MethodSetting
parseJSON =
String
-> (Object -> Parser MethodSetting)
-> Value
-> Parser MethodSetting
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MethodSetting"
( \Object
x ->
Maybe Int
-> Maybe Bool
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy
-> MethodSetting
MethodSetting'
(Maybe Int
-> Maybe Bool
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy
-> MethodSetting)
-> Parser (Maybe Int)
-> Parser
(Maybe Bool
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy
-> MethodSetting)
forall (f :: * -> *) a b. Functor 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
"cacheTtlInSeconds")
Parser
(Maybe Bool
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy
-> MethodSetting)
-> Parser (Maybe Bool)
-> Parser
(Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy
-> MethodSetting)
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
"dataTraceEnabled")
Parser
(Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy
-> MethodSetting)
-> Parser (Maybe Int)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy
-> MethodSetting)
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 Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy
-> MethodSetting)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy
-> MethodSetting)
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
"cacheDataEncrypted")
Parser
(Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy
-> MethodSetting)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy
-> MethodSetting)
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 Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy
-> MethodSetting)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy
-> MethodSetting)
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
"requireAuthorizationForCacheControl")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy
-> MethodSetting)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy
-> MethodSetting)
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
"cachingEnabled")
Parser
(Maybe Bool
-> Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy
-> MethodSetting)
-> Parser (Maybe Bool)
-> Parser
(Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy -> MethodSetting)
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
"metricsEnabled")
Parser
(Maybe Double
-> Maybe UnauthorizedCacheControlHeaderStrategy -> MethodSetting)
-> Parser (Maybe Double)
-> Parser
(Maybe UnauthorizedCacheControlHeaderStrategy -> MethodSetting)
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 UnauthorizedCacheControlHeaderStrategy -> MethodSetting)
-> Parser (Maybe UnauthorizedCacheControlHeaderStrategy)
-> Parser MethodSetting
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
Object
-> Text -> Parser (Maybe UnauthorizedCacheControlHeaderStrategy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"unauthorizedCacheControlHeaderStrategy"
)
)
instance Prelude.Hashable MethodSetting
instance Prelude.NFData MethodSetting