{-# 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.AssociateFirewallRuleGroup
(
AssociateFirewallRuleGroup (..),
newAssociateFirewallRuleGroup,
associateFirewallRuleGroup_mutationProtection,
associateFirewallRuleGroup_tags,
associateFirewallRuleGroup_creatorRequestId,
associateFirewallRuleGroup_firewallRuleGroupId,
associateFirewallRuleGroup_vpcId,
associateFirewallRuleGroup_priority,
associateFirewallRuleGroup_name,
AssociateFirewallRuleGroupResponse (..),
newAssociateFirewallRuleGroupResponse,
associateFirewallRuleGroupResponse_firewallRuleGroupAssociation,
associateFirewallRuleGroupResponse_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 AssociateFirewallRuleGroup = AssociateFirewallRuleGroup'
{
AssociateFirewallRuleGroup -> Maybe MutationProtectionStatus
mutationProtection :: Prelude.Maybe MutationProtectionStatus,
AssociateFirewallRuleGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
AssociateFirewallRuleGroup -> Text
creatorRequestId :: Prelude.Text,
AssociateFirewallRuleGroup -> Text
firewallRuleGroupId :: Prelude.Text,
AssociateFirewallRuleGroup -> Text
vpcId :: Prelude.Text,
AssociateFirewallRuleGroup -> Int
priority :: Prelude.Int,
AssociateFirewallRuleGroup -> Text
name :: Prelude.Text
}
deriving (AssociateFirewallRuleGroup -> AssociateFirewallRuleGroup -> Bool
(AssociateFirewallRuleGroup -> AssociateFirewallRuleGroup -> Bool)
-> (AssociateFirewallRuleGroup
-> AssociateFirewallRuleGroup -> Bool)
-> Eq AssociateFirewallRuleGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateFirewallRuleGroup -> AssociateFirewallRuleGroup -> Bool
$c/= :: AssociateFirewallRuleGroup -> AssociateFirewallRuleGroup -> Bool
== :: AssociateFirewallRuleGroup -> AssociateFirewallRuleGroup -> Bool
$c== :: AssociateFirewallRuleGroup -> AssociateFirewallRuleGroup -> Bool
Prelude.Eq, ReadPrec [AssociateFirewallRuleGroup]
ReadPrec AssociateFirewallRuleGroup
Int -> ReadS AssociateFirewallRuleGroup
ReadS [AssociateFirewallRuleGroup]
(Int -> ReadS AssociateFirewallRuleGroup)
-> ReadS [AssociateFirewallRuleGroup]
-> ReadPrec AssociateFirewallRuleGroup
-> ReadPrec [AssociateFirewallRuleGroup]
-> Read AssociateFirewallRuleGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateFirewallRuleGroup]
$creadListPrec :: ReadPrec [AssociateFirewallRuleGroup]
readPrec :: ReadPrec AssociateFirewallRuleGroup
$creadPrec :: ReadPrec AssociateFirewallRuleGroup
readList :: ReadS [AssociateFirewallRuleGroup]
$creadList :: ReadS [AssociateFirewallRuleGroup]
readsPrec :: Int -> ReadS AssociateFirewallRuleGroup
$creadsPrec :: Int -> ReadS AssociateFirewallRuleGroup
Prelude.Read, Int -> AssociateFirewallRuleGroup -> ShowS
[AssociateFirewallRuleGroup] -> ShowS
AssociateFirewallRuleGroup -> String
(Int -> AssociateFirewallRuleGroup -> ShowS)
-> (AssociateFirewallRuleGroup -> String)
-> ([AssociateFirewallRuleGroup] -> ShowS)
-> Show AssociateFirewallRuleGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateFirewallRuleGroup] -> ShowS
$cshowList :: [AssociateFirewallRuleGroup] -> ShowS
show :: AssociateFirewallRuleGroup -> String
$cshow :: AssociateFirewallRuleGroup -> String
showsPrec :: Int -> AssociateFirewallRuleGroup -> ShowS
$cshowsPrec :: Int -> AssociateFirewallRuleGroup -> ShowS
Prelude.Show, (forall x.
AssociateFirewallRuleGroup -> Rep AssociateFirewallRuleGroup x)
-> (forall x.
Rep AssociateFirewallRuleGroup x -> AssociateFirewallRuleGroup)
-> Generic AssociateFirewallRuleGroup
forall x.
Rep AssociateFirewallRuleGroup x -> AssociateFirewallRuleGroup
forall x.
AssociateFirewallRuleGroup -> Rep AssociateFirewallRuleGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateFirewallRuleGroup x -> AssociateFirewallRuleGroup
$cfrom :: forall x.
AssociateFirewallRuleGroup -> Rep AssociateFirewallRuleGroup x
Prelude.Generic)
newAssociateFirewallRuleGroup ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Int ->
Prelude.Text ->
AssociateFirewallRuleGroup
newAssociateFirewallRuleGroup :: Text -> Text -> Text -> Int -> Text -> AssociateFirewallRuleGroup
newAssociateFirewallRuleGroup
Text
pCreatorRequestId_
Text
pFirewallRuleGroupId_
Text
pVpcId_
Int
pPriority_
Text
pName_ =
AssociateFirewallRuleGroup' :: Maybe MutationProtectionStatus
-> Maybe [Tag]
-> Text
-> Text
-> Text
-> Int
-> Text
-> AssociateFirewallRuleGroup
AssociateFirewallRuleGroup'
{ $sel:mutationProtection:AssociateFirewallRuleGroup' :: Maybe MutationProtectionStatus
mutationProtection =
Maybe MutationProtectionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:tags:AssociateFirewallRuleGroup' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:creatorRequestId:AssociateFirewallRuleGroup' :: Text
creatorRequestId = Text
pCreatorRequestId_,
$sel:firewallRuleGroupId:AssociateFirewallRuleGroup' :: Text
firewallRuleGroupId = Text
pFirewallRuleGroupId_,
$sel:vpcId:AssociateFirewallRuleGroup' :: Text
vpcId = Text
pVpcId_,
$sel:priority:AssociateFirewallRuleGroup' :: Int
priority = Int
pPriority_,
$sel:name:AssociateFirewallRuleGroup' :: Text
name = Text
pName_
}
associateFirewallRuleGroup_mutationProtection :: Lens.Lens' AssociateFirewallRuleGroup (Prelude.Maybe MutationProtectionStatus)
associateFirewallRuleGroup_mutationProtection :: (Maybe MutationProtectionStatus
-> f (Maybe MutationProtectionStatus))
-> AssociateFirewallRuleGroup -> f AssociateFirewallRuleGroup
associateFirewallRuleGroup_mutationProtection = (AssociateFirewallRuleGroup -> Maybe MutationProtectionStatus)
-> (AssociateFirewallRuleGroup
-> Maybe MutationProtectionStatus -> AssociateFirewallRuleGroup)
-> Lens
AssociateFirewallRuleGroup
AssociateFirewallRuleGroup
(Maybe MutationProtectionStatus)
(Maybe MutationProtectionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateFirewallRuleGroup' {Maybe MutationProtectionStatus
mutationProtection :: Maybe MutationProtectionStatus
$sel:mutationProtection:AssociateFirewallRuleGroup' :: AssociateFirewallRuleGroup -> Maybe MutationProtectionStatus
mutationProtection} -> Maybe MutationProtectionStatus
mutationProtection) (\s :: AssociateFirewallRuleGroup
s@AssociateFirewallRuleGroup' {} Maybe MutationProtectionStatus
a -> AssociateFirewallRuleGroup
s {$sel:mutationProtection:AssociateFirewallRuleGroup' :: Maybe MutationProtectionStatus
mutationProtection = Maybe MutationProtectionStatus
a} :: AssociateFirewallRuleGroup)
associateFirewallRuleGroup_tags :: Lens.Lens' AssociateFirewallRuleGroup (Prelude.Maybe [Tag])
associateFirewallRuleGroup_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> AssociateFirewallRuleGroup -> f AssociateFirewallRuleGroup
associateFirewallRuleGroup_tags = (AssociateFirewallRuleGroup -> Maybe [Tag])
-> (AssociateFirewallRuleGroup
-> Maybe [Tag] -> AssociateFirewallRuleGroup)
-> Lens
AssociateFirewallRuleGroup
AssociateFirewallRuleGroup
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateFirewallRuleGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:AssociateFirewallRuleGroup' :: AssociateFirewallRuleGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: AssociateFirewallRuleGroup
s@AssociateFirewallRuleGroup' {} Maybe [Tag]
a -> AssociateFirewallRuleGroup
s {$sel:tags:AssociateFirewallRuleGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: AssociateFirewallRuleGroup) ((Maybe [Tag] -> f (Maybe [Tag]))
-> AssociateFirewallRuleGroup -> f AssociateFirewallRuleGroup)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> AssociateFirewallRuleGroup
-> f AssociateFirewallRuleGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
associateFirewallRuleGroup_creatorRequestId :: Lens.Lens' AssociateFirewallRuleGroup Prelude.Text
associateFirewallRuleGroup_creatorRequestId :: (Text -> f Text)
-> AssociateFirewallRuleGroup -> f AssociateFirewallRuleGroup
associateFirewallRuleGroup_creatorRequestId = (AssociateFirewallRuleGroup -> Text)
-> (AssociateFirewallRuleGroup
-> Text -> AssociateFirewallRuleGroup)
-> Lens
AssociateFirewallRuleGroup AssociateFirewallRuleGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateFirewallRuleGroup' {Text
creatorRequestId :: Text
$sel:creatorRequestId:AssociateFirewallRuleGroup' :: AssociateFirewallRuleGroup -> Text
creatorRequestId} -> Text
creatorRequestId) (\s :: AssociateFirewallRuleGroup
s@AssociateFirewallRuleGroup' {} Text
a -> AssociateFirewallRuleGroup
s {$sel:creatorRequestId:AssociateFirewallRuleGroup' :: Text
creatorRequestId = Text
a} :: AssociateFirewallRuleGroup)
associateFirewallRuleGroup_firewallRuleGroupId :: Lens.Lens' AssociateFirewallRuleGroup Prelude.Text
associateFirewallRuleGroup_firewallRuleGroupId :: (Text -> f Text)
-> AssociateFirewallRuleGroup -> f AssociateFirewallRuleGroup
associateFirewallRuleGroup_firewallRuleGroupId = (AssociateFirewallRuleGroup -> Text)
-> (AssociateFirewallRuleGroup
-> Text -> AssociateFirewallRuleGroup)
-> Lens
AssociateFirewallRuleGroup AssociateFirewallRuleGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateFirewallRuleGroup' {Text
firewallRuleGroupId :: Text
$sel:firewallRuleGroupId:AssociateFirewallRuleGroup' :: AssociateFirewallRuleGroup -> Text
firewallRuleGroupId} -> Text
firewallRuleGroupId) (\s :: AssociateFirewallRuleGroup
s@AssociateFirewallRuleGroup' {} Text
a -> AssociateFirewallRuleGroup
s {$sel:firewallRuleGroupId:AssociateFirewallRuleGroup' :: Text
firewallRuleGroupId = Text
a} :: AssociateFirewallRuleGroup)
associateFirewallRuleGroup_vpcId :: Lens.Lens' AssociateFirewallRuleGroup Prelude.Text
associateFirewallRuleGroup_vpcId :: (Text -> f Text)
-> AssociateFirewallRuleGroup -> f AssociateFirewallRuleGroup
associateFirewallRuleGroup_vpcId = (AssociateFirewallRuleGroup -> Text)
-> (AssociateFirewallRuleGroup
-> Text -> AssociateFirewallRuleGroup)
-> Lens
AssociateFirewallRuleGroup AssociateFirewallRuleGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateFirewallRuleGroup' {Text
vpcId :: Text
$sel:vpcId:AssociateFirewallRuleGroup' :: AssociateFirewallRuleGroup -> Text
vpcId} -> Text
vpcId) (\s :: AssociateFirewallRuleGroup
s@AssociateFirewallRuleGroup' {} Text
a -> AssociateFirewallRuleGroup
s {$sel:vpcId:AssociateFirewallRuleGroup' :: Text
vpcId = Text
a} :: AssociateFirewallRuleGroup)
associateFirewallRuleGroup_priority :: Lens.Lens' AssociateFirewallRuleGroup Prelude.Int
associateFirewallRuleGroup_priority :: (Int -> f Int)
-> AssociateFirewallRuleGroup -> f AssociateFirewallRuleGroup
associateFirewallRuleGroup_priority = (AssociateFirewallRuleGroup -> Int)
-> (AssociateFirewallRuleGroup
-> Int -> AssociateFirewallRuleGroup)
-> Lens
AssociateFirewallRuleGroup AssociateFirewallRuleGroup Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateFirewallRuleGroup' {Int
priority :: Int
$sel:priority:AssociateFirewallRuleGroup' :: AssociateFirewallRuleGroup -> Int
priority} -> Int
priority) (\s :: AssociateFirewallRuleGroup
s@AssociateFirewallRuleGroup' {} Int
a -> AssociateFirewallRuleGroup
s {$sel:priority:AssociateFirewallRuleGroup' :: Int
priority = Int
a} :: AssociateFirewallRuleGroup)
associateFirewallRuleGroup_name :: Lens.Lens' AssociateFirewallRuleGroup Prelude.Text
associateFirewallRuleGroup_name :: (Text -> f Text)
-> AssociateFirewallRuleGroup -> f AssociateFirewallRuleGroup
associateFirewallRuleGroup_name = (AssociateFirewallRuleGroup -> Text)
-> (AssociateFirewallRuleGroup
-> Text -> AssociateFirewallRuleGroup)
-> Lens
AssociateFirewallRuleGroup AssociateFirewallRuleGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateFirewallRuleGroup' {Text
name :: Text
$sel:name:AssociateFirewallRuleGroup' :: AssociateFirewallRuleGroup -> Text
name} -> Text
name) (\s :: AssociateFirewallRuleGroup
s@AssociateFirewallRuleGroup' {} Text
a -> AssociateFirewallRuleGroup
s {$sel:name:AssociateFirewallRuleGroup' :: Text
name = Text
a} :: AssociateFirewallRuleGroup)
instance Core.AWSRequest AssociateFirewallRuleGroup where
type
AWSResponse AssociateFirewallRuleGroup =
AssociateFirewallRuleGroupResponse
request :: AssociateFirewallRuleGroup -> Request AssociateFirewallRuleGroup
request = Service
-> AssociateFirewallRuleGroup -> Request AssociateFirewallRuleGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy AssociateFirewallRuleGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse AssociateFirewallRuleGroup)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse AssociateFirewallRuleGroup))
-> Logger
-> Service
-> Proxy AssociateFirewallRuleGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse AssociateFirewallRuleGroup)))
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 FirewallRuleGroupAssociation
-> Int -> AssociateFirewallRuleGroupResponse
AssociateFirewallRuleGroupResponse'
(Maybe FirewallRuleGroupAssociation
-> Int -> AssociateFirewallRuleGroupResponse)
-> Either String (Maybe FirewallRuleGroupAssociation)
-> Either String (Int -> AssociateFirewallRuleGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe FirewallRuleGroupAssociation)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FirewallRuleGroupAssociation")
Either String (Int -> AssociateFirewallRuleGroupResponse)
-> Either String Int
-> Either String AssociateFirewallRuleGroupResponse
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 AssociateFirewallRuleGroup
instance Prelude.NFData AssociateFirewallRuleGroup
instance Core.ToHeaders AssociateFirewallRuleGroup where
toHeaders :: AssociateFirewallRuleGroup -> ResponseHeaders
toHeaders =
ResponseHeaders -> AssociateFirewallRuleGroup -> 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.AssociateFirewallRuleGroup" ::
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 AssociateFirewallRuleGroup where
toJSON :: AssociateFirewallRuleGroup -> Value
toJSON AssociateFirewallRuleGroup' {Int
Maybe [Tag]
Maybe MutationProtectionStatus
Text
name :: Text
priority :: Int
vpcId :: Text
firewallRuleGroupId :: Text
creatorRequestId :: Text
tags :: Maybe [Tag]
mutationProtection :: Maybe MutationProtectionStatus
$sel:name:AssociateFirewallRuleGroup' :: AssociateFirewallRuleGroup -> Text
$sel:priority:AssociateFirewallRuleGroup' :: AssociateFirewallRuleGroup -> Int
$sel:vpcId:AssociateFirewallRuleGroup' :: AssociateFirewallRuleGroup -> Text
$sel:firewallRuleGroupId:AssociateFirewallRuleGroup' :: AssociateFirewallRuleGroup -> Text
$sel:creatorRequestId:AssociateFirewallRuleGroup' :: AssociateFirewallRuleGroup -> Text
$sel:tags:AssociateFirewallRuleGroup' :: AssociateFirewallRuleGroup -> Maybe [Tag]
$sel:mutationProtection:AssociateFirewallRuleGroup' :: AssociateFirewallRuleGroup -> Maybe MutationProtectionStatus
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"MutationProtection" Text -> MutationProtectionStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(MutationProtectionStatus -> Pair)
-> Maybe MutationProtectionStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MutationProtectionStatus
mutationProtection,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"CreatorRequestId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
creatorRequestId),
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
"VpcId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
vpcId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Priority" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Int
priority),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
]
)
instance Core.ToPath AssociateFirewallRuleGroup where
toPath :: AssociateFirewallRuleGroup -> ByteString
toPath = ByteString -> AssociateFirewallRuleGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery AssociateFirewallRuleGroup where
toQuery :: AssociateFirewallRuleGroup -> QueryString
toQuery = QueryString -> AssociateFirewallRuleGroup -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data AssociateFirewallRuleGroupResponse = AssociateFirewallRuleGroupResponse'
{
AssociateFirewallRuleGroupResponse
-> Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation :: Prelude.Maybe FirewallRuleGroupAssociation,
AssociateFirewallRuleGroupResponse -> Int
httpStatus :: Prelude.Int
}
deriving (AssociateFirewallRuleGroupResponse
-> AssociateFirewallRuleGroupResponse -> Bool
(AssociateFirewallRuleGroupResponse
-> AssociateFirewallRuleGroupResponse -> Bool)
-> (AssociateFirewallRuleGroupResponse
-> AssociateFirewallRuleGroupResponse -> Bool)
-> Eq AssociateFirewallRuleGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateFirewallRuleGroupResponse
-> AssociateFirewallRuleGroupResponse -> Bool
$c/= :: AssociateFirewallRuleGroupResponse
-> AssociateFirewallRuleGroupResponse -> Bool
== :: AssociateFirewallRuleGroupResponse
-> AssociateFirewallRuleGroupResponse -> Bool
$c== :: AssociateFirewallRuleGroupResponse
-> AssociateFirewallRuleGroupResponse -> Bool
Prelude.Eq, ReadPrec [AssociateFirewallRuleGroupResponse]
ReadPrec AssociateFirewallRuleGroupResponse
Int -> ReadS AssociateFirewallRuleGroupResponse
ReadS [AssociateFirewallRuleGroupResponse]
(Int -> ReadS AssociateFirewallRuleGroupResponse)
-> ReadS [AssociateFirewallRuleGroupResponse]
-> ReadPrec AssociateFirewallRuleGroupResponse
-> ReadPrec [AssociateFirewallRuleGroupResponse]
-> Read AssociateFirewallRuleGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateFirewallRuleGroupResponse]
$creadListPrec :: ReadPrec [AssociateFirewallRuleGroupResponse]
readPrec :: ReadPrec AssociateFirewallRuleGroupResponse
$creadPrec :: ReadPrec AssociateFirewallRuleGroupResponse
readList :: ReadS [AssociateFirewallRuleGroupResponse]
$creadList :: ReadS [AssociateFirewallRuleGroupResponse]
readsPrec :: Int -> ReadS AssociateFirewallRuleGroupResponse
$creadsPrec :: Int -> ReadS AssociateFirewallRuleGroupResponse
Prelude.Read, Int -> AssociateFirewallRuleGroupResponse -> ShowS
[AssociateFirewallRuleGroupResponse] -> ShowS
AssociateFirewallRuleGroupResponse -> String
(Int -> AssociateFirewallRuleGroupResponse -> ShowS)
-> (AssociateFirewallRuleGroupResponse -> String)
-> ([AssociateFirewallRuleGroupResponse] -> ShowS)
-> Show AssociateFirewallRuleGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateFirewallRuleGroupResponse] -> ShowS
$cshowList :: [AssociateFirewallRuleGroupResponse] -> ShowS
show :: AssociateFirewallRuleGroupResponse -> String
$cshow :: AssociateFirewallRuleGroupResponse -> String
showsPrec :: Int -> AssociateFirewallRuleGroupResponse -> ShowS
$cshowsPrec :: Int -> AssociateFirewallRuleGroupResponse -> ShowS
Prelude.Show, (forall x.
AssociateFirewallRuleGroupResponse
-> Rep AssociateFirewallRuleGroupResponse x)
-> (forall x.
Rep AssociateFirewallRuleGroupResponse x
-> AssociateFirewallRuleGroupResponse)
-> Generic AssociateFirewallRuleGroupResponse
forall x.
Rep AssociateFirewallRuleGroupResponse x
-> AssociateFirewallRuleGroupResponse
forall x.
AssociateFirewallRuleGroupResponse
-> Rep AssociateFirewallRuleGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateFirewallRuleGroupResponse x
-> AssociateFirewallRuleGroupResponse
$cfrom :: forall x.
AssociateFirewallRuleGroupResponse
-> Rep AssociateFirewallRuleGroupResponse x
Prelude.Generic)
newAssociateFirewallRuleGroupResponse ::
Prelude.Int ->
AssociateFirewallRuleGroupResponse
newAssociateFirewallRuleGroupResponse :: Int -> AssociateFirewallRuleGroupResponse
newAssociateFirewallRuleGroupResponse Int
pHttpStatus_ =
AssociateFirewallRuleGroupResponse' :: Maybe FirewallRuleGroupAssociation
-> Int -> AssociateFirewallRuleGroupResponse
AssociateFirewallRuleGroupResponse'
{ $sel:firewallRuleGroupAssociation:AssociateFirewallRuleGroupResponse' :: Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation =
Maybe FirewallRuleGroupAssociation
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:AssociateFirewallRuleGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
}
associateFirewallRuleGroupResponse_firewallRuleGroupAssociation :: Lens.Lens' AssociateFirewallRuleGroupResponse (Prelude.Maybe FirewallRuleGroupAssociation)
associateFirewallRuleGroupResponse_firewallRuleGroupAssociation :: (Maybe FirewallRuleGroupAssociation
-> f (Maybe FirewallRuleGroupAssociation))
-> AssociateFirewallRuleGroupResponse
-> f AssociateFirewallRuleGroupResponse
associateFirewallRuleGroupResponse_firewallRuleGroupAssociation = (AssociateFirewallRuleGroupResponse
-> Maybe FirewallRuleGroupAssociation)
-> (AssociateFirewallRuleGroupResponse
-> Maybe FirewallRuleGroupAssociation
-> AssociateFirewallRuleGroupResponse)
-> Lens
AssociateFirewallRuleGroupResponse
AssociateFirewallRuleGroupResponse
(Maybe FirewallRuleGroupAssociation)
(Maybe FirewallRuleGroupAssociation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateFirewallRuleGroupResponse' {Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation :: Maybe FirewallRuleGroupAssociation
$sel:firewallRuleGroupAssociation:AssociateFirewallRuleGroupResponse' :: AssociateFirewallRuleGroupResponse
-> Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation} -> Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation) (\s :: AssociateFirewallRuleGroupResponse
s@AssociateFirewallRuleGroupResponse' {} Maybe FirewallRuleGroupAssociation
a -> AssociateFirewallRuleGroupResponse
s {$sel:firewallRuleGroupAssociation:AssociateFirewallRuleGroupResponse' :: Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation = Maybe FirewallRuleGroupAssociation
a} :: AssociateFirewallRuleGroupResponse)
associateFirewallRuleGroupResponse_httpStatus :: Lens.Lens' AssociateFirewallRuleGroupResponse Prelude.Int
associateFirewallRuleGroupResponse_httpStatus :: (Int -> f Int)
-> AssociateFirewallRuleGroupResponse
-> f AssociateFirewallRuleGroupResponse
associateFirewallRuleGroupResponse_httpStatus = (AssociateFirewallRuleGroupResponse -> Int)
-> (AssociateFirewallRuleGroupResponse
-> Int -> AssociateFirewallRuleGroupResponse)
-> Lens
AssociateFirewallRuleGroupResponse
AssociateFirewallRuleGroupResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateFirewallRuleGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:AssociateFirewallRuleGroupResponse' :: AssociateFirewallRuleGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: AssociateFirewallRuleGroupResponse
s@AssociateFirewallRuleGroupResponse' {} Int
a -> AssociateFirewallRuleGroupResponse
s {$sel:httpStatus:AssociateFirewallRuleGroupResponse' :: Int
httpStatus = Int
a} :: AssociateFirewallRuleGroupResponse)
instance
Prelude.NFData
AssociateFirewallRuleGroupResponse