{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.WAFV2.UpdateWebACL
(
UpdateWebACL (..),
newUpdateWebACL,
updateWebACL_captchaConfig,
updateWebACL_challengeConfig,
updateWebACL_customResponseBodies,
updateWebACL_description,
updateWebACL_rules,
updateWebACL_tokenDomains,
updateWebACL_name,
updateWebACL_scope,
updateWebACL_id,
updateWebACL_defaultAction,
updateWebACL_visibilityConfig,
updateWebACL_lockToken,
UpdateWebACLResponse (..),
newUpdateWebACLResponse,
updateWebACLResponse_nextLockToken,
updateWebACLResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.WAFV2.Types
data UpdateWebACL = UpdateWebACL'
{
UpdateWebACL -> Maybe CaptchaConfig
captchaConfig :: Prelude.Maybe CaptchaConfig,
UpdateWebACL -> Maybe ChallengeConfig
challengeConfig :: Prelude.Maybe ChallengeConfig,
UpdateWebACL -> Maybe (HashMap Text CustomResponseBody)
customResponseBodies :: Prelude.Maybe (Prelude.HashMap Prelude.Text CustomResponseBody),
UpdateWebACL -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
UpdateWebACL -> Maybe [Rule]
rules :: Prelude.Maybe [Rule],
UpdateWebACL -> Maybe (NonEmpty Text)
tokenDomains :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
UpdateWebACL -> Text
name :: Prelude.Text,
UpdateWebACL -> Scope
scope :: Scope,
UpdateWebACL -> Text
id :: Prelude.Text,
UpdateWebACL -> DefaultAction
defaultAction :: DefaultAction,
UpdateWebACL -> VisibilityConfig
visibilityConfig :: VisibilityConfig,
UpdateWebACL -> Text
lockToken :: Prelude.Text
}
deriving (UpdateWebACL -> UpdateWebACL -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateWebACL -> UpdateWebACL -> Bool
$c/= :: UpdateWebACL -> UpdateWebACL -> Bool
== :: UpdateWebACL -> UpdateWebACL -> Bool
$c== :: UpdateWebACL -> UpdateWebACL -> Bool
Prelude.Eq, ReadPrec [UpdateWebACL]
ReadPrec UpdateWebACL
Int -> ReadS UpdateWebACL
ReadS [UpdateWebACL]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateWebACL]
$creadListPrec :: ReadPrec [UpdateWebACL]
readPrec :: ReadPrec UpdateWebACL
$creadPrec :: ReadPrec UpdateWebACL
readList :: ReadS [UpdateWebACL]
$creadList :: ReadS [UpdateWebACL]
readsPrec :: Int -> ReadS UpdateWebACL
$creadsPrec :: Int -> ReadS UpdateWebACL
Prelude.Read, Int -> UpdateWebACL -> ShowS
[UpdateWebACL] -> ShowS
UpdateWebACL -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateWebACL] -> ShowS
$cshowList :: [UpdateWebACL] -> ShowS
show :: UpdateWebACL -> String
$cshow :: UpdateWebACL -> String
showsPrec :: Int -> UpdateWebACL -> ShowS
$cshowsPrec :: Int -> UpdateWebACL -> ShowS
Prelude.Show, forall x. Rep UpdateWebACL x -> UpdateWebACL
forall x. UpdateWebACL -> Rep UpdateWebACL x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateWebACL x -> UpdateWebACL
$cfrom :: forall x. UpdateWebACL -> Rep UpdateWebACL x
Prelude.Generic)
newUpdateWebACL ::
Prelude.Text ->
Scope ->
Prelude.Text ->
DefaultAction ->
VisibilityConfig ->
Prelude.Text ->
UpdateWebACL
newUpdateWebACL :: Text
-> Scope
-> Text
-> DefaultAction
-> VisibilityConfig
-> Text
-> UpdateWebACL
newUpdateWebACL
Text
pName_
Scope
pScope_
Text
pId_
DefaultAction
pDefaultAction_
VisibilityConfig
pVisibilityConfig_
Text
pLockToken_ =
UpdateWebACL'
{ $sel:captchaConfig:UpdateWebACL' :: Maybe CaptchaConfig
captchaConfig = forall a. Maybe a
Prelude.Nothing,
$sel:challengeConfig:UpdateWebACL' :: Maybe ChallengeConfig
challengeConfig = forall a. Maybe a
Prelude.Nothing,
$sel:customResponseBodies:UpdateWebACL' :: Maybe (HashMap Text CustomResponseBody)
customResponseBodies = forall a. Maybe a
Prelude.Nothing,
$sel:description:UpdateWebACL' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:rules:UpdateWebACL' :: Maybe [Rule]
rules = forall a. Maybe a
Prelude.Nothing,
$sel:tokenDomains:UpdateWebACL' :: Maybe (NonEmpty Text)
tokenDomains = forall a. Maybe a
Prelude.Nothing,
$sel:name:UpdateWebACL' :: Text
name = Text
pName_,
$sel:scope:UpdateWebACL' :: Scope
scope = Scope
pScope_,
$sel:id:UpdateWebACL' :: Text
id = Text
pId_,
$sel:defaultAction:UpdateWebACL' :: DefaultAction
defaultAction = DefaultAction
pDefaultAction_,
$sel:visibilityConfig:UpdateWebACL' :: VisibilityConfig
visibilityConfig = VisibilityConfig
pVisibilityConfig_,
$sel:lockToken:UpdateWebACL' :: Text
lockToken = Text
pLockToken_
}
updateWebACL_captchaConfig :: Lens.Lens' UpdateWebACL (Prelude.Maybe CaptchaConfig)
updateWebACL_captchaConfig :: Lens' UpdateWebACL (Maybe CaptchaConfig)
updateWebACL_captchaConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWebACL' {Maybe CaptchaConfig
captchaConfig :: Maybe CaptchaConfig
$sel:captchaConfig:UpdateWebACL' :: UpdateWebACL -> Maybe CaptchaConfig
captchaConfig} -> Maybe CaptchaConfig
captchaConfig) (\s :: UpdateWebACL
s@UpdateWebACL' {} Maybe CaptchaConfig
a -> UpdateWebACL
s {$sel:captchaConfig:UpdateWebACL' :: Maybe CaptchaConfig
captchaConfig = Maybe CaptchaConfig
a} :: UpdateWebACL)
updateWebACL_challengeConfig :: Lens.Lens' UpdateWebACL (Prelude.Maybe ChallengeConfig)
updateWebACL_challengeConfig :: Lens' UpdateWebACL (Maybe ChallengeConfig)
updateWebACL_challengeConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWebACL' {Maybe ChallengeConfig
challengeConfig :: Maybe ChallengeConfig
$sel:challengeConfig:UpdateWebACL' :: UpdateWebACL -> Maybe ChallengeConfig
challengeConfig} -> Maybe ChallengeConfig
challengeConfig) (\s :: UpdateWebACL
s@UpdateWebACL' {} Maybe ChallengeConfig
a -> UpdateWebACL
s {$sel:challengeConfig:UpdateWebACL' :: Maybe ChallengeConfig
challengeConfig = Maybe ChallengeConfig
a} :: UpdateWebACL)
updateWebACL_customResponseBodies :: Lens.Lens' UpdateWebACL (Prelude.Maybe (Prelude.HashMap Prelude.Text CustomResponseBody))
updateWebACL_customResponseBodies :: Lens' UpdateWebACL (Maybe (HashMap Text CustomResponseBody))
updateWebACL_customResponseBodies = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWebACL' {Maybe (HashMap Text CustomResponseBody)
customResponseBodies :: Maybe (HashMap Text CustomResponseBody)
$sel:customResponseBodies:UpdateWebACL' :: UpdateWebACL -> Maybe (HashMap Text CustomResponseBody)
customResponseBodies} -> Maybe (HashMap Text CustomResponseBody)
customResponseBodies) (\s :: UpdateWebACL
s@UpdateWebACL' {} Maybe (HashMap Text CustomResponseBody)
a -> UpdateWebACL
s {$sel:customResponseBodies:UpdateWebACL' :: Maybe (HashMap Text CustomResponseBody)
customResponseBodies = Maybe (HashMap Text CustomResponseBody)
a} :: UpdateWebACL) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateWebACL_description :: Lens.Lens' UpdateWebACL (Prelude.Maybe Prelude.Text)
updateWebACL_description :: Lens' UpdateWebACL (Maybe Text)
updateWebACL_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWebACL' {Maybe Text
description :: Maybe Text
$sel:description:UpdateWebACL' :: UpdateWebACL -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateWebACL
s@UpdateWebACL' {} Maybe Text
a -> UpdateWebACL
s {$sel:description:UpdateWebACL' :: Maybe Text
description = Maybe Text
a} :: UpdateWebACL)
updateWebACL_rules :: Lens.Lens' UpdateWebACL (Prelude.Maybe [Rule])
updateWebACL_rules :: Lens' UpdateWebACL (Maybe [Rule])
updateWebACL_rules = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWebACL' {Maybe [Rule]
rules :: Maybe [Rule]
$sel:rules:UpdateWebACL' :: UpdateWebACL -> Maybe [Rule]
rules} -> Maybe [Rule]
rules) (\s :: UpdateWebACL
s@UpdateWebACL' {} Maybe [Rule]
a -> UpdateWebACL
s {$sel:rules:UpdateWebACL' :: Maybe [Rule]
rules = Maybe [Rule]
a} :: UpdateWebACL) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateWebACL_tokenDomains :: Lens.Lens' UpdateWebACL (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
updateWebACL_tokenDomains :: Lens' UpdateWebACL (Maybe (NonEmpty Text))
updateWebACL_tokenDomains = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWebACL' {Maybe (NonEmpty Text)
tokenDomains :: Maybe (NonEmpty Text)
$sel:tokenDomains:UpdateWebACL' :: UpdateWebACL -> Maybe (NonEmpty Text)
tokenDomains} -> Maybe (NonEmpty Text)
tokenDomains) (\s :: UpdateWebACL
s@UpdateWebACL' {} Maybe (NonEmpty Text)
a -> UpdateWebACL
s {$sel:tokenDomains:UpdateWebACL' :: Maybe (NonEmpty Text)
tokenDomains = Maybe (NonEmpty Text)
a} :: UpdateWebACL) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateWebACL_name :: Lens.Lens' UpdateWebACL Prelude.Text
updateWebACL_name :: Lens' UpdateWebACL Text
updateWebACL_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWebACL' {Text
name :: Text
$sel:name:UpdateWebACL' :: UpdateWebACL -> Text
name} -> Text
name) (\s :: UpdateWebACL
s@UpdateWebACL' {} Text
a -> UpdateWebACL
s {$sel:name:UpdateWebACL' :: Text
name = Text
a} :: UpdateWebACL)
updateWebACL_scope :: Lens.Lens' UpdateWebACL Scope
updateWebACL_scope :: Lens' UpdateWebACL Scope
updateWebACL_scope = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWebACL' {Scope
scope :: Scope
$sel:scope:UpdateWebACL' :: UpdateWebACL -> Scope
scope} -> Scope
scope) (\s :: UpdateWebACL
s@UpdateWebACL' {} Scope
a -> UpdateWebACL
s {$sel:scope:UpdateWebACL' :: Scope
scope = Scope
a} :: UpdateWebACL)
updateWebACL_id :: Lens.Lens' UpdateWebACL Prelude.Text
updateWebACL_id :: Lens' UpdateWebACL Text
updateWebACL_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWebACL' {Text
id :: Text
$sel:id:UpdateWebACL' :: UpdateWebACL -> Text
id} -> Text
id) (\s :: UpdateWebACL
s@UpdateWebACL' {} Text
a -> UpdateWebACL
s {$sel:id:UpdateWebACL' :: Text
id = Text
a} :: UpdateWebACL)
updateWebACL_defaultAction :: Lens.Lens' UpdateWebACL DefaultAction
updateWebACL_defaultAction :: Lens' UpdateWebACL DefaultAction
updateWebACL_defaultAction = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWebACL' {DefaultAction
defaultAction :: DefaultAction
$sel:defaultAction:UpdateWebACL' :: UpdateWebACL -> DefaultAction
defaultAction} -> DefaultAction
defaultAction) (\s :: UpdateWebACL
s@UpdateWebACL' {} DefaultAction
a -> UpdateWebACL
s {$sel:defaultAction:UpdateWebACL' :: DefaultAction
defaultAction = DefaultAction
a} :: UpdateWebACL)
updateWebACL_visibilityConfig :: Lens.Lens' UpdateWebACL VisibilityConfig
updateWebACL_visibilityConfig :: Lens' UpdateWebACL VisibilityConfig
updateWebACL_visibilityConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWebACL' {VisibilityConfig
visibilityConfig :: VisibilityConfig
$sel:visibilityConfig:UpdateWebACL' :: UpdateWebACL -> VisibilityConfig
visibilityConfig} -> VisibilityConfig
visibilityConfig) (\s :: UpdateWebACL
s@UpdateWebACL' {} VisibilityConfig
a -> UpdateWebACL
s {$sel:visibilityConfig:UpdateWebACL' :: VisibilityConfig
visibilityConfig = VisibilityConfig
a} :: UpdateWebACL)
updateWebACL_lockToken :: Lens.Lens' UpdateWebACL Prelude.Text
updateWebACL_lockToken :: Lens' UpdateWebACL Text
updateWebACL_lockToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWebACL' {Text
lockToken :: Text
$sel:lockToken:UpdateWebACL' :: UpdateWebACL -> Text
lockToken} -> Text
lockToken) (\s :: UpdateWebACL
s@UpdateWebACL' {} Text
a -> UpdateWebACL
s {$sel:lockToken:UpdateWebACL' :: Text
lockToken = Text
a} :: UpdateWebACL)
instance Core.AWSRequest UpdateWebACL where
type AWSResponse UpdateWebACL = UpdateWebACLResponse
request :: (Service -> Service) -> UpdateWebACL -> Request UpdateWebACL
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateWebACL
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateWebACL)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Int -> UpdateWebACLResponse
UpdateWebACLResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextLockToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable UpdateWebACL where
hashWithSalt :: Int -> UpdateWebACL -> Int
hashWithSalt Int
_salt UpdateWebACL' {Maybe [Rule]
Maybe (NonEmpty Text)
Maybe Text
Maybe (HashMap Text CustomResponseBody)
Maybe ChallengeConfig
Maybe CaptchaConfig
Text
DefaultAction
Scope
VisibilityConfig
lockToken :: Text
visibilityConfig :: VisibilityConfig
defaultAction :: DefaultAction
id :: Text
scope :: Scope
name :: Text
tokenDomains :: Maybe (NonEmpty Text)
rules :: Maybe [Rule]
description :: Maybe Text
customResponseBodies :: Maybe (HashMap Text CustomResponseBody)
challengeConfig :: Maybe ChallengeConfig
captchaConfig :: Maybe CaptchaConfig
$sel:lockToken:UpdateWebACL' :: UpdateWebACL -> Text
$sel:visibilityConfig:UpdateWebACL' :: UpdateWebACL -> VisibilityConfig
$sel:defaultAction:UpdateWebACL' :: UpdateWebACL -> DefaultAction
$sel:id:UpdateWebACL' :: UpdateWebACL -> Text
$sel:scope:UpdateWebACL' :: UpdateWebACL -> Scope
$sel:name:UpdateWebACL' :: UpdateWebACL -> Text
$sel:tokenDomains:UpdateWebACL' :: UpdateWebACL -> Maybe (NonEmpty Text)
$sel:rules:UpdateWebACL' :: UpdateWebACL -> Maybe [Rule]
$sel:description:UpdateWebACL' :: UpdateWebACL -> Maybe Text
$sel:customResponseBodies:UpdateWebACL' :: UpdateWebACL -> Maybe (HashMap Text CustomResponseBody)
$sel:challengeConfig:UpdateWebACL' :: UpdateWebACL -> Maybe ChallengeConfig
$sel:captchaConfig:UpdateWebACL' :: UpdateWebACL -> Maybe CaptchaConfig
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CaptchaConfig
captchaConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ChallengeConfig
challengeConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text CustomResponseBody)
customResponseBodies
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Rule]
rules
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
tokenDomains
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Scope
scope
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DefaultAction
defaultAction
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` VisibilityConfig
visibilityConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
lockToken
instance Prelude.NFData UpdateWebACL where
rnf :: UpdateWebACL -> ()
rnf UpdateWebACL' {Maybe [Rule]
Maybe (NonEmpty Text)
Maybe Text
Maybe (HashMap Text CustomResponseBody)
Maybe ChallengeConfig
Maybe CaptchaConfig
Text
DefaultAction
Scope
VisibilityConfig
lockToken :: Text
visibilityConfig :: VisibilityConfig
defaultAction :: DefaultAction
id :: Text
scope :: Scope
name :: Text
tokenDomains :: Maybe (NonEmpty Text)
rules :: Maybe [Rule]
description :: Maybe Text
customResponseBodies :: Maybe (HashMap Text CustomResponseBody)
challengeConfig :: Maybe ChallengeConfig
captchaConfig :: Maybe CaptchaConfig
$sel:lockToken:UpdateWebACL' :: UpdateWebACL -> Text
$sel:visibilityConfig:UpdateWebACL' :: UpdateWebACL -> VisibilityConfig
$sel:defaultAction:UpdateWebACL' :: UpdateWebACL -> DefaultAction
$sel:id:UpdateWebACL' :: UpdateWebACL -> Text
$sel:scope:UpdateWebACL' :: UpdateWebACL -> Scope
$sel:name:UpdateWebACL' :: UpdateWebACL -> Text
$sel:tokenDomains:UpdateWebACL' :: UpdateWebACL -> Maybe (NonEmpty Text)
$sel:rules:UpdateWebACL' :: UpdateWebACL -> Maybe [Rule]
$sel:description:UpdateWebACL' :: UpdateWebACL -> Maybe Text
$sel:customResponseBodies:UpdateWebACL' :: UpdateWebACL -> Maybe (HashMap Text CustomResponseBody)
$sel:challengeConfig:UpdateWebACL' :: UpdateWebACL -> Maybe ChallengeConfig
$sel:captchaConfig:UpdateWebACL' :: UpdateWebACL -> Maybe CaptchaConfig
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe CaptchaConfig
captchaConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ChallengeConfig
challengeConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text CustomResponseBody)
customResponseBodies
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Rule]
rules
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
tokenDomains
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Scope
scope
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DefaultAction
defaultAction
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf VisibilityConfig
visibilityConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
lockToken
instance Data.ToHeaders UpdateWebACL where
toHeaders :: UpdateWebACL -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AWSWAF_20190729.UpdateWebACL" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON UpdateWebACL where
toJSON :: UpdateWebACL -> Value
toJSON UpdateWebACL' {Maybe [Rule]
Maybe (NonEmpty Text)
Maybe Text
Maybe (HashMap Text CustomResponseBody)
Maybe ChallengeConfig
Maybe CaptchaConfig
Text
DefaultAction
Scope
VisibilityConfig
lockToken :: Text
visibilityConfig :: VisibilityConfig
defaultAction :: DefaultAction
id :: Text
scope :: Scope
name :: Text
tokenDomains :: Maybe (NonEmpty Text)
rules :: Maybe [Rule]
description :: Maybe Text
customResponseBodies :: Maybe (HashMap Text CustomResponseBody)
challengeConfig :: Maybe ChallengeConfig
captchaConfig :: Maybe CaptchaConfig
$sel:lockToken:UpdateWebACL' :: UpdateWebACL -> Text
$sel:visibilityConfig:UpdateWebACL' :: UpdateWebACL -> VisibilityConfig
$sel:defaultAction:UpdateWebACL' :: UpdateWebACL -> DefaultAction
$sel:id:UpdateWebACL' :: UpdateWebACL -> Text
$sel:scope:UpdateWebACL' :: UpdateWebACL -> Scope
$sel:name:UpdateWebACL' :: UpdateWebACL -> Text
$sel:tokenDomains:UpdateWebACL' :: UpdateWebACL -> Maybe (NonEmpty Text)
$sel:rules:UpdateWebACL' :: UpdateWebACL -> Maybe [Rule]
$sel:description:UpdateWebACL' :: UpdateWebACL -> Maybe Text
$sel:customResponseBodies:UpdateWebACL' :: UpdateWebACL -> Maybe (HashMap Text CustomResponseBody)
$sel:challengeConfig:UpdateWebACL' :: UpdateWebACL -> Maybe ChallengeConfig
$sel:captchaConfig:UpdateWebACL' :: UpdateWebACL -> Maybe CaptchaConfig
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"CaptchaConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CaptchaConfig
captchaConfig,
(Key
"ChallengeConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ChallengeConfig
challengeConfig,
(Key
"CustomResponseBodies" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text CustomResponseBody)
customResponseBodies,
(Key
"Description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Key
"Rules" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Rule]
rules,
(Key
"TokenDomains" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
tokenDomains,
forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
forall a. a -> Maybe a
Prelude.Just (Key
"Scope" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Scope
scope),
forall a. a -> Maybe a
Prelude.Just (Key
"Id" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
id),
forall a. a -> Maybe a
Prelude.Just (Key
"DefaultAction" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= DefaultAction
defaultAction),
forall a. a -> Maybe a
Prelude.Just
(Key
"VisibilityConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= VisibilityConfig
visibilityConfig),
forall a. a -> Maybe a
Prelude.Just (Key
"LockToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
lockToken)
]
)
instance Data.ToPath UpdateWebACL where
toPath :: UpdateWebACL -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery UpdateWebACL where
toQuery :: UpdateWebACL -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data UpdateWebACLResponse = UpdateWebACLResponse'
{
UpdateWebACLResponse -> Maybe Text
nextLockToken :: Prelude.Maybe Prelude.Text,
UpdateWebACLResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateWebACLResponse -> UpdateWebACLResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateWebACLResponse -> UpdateWebACLResponse -> Bool
$c/= :: UpdateWebACLResponse -> UpdateWebACLResponse -> Bool
== :: UpdateWebACLResponse -> UpdateWebACLResponse -> Bool
$c== :: UpdateWebACLResponse -> UpdateWebACLResponse -> Bool
Prelude.Eq, ReadPrec [UpdateWebACLResponse]
ReadPrec UpdateWebACLResponse
Int -> ReadS UpdateWebACLResponse
ReadS [UpdateWebACLResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateWebACLResponse]
$creadListPrec :: ReadPrec [UpdateWebACLResponse]
readPrec :: ReadPrec UpdateWebACLResponse
$creadPrec :: ReadPrec UpdateWebACLResponse
readList :: ReadS [UpdateWebACLResponse]
$creadList :: ReadS [UpdateWebACLResponse]
readsPrec :: Int -> ReadS UpdateWebACLResponse
$creadsPrec :: Int -> ReadS UpdateWebACLResponse
Prelude.Read, Int -> UpdateWebACLResponse -> ShowS
[UpdateWebACLResponse] -> ShowS
UpdateWebACLResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateWebACLResponse] -> ShowS
$cshowList :: [UpdateWebACLResponse] -> ShowS
show :: UpdateWebACLResponse -> String
$cshow :: UpdateWebACLResponse -> String
showsPrec :: Int -> UpdateWebACLResponse -> ShowS
$cshowsPrec :: Int -> UpdateWebACLResponse -> ShowS
Prelude.Show, forall x. Rep UpdateWebACLResponse x -> UpdateWebACLResponse
forall x. UpdateWebACLResponse -> Rep UpdateWebACLResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateWebACLResponse x -> UpdateWebACLResponse
$cfrom :: forall x. UpdateWebACLResponse -> Rep UpdateWebACLResponse x
Prelude.Generic)
newUpdateWebACLResponse ::
Prelude.Int ->
UpdateWebACLResponse
newUpdateWebACLResponse :: Int -> UpdateWebACLResponse
newUpdateWebACLResponse Int
pHttpStatus_ =
UpdateWebACLResponse'
{ $sel:nextLockToken:UpdateWebACLResponse' :: Maybe Text
nextLockToken =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateWebACLResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateWebACLResponse_nextLockToken :: Lens.Lens' UpdateWebACLResponse (Prelude.Maybe Prelude.Text)
updateWebACLResponse_nextLockToken :: Lens' UpdateWebACLResponse (Maybe Text)
updateWebACLResponse_nextLockToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWebACLResponse' {Maybe Text
nextLockToken :: Maybe Text
$sel:nextLockToken:UpdateWebACLResponse' :: UpdateWebACLResponse -> Maybe Text
nextLockToken} -> Maybe Text
nextLockToken) (\s :: UpdateWebACLResponse
s@UpdateWebACLResponse' {} Maybe Text
a -> UpdateWebACLResponse
s {$sel:nextLockToken:UpdateWebACLResponse' :: Maybe Text
nextLockToken = Maybe Text
a} :: UpdateWebACLResponse)
updateWebACLResponse_httpStatus :: Lens.Lens' UpdateWebACLResponse Prelude.Int
updateWebACLResponse_httpStatus :: Lens' UpdateWebACLResponse Int
updateWebACLResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWebACLResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateWebACLResponse' :: UpdateWebACLResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateWebACLResponse
s@UpdateWebACLResponse' {} Int
a -> UpdateWebACLResponse
s {$sel:httpStatus:UpdateWebACLResponse' :: Int
httpStatus = Int
a} :: UpdateWebACLResponse)
instance Prelude.NFData UpdateWebACLResponse where
rnf :: UpdateWebACLResponse -> ()
rnf UpdateWebACLResponse' {Int
Maybe Text
httpStatus :: Int
nextLockToken :: Maybe Text
$sel:httpStatus:UpdateWebACLResponse' :: UpdateWebACLResponse -> Int
$sel:nextLockToken:UpdateWebACLResponse' :: UpdateWebACLResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextLockToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus