{-# 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.Route53Resolver.UpdateFirewallRule
(
UpdateFirewallRule (..),
newUpdateFirewallRule,
updateFirewallRule_blockOverrideDnsType,
updateFirewallRule_priority,
updateFirewallRule_blockResponse,
updateFirewallRule_action,
updateFirewallRule_blockOverrideTtl,
updateFirewallRule_name,
updateFirewallRule_blockOverrideDomain,
updateFirewallRule_firewallRuleGroupId,
updateFirewallRule_firewallDomainListId,
UpdateFirewallRuleResponse (..),
newUpdateFirewallRuleResponse,
updateFirewallRuleResponse_firewallRule,
updateFirewallRuleResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Route53Resolver.Types
data UpdateFirewallRule = UpdateFirewallRule'
{
UpdateFirewallRule -> Maybe BlockOverrideDnsType
blockOverrideDnsType :: Prelude.Maybe BlockOverrideDnsType,
UpdateFirewallRule -> Maybe Int
priority :: Prelude.Maybe Prelude.Int,
UpdateFirewallRule -> Maybe BlockResponse
blockResponse :: Prelude.Maybe BlockResponse,
UpdateFirewallRule -> Maybe Action
action :: Prelude.Maybe Action,
UpdateFirewallRule -> Maybe Natural
blockOverrideTtl :: Prelude.Maybe Prelude.Natural,
UpdateFirewallRule -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
UpdateFirewallRule -> Maybe Text
blockOverrideDomain :: Prelude.Maybe Prelude.Text,
UpdateFirewallRule -> Text
firewallRuleGroupId :: Prelude.Text,
UpdateFirewallRule -> Text
firewallDomainListId :: Prelude.Text
}
deriving (UpdateFirewallRule -> UpdateFirewallRule -> Bool
(UpdateFirewallRule -> UpdateFirewallRule -> Bool)
-> (UpdateFirewallRule -> UpdateFirewallRule -> Bool)
-> Eq UpdateFirewallRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFirewallRule -> UpdateFirewallRule -> Bool
$c/= :: UpdateFirewallRule -> UpdateFirewallRule -> Bool
== :: UpdateFirewallRule -> UpdateFirewallRule -> Bool
$c== :: UpdateFirewallRule -> UpdateFirewallRule -> Bool
Prelude.Eq, ReadPrec [UpdateFirewallRule]
ReadPrec UpdateFirewallRule
Int -> ReadS UpdateFirewallRule
ReadS [UpdateFirewallRule]
(Int -> ReadS UpdateFirewallRule)
-> ReadS [UpdateFirewallRule]
-> ReadPrec UpdateFirewallRule
-> ReadPrec [UpdateFirewallRule]
-> Read UpdateFirewallRule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFirewallRule]
$creadListPrec :: ReadPrec [UpdateFirewallRule]
readPrec :: ReadPrec UpdateFirewallRule
$creadPrec :: ReadPrec UpdateFirewallRule
readList :: ReadS [UpdateFirewallRule]
$creadList :: ReadS [UpdateFirewallRule]
readsPrec :: Int -> ReadS UpdateFirewallRule
$creadsPrec :: Int -> ReadS UpdateFirewallRule
Prelude.Read, Int -> UpdateFirewallRule -> ShowS
[UpdateFirewallRule] -> ShowS
UpdateFirewallRule -> String
(Int -> UpdateFirewallRule -> ShowS)
-> (UpdateFirewallRule -> String)
-> ([UpdateFirewallRule] -> ShowS)
-> Show UpdateFirewallRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFirewallRule] -> ShowS
$cshowList :: [UpdateFirewallRule] -> ShowS
show :: UpdateFirewallRule -> String
$cshow :: UpdateFirewallRule -> String
showsPrec :: Int -> UpdateFirewallRule -> ShowS
$cshowsPrec :: Int -> UpdateFirewallRule -> ShowS
Prelude.Show, (forall x. UpdateFirewallRule -> Rep UpdateFirewallRule x)
-> (forall x. Rep UpdateFirewallRule x -> UpdateFirewallRule)
-> Generic UpdateFirewallRule
forall x. Rep UpdateFirewallRule x -> UpdateFirewallRule
forall x. UpdateFirewallRule -> Rep UpdateFirewallRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateFirewallRule x -> UpdateFirewallRule
$cfrom :: forall x. UpdateFirewallRule -> Rep UpdateFirewallRule x
Prelude.Generic)
newUpdateFirewallRule ::
Prelude.Text ->
Prelude.Text ->
UpdateFirewallRule
newUpdateFirewallRule :: Text -> Text -> UpdateFirewallRule
newUpdateFirewallRule
Text
pFirewallRuleGroupId_
Text
pFirewallDomainListId_ =
UpdateFirewallRule' :: Maybe BlockOverrideDnsType
-> Maybe Int
-> Maybe BlockResponse
-> Maybe Action
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> UpdateFirewallRule
UpdateFirewallRule'
{ $sel:blockOverrideDnsType:UpdateFirewallRule' :: Maybe BlockOverrideDnsType
blockOverrideDnsType =
Maybe BlockOverrideDnsType
forall a. Maybe a
Prelude.Nothing,
$sel:priority:UpdateFirewallRule' :: Maybe Int
priority = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:blockResponse:UpdateFirewallRule' :: Maybe BlockResponse
blockResponse = Maybe BlockResponse
forall a. Maybe a
Prelude.Nothing,
$sel:action:UpdateFirewallRule' :: Maybe Action
action = Maybe Action
forall a. Maybe a
Prelude.Nothing,
$sel:blockOverrideTtl:UpdateFirewallRule' :: Maybe Natural
blockOverrideTtl = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:name:UpdateFirewallRule' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:blockOverrideDomain:UpdateFirewallRule' :: Maybe Text
blockOverrideDomain = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:firewallRuleGroupId:UpdateFirewallRule' :: Text
firewallRuleGroupId = Text
pFirewallRuleGroupId_,
$sel:firewallDomainListId:UpdateFirewallRule' :: Text
firewallDomainListId = Text
pFirewallDomainListId_
}
updateFirewallRule_blockOverrideDnsType :: Lens.Lens' UpdateFirewallRule (Prelude.Maybe BlockOverrideDnsType)
updateFirewallRule_blockOverrideDnsType :: (Maybe BlockOverrideDnsType -> f (Maybe BlockOverrideDnsType))
-> UpdateFirewallRule -> f UpdateFirewallRule
updateFirewallRule_blockOverrideDnsType = (UpdateFirewallRule -> Maybe BlockOverrideDnsType)
-> (UpdateFirewallRule
-> Maybe BlockOverrideDnsType -> UpdateFirewallRule)
-> Lens
UpdateFirewallRule
UpdateFirewallRule
(Maybe BlockOverrideDnsType)
(Maybe BlockOverrideDnsType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallRule' {Maybe BlockOverrideDnsType
blockOverrideDnsType :: Maybe BlockOverrideDnsType
$sel:blockOverrideDnsType:UpdateFirewallRule' :: UpdateFirewallRule -> Maybe BlockOverrideDnsType
blockOverrideDnsType} -> Maybe BlockOverrideDnsType
blockOverrideDnsType) (\s :: UpdateFirewallRule
s@UpdateFirewallRule' {} Maybe BlockOverrideDnsType
a -> UpdateFirewallRule
s {$sel:blockOverrideDnsType:UpdateFirewallRule' :: Maybe BlockOverrideDnsType
blockOverrideDnsType = Maybe BlockOverrideDnsType
a} :: UpdateFirewallRule)
updateFirewallRule_priority :: Lens.Lens' UpdateFirewallRule (Prelude.Maybe Prelude.Int)
updateFirewallRule_priority :: (Maybe Int -> f (Maybe Int))
-> UpdateFirewallRule -> f UpdateFirewallRule
updateFirewallRule_priority = (UpdateFirewallRule -> Maybe Int)
-> (UpdateFirewallRule -> Maybe Int -> UpdateFirewallRule)
-> Lens
UpdateFirewallRule UpdateFirewallRule (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallRule' {Maybe Int
priority :: Maybe Int
$sel:priority:UpdateFirewallRule' :: UpdateFirewallRule -> Maybe Int
priority} -> Maybe Int
priority) (\s :: UpdateFirewallRule
s@UpdateFirewallRule' {} Maybe Int
a -> UpdateFirewallRule
s {$sel:priority:UpdateFirewallRule' :: Maybe Int
priority = Maybe Int
a} :: UpdateFirewallRule)
updateFirewallRule_blockResponse :: Lens.Lens' UpdateFirewallRule (Prelude.Maybe BlockResponse)
updateFirewallRule_blockResponse :: (Maybe BlockResponse -> f (Maybe BlockResponse))
-> UpdateFirewallRule -> f UpdateFirewallRule
updateFirewallRule_blockResponse = (UpdateFirewallRule -> Maybe BlockResponse)
-> (UpdateFirewallRule
-> Maybe BlockResponse -> UpdateFirewallRule)
-> Lens
UpdateFirewallRule
UpdateFirewallRule
(Maybe BlockResponse)
(Maybe BlockResponse)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallRule' {Maybe BlockResponse
blockResponse :: Maybe BlockResponse
$sel:blockResponse:UpdateFirewallRule' :: UpdateFirewallRule -> Maybe BlockResponse
blockResponse} -> Maybe BlockResponse
blockResponse) (\s :: UpdateFirewallRule
s@UpdateFirewallRule' {} Maybe BlockResponse
a -> UpdateFirewallRule
s {$sel:blockResponse:UpdateFirewallRule' :: Maybe BlockResponse
blockResponse = Maybe BlockResponse
a} :: UpdateFirewallRule)
updateFirewallRule_action :: Lens.Lens' UpdateFirewallRule (Prelude.Maybe Action)
updateFirewallRule_action :: (Maybe Action -> f (Maybe Action))
-> UpdateFirewallRule -> f UpdateFirewallRule
updateFirewallRule_action = (UpdateFirewallRule -> Maybe Action)
-> (UpdateFirewallRule -> Maybe Action -> UpdateFirewallRule)
-> Lens
UpdateFirewallRule UpdateFirewallRule (Maybe Action) (Maybe Action)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallRule' {Maybe Action
action :: Maybe Action
$sel:action:UpdateFirewallRule' :: UpdateFirewallRule -> Maybe Action
action} -> Maybe Action
action) (\s :: UpdateFirewallRule
s@UpdateFirewallRule' {} Maybe Action
a -> UpdateFirewallRule
s {$sel:action:UpdateFirewallRule' :: Maybe Action
action = Maybe Action
a} :: UpdateFirewallRule)
updateFirewallRule_blockOverrideTtl :: Lens.Lens' UpdateFirewallRule (Prelude.Maybe Prelude.Natural)
updateFirewallRule_blockOverrideTtl :: (Maybe Natural -> f (Maybe Natural))
-> UpdateFirewallRule -> f UpdateFirewallRule
updateFirewallRule_blockOverrideTtl = (UpdateFirewallRule -> Maybe Natural)
-> (UpdateFirewallRule -> Maybe Natural -> UpdateFirewallRule)
-> Lens
UpdateFirewallRule
UpdateFirewallRule
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallRule' {Maybe Natural
blockOverrideTtl :: Maybe Natural
$sel:blockOverrideTtl:UpdateFirewallRule' :: UpdateFirewallRule -> Maybe Natural
blockOverrideTtl} -> Maybe Natural
blockOverrideTtl) (\s :: UpdateFirewallRule
s@UpdateFirewallRule' {} Maybe Natural
a -> UpdateFirewallRule
s {$sel:blockOverrideTtl:UpdateFirewallRule' :: Maybe Natural
blockOverrideTtl = Maybe Natural
a} :: UpdateFirewallRule)
updateFirewallRule_name :: Lens.Lens' UpdateFirewallRule (Prelude.Maybe Prelude.Text)
updateFirewallRule_name :: (Maybe Text -> f (Maybe Text))
-> UpdateFirewallRule -> f UpdateFirewallRule
updateFirewallRule_name = (UpdateFirewallRule -> Maybe Text)
-> (UpdateFirewallRule -> Maybe Text -> UpdateFirewallRule)
-> Lens
UpdateFirewallRule UpdateFirewallRule (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallRule' {Maybe Text
name :: Maybe Text
$sel:name:UpdateFirewallRule' :: UpdateFirewallRule -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateFirewallRule
s@UpdateFirewallRule' {} Maybe Text
a -> UpdateFirewallRule
s {$sel:name:UpdateFirewallRule' :: Maybe Text
name = Maybe Text
a} :: UpdateFirewallRule)
updateFirewallRule_blockOverrideDomain :: Lens.Lens' UpdateFirewallRule (Prelude.Maybe Prelude.Text)
updateFirewallRule_blockOverrideDomain :: (Maybe Text -> f (Maybe Text))
-> UpdateFirewallRule -> f UpdateFirewallRule
updateFirewallRule_blockOverrideDomain = (UpdateFirewallRule -> Maybe Text)
-> (UpdateFirewallRule -> Maybe Text -> UpdateFirewallRule)
-> Lens
UpdateFirewallRule UpdateFirewallRule (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallRule' {Maybe Text
blockOverrideDomain :: Maybe Text
$sel:blockOverrideDomain:UpdateFirewallRule' :: UpdateFirewallRule -> Maybe Text
blockOverrideDomain} -> Maybe Text
blockOverrideDomain) (\s :: UpdateFirewallRule
s@UpdateFirewallRule' {} Maybe Text
a -> UpdateFirewallRule
s {$sel:blockOverrideDomain:UpdateFirewallRule' :: Maybe Text
blockOverrideDomain = Maybe Text
a} :: UpdateFirewallRule)
updateFirewallRule_firewallRuleGroupId :: Lens.Lens' UpdateFirewallRule Prelude.Text
updateFirewallRule_firewallRuleGroupId :: (Text -> f Text) -> UpdateFirewallRule -> f UpdateFirewallRule
updateFirewallRule_firewallRuleGroupId = (UpdateFirewallRule -> Text)
-> (UpdateFirewallRule -> Text -> UpdateFirewallRule)
-> Lens UpdateFirewallRule UpdateFirewallRule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallRule' {Text
firewallRuleGroupId :: Text
$sel:firewallRuleGroupId:UpdateFirewallRule' :: UpdateFirewallRule -> Text
firewallRuleGroupId} -> Text
firewallRuleGroupId) (\s :: UpdateFirewallRule
s@UpdateFirewallRule' {} Text
a -> UpdateFirewallRule
s {$sel:firewallRuleGroupId:UpdateFirewallRule' :: Text
firewallRuleGroupId = Text
a} :: UpdateFirewallRule)
updateFirewallRule_firewallDomainListId :: Lens.Lens' UpdateFirewallRule Prelude.Text
updateFirewallRule_firewallDomainListId :: (Text -> f Text) -> UpdateFirewallRule -> f UpdateFirewallRule
updateFirewallRule_firewallDomainListId = (UpdateFirewallRule -> Text)
-> (UpdateFirewallRule -> Text -> UpdateFirewallRule)
-> Lens UpdateFirewallRule UpdateFirewallRule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallRule' {Text
firewallDomainListId :: Text
$sel:firewallDomainListId:UpdateFirewallRule' :: UpdateFirewallRule -> Text
firewallDomainListId} -> Text
firewallDomainListId) (\s :: UpdateFirewallRule
s@UpdateFirewallRule' {} Text
a -> UpdateFirewallRule
s {$sel:firewallDomainListId:UpdateFirewallRule' :: Text
firewallDomainListId = Text
a} :: UpdateFirewallRule)
instance Core.AWSRequest UpdateFirewallRule where
type
AWSResponse UpdateFirewallRule =
UpdateFirewallRuleResponse
request :: UpdateFirewallRule -> Request UpdateFirewallRule
request = Service -> UpdateFirewallRule -> Request UpdateFirewallRule
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateFirewallRule
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateFirewallRule)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateFirewallRule))
-> Logger
-> Service
-> Proxy UpdateFirewallRule
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateFirewallRule)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe FirewallRule -> Int -> UpdateFirewallRuleResponse
UpdateFirewallRuleResponse'
(Maybe FirewallRule -> Int -> UpdateFirewallRuleResponse)
-> Either String (Maybe FirewallRule)
-> Either String (Int -> UpdateFirewallRuleResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe FirewallRule)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FirewallRule")
Either String (Int -> UpdateFirewallRuleResponse)
-> Either String Int -> Either String UpdateFirewallRuleResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable UpdateFirewallRule
instance Prelude.NFData UpdateFirewallRule
instance Core.ToHeaders UpdateFirewallRule where
toHeaders :: UpdateFirewallRule -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateFirewallRule -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Route53Resolver.UpdateFirewallRule" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON UpdateFirewallRule where
toJSON :: UpdateFirewallRule -> Value
toJSON UpdateFirewallRule' {Maybe Int
Maybe Natural
Maybe Text
Maybe Action
Maybe BlockOverrideDnsType
Maybe BlockResponse
Text
firewallDomainListId :: Text
firewallRuleGroupId :: Text
blockOverrideDomain :: Maybe Text
name :: Maybe Text
blockOverrideTtl :: Maybe Natural
action :: Maybe Action
blockResponse :: Maybe BlockResponse
priority :: Maybe Int
blockOverrideDnsType :: Maybe BlockOverrideDnsType
$sel:firewallDomainListId:UpdateFirewallRule' :: UpdateFirewallRule -> Text
$sel:firewallRuleGroupId:UpdateFirewallRule' :: UpdateFirewallRule -> Text
$sel:blockOverrideDomain:UpdateFirewallRule' :: UpdateFirewallRule -> Maybe Text
$sel:name:UpdateFirewallRule' :: UpdateFirewallRule -> Maybe Text
$sel:blockOverrideTtl:UpdateFirewallRule' :: UpdateFirewallRule -> Maybe Natural
$sel:action:UpdateFirewallRule' :: UpdateFirewallRule -> Maybe Action
$sel:blockResponse:UpdateFirewallRule' :: UpdateFirewallRule -> Maybe BlockResponse
$sel:priority:UpdateFirewallRule' :: UpdateFirewallRule -> Maybe Int
$sel:blockOverrideDnsType:UpdateFirewallRule' :: UpdateFirewallRule -> Maybe BlockOverrideDnsType
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"BlockOverrideDnsType" Text -> BlockOverrideDnsType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(BlockOverrideDnsType -> Pair)
-> Maybe BlockOverrideDnsType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BlockOverrideDnsType
blockOverrideDnsType,
(Text
"Priority" 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
priority,
(Text
"BlockResponse" Text -> BlockResponse -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (BlockResponse -> Pair) -> Maybe BlockResponse -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BlockResponse
blockResponse,
(Text
"Action" Text -> Action -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Action -> Pair) -> Maybe Action -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Action
action,
(Text
"BlockOverrideTtl" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
blockOverrideTtl,
(Text
"Name" 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
name,
(Text
"BlockOverrideDomain" 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
blockOverrideDomain,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"FirewallRuleGroupId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
firewallRuleGroupId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"FirewallDomainListId"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
firewallDomainListId
)
]
)
instance Core.ToPath UpdateFirewallRule where
toPath :: UpdateFirewallRule -> ByteString
toPath = ByteString -> UpdateFirewallRule -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateFirewallRule where
toQuery :: UpdateFirewallRule -> QueryString
toQuery = QueryString -> UpdateFirewallRule -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateFirewallRuleResponse = UpdateFirewallRuleResponse'
{
UpdateFirewallRuleResponse -> Maybe FirewallRule
firewallRule :: Prelude.Maybe FirewallRule,
UpdateFirewallRuleResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateFirewallRuleResponse -> UpdateFirewallRuleResponse -> Bool
(UpdateFirewallRuleResponse -> UpdateFirewallRuleResponse -> Bool)
-> (UpdateFirewallRuleResponse
-> UpdateFirewallRuleResponse -> Bool)
-> Eq UpdateFirewallRuleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFirewallRuleResponse -> UpdateFirewallRuleResponse -> Bool
$c/= :: UpdateFirewallRuleResponse -> UpdateFirewallRuleResponse -> Bool
== :: UpdateFirewallRuleResponse -> UpdateFirewallRuleResponse -> Bool
$c== :: UpdateFirewallRuleResponse -> UpdateFirewallRuleResponse -> Bool
Prelude.Eq, ReadPrec [UpdateFirewallRuleResponse]
ReadPrec UpdateFirewallRuleResponse
Int -> ReadS UpdateFirewallRuleResponse
ReadS [UpdateFirewallRuleResponse]
(Int -> ReadS UpdateFirewallRuleResponse)
-> ReadS [UpdateFirewallRuleResponse]
-> ReadPrec UpdateFirewallRuleResponse
-> ReadPrec [UpdateFirewallRuleResponse]
-> Read UpdateFirewallRuleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFirewallRuleResponse]
$creadListPrec :: ReadPrec [UpdateFirewallRuleResponse]
readPrec :: ReadPrec UpdateFirewallRuleResponse
$creadPrec :: ReadPrec UpdateFirewallRuleResponse
readList :: ReadS [UpdateFirewallRuleResponse]
$creadList :: ReadS [UpdateFirewallRuleResponse]
readsPrec :: Int -> ReadS UpdateFirewallRuleResponse
$creadsPrec :: Int -> ReadS UpdateFirewallRuleResponse
Prelude.Read, Int -> UpdateFirewallRuleResponse -> ShowS
[UpdateFirewallRuleResponse] -> ShowS
UpdateFirewallRuleResponse -> String
(Int -> UpdateFirewallRuleResponse -> ShowS)
-> (UpdateFirewallRuleResponse -> String)
-> ([UpdateFirewallRuleResponse] -> ShowS)
-> Show UpdateFirewallRuleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFirewallRuleResponse] -> ShowS
$cshowList :: [UpdateFirewallRuleResponse] -> ShowS
show :: UpdateFirewallRuleResponse -> String
$cshow :: UpdateFirewallRuleResponse -> String
showsPrec :: Int -> UpdateFirewallRuleResponse -> ShowS
$cshowsPrec :: Int -> UpdateFirewallRuleResponse -> ShowS
Prelude.Show, (forall x.
UpdateFirewallRuleResponse -> Rep UpdateFirewallRuleResponse x)
-> (forall x.
Rep UpdateFirewallRuleResponse x -> UpdateFirewallRuleResponse)
-> Generic UpdateFirewallRuleResponse
forall x.
Rep UpdateFirewallRuleResponse x -> UpdateFirewallRuleResponse
forall x.
UpdateFirewallRuleResponse -> Rep UpdateFirewallRuleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateFirewallRuleResponse x -> UpdateFirewallRuleResponse
$cfrom :: forall x.
UpdateFirewallRuleResponse -> Rep UpdateFirewallRuleResponse x
Prelude.Generic)
newUpdateFirewallRuleResponse ::
Prelude.Int ->
UpdateFirewallRuleResponse
newUpdateFirewallRuleResponse :: Int -> UpdateFirewallRuleResponse
newUpdateFirewallRuleResponse Int
pHttpStatus_ =
UpdateFirewallRuleResponse' :: Maybe FirewallRule -> Int -> UpdateFirewallRuleResponse
UpdateFirewallRuleResponse'
{ $sel:firewallRule:UpdateFirewallRuleResponse' :: Maybe FirewallRule
firewallRule =
Maybe FirewallRule
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateFirewallRuleResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateFirewallRuleResponse_firewallRule :: Lens.Lens' UpdateFirewallRuleResponse (Prelude.Maybe FirewallRule)
updateFirewallRuleResponse_firewallRule :: (Maybe FirewallRule -> f (Maybe FirewallRule))
-> UpdateFirewallRuleResponse -> f UpdateFirewallRuleResponse
updateFirewallRuleResponse_firewallRule = (UpdateFirewallRuleResponse -> Maybe FirewallRule)
-> (UpdateFirewallRuleResponse
-> Maybe FirewallRule -> UpdateFirewallRuleResponse)
-> Lens
UpdateFirewallRuleResponse
UpdateFirewallRuleResponse
(Maybe FirewallRule)
(Maybe FirewallRule)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallRuleResponse' {Maybe FirewallRule
firewallRule :: Maybe FirewallRule
$sel:firewallRule:UpdateFirewallRuleResponse' :: UpdateFirewallRuleResponse -> Maybe FirewallRule
firewallRule} -> Maybe FirewallRule
firewallRule) (\s :: UpdateFirewallRuleResponse
s@UpdateFirewallRuleResponse' {} Maybe FirewallRule
a -> UpdateFirewallRuleResponse
s {$sel:firewallRule:UpdateFirewallRuleResponse' :: Maybe FirewallRule
firewallRule = Maybe FirewallRule
a} :: UpdateFirewallRuleResponse)
updateFirewallRuleResponse_httpStatus :: Lens.Lens' UpdateFirewallRuleResponse Prelude.Int
updateFirewallRuleResponse_httpStatus :: (Int -> f Int)
-> UpdateFirewallRuleResponse -> f UpdateFirewallRuleResponse
updateFirewallRuleResponse_httpStatus = (UpdateFirewallRuleResponse -> Int)
-> (UpdateFirewallRuleResponse
-> Int -> UpdateFirewallRuleResponse)
-> Lens
UpdateFirewallRuleResponse UpdateFirewallRuleResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallRuleResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateFirewallRuleResponse' :: UpdateFirewallRuleResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateFirewallRuleResponse
s@UpdateFirewallRuleResponse' {} Int
a -> UpdateFirewallRuleResponse
s {$sel:httpStatus:UpdateFirewallRuleResponse' :: Int
httpStatus = Int
a} :: UpdateFirewallRuleResponse)
instance Prelude.NFData UpdateFirewallRuleResponse