{-# 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.CreateResolverQueryLogConfig
-- 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)
--
-- Creates a Resolver query logging configuration, which defines where you
-- want Resolver to save DNS query logs that originate in your VPCs.
-- Resolver can log queries only for VPCs that are in the same Region as
-- the query logging configuration.
--
-- To specify which VPCs you want to log queries for, you use
-- @AssociateResolverQueryLogConfig@. For more information, see
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_AssociateResolverQueryLogConfig.html AssociateResolverQueryLogConfig>.
--
-- You can optionally use Resource Access Manager (RAM) to share a query
-- logging configuration with other Amazon Web Services accounts. The other
-- accounts can then associate VPCs with the configuration. The query logs
-- that Resolver creates for a configuration include all DNS queries that
-- originate in all VPCs that are associated with the configuration.
module Amazonka.Route53Resolver.CreateResolverQueryLogConfig
  ( -- * Creating a Request
    CreateResolverQueryLogConfig (..),
    newCreateResolverQueryLogConfig,

    -- * Request Lenses
    createResolverQueryLogConfig_tags,
    createResolverQueryLogConfig_name,
    createResolverQueryLogConfig_destinationArn,
    createResolverQueryLogConfig_creatorRequestId,

    -- * Destructuring the Response
    CreateResolverQueryLogConfigResponse (..),
    newCreateResolverQueryLogConfigResponse,

    -- * Response Lenses
    createResolverQueryLogConfigResponse_resolverQueryLogConfig,
    createResolverQueryLogConfigResponse_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:/ 'newCreateResolverQueryLogConfig' smart constructor.
data CreateResolverQueryLogConfig = CreateResolverQueryLogConfig'
  { -- | A list of the tag keys and values that you want to associate with the
    -- query logging configuration.
    CreateResolverQueryLogConfig -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name that you want to give the query logging configuration.
    CreateResolverQueryLogConfig -> Text
name :: Prelude.Text,
    -- | The ARN of the resource that you want Resolver to send query logs. You
    -- can send query logs to an S3 bucket, a CloudWatch Logs log group, or a
    -- Kinesis Data Firehose delivery stream. Examples of valid values include
    -- the following:
    --
    -- -   __S3 bucket__:
    --
    --     @arn:aws:s3:::examplebucket@
    --
    --     You can optionally append a file prefix to the end of the ARN.
    --
    --     @arn:aws:s3:::examplebucket\/development\/@
    --
    -- -   __CloudWatch Logs log group__:
    --
    --     @arn:aws:logs:us-west-1:123456789012:log-group:\/mystack-testgroup-12ABC1AB12A1:*@
    --
    -- -   __Kinesis Data Firehose delivery stream__:
    --
    --     @arn:aws:kinesis:us-east-2:0123456789:stream\/my_stream_name@
    CreateResolverQueryLogConfig -> Text
destinationArn :: Prelude.Text,
    -- | A unique string that identifies the request and that allows failed
    -- requests to be retried without the risk of running the operation twice.
    -- @CreatorRequestId@ can be any unique string, for example, a date\/time
    -- stamp.
    CreateResolverQueryLogConfig -> Text
creatorRequestId :: Prelude.Text
  }
  deriving (CreateResolverQueryLogConfig
-> CreateResolverQueryLogConfig -> Bool
(CreateResolverQueryLogConfig
 -> CreateResolverQueryLogConfig -> Bool)
-> (CreateResolverQueryLogConfig
    -> CreateResolverQueryLogConfig -> Bool)
-> Eq CreateResolverQueryLogConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateResolverQueryLogConfig
-> CreateResolverQueryLogConfig -> Bool
$c/= :: CreateResolverQueryLogConfig
-> CreateResolverQueryLogConfig -> Bool
== :: CreateResolverQueryLogConfig
-> CreateResolverQueryLogConfig -> Bool
$c== :: CreateResolverQueryLogConfig
-> CreateResolverQueryLogConfig -> Bool
Prelude.Eq, ReadPrec [CreateResolverQueryLogConfig]
ReadPrec CreateResolverQueryLogConfig
Int -> ReadS CreateResolverQueryLogConfig
ReadS [CreateResolverQueryLogConfig]
(Int -> ReadS CreateResolverQueryLogConfig)
-> ReadS [CreateResolverQueryLogConfig]
-> ReadPrec CreateResolverQueryLogConfig
-> ReadPrec [CreateResolverQueryLogConfig]
-> Read CreateResolverQueryLogConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateResolverQueryLogConfig]
$creadListPrec :: ReadPrec [CreateResolverQueryLogConfig]
readPrec :: ReadPrec CreateResolverQueryLogConfig
$creadPrec :: ReadPrec CreateResolverQueryLogConfig
readList :: ReadS [CreateResolverQueryLogConfig]
$creadList :: ReadS [CreateResolverQueryLogConfig]
readsPrec :: Int -> ReadS CreateResolverQueryLogConfig
$creadsPrec :: Int -> ReadS CreateResolverQueryLogConfig
Prelude.Read, Int -> CreateResolverQueryLogConfig -> ShowS
[CreateResolverQueryLogConfig] -> ShowS
CreateResolverQueryLogConfig -> String
(Int -> CreateResolverQueryLogConfig -> ShowS)
-> (CreateResolverQueryLogConfig -> String)
-> ([CreateResolverQueryLogConfig] -> ShowS)
-> Show CreateResolverQueryLogConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateResolverQueryLogConfig] -> ShowS
$cshowList :: [CreateResolverQueryLogConfig] -> ShowS
show :: CreateResolverQueryLogConfig -> String
$cshow :: CreateResolverQueryLogConfig -> String
showsPrec :: Int -> CreateResolverQueryLogConfig -> ShowS
$cshowsPrec :: Int -> CreateResolverQueryLogConfig -> ShowS
Prelude.Show, (forall x.
 CreateResolverQueryLogConfig -> Rep CreateResolverQueryLogConfig x)
-> (forall x.
    Rep CreateResolverQueryLogConfig x -> CreateResolverQueryLogConfig)
-> Generic CreateResolverQueryLogConfig
forall x.
Rep CreateResolverQueryLogConfig x -> CreateResolverQueryLogConfig
forall x.
CreateResolverQueryLogConfig -> Rep CreateResolverQueryLogConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateResolverQueryLogConfig x -> CreateResolverQueryLogConfig
$cfrom :: forall x.
CreateResolverQueryLogConfig -> Rep CreateResolverQueryLogConfig x
Prelude.Generic)

-- |
-- Create a value of 'CreateResolverQueryLogConfig' 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:
--
-- 'tags', 'createResolverQueryLogConfig_tags' - A list of the tag keys and values that you want to associate with the
-- query logging configuration.
--
-- 'name', 'createResolverQueryLogConfig_name' - The name that you want to give the query logging configuration.
--
-- 'destinationArn', 'createResolverQueryLogConfig_destinationArn' - The ARN of the resource that you want Resolver to send query logs. You
-- can send query logs to an S3 bucket, a CloudWatch Logs log group, or a
-- Kinesis Data Firehose delivery stream. Examples of valid values include
-- the following:
--
-- -   __S3 bucket__:
--
--     @arn:aws:s3:::examplebucket@
--
--     You can optionally append a file prefix to the end of the ARN.
--
--     @arn:aws:s3:::examplebucket\/development\/@
--
-- -   __CloudWatch Logs log group__:
--
--     @arn:aws:logs:us-west-1:123456789012:log-group:\/mystack-testgroup-12ABC1AB12A1:*@
--
-- -   __Kinesis Data Firehose delivery stream__:
--
--     @arn:aws:kinesis:us-east-2:0123456789:stream\/my_stream_name@
--
-- 'creatorRequestId', 'createResolverQueryLogConfig_creatorRequestId' - A unique string that identifies the request and that allows failed
-- requests to be retried without the risk of running the operation twice.
-- @CreatorRequestId@ can be any unique string, for example, a date\/time
-- stamp.
newCreateResolverQueryLogConfig ::
  -- | 'name'
  Prelude.Text ->
  -- | 'destinationArn'
  Prelude.Text ->
  -- | 'creatorRequestId'
  Prelude.Text ->
  CreateResolverQueryLogConfig
newCreateResolverQueryLogConfig :: Text -> Text -> Text -> CreateResolverQueryLogConfig
newCreateResolverQueryLogConfig
  Text
pName_
  Text
pDestinationArn_
  Text
pCreatorRequestId_ =
    CreateResolverQueryLogConfig' :: Maybe [Tag] -> Text -> Text -> Text -> CreateResolverQueryLogConfig
CreateResolverQueryLogConfig'
      { $sel:tags:CreateResolverQueryLogConfig' :: Maybe [Tag]
tags =
          Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:name:CreateResolverQueryLogConfig' :: Text
name = Text
pName_,
        $sel:destinationArn:CreateResolverQueryLogConfig' :: Text
destinationArn = Text
pDestinationArn_,
        $sel:creatorRequestId:CreateResolverQueryLogConfig' :: Text
creatorRequestId = Text
pCreatorRequestId_
      }

-- | A list of the tag keys and values that you want to associate with the
-- query logging configuration.
createResolverQueryLogConfig_tags :: Lens.Lens' CreateResolverQueryLogConfig (Prelude.Maybe [Tag])
createResolverQueryLogConfig_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateResolverQueryLogConfig -> f CreateResolverQueryLogConfig
createResolverQueryLogConfig_tags = (CreateResolverQueryLogConfig -> Maybe [Tag])
-> (CreateResolverQueryLogConfig
    -> Maybe [Tag] -> CreateResolverQueryLogConfig)
-> Lens
     CreateResolverQueryLogConfig
     CreateResolverQueryLogConfig
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateResolverQueryLogConfig' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateResolverQueryLogConfig' :: CreateResolverQueryLogConfig -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateResolverQueryLogConfig
s@CreateResolverQueryLogConfig' {} Maybe [Tag]
a -> CreateResolverQueryLogConfig
s {$sel:tags:CreateResolverQueryLogConfig' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateResolverQueryLogConfig) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateResolverQueryLogConfig -> f CreateResolverQueryLogConfig)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateResolverQueryLogConfig
-> f CreateResolverQueryLogConfig
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

-- | The name that you want to give the query logging configuration.
createResolverQueryLogConfig_name :: Lens.Lens' CreateResolverQueryLogConfig Prelude.Text
createResolverQueryLogConfig_name :: (Text -> f Text)
-> CreateResolverQueryLogConfig -> f CreateResolverQueryLogConfig
createResolverQueryLogConfig_name = (CreateResolverQueryLogConfig -> Text)
-> (CreateResolverQueryLogConfig
    -> Text -> CreateResolverQueryLogConfig)
-> Lens
     CreateResolverQueryLogConfig CreateResolverQueryLogConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateResolverQueryLogConfig' {Text
name :: Text
$sel:name:CreateResolverQueryLogConfig' :: CreateResolverQueryLogConfig -> Text
name} -> Text
name) (\s :: CreateResolverQueryLogConfig
s@CreateResolverQueryLogConfig' {} Text
a -> CreateResolverQueryLogConfig
s {$sel:name:CreateResolverQueryLogConfig' :: Text
name = Text
a} :: CreateResolverQueryLogConfig)

-- | The ARN of the resource that you want Resolver to send query logs. You
-- can send query logs to an S3 bucket, a CloudWatch Logs log group, or a
-- Kinesis Data Firehose delivery stream. Examples of valid values include
-- the following:
--
-- -   __S3 bucket__:
--
--     @arn:aws:s3:::examplebucket@
--
--     You can optionally append a file prefix to the end of the ARN.
--
--     @arn:aws:s3:::examplebucket\/development\/@
--
-- -   __CloudWatch Logs log group__:
--
--     @arn:aws:logs:us-west-1:123456789012:log-group:\/mystack-testgroup-12ABC1AB12A1:*@
--
-- -   __Kinesis Data Firehose delivery stream__:
--
--     @arn:aws:kinesis:us-east-2:0123456789:stream\/my_stream_name@
createResolverQueryLogConfig_destinationArn :: Lens.Lens' CreateResolverQueryLogConfig Prelude.Text
createResolverQueryLogConfig_destinationArn :: (Text -> f Text)
-> CreateResolverQueryLogConfig -> f CreateResolverQueryLogConfig
createResolverQueryLogConfig_destinationArn = (CreateResolverQueryLogConfig -> Text)
-> (CreateResolverQueryLogConfig
    -> Text -> CreateResolverQueryLogConfig)
-> Lens
     CreateResolverQueryLogConfig CreateResolverQueryLogConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateResolverQueryLogConfig' {Text
destinationArn :: Text
$sel:destinationArn:CreateResolverQueryLogConfig' :: CreateResolverQueryLogConfig -> Text
destinationArn} -> Text
destinationArn) (\s :: CreateResolverQueryLogConfig
s@CreateResolverQueryLogConfig' {} Text
a -> CreateResolverQueryLogConfig
s {$sel:destinationArn:CreateResolverQueryLogConfig' :: Text
destinationArn = Text
a} :: CreateResolverQueryLogConfig)

-- | A unique string that identifies the request and that allows failed
-- requests to be retried without the risk of running the operation twice.
-- @CreatorRequestId@ can be any unique string, for example, a date\/time
-- stamp.
createResolverQueryLogConfig_creatorRequestId :: Lens.Lens' CreateResolverQueryLogConfig Prelude.Text
createResolverQueryLogConfig_creatorRequestId :: (Text -> f Text)
-> CreateResolverQueryLogConfig -> f CreateResolverQueryLogConfig
createResolverQueryLogConfig_creatorRequestId = (CreateResolverQueryLogConfig -> Text)
-> (CreateResolverQueryLogConfig
    -> Text -> CreateResolverQueryLogConfig)
-> Lens
     CreateResolverQueryLogConfig CreateResolverQueryLogConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateResolverQueryLogConfig' {Text
creatorRequestId :: Text
$sel:creatorRequestId:CreateResolverQueryLogConfig' :: CreateResolverQueryLogConfig -> Text
creatorRequestId} -> Text
creatorRequestId) (\s :: CreateResolverQueryLogConfig
s@CreateResolverQueryLogConfig' {} Text
a -> CreateResolverQueryLogConfig
s {$sel:creatorRequestId:CreateResolverQueryLogConfig' :: Text
creatorRequestId = Text
a} :: CreateResolverQueryLogConfig)

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

instance Prelude.NFData CreateResolverQueryLogConfig

instance Core.ToHeaders CreateResolverQueryLogConfig where
  toHeaders :: CreateResolverQueryLogConfig -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateResolverQueryLogConfig -> 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.CreateResolverQueryLogConfig" ::
                          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 CreateResolverQueryLogConfig where
  toJSON :: CreateResolverQueryLogConfig -> Value
toJSON CreateResolverQueryLogConfig' {Maybe [Tag]
Text
creatorRequestId :: Text
destinationArn :: Text
name :: Text
tags :: Maybe [Tag]
$sel:creatorRequestId:CreateResolverQueryLogConfig' :: CreateResolverQueryLogConfig -> Text
$sel:destinationArn:CreateResolverQueryLogConfig' :: CreateResolverQueryLogConfig -> Text
$sel:name:CreateResolverQueryLogConfig' :: CreateResolverQueryLogConfig -> Text
$sel:tags:CreateResolverQueryLogConfig' :: CreateResolverQueryLogConfig -> Maybe [Tag]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"DestinationArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
destinationArn),
            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)
          ]
      )

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

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

-- | /See:/ 'newCreateResolverQueryLogConfigResponse' smart constructor.
data CreateResolverQueryLogConfigResponse = CreateResolverQueryLogConfigResponse'
  { -- | Information about the @CreateResolverQueryLogConfig@ request, including
    -- the status of the request.
    CreateResolverQueryLogConfigResponse
-> Maybe ResolverQueryLogConfig
resolverQueryLogConfig :: Prelude.Maybe ResolverQueryLogConfig,
    -- | The response's http status code.
    CreateResolverQueryLogConfigResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateResolverQueryLogConfigResponse
-> CreateResolverQueryLogConfigResponse -> Bool
(CreateResolverQueryLogConfigResponse
 -> CreateResolverQueryLogConfigResponse -> Bool)
-> (CreateResolverQueryLogConfigResponse
    -> CreateResolverQueryLogConfigResponse -> Bool)
-> Eq CreateResolverQueryLogConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateResolverQueryLogConfigResponse
-> CreateResolverQueryLogConfigResponse -> Bool
$c/= :: CreateResolverQueryLogConfigResponse
-> CreateResolverQueryLogConfigResponse -> Bool
== :: CreateResolverQueryLogConfigResponse
-> CreateResolverQueryLogConfigResponse -> Bool
$c== :: CreateResolverQueryLogConfigResponse
-> CreateResolverQueryLogConfigResponse -> Bool
Prelude.Eq, ReadPrec [CreateResolverQueryLogConfigResponse]
ReadPrec CreateResolverQueryLogConfigResponse
Int -> ReadS CreateResolverQueryLogConfigResponse
ReadS [CreateResolverQueryLogConfigResponse]
(Int -> ReadS CreateResolverQueryLogConfigResponse)
-> ReadS [CreateResolverQueryLogConfigResponse]
-> ReadPrec CreateResolverQueryLogConfigResponse
-> ReadPrec [CreateResolverQueryLogConfigResponse]
-> Read CreateResolverQueryLogConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateResolverQueryLogConfigResponse]
$creadListPrec :: ReadPrec [CreateResolverQueryLogConfigResponse]
readPrec :: ReadPrec CreateResolverQueryLogConfigResponse
$creadPrec :: ReadPrec CreateResolverQueryLogConfigResponse
readList :: ReadS [CreateResolverQueryLogConfigResponse]
$creadList :: ReadS [CreateResolverQueryLogConfigResponse]
readsPrec :: Int -> ReadS CreateResolverQueryLogConfigResponse
$creadsPrec :: Int -> ReadS CreateResolverQueryLogConfigResponse
Prelude.Read, Int -> CreateResolverQueryLogConfigResponse -> ShowS
[CreateResolverQueryLogConfigResponse] -> ShowS
CreateResolverQueryLogConfigResponse -> String
(Int -> CreateResolverQueryLogConfigResponse -> ShowS)
-> (CreateResolverQueryLogConfigResponse -> String)
-> ([CreateResolverQueryLogConfigResponse] -> ShowS)
-> Show CreateResolverQueryLogConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateResolverQueryLogConfigResponse] -> ShowS
$cshowList :: [CreateResolverQueryLogConfigResponse] -> ShowS
show :: CreateResolverQueryLogConfigResponse -> String
$cshow :: CreateResolverQueryLogConfigResponse -> String
showsPrec :: Int -> CreateResolverQueryLogConfigResponse -> ShowS
$cshowsPrec :: Int -> CreateResolverQueryLogConfigResponse -> ShowS
Prelude.Show, (forall x.
 CreateResolverQueryLogConfigResponse
 -> Rep CreateResolverQueryLogConfigResponse x)
-> (forall x.
    Rep CreateResolverQueryLogConfigResponse x
    -> CreateResolverQueryLogConfigResponse)
-> Generic CreateResolverQueryLogConfigResponse
forall x.
Rep CreateResolverQueryLogConfigResponse x
-> CreateResolverQueryLogConfigResponse
forall x.
CreateResolverQueryLogConfigResponse
-> Rep CreateResolverQueryLogConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateResolverQueryLogConfigResponse x
-> CreateResolverQueryLogConfigResponse
$cfrom :: forall x.
CreateResolverQueryLogConfigResponse
-> Rep CreateResolverQueryLogConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateResolverQueryLogConfigResponse' 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:
--
-- 'resolverQueryLogConfig', 'createResolverQueryLogConfigResponse_resolverQueryLogConfig' - Information about the @CreateResolverQueryLogConfig@ request, including
-- the status of the request.
--
-- 'httpStatus', 'createResolverQueryLogConfigResponse_httpStatus' - The response's http status code.
newCreateResolverQueryLogConfigResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateResolverQueryLogConfigResponse
newCreateResolverQueryLogConfigResponse :: Int -> CreateResolverQueryLogConfigResponse
newCreateResolverQueryLogConfigResponse Int
pHttpStatus_ =
  CreateResolverQueryLogConfigResponse' :: Maybe ResolverQueryLogConfig
-> Int -> CreateResolverQueryLogConfigResponse
CreateResolverQueryLogConfigResponse'
    { $sel:resolverQueryLogConfig:CreateResolverQueryLogConfigResponse' :: Maybe ResolverQueryLogConfig
resolverQueryLogConfig =
        Maybe ResolverQueryLogConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateResolverQueryLogConfigResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the @CreateResolverQueryLogConfig@ request, including
-- the status of the request.
createResolverQueryLogConfigResponse_resolverQueryLogConfig :: Lens.Lens' CreateResolverQueryLogConfigResponse (Prelude.Maybe ResolverQueryLogConfig)
createResolverQueryLogConfigResponse_resolverQueryLogConfig :: (Maybe ResolverQueryLogConfig -> f (Maybe ResolverQueryLogConfig))
-> CreateResolverQueryLogConfigResponse
-> f CreateResolverQueryLogConfigResponse
createResolverQueryLogConfigResponse_resolverQueryLogConfig = (CreateResolverQueryLogConfigResponse
 -> Maybe ResolverQueryLogConfig)
-> (CreateResolverQueryLogConfigResponse
    -> Maybe ResolverQueryLogConfig
    -> CreateResolverQueryLogConfigResponse)
-> Lens
     CreateResolverQueryLogConfigResponse
     CreateResolverQueryLogConfigResponse
     (Maybe ResolverQueryLogConfig)
     (Maybe ResolverQueryLogConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateResolverQueryLogConfigResponse' {Maybe ResolverQueryLogConfig
resolverQueryLogConfig :: Maybe ResolverQueryLogConfig
$sel:resolverQueryLogConfig:CreateResolverQueryLogConfigResponse' :: CreateResolverQueryLogConfigResponse
-> Maybe ResolverQueryLogConfig
resolverQueryLogConfig} -> Maybe ResolverQueryLogConfig
resolverQueryLogConfig) (\s :: CreateResolverQueryLogConfigResponse
s@CreateResolverQueryLogConfigResponse' {} Maybe ResolverQueryLogConfig
a -> CreateResolverQueryLogConfigResponse
s {$sel:resolverQueryLogConfig:CreateResolverQueryLogConfigResponse' :: Maybe ResolverQueryLogConfig
resolverQueryLogConfig = Maybe ResolverQueryLogConfig
a} :: CreateResolverQueryLogConfigResponse)

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

instance
  Prelude.NFData
    CreateResolverQueryLogConfigResponse