{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Route53Resolver.PutResolverQueryLogConfigPolicy
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Specifies an Amazon Web Services account that you want to share a query
-- logging configuration with, the query logging configuration that you
-- want to share, and the operations that you want the account to be able
-- to perform on the configuration.
module Amazonka.Route53Resolver.PutResolverQueryLogConfigPolicy
  ( -- * Creating a Request
    PutResolverQueryLogConfigPolicy (..),
    newPutResolverQueryLogConfigPolicy,

    -- * Request Lenses
    putResolverQueryLogConfigPolicy_arn,
    putResolverQueryLogConfigPolicy_resolverQueryLogConfigPolicy,

    -- * Destructuring the Response
    PutResolverQueryLogConfigPolicyResponse (..),
    newPutResolverQueryLogConfigPolicyResponse,

    -- * Response Lenses
    putResolverQueryLogConfigPolicyResponse_returnValue,
    putResolverQueryLogConfigPolicyResponse_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

-- | /See:/ 'newPutResolverQueryLogConfigPolicy' smart constructor.
data PutResolverQueryLogConfigPolicy = PutResolverQueryLogConfigPolicy'
  { -- | The Amazon Resource Name (ARN) of the account that you want to share
    -- rules with.
    PutResolverQueryLogConfigPolicy -> Text
arn :: Prelude.Text,
    -- | An Identity and Access Management policy statement that lists the query
    -- logging configurations that you want to share with another Amazon Web
    -- Services account and the operations that you want the account to be able
    -- to perform. You can specify the following operations in the @Actions@
    -- section of the statement:
    --
    -- -   @route53resolver:AssociateResolverQueryLogConfig@
    --
    -- -   @route53resolver:DisassociateResolverQueryLogConfig@
    --
    -- -   @route53resolver:ListResolverQueryLogConfigAssociations@
    --
    -- -   @route53resolver:ListResolverQueryLogConfigs@
    --
    -- In the @Resource@ section of the statement, you specify the ARNs for the
    -- query logging configurations that you want to share with the account
    -- that you specified in @Arn@.
    PutResolverQueryLogConfigPolicy -> Text
resolverQueryLogConfigPolicy :: Prelude.Text
  }
  deriving (PutResolverQueryLogConfigPolicy
-> PutResolverQueryLogConfigPolicy -> Bool
(PutResolverQueryLogConfigPolicy
 -> PutResolverQueryLogConfigPolicy -> Bool)
-> (PutResolverQueryLogConfigPolicy
    -> PutResolverQueryLogConfigPolicy -> Bool)
-> Eq PutResolverQueryLogConfigPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutResolverQueryLogConfigPolicy
-> PutResolverQueryLogConfigPolicy -> Bool
$c/= :: PutResolverQueryLogConfigPolicy
-> PutResolverQueryLogConfigPolicy -> Bool
== :: PutResolverQueryLogConfigPolicy
-> PutResolverQueryLogConfigPolicy -> Bool
$c== :: PutResolverQueryLogConfigPolicy
-> PutResolverQueryLogConfigPolicy -> Bool
Prelude.Eq, ReadPrec [PutResolverQueryLogConfigPolicy]
ReadPrec PutResolverQueryLogConfigPolicy
Int -> ReadS PutResolverQueryLogConfigPolicy
ReadS [PutResolverQueryLogConfigPolicy]
(Int -> ReadS PutResolverQueryLogConfigPolicy)
-> ReadS [PutResolverQueryLogConfigPolicy]
-> ReadPrec PutResolverQueryLogConfigPolicy
-> ReadPrec [PutResolverQueryLogConfigPolicy]
-> Read PutResolverQueryLogConfigPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutResolverQueryLogConfigPolicy]
$creadListPrec :: ReadPrec [PutResolverQueryLogConfigPolicy]
readPrec :: ReadPrec PutResolverQueryLogConfigPolicy
$creadPrec :: ReadPrec PutResolverQueryLogConfigPolicy
readList :: ReadS [PutResolverQueryLogConfigPolicy]
$creadList :: ReadS [PutResolverQueryLogConfigPolicy]
readsPrec :: Int -> ReadS PutResolverQueryLogConfigPolicy
$creadsPrec :: Int -> ReadS PutResolverQueryLogConfigPolicy
Prelude.Read, Int -> PutResolverQueryLogConfigPolicy -> ShowS
[PutResolverQueryLogConfigPolicy] -> ShowS
PutResolverQueryLogConfigPolicy -> String
(Int -> PutResolverQueryLogConfigPolicy -> ShowS)
-> (PutResolverQueryLogConfigPolicy -> String)
-> ([PutResolverQueryLogConfigPolicy] -> ShowS)
-> Show PutResolverQueryLogConfigPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutResolverQueryLogConfigPolicy] -> ShowS
$cshowList :: [PutResolverQueryLogConfigPolicy] -> ShowS
show :: PutResolverQueryLogConfigPolicy -> String
$cshow :: PutResolverQueryLogConfigPolicy -> String
showsPrec :: Int -> PutResolverQueryLogConfigPolicy -> ShowS
$cshowsPrec :: Int -> PutResolverQueryLogConfigPolicy -> ShowS
Prelude.Show, (forall x.
 PutResolverQueryLogConfigPolicy
 -> Rep PutResolverQueryLogConfigPolicy x)
-> (forall x.
    Rep PutResolverQueryLogConfigPolicy x
    -> PutResolverQueryLogConfigPolicy)
-> Generic PutResolverQueryLogConfigPolicy
forall x.
Rep PutResolverQueryLogConfigPolicy x
-> PutResolverQueryLogConfigPolicy
forall x.
PutResolverQueryLogConfigPolicy
-> Rep PutResolverQueryLogConfigPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutResolverQueryLogConfigPolicy x
-> PutResolverQueryLogConfigPolicy
$cfrom :: forall x.
PutResolverQueryLogConfigPolicy
-> Rep PutResolverQueryLogConfigPolicy x
Prelude.Generic)

-- |
-- Create a value of 'PutResolverQueryLogConfigPolicy' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'arn', 'putResolverQueryLogConfigPolicy_arn' - The Amazon Resource Name (ARN) of the account that you want to share
-- rules with.
--
-- 'resolverQueryLogConfigPolicy', 'putResolverQueryLogConfigPolicy_resolverQueryLogConfigPolicy' - An Identity and Access Management policy statement that lists the query
-- logging configurations that you want to share with another Amazon Web
-- Services account and the operations that you want the account to be able
-- to perform. You can specify the following operations in the @Actions@
-- section of the statement:
--
-- -   @route53resolver:AssociateResolverQueryLogConfig@
--
-- -   @route53resolver:DisassociateResolverQueryLogConfig@
--
-- -   @route53resolver:ListResolverQueryLogConfigAssociations@
--
-- -   @route53resolver:ListResolverQueryLogConfigs@
--
-- In the @Resource@ section of the statement, you specify the ARNs for the
-- query logging configurations that you want to share with the account
-- that you specified in @Arn@.
newPutResolverQueryLogConfigPolicy ::
  -- | 'arn'
  Prelude.Text ->
  -- | 'resolverQueryLogConfigPolicy'
  Prelude.Text ->
  PutResolverQueryLogConfigPolicy
newPutResolverQueryLogConfigPolicy :: Text -> Text -> PutResolverQueryLogConfigPolicy
newPutResolverQueryLogConfigPolicy
  Text
pArn_
  Text
pResolverQueryLogConfigPolicy_ =
    PutResolverQueryLogConfigPolicy' :: Text -> Text -> PutResolverQueryLogConfigPolicy
PutResolverQueryLogConfigPolicy'
      { $sel:arn:PutResolverQueryLogConfigPolicy' :: Text
arn = Text
pArn_,
        $sel:resolverQueryLogConfigPolicy:PutResolverQueryLogConfigPolicy' :: Text
resolverQueryLogConfigPolicy =
          Text
pResolverQueryLogConfigPolicy_
      }

-- | The Amazon Resource Name (ARN) of the account that you want to share
-- rules with.
putResolverQueryLogConfigPolicy_arn :: Lens.Lens' PutResolverQueryLogConfigPolicy Prelude.Text
putResolverQueryLogConfigPolicy_arn :: (Text -> f Text)
-> PutResolverQueryLogConfigPolicy
-> f PutResolverQueryLogConfigPolicy
putResolverQueryLogConfigPolicy_arn = (PutResolverQueryLogConfigPolicy -> Text)
-> (PutResolverQueryLogConfigPolicy
    -> Text -> PutResolverQueryLogConfigPolicy)
-> Lens
     PutResolverQueryLogConfigPolicy
     PutResolverQueryLogConfigPolicy
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutResolverQueryLogConfigPolicy' {Text
arn :: Text
$sel:arn:PutResolverQueryLogConfigPolicy' :: PutResolverQueryLogConfigPolicy -> Text
arn} -> Text
arn) (\s :: PutResolverQueryLogConfigPolicy
s@PutResolverQueryLogConfigPolicy' {} Text
a -> PutResolverQueryLogConfigPolicy
s {$sel:arn:PutResolverQueryLogConfigPolicy' :: Text
arn = Text
a} :: PutResolverQueryLogConfigPolicy)

-- | An Identity and Access Management policy statement that lists the query
-- logging configurations that you want to share with another Amazon Web
-- Services account and the operations that you want the account to be able
-- to perform. You can specify the following operations in the @Actions@
-- section of the statement:
--
-- -   @route53resolver:AssociateResolverQueryLogConfig@
--
-- -   @route53resolver:DisassociateResolverQueryLogConfig@
--
-- -   @route53resolver:ListResolverQueryLogConfigAssociations@
--
-- -   @route53resolver:ListResolverQueryLogConfigs@
--
-- In the @Resource@ section of the statement, you specify the ARNs for the
-- query logging configurations that you want to share with the account
-- that you specified in @Arn@.
putResolverQueryLogConfigPolicy_resolverQueryLogConfigPolicy :: Lens.Lens' PutResolverQueryLogConfigPolicy Prelude.Text
putResolverQueryLogConfigPolicy_resolverQueryLogConfigPolicy :: (Text -> f Text)
-> PutResolverQueryLogConfigPolicy
-> f PutResolverQueryLogConfigPolicy
putResolverQueryLogConfigPolicy_resolverQueryLogConfigPolicy = (PutResolverQueryLogConfigPolicy -> Text)
-> (PutResolverQueryLogConfigPolicy
    -> Text -> PutResolverQueryLogConfigPolicy)
-> Lens
     PutResolverQueryLogConfigPolicy
     PutResolverQueryLogConfigPolicy
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutResolverQueryLogConfigPolicy' {Text
resolverQueryLogConfigPolicy :: Text
$sel:resolverQueryLogConfigPolicy:PutResolverQueryLogConfigPolicy' :: PutResolverQueryLogConfigPolicy -> Text
resolverQueryLogConfigPolicy} -> Text
resolverQueryLogConfigPolicy) (\s :: PutResolverQueryLogConfigPolicy
s@PutResolverQueryLogConfigPolicy' {} Text
a -> PutResolverQueryLogConfigPolicy
s {$sel:resolverQueryLogConfigPolicy:PutResolverQueryLogConfigPolicy' :: Text
resolverQueryLogConfigPolicy = Text
a} :: PutResolverQueryLogConfigPolicy)

instance
  Core.AWSRequest
    PutResolverQueryLogConfigPolicy
  where
  type
    AWSResponse PutResolverQueryLogConfigPolicy =
      PutResolverQueryLogConfigPolicyResponse
  request :: PutResolverQueryLogConfigPolicy
-> Request PutResolverQueryLogConfigPolicy
request = Service
-> PutResolverQueryLogConfigPolicy
-> Request PutResolverQueryLogConfigPolicy
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy PutResolverQueryLogConfigPolicy
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse PutResolverQueryLogConfigPolicy)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse PutResolverQueryLogConfigPolicy))
-> Logger
-> Service
-> Proxy PutResolverQueryLogConfigPolicy
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse PutResolverQueryLogConfigPolicy)))
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 Bool -> Int -> PutResolverQueryLogConfigPolicyResponse
PutResolverQueryLogConfigPolicyResponse'
            (Maybe Bool -> Int -> PutResolverQueryLogConfigPolicyResponse)
-> Either String (Maybe Bool)
-> Either String (Int -> PutResolverQueryLogConfigPolicyResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ReturnValue")
            Either String (Int -> PutResolverQueryLogConfigPolicyResponse)
-> Either String Int
-> Either String PutResolverQueryLogConfigPolicyResponse
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
    PutResolverQueryLogConfigPolicy

instance
  Prelude.NFData
    PutResolverQueryLogConfigPolicy

instance
  Core.ToHeaders
    PutResolverQueryLogConfigPolicy
  where
  toHeaders :: PutResolverQueryLogConfigPolicy -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> PutResolverQueryLogConfigPolicy -> 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.PutResolverQueryLogConfigPolicy" ::
                          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 PutResolverQueryLogConfigPolicy where
  toJSON :: PutResolverQueryLogConfigPolicy -> Value
toJSON PutResolverQueryLogConfigPolicy' {Text
resolverQueryLogConfigPolicy :: Text
arn :: Text
$sel:resolverQueryLogConfigPolicy:PutResolverQueryLogConfigPolicy' :: PutResolverQueryLogConfigPolicy -> Text
$sel:arn:PutResolverQueryLogConfigPolicy' :: PutResolverQueryLogConfigPolicy -> 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),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"ResolverQueryLogConfigPolicy"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resolverQueryLogConfigPolicy
              )
          ]
      )

instance Core.ToPath PutResolverQueryLogConfigPolicy where
  toPath :: PutResolverQueryLogConfigPolicy -> ByteString
toPath = ByteString -> PutResolverQueryLogConfigPolicy -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery PutResolverQueryLogConfigPolicy where
  toQuery :: PutResolverQueryLogConfigPolicy -> QueryString
toQuery = QueryString -> PutResolverQueryLogConfigPolicy -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | The response to a @PutResolverQueryLogConfigPolicy@ request.
--
-- /See:/ 'newPutResolverQueryLogConfigPolicyResponse' smart constructor.
data PutResolverQueryLogConfigPolicyResponse = PutResolverQueryLogConfigPolicyResponse'
  { -- | Whether the @PutResolverQueryLogConfigPolicy@ request was successful.
    PutResolverQueryLogConfigPolicyResponse -> Maybe Bool
returnValue :: Prelude.Maybe Prelude.Bool,
    -- | The response's http status code.
    PutResolverQueryLogConfigPolicyResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (PutResolverQueryLogConfigPolicyResponse
-> PutResolverQueryLogConfigPolicyResponse -> Bool
(PutResolverQueryLogConfigPolicyResponse
 -> PutResolverQueryLogConfigPolicyResponse -> Bool)
-> (PutResolverQueryLogConfigPolicyResponse
    -> PutResolverQueryLogConfigPolicyResponse -> Bool)
-> Eq PutResolverQueryLogConfigPolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutResolverQueryLogConfigPolicyResponse
-> PutResolverQueryLogConfigPolicyResponse -> Bool
$c/= :: PutResolverQueryLogConfigPolicyResponse
-> PutResolverQueryLogConfigPolicyResponse -> Bool
== :: PutResolverQueryLogConfigPolicyResponse
-> PutResolverQueryLogConfigPolicyResponse -> Bool
$c== :: PutResolverQueryLogConfigPolicyResponse
-> PutResolverQueryLogConfigPolicyResponse -> Bool
Prelude.Eq, ReadPrec [PutResolverQueryLogConfigPolicyResponse]
ReadPrec PutResolverQueryLogConfigPolicyResponse
Int -> ReadS PutResolverQueryLogConfigPolicyResponse
ReadS [PutResolverQueryLogConfigPolicyResponse]
(Int -> ReadS PutResolverQueryLogConfigPolicyResponse)
-> ReadS [PutResolverQueryLogConfigPolicyResponse]
-> ReadPrec PutResolverQueryLogConfigPolicyResponse
-> ReadPrec [PutResolverQueryLogConfigPolicyResponse]
-> Read PutResolverQueryLogConfigPolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutResolverQueryLogConfigPolicyResponse]
$creadListPrec :: ReadPrec [PutResolverQueryLogConfigPolicyResponse]
readPrec :: ReadPrec PutResolverQueryLogConfigPolicyResponse
$creadPrec :: ReadPrec PutResolverQueryLogConfigPolicyResponse
readList :: ReadS [PutResolverQueryLogConfigPolicyResponse]
$creadList :: ReadS [PutResolverQueryLogConfigPolicyResponse]
readsPrec :: Int -> ReadS PutResolverQueryLogConfigPolicyResponse
$creadsPrec :: Int -> ReadS PutResolverQueryLogConfigPolicyResponse
Prelude.Read, Int -> PutResolverQueryLogConfigPolicyResponse -> ShowS
[PutResolverQueryLogConfigPolicyResponse] -> ShowS
PutResolverQueryLogConfigPolicyResponse -> String
(Int -> PutResolverQueryLogConfigPolicyResponse -> ShowS)
-> (PutResolverQueryLogConfigPolicyResponse -> String)
-> ([PutResolverQueryLogConfigPolicyResponse] -> ShowS)
-> Show PutResolverQueryLogConfigPolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutResolverQueryLogConfigPolicyResponse] -> ShowS
$cshowList :: [PutResolverQueryLogConfigPolicyResponse] -> ShowS
show :: PutResolverQueryLogConfigPolicyResponse -> String
$cshow :: PutResolverQueryLogConfigPolicyResponse -> String
showsPrec :: Int -> PutResolverQueryLogConfigPolicyResponse -> ShowS
$cshowsPrec :: Int -> PutResolverQueryLogConfigPolicyResponse -> ShowS
Prelude.Show, (forall x.
 PutResolverQueryLogConfigPolicyResponse
 -> Rep PutResolverQueryLogConfigPolicyResponse x)
-> (forall x.
    Rep PutResolverQueryLogConfigPolicyResponse x
    -> PutResolverQueryLogConfigPolicyResponse)
-> Generic PutResolverQueryLogConfigPolicyResponse
forall x.
Rep PutResolverQueryLogConfigPolicyResponse x
-> PutResolverQueryLogConfigPolicyResponse
forall x.
PutResolverQueryLogConfigPolicyResponse
-> Rep PutResolverQueryLogConfigPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutResolverQueryLogConfigPolicyResponse x
-> PutResolverQueryLogConfigPolicyResponse
$cfrom :: forall x.
PutResolverQueryLogConfigPolicyResponse
-> Rep PutResolverQueryLogConfigPolicyResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutResolverQueryLogConfigPolicyResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'returnValue', 'putResolverQueryLogConfigPolicyResponse_returnValue' - Whether the @PutResolverQueryLogConfigPolicy@ request was successful.
--
-- 'httpStatus', 'putResolverQueryLogConfigPolicyResponse_httpStatus' - The response's http status code.
newPutResolverQueryLogConfigPolicyResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutResolverQueryLogConfigPolicyResponse
newPutResolverQueryLogConfigPolicyResponse :: Int -> PutResolverQueryLogConfigPolicyResponse
newPutResolverQueryLogConfigPolicyResponse
  Int
pHttpStatus_ =
    PutResolverQueryLogConfigPolicyResponse' :: Maybe Bool -> Int -> PutResolverQueryLogConfigPolicyResponse
PutResolverQueryLogConfigPolicyResponse'
      { $sel:returnValue:PutResolverQueryLogConfigPolicyResponse' :: Maybe Bool
returnValue =
          Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:PutResolverQueryLogConfigPolicyResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Whether the @PutResolverQueryLogConfigPolicy@ request was successful.
putResolverQueryLogConfigPolicyResponse_returnValue :: Lens.Lens' PutResolverQueryLogConfigPolicyResponse (Prelude.Maybe Prelude.Bool)
putResolverQueryLogConfigPolicyResponse_returnValue :: (Maybe Bool -> f (Maybe Bool))
-> PutResolverQueryLogConfigPolicyResponse
-> f PutResolverQueryLogConfigPolicyResponse
putResolverQueryLogConfigPolicyResponse_returnValue = (PutResolverQueryLogConfigPolicyResponse -> Maybe Bool)
-> (PutResolverQueryLogConfigPolicyResponse
    -> Maybe Bool -> PutResolverQueryLogConfigPolicyResponse)
-> Lens
     PutResolverQueryLogConfigPolicyResponse
     PutResolverQueryLogConfigPolicyResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutResolverQueryLogConfigPolicyResponse' {Maybe Bool
returnValue :: Maybe Bool
$sel:returnValue:PutResolverQueryLogConfigPolicyResponse' :: PutResolverQueryLogConfigPolicyResponse -> Maybe Bool
returnValue} -> Maybe Bool
returnValue) (\s :: PutResolverQueryLogConfigPolicyResponse
s@PutResolverQueryLogConfigPolicyResponse' {} Maybe Bool
a -> PutResolverQueryLogConfigPolicyResponse
s {$sel:returnValue:PutResolverQueryLogConfigPolicyResponse' :: Maybe Bool
returnValue = Maybe Bool
a} :: PutResolverQueryLogConfigPolicyResponse)

-- | The response's http status code.
putResolverQueryLogConfigPolicyResponse_httpStatus :: Lens.Lens' PutResolverQueryLogConfigPolicyResponse Prelude.Int
putResolverQueryLogConfigPolicyResponse_httpStatus :: (Int -> f Int)
-> PutResolverQueryLogConfigPolicyResponse
-> f PutResolverQueryLogConfigPolicyResponse
putResolverQueryLogConfigPolicyResponse_httpStatus = (PutResolverQueryLogConfigPolicyResponse -> Int)
-> (PutResolverQueryLogConfigPolicyResponse
    -> Int -> PutResolverQueryLogConfigPolicyResponse)
-> Lens
     PutResolverQueryLogConfigPolicyResponse
     PutResolverQueryLogConfigPolicyResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutResolverQueryLogConfigPolicyResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutResolverQueryLogConfigPolicyResponse' :: PutResolverQueryLogConfigPolicyResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PutResolverQueryLogConfigPolicyResponse
s@PutResolverQueryLogConfigPolicyResponse' {} Int
a -> PutResolverQueryLogConfigPolicyResponse
s {$sel:httpStatus:PutResolverQueryLogConfigPolicyResponse' :: Int
httpStatus = Int
a} :: PutResolverQueryLogConfigPolicyResponse)

instance
  Prelude.NFData
    PutResolverQueryLogConfigPolicyResponse