{-# 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.GetResolverQueryLogConfigPolicy
(
GetResolverQueryLogConfigPolicy (..),
newGetResolverQueryLogConfigPolicy,
getResolverQueryLogConfigPolicy_arn,
GetResolverQueryLogConfigPolicyResponse (..),
newGetResolverQueryLogConfigPolicyResponse,
getResolverQueryLogConfigPolicyResponse_resolverQueryLogConfigPolicy,
getResolverQueryLogConfigPolicyResponse_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 GetResolverQueryLogConfigPolicy = GetResolverQueryLogConfigPolicy'
{
GetResolverQueryLogConfigPolicy -> Text
arn :: Prelude.Text
}
deriving (GetResolverQueryLogConfigPolicy
-> GetResolverQueryLogConfigPolicy -> Bool
(GetResolverQueryLogConfigPolicy
-> GetResolverQueryLogConfigPolicy -> Bool)
-> (GetResolverQueryLogConfigPolicy
-> GetResolverQueryLogConfigPolicy -> Bool)
-> Eq GetResolverQueryLogConfigPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetResolverQueryLogConfigPolicy
-> GetResolverQueryLogConfigPolicy -> Bool
$c/= :: GetResolverQueryLogConfigPolicy
-> GetResolverQueryLogConfigPolicy -> Bool
== :: GetResolverQueryLogConfigPolicy
-> GetResolverQueryLogConfigPolicy -> Bool
$c== :: GetResolverQueryLogConfigPolicy
-> GetResolverQueryLogConfigPolicy -> Bool
Prelude.Eq, ReadPrec [GetResolverQueryLogConfigPolicy]
ReadPrec GetResolverQueryLogConfigPolicy
Int -> ReadS GetResolverQueryLogConfigPolicy
ReadS [GetResolverQueryLogConfigPolicy]
(Int -> ReadS GetResolverQueryLogConfigPolicy)
-> ReadS [GetResolverQueryLogConfigPolicy]
-> ReadPrec GetResolverQueryLogConfigPolicy
-> ReadPrec [GetResolverQueryLogConfigPolicy]
-> Read GetResolverQueryLogConfigPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetResolverQueryLogConfigPolicy]
$creadListPrec :: ReadPrec [GetResolverQueryLogConfigPolicy]
readPrec :: ReadPrec GetResolverQueryLogConfigPolicy
$creadPrec :: ReadPrec GetResolverQueryLogConfigPolicy
readList :: ReadS [GetResolverQueryLogConfigPolicy]
$creadList :: ReadS [GetResolverQueryLogConfigPolicy]
readsPrec :: Int -> ReadS GetResolverQueryLogConfigPolicy
$creadsPrec :: Int -> ReadS GetResolverQueryLogConfigPolicy
Prelude.Read, Int -> GetResolverQueryLogConfigPolicy -> ShowS
[GetResolverQueryLogConfigPolicy] -> ShowS
GetResolverQueryLogConfigPolicy -> String
(Int -> GetResolverQueryLogConfigPolicy -> ShowS)
-> (GetResolverQueryLogConfigPolicy -> String)
-> ([GetResolverQueryLogConfigPolicy] -> ShowS)
-> Show GetResolverQueryLogConfigPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetResolverQueryLogConfigPolicy] -> ShowS
$cshowList :: [GetResolverQueryLogConfigPolicy] -> ShowS
show :: GetResolverQueryLogConfigPolicy -> String
$cshow :: GetResolverQueryLogConfigPolicy -> String
showsPrec :: Int -> GetResolverQueryLogConfigPolicy -> ShowS
$cshowsPrec :: Int -> GetResolverQueryLogConfigPolicy -> ShowS
Prelude.Show, (forall x.
GetResolverQueryLogConfigPolicy
-> Rep GetResolverQueryLogConfigPolicy x)
-> (forall x.
Rep GetResolverQueryLogConfigPolicy x
-> GetResolverQueryLogConfigPolicy)
-> Generic GetResolverQueryLogConfigPolicy
forall x.
Rep GetResolverQueryLogConfigPolicy x
-> GetResolverQueryLogConfigPolicy
forall x.
GetResolverQueryLogConfigPolicy
-> Rep GetResolverQueryLogConfigPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetResolverQueryLogConfigPolicy x
-> GetResolverQueryLogConfigPolicy
$cfrom :: forall x.
GetResolverQueryLogConfigPolicy
-> Rep GetResolverQueryLogConfigPolicy x
Prelude.Generic)
newGetResolverQueryLogConfigPolicy ::
Prelude.Text ->
GetResolverQueryLogConfigPolicy
newGetResolverQueryLogConfigPolicy :: Text -> GetResolverQueryLogConfigPolicy
newGetResolverQueryLogConfigPolicy Text
pArn_ =
GetResolverQueryLogConfigPolicy' :: Text -> GetResolverQueryLogConfigPolicy
GetResolverQueryLogConfigPolicy' {$sel:arn:GetResolverQueryLogConfigPolicy' :: Text
arn = Text
pArn_}
getResolverQueryLogConfigPolicy_arn :: Lens.Lens' GetResolverQueryLogConfigPolicy Prelude.Text
getResolverQueryLogConfigPolicy_arn :: (Text -> f Text)
-> GetResolverQueryLogConfigPolicy
-> f GetResolverQueryLogConfigPolicy
getResolverQueryLogConfigPolicy_arn = (GetResolverQueryLogConfigPolicy -> Text)
-> (GetResolverQueryLogConfigPolicy
-> Text -> GetResolverQueryLogConfigPolicy)
-> Lens
GetResolverQueryLogConfigPolicy
GetResolverQueryLogConfigPolicy
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResolverQueryLogConfigPolicy' {Text
arn :: Text
$sel:arn:GetResolverQueryLogConfigPolicy' :: GetResolverQueryLogConfigPolicy -> Text
arn} -> Text
arn) (\s :: GetResolverQueryLogConfigPolicy
s@GetResolverQueryLogConfigPolicy' {} Text
a -> GetResolverQueryLogConfigPolicy
s {$sel:arn:GetResolverQueryLogConfigPolicy' :: Text
arn = Text
a} :: GetResolverQueryLogConfigPolicy)
instance
Core.AWSRequest
GetResolverQueryLogConfigPolicy
where
type
AWSResponse GetResolverQueryLogConfigPolicy =
GetResolverQueryLogConfigPolicyResponse
request :: GetResolverQueryLogConfigPolicy
-> Request GetResolverQueryLogConfigPolicy
request = Service
-> GetResolverQueryLogConfigPolicy
-> Request GetResolverQueryLogConfigPolicy
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetResolverQueryLogConfigPolicy
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetResolverQueryLogConfigPolicy)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetResolverQueryLogConfigPolicy))
-> Logger
-> Service
-> Proxy GetResolverQueryLogConfigPolicy
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetResolverQueryLogConfigPolicy)))
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 Text -> Int -> GetResolverQueryLogConfigPolicyResponse
GetResolverQueryLogConfigPolicyResponse'
(Maybe Text -> Int -> GetResolverQueryLogConfigPolicyResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetResolverQueryLogConfigPolicyResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ResolverQueryLogConfigPolicy")
Either String (Int -> GetResolverQueryLogConfigPolicyResponse)
-> Either String Int
-> Either String GetResolverQueryLogConfigPolicyResponse
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
GetResolverQueryLogConfigPolicy
instance
Prelude.NFData
GetResolverQueryLogConfigPolicy
instance
Core.ToHeaders
GetResolverQueryLogConfigPolicy
where
toHeaders :: GetResolverQueryLogConfigPolicy -> ResponseHeaders
toHeaders =
ResponseHeaders
-> GetResolverQueryLogConfigPolicy -> 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.GetResolverQueryLogConfigPolicy" ::
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 GetResolverQueryLogConfigPolicy where
toJSON :: GetResolverQueryLogConfigPolicy -> Value
toJSON GetResolverQueryLogConfigPolicy' {Text
arn :: Text
$sel:arn:GetResolverQueryLogConfigPolicy' :: GetResolverQueryLogConfigPolicy -> 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
"Arn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
arn)]
)
instance Core.ToPath GetResolverQueryLogConfigPolicy where
toPath :: GetResolverQueryLogConfigPolicy -> ByteString
toPath = ByteString -> GetResolverQueryLogConfigPolicy -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetResolverQueryLogConfigPolicy where
toQuery :: GetResolverQueryLogConfigPolicy -> QueryString
toQuery = QueryString -> GetResolverQueryLogConfigPolicy -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetResolverQueryLogConfigPolicyResponse = GetResolverQueryLogConfigPolicyResponse'
{
GetResolverQueryLogConfigPolicyResponse -> Maybe Text
resolverQueryLogConfigPolicy :: Prelude.Maybe Prelude.Text,
GetResolverQueryLogConfigPolicyResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetResolverQueryLogConfigPolicyResponse
-> GetResolverQueryLogConfigPolicyResponse -> Bool
(GetResolverQueryLogConfigPolicyResponse
-> GetResolverQueryLogConfigPolicyResponse -> Bool)
-> (GetResolverQueryLogConfigPolicyResponse
-> GetResolverQueryLogConfigPolicyResponse -> Bool)
-> Eq GetResolverQueryLogConfigPolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetResolverQueryLogConfigPolicyResponse
-> GetResolverQueryLogConfigPolicyResponse -> Bool
$c/= :: GetResolverQueryLogConfigPolicyResponse
-> GetResolverQueryLogConfigPolicyResponse -> Bool
== :: GetResolverQueryLogConfigPolicyResponse
-> GetResolverQueryLogConfigPolicyResponse -> Bool
$c== :: GetResolverQueryLogConfigPolicyResponse
-> GetResolverQueryLogConfigPolicyResponse -> Bool
Prelude.Eq, ReadPrec [GetResolverQueryLogConfigPolicyResponse]
ReadPrec GetResolverQueryLogConfigPolicyResponse
Int -> ReadS GetResolverQueryLogConfigPolicyResponse
ReadS [GetResolverQueryLogConfigPolicyResponse]
(Int -> ReadS GetResolverQueryLogConfigPolicyResponse)
-> ReadS [GetResolverQueryLogConfigPolicyResponse]
-> ReadPrec GetResolverQueryLogConfigPolicyResponse
-> ReadPrec [GetResolverQueryLogConfigPolicyResponse]
-> Read GetResolverQueryLogConfigPolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetResolverQueryLogConfigPolicyResponse]
$creadListPrec :: ReadPrec [GetResolverQueryLogConfigPolicyResponse]
readPrec :: ReadPrec GetResolverQueryLogConfigPolicyResponse
$creadPrec :: ReadPrec GetResolverQueryLogConfigPolicyResponse
readList :: ReadS [GetResolverQueryLogConfigPolicyResponse]
$creadList :: ReadS [GetResolverQueryLogConfigPolicyResponse]
readsPrec :: Int -> ReadS GetResolverQueryLogConfigPolicyResponse
$creadsPrec :: Int -> ReadS GetResolverQueryLogConfigPolicyResponse
Prelude.Read, Int -> GetResolverQueryLogConfigPolicyResponse -> ShowS
[GetResolverQueryLogConfigPolicyResponse] -> ShowS
GetResolverQueryLogConfigPolicyResponse -> String
(Int -> GetResolverQueryLogConfigPolicyResponse -> ShowS)
-> (GetResolverQueryLogConfigPolicyResponse -> String)
-> ([GetResolverQueryLogConfigPolicyResponse] -> ShowS)
-> Show GetResolverQueryLogConfigPolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetResolverQueryLogConfigPolicyResponse] -> ShowS
$cshowList :: [GetResolverQueryLogConfigPolicyResponse] -> ShowS
show :: GetResolverQueryLogConfigPolicyResponse -> String
$cshow :: GetResolverQueryLogConfigPolicyResponse -> String
showsPrec :: Int -> GetResolverQueryLogConfigPolicyResponse -> ShowS
$cshowsPrec :: Int -> GetResolverQueryLogConfigPolicyResponse -> ShowS
Prelude.Show, (forall x.
GetResolverQueryLogConfigPolicyResponse
-> Rep GetResolverQueryLogConfigPolicyResponse x)
-> (forall x.
Rep GetResolverQueryLogConfigPolicyResponse x
-> GetResolverQueryLogConfigPolicyResponse)
-> Generic GetResolverQueryLogConfigPolicyResponse
forall x.
Rep GetResolverQueryLogConfigPolicyResponse x
-> GetResolverQueryLogConfigPolicyResponse
forall x.
GetResolverQueryLogConfigPolicyResponse
-> Rep GetResolverQueryLogConfigPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetResolverQueryLogConfigPolicyResponse x
-> GetResolverQueryLogConfigPolicyResponse
$cfrom :: forall x.
GetResolverQueryLogConfigPolicyResponse
-> Rep GetResolverQueryLogConfigPolicyResponse x
Prelude.Generic)
newGetResolverQueryLogConfigPolicyResponse ::
Prelude.Int ->
GetResolverQueryLogConfigPolicyResponse
newGetResolverQueryLogConfigPolicyResponse :: Int -> GetResolverQueryLogConfigPolicyResponse
newGetResolverQueryLogConfigPolicyResponse
Int
pHttpStatus_ =
GetResolverQueryLogConfigPolicyResponse' :: Maybe Text -> Int -> GetResolverQueryLogConfigPolicyResponse
GetResolverQueryLogConfigPolicyResponse'
{ $sel:resolverQueryLogConfigPolicy:GetResolverQueryLogConfigPolicyResponse' :: Maybe Text
resolverQueryLogConfigPolicy =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetResolverQueryLogConfigPolicyResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getResolverQueryLogConfigPolicyResponse_resolverQueryLogConfigPolicy :: Lens.Lens' GetResolverQueryLogConfigPolicyResponse (Prelude.Maybe Prelude.Text)
getResolverQueryLogConfigPolicyResponse_resolverQueryLogConfigPolicy :: (Maybe Text -> f (Maybe Text))
-> GetResolverQueryLogConfigPolicyResponse
-> f GetResolverQueryLogConfigPolicyResponse
getResolverQueryLogConfigPolicyResponse_resolverQueryLogConfigPolicy = (GetResolverQueryLogConfigPolicyResponse -> Maybe Text)
-> (GetResolverQueryLogConfigPolicyResponse
-> Maybe Text -> GetResolverQueryLogConfigPolicyResponse)
-> Lens
GetResolverQueryLogConfigPolicyResponse
GetResolverQueryLogConfigPolicyResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResolverQueryLogConfigPolicyResponse' {Maybe Text
resolverQueryLogConfigPolicy :: Maybe Text
$sel:resolverQueryLogConfigPolicy:GetResolverQueryLogConfigPolicyResponse' :: GetResolverQueryLogConfigPolicyResponse -> Maybe Text
resolverQueryLogConfigPolicy} -> Maybe Text
resolverQueryLogConfigPolicy) (\s :: GetResolverQueryLogConfigPolicyResponse
s@GetResolverQueryLogConfigPolicyResponse' {} Maybe Text
a -> GetResolverQueryLogConfigPolicyResponse
s {$sel:resolverQueryLogConfigPolicy:GetResolverQueryLogConfigPolicyResponse' :: Maybe Text
resolverQueryLogConfigPolicy = Maybe Text
a} :: GetResolverQueryLogConfigPolicyResponse)
getResolverQueryLogConfigPolicyResponse_httpStatus :: Lens.Lens' GetResolverQueryLogConfigPolicyResponse Prelude.Int
getResolverQueryLogConfigPolicyResponse_httpStatus :: (Int -> f Int)
-> GetResolverQueryLogConfigPolicyResponse
-> f GetResolverQueryLogConfigPolicyResponse
getResolverQueryLogConfigPolicyResponse_httpStatus = (GetResolverQueryLogConfigPolicyResponse -> Int)
-> (GetResolverQueryLogConfigPolicyResponse
-> Int -> GetResolverQueryLogConfigPolicyResponse)
-> Lens
GetResolverQueryLogConfigPolicyResponse
GetResolverQueryLogConfigPolicyResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResolverQueryLogConfigPolicyResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetResolverQueryLogConfigPolicyResponse' :: GetResolverQueryLogConfigPolicyResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetResolverQueryLogConfigPolicyResponse
s@GetResolverQueryLogConfigPolicyResponse' {} Int
a -> GetResolverQueryLogConfigPolicyResponse
s {$sel:httpStatus:GetResolverQueryLogConfigPolicyResponse' :: Int
httpStatus = Int
a} :: GetResolverQueryLogConfigPolicyResponse)
instance
Prelude.NFData
GetResolverQueryLogConfigPolicyResponse