{-# 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.GetFirewallRuleGroupAssociation
(
GetFirewallRuleGroupAssociation (..),
newGetFirewallRuleGroupAssociation,
getFirewallRuleGroupAssociation_firewallRuleGroupAssociationId,
GetFirewallRuleGroupAssociationResponse (..),
newGetFirewallRuleGroupAssociationResponse,
getFirewallRuleGroupAssociationResponse_firewallRuleGroupAssociation,
getFirewallRuleGroupAssociationResponse_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 GetFirewallRuleGroupAssociation = GetFirewallRuleGroupAssociation'
{
GetFirewallRuleGroupAssociation -> Text
firewallRuleGroupAssociationId :: Prelude.Text
}
deriving (GetFirewallRuleGroupAssociation
-> GetFirewallRuleGroupAssociation -> Bool
(GetFirewallRuleGroupAssociation
-> GetFirewallRuleGroupAssociation -> Bool)
-> (GetFirewallRuleGroupAssociation
-> GetFirewallRuleGroupAssociation -> Bool)
-> Eq GetFirewallRuleGroupAssociation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetFirewallRuleGroupAssociation
-> GetFirewallRuleGroupAssociation -> Bool
$c/= :: GetFirewallRuleGroupAssociation
-> GetFirewallRuleGroupAssociation -> Bool
== :: GetFirewallRuleGroupAssociation
-> GetFirewallRuleGroupAssociation -> Bool
$c== :: GetFirewallRuleGroupAssociation
-> GetFirewallRuleGroupAssociation -> Bool
Prelude.Eq, ReadPrec [GetFirewallRuleGroupAssociation]
ReadPrec GetFirewallRuleGroupAssociation
Int -> ReadS GetFirewallRuleGroupAssociation
ReadS [GetFirewallRuleGroupAssociation]
(Int -> ReadS GetFirewallRuleGroupAssociation)
-> ReadS [GetFirewallRuleGroupAssociation]
-> ReadPrec GetFirewallRuleGroupAssociation
-> ReadPrec [GetFirewallRuleGroupAssociation]
-> Read GetFirewallRuleGroupAssociation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetFirewallRuleGroupAssociation]
$creadListPrec :: ReadPrec [GetFirewallRuleGroupAssociation]
readPrec :: ReadPrec GetFirewallRuleGroupAssociation
$creadPrec :: ReadPrec GetFirewallRuleGroupAssociation
readList :: ReadS [GetFirewallRuleGroupAssociation]
$creadList :: ReadS [GetFirewallRuleGroupAssociation]
readsPrec :: Int -> ReadS GetFirewallRuleGroupAssociation
$creadsPrec :: Int -> ReadS GetFirewallRuleGroupAssociation
Prelude.Read, Int -> GetFirewallRuleGroupAssociation -> ShowS
[GetFirewallRuleGroupAssociation] -> ShowS
GetFirewallRuleGroupAssociation -> String
(Int -> GetFirewallRuleGroupAssociation -> ShowS)
-> (GetFirewallRuleGroupAssociation -> String)
-> ([GetFirewallRuleGroupAssociation] -> ShowS)
-> Show GetFirewallRuleGroupAssociation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetFirewallRuleGroupAssociation] -> ShowS
$cshowList :: [GetFirewallRuleGroupAssociation] -> ShowS
show :: GetFirewallRuleGroupAssociation -> String
$cshow :: GetFirewallRuleGroupAssociation -> String
showsPrec :: Int -> GetFirewallRuleGroupAssociation -> ShowS
$cshowsPrec :: Int -> GetFirewallRuleGroupAssociation -> ShowS
Prelude.Show, (forall x.
GetFirewallRuleGroupAssociation
-> Rep GetFirewallRuleGroupAssociation x)
-> (forall x.
Rep GetFirewallRuleGroupAssociation x
-> GetFirewallRuleGroupAssociation)
-> Generic GetFirewallRuleGroupAssociation
forall x.
Rep GetFirewallRuleGroupAssociation x
-> GetFirewallRuleGroupAssociation
forall x.
GetFirewallRuleGroupAssociation
-> Rep GetFirewallRuleGroupAssociation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetFirewallRuleGroupAssociation x
-> GetFirewallRuleGroupAssociation
$cfrom :: forall x.
GetFirewallRuleGroupAssociation
-> Rep GetFirewallRuleGroupAssociation x
Prelude.Generic)
newGetFirewallRuleGroupAssociation ::
Prelude.Text ->
GetFirewallRuleGroupAssociation
newGetFirewallRuleGroupAssociation :: Text -> GetFirewallRuleGroupAssociation
newGetFirewallRuleGroupAssociation
Text
pFirewallRuleGroupAssociationId_ =
GetFirewallRuleGroupAssociation' :: Text -> GetFirewallRuleGroupAssociation
GetFirewallRuleGroupAssociation'
{ $sel:firewallRuleGroupAssociationId:GetFirewallRuleGroupAssociation' :: Text
firewallRuleGroupAssociationId =
Text
pFirewallRuleGroupAssociationId_
}
getFirewallRuleGroupAssociation_firewallRuleGroupAssociationId :: Lens.Lens' GetFirewallRuleGroupAssociation Prelude.Text
getFirewallRuleGroupAssociation_firewallRuleGroupAssociationId :: (Text -> f Text)
-> GetFirewallRuleGroupAssociation
-> f GetFirewallRuleGroupAssociation
getFirewallRuleGroupAssociation_firewallRuleGroupAssociationId = (GetFirewallRuleGroupAssociation -> Text)
-> (GetFirewallRuleGroupAssociation
-> Text -> GetFirewallRuleGroupAssociation)
-> Lens
GetFirewallRuleGroupAssociation
GetFirewallRuleGroupAssociation
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFirewallRuleGroupAssociation' {Text
firewallRuleGroupAssociationId :: Text
$sel:firewallRuleGroupAssociationId:GetFirewallRuleGroupAssociation' :: GetFirewallRuleGroupAssociation -> Text
firewallRuleGroupAssociationId} -> Text
firewallRuleGroupAssociationId) (\s :: GetFirewallRuleGroupAssociation
s@GetFirewallRuleGroupAssociation' {} Text
a -> GetFirewallRuleGroupAssociation
s {$sel:firewallRuleGroupAssociationId:GetFirewallRuleGroupAssociation' :: Text
firewallRuleGroupAssociationId = Text
a} :: GetFirewallRuleGroupAssociation)
instance
Core.AWSRequest
GetFirewallRuleGroupAssociation
where
type
AWSResponse GetFirewallRuleGroupAssociation =
GetFirewallRuleGroupAssociationResponse
request :: GetFirewallRuleGroupAssociation
-> Request GetFirewallRuleGroupAssociation
request = Service
-> GetFirewallRuleGroupAssociation
-> Request GetFirewallRuleGroupAssociation
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetFirewallRuleGroupAssociation
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetFirewallRuleGroupAssociation)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetFirewallRuleGroupAssociation))
-> Logger
-> Service
-> Proxy GetFirewallRuleGroupAssociation
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetFirewallRuleGroupAssociation)))
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 -> GetFirewallRuleGroupAssociationResponse
GetFirewallRuleGroupAssociationResponse'
(Maybe FirewallRuleGroupAssociation
-> Int -> GetFirewallRuleGroupAssociationResponse)
-> Either String (Maybe FirewallRuleGroupAssociation)
-> Either String (Int -> GetFirewallRuleGroupAssociationResponse)
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 -> GetFirewallRuleGroupAssociationResponse)
-> Either String Int
-> Either String GetFirewallRuleGroupAssociationResponse
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
GetFirewallRuleGroupAssociation
instance
Prelude.NFData
GetFirewallRuleGroupAssociation
instance
Core.ToHeaders
GetFirewallRuleGroupAssociation
where
toHeaders :: GetFirewallRuleGroupAssociation -> ResponseHeaders
toHeaders =
ResponseHeaders
-> GetFirewallRuleGroupAssociation -> 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.GetFirewallRuleGroupAssociation" ::
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 GetFirewallRuleGroupAssociation where
toJSON :: GetFirewallRuleGroupAssociation -> Value
toJSON GetFirewallRuleGroupAssociation' {Text
firewallRuleGroupAssociationId :: Text
$sel:firewallRuleGroupAssociationId:GetFirewallRuleGroupAssociation' :: GetFirewallRuleGroupAssociation -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"FirewallRuleGroupAssociationId"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
firewallRuleGroupAssociationId
)
]
)
instance Core.ToPath GetFirewallRuleGroupAssociation where
toPath :: GetFirewallRuleGroupAssociation -> ByteString
toPath = ByteString -> GetFirewallRuleGroupAssociation -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetFirewallRuleGroupAssociation where
toQuery :: GetFirewallRuleGroupAssociation -> QueryString
toQuery = QueryString -> GetFirewallRuleGroupAssociation -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetFirewallRuleGroupAssociationResponse = GetFirewallRuleGroupAssociationResponse'
{
GetFirewallRuleGroupAssociationResponse
-> Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation :: Prelude.Maybe FirewallRuleGroupAssociation,
GetFirewallRuleGroupAssociationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetFirewallRuleGroupAssociationResponse
-> GetFirewallRuleGroupAssociationResponse -> Bool
(GetFirewallRuleGroupAssociationResponse
-> GetFirewallRuleGroupAssociationResponse -> Bool)
-> (GetFirewallRuleGroupAssociationResponse
-> GetFirewallRuleGroupAssociationResponse -> Bool)
-> Eq GetFirewallRuleGroupAssociationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetFirewallRuleGroupAssociationResponse
-> GetFirewallRuleGroupAssociationResponse -> Bool
$c/= :: GetFirewallRuleGroupAssociationResponse
-> GetFirewallRuleGroupAssociationResponse -> Bool
== :: GetFirewallRuleGroupAssociationResponse
-> GetFirewallRuleGroupAssociationResponse -> Bool
$c== :: GetFirewallRuleGroupAssociationResponse
-> GetFirewallRuleGroupAssociationResponse -> Bool
Prelude.Eq, ReadPrec [GetFirewallRuleGroupAssociationResponse]
ReadPrec GetFirewallRuleGroupAssociationResponse
Int -> ReadS GetFirewallRuleGroupAssociationResponse
ReadS [GetFirewallRuleGroupAssociationResponse]
(Int -> ReadS GetFirewallRuleGroupAssociationResponse)
-> ReadS [GetFirewallRuleGroupAssociationResponse]
-> ReadPrec GetFirewallRuleGroupAssociationResponse
-> ReadPrec [GetFirewallRuleGroupAssociationResponse]
-> Read GetFirewallRuleGroupAssociationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetFirewallRuleGroupAssociationResponse]
$creadListPrec :: ReadPrec [GetFirewallRuleGroupAssociationResponse]
readPrec :: ReadPrec GetFirewallRuleGroupAssociationResponse
$creadPrec :: ReadPrec GetFirewallRuleGroupAssociationResponse
readList :: ReadS [GetFirewallRuleGroupAssociationResponse]
$creadList :: ReadS [GetFirewallRuleGroupAssociationResponse]
readsPrec :: Int -> ReadS GetFirewallRuleGroupAssociationResponse
$creadsPrec :: Int -> ReadS GetFirewallRuleGroupAssociationResponse
Prelude.Read, Int -> GetFirewallRuleGroupAssociationResponse -> ShowS
[GetFirewallRuleGroupAssociationResponse] -> ShowS
GetFirewallRuleGroupAssociationResponse -> String
(Int -> GetFirewallRuleGroupAssociationResponse -> ShowS)
-> (GetFirewallRuleGroupAssociationResponse -> String)
-> ([GetFirewallRuleGroupAssociationResponse] -> ShowS)
-> Show GetFirewallRuleGroupAssociationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetFirewallRuleGroupAssociationResponse] -> ShowS
$cshowList :: [GetFirewallRuleGroupAssociationResponse] -> ShowS
show :: GetFirewallRuleGroupAssociationResponse -> String
$cshow :: GetFirewallRuleGroupAssociationResponse -> String
showsPrec :: Int -> GetFirewallRuleGroupAssociationResponse -> ShowS
$cshowsPrec :: Int -> GetFirewallRuleGroupAssociationResponse -> ShowS
Prelude.Show, (forall x.
GetFirewallRuleGroupAssociationResponse
-> Rep GetFirewallRuleGroupAssociationResponse x)
-> (forall x.
Rep GetFirewallRuleGroupAssociationResponse x
-> GetFirewallRuleGroupAssociationResponse)
-> Generic GetFirewallRuleGroupAssociationResponse
forall x.
Rep GetFirewallRuleGroupAssociationResponse x
-> GetFirewallRuleGroupAssociationResponse
forall x.
GetFirewallRuleGroupAssociationResponse
-> Rep GetFirewallRuleGroupAssociationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetFirewallRuleGroupAssociationResponse x
-> GetFirewallRuleGroupAssociationResponse
$cfrom :: forall x.
GetFirewallRuleGroupAssociationResponse
-> Rep GetFirewallRuleGroupAssociationResponse x
Prelude.Generic)
newGetFirewallRuleGroupAssociationResponse ::
Prelude.Int ->
GetFirewallRuleGroupAssociationResponse
newGetFirewallRuleGroupAssociationResponse :: Int -> GetFirewallRuleGroupAssociationResponse
newGetFirewallRuleGroupAssociationResponse
Int
pHttpStatus_ =
GetFirewallRuleGroupAssociationResponse' :: Maybe FirewallRuleGroupAssociation
-> Int -> GetFirewallRuleGroupAssociationResponse
GetFirewallRuleGroupAssociationResponse'
{ $sel:firewallRuleGroupAssociation:GetFirewallRuleGroupAssociationResponse' :: Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation =
Maybe FirewallRuleGroupAssociation
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetFirewallRuleGroupAssociationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getFirewallRuleGroupAssociationResponse_firewallRuleGroupAssociation :: Lens.Lens' GetFirewallRuleGroupAssociationResponse (Prelude.Maybe FirewallRuleGroupAssociation)
getFirewallRuleGroupAssociationResponse_firewallRuleGroupAssociation :: (Maybe FirewallRuleGroupAssociation
-> f (Maybe FirewallRuleGroupAssociation))
-> GetFirewallRuleGroupAssociationResponse
-> f GetFirewallRuleGroupAssociationResponse
getFirewallRuleGroupAssociationResponse_firewallRuleGroupAssociation = (GetFirewallRuleGroupAssociationResponse
-> Maybe FirewallRuleGroupAssociation)
-> (GetFirewallRuleGroupAssociationResponse
-> Maybe FirewallRuleGroupAssociation
-> GetFirewallRuleGroupAssociationResponse)
-> Lens
GetFirewallRuleGroupAssociationResponse
GetFirewallRuleGroupAssociationResponse
(Maybe FirewallRuleGroupAssociation)
(Maybe FirewallRuleGroupAssociation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFirewallRuleGroupAssociationResponse' {Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation :: Maybe FirewallRuleGroupAssociation
$sel:firewallRuleGroupAssociation:GetFirewallRuleGroupAssociationResponse' :: GetFirewallRuleGroupAssociationResponse
-> Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation} -> Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation) (\s :: GetFirewallRuleGroupAssociationResponse
s@GetFirewallRuleGroupAssociationResponse' {} Maybe FirewallRuleGroupAssociation
a -> GetFirewallRuleGroupAssociationResponse
s {$sel:firewallRuleGroupAssociation:GetFirewallRuleGroupAssociationResponse' :: Maybe FirewallRuleGroupAssociation
firewallRuleGroupAssociation = Maybe FirewallRuleGroupAssociation
a} :: GetFirewallRuleGroupAssociationResponse)
getFirewallRuleGroupAssociationResponse_httpStatus :: Lens.Lens' GetFirewallRuleGroupAssociationResponse Prelude.Int
getFirewallRuleGroupAssociationResponse_httpStatus :: (Int -> f Int)
-> GetFirewallRuleGroupAssociationResponse
-> f GetFirewallRuleGroupAssociationResponse
getFirewallRuleGroupAssociationResponse_httpStatus = (GetFirewallRuleGroupAssociationResponse -> Int)
-> (GetFirewallRuleGroupAssociationResponse
-> Int -> GetFirewallRuleGroupAssociationResponse)
-> Lens
GetFirewallRuleGroupAssociationResponse
GetFirewallRuleGroupAssociationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFirewallRuleGroupAssociationResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetFirewallRuleGroupAssociationResponse' :: GetFirewallRuleGroupAssociationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetFirewallRuleGroupAssociationResponse
s@GetFirewallRuleGroupAssociationResponse' {} Int
a -> GetFirewallRuleGroupAssociationResponse
s {$sel:httpStatus:GetFirewallRuleGroupAssociationResponse' :: Int
httpStatus = Int
a} :: GetFirewallRuleGroupAssociationResponse)
instance
Prelude.NFData
GetFirewallRuleGroupAssociationResponse