{-# 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.ListResolverQueryLogConfigs
-- 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)
--
-- Lists information about the specified query logging configurations. Each
-- configuration defines where you want Resolver to save DNS query logs and
-- specifies the VPCs that you want to log queries for.
--
-- This operation returns paginated results.
module Amazonka.Route53Resolver.ListResolverQueryLogConfigs
  ( -- * Creating a Request
    ListResolverQueryLogConfigs (..),
    newListResolverQueryLogConfigs,

    -- * Request Lenses
    listResolverQueryLogConfigs_filters,
    listResolverQueryLogConfigs_nextToken,
    listResolverQueryLogConfigs_sortOrder,
    listResolverQueryLogConfigs_maxResults,
    listResolverQueryLogConfigs_sortBy,

    -- * Destructuring the Response
    ListResolverQueryLogConfigsResponse (..),
    newListResolverQueryLogConfigsResponse,

    -- * Response Lenses
    listResolverQueryLogConfigsResponse_totalFilteredCount,
    listResolverQueryLogConfigsResponse_resolverQueryLogConfigs,
    listResolverQueryLogConfigsResponse_nextToken,
    listResolverQueryLogConfigsResponse_totalCount,
    listResolverQueryLogConfigsResponse_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:/ 'newListResolverQueryLogConfigs' smart constructor.
data ListResolverQueryLogConfigs = ListResolverQueryLogConfigs'
  { -- | An optional specification to return a subset of query logging
    -- configurations.
    --
    -- If you submit a second or subsequent @ListResolverQueryLogConfigs@
    -- request and specify the @NextToken@ parameter, you must use the same
    -- values for @Filters@, if any, as in the previous request.
    ListResolverQueryLogConfigs -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | For the first @ListResolverQueryLogConfigs@ request, omit this value.
    --
    -- If there are more than @MaxResults@ query logging configurations that
    -- match the values that you specify for @Filters@, you can submit another
    -- @ListResolverQueryLogConfigs@ request to get the next group of
    -- configurations. In the next request, specify the value of @NextToken@
    -- from the previous response.
    ListResolverQueryLogConfigs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | If you specified a value for @SortBy@, the order that you want query
    -- logging configurations to be listed in, @ASCENDING@ or @DESCENDING@.
    --
    -- If you submit a second or subsequent @ListResolverQueryLogConfigs@
    -- request and specify the @NextToken@ parameter, you must use the same
    -- value for @SortOrder@, if any, as in the previous request.
    ListResolverQueryLogConfigs -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder,
    -- | The maximum number of query logging configurations that you want to
    -- return in the response to a @ListResolverQueryLogConfigs@ request. If
    -- you don\'t specify a value for @MaxResults@, Resolver returns up to 100
    -- query logging configurations.
    ListResolverQueryLogConfigs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The element that you want Resolver to sort query logging configurations
    -- by.
    --
    -- If you submit a second or subsequent @ListResolverQueryLogConfigs@
    -- request and specify the @NextToken@ parameter, you must use the same
    -- value for @SortBy@, if any, as in the previous request.
    --
    -- Valid values include the following elements:
    --
    -- -   @Arn@: The ARN of the query logging configuration
    --
    -- -   @AssociationCount@: The number of VPCs that are associated with the
    --     specified configuration
    --
    -- -   @CreationTime@: The date and time that Resolver returned when the
    --     configuration was created
    --
    -- -   @CreatorRequestId@: The value that was specified for
    --     @CreatorRequestId@ when the configuration was created
    --
    -- -   @DestinationArn@: The location that logs are sent to
    --
    -- -   @Id@: The ID of the configuration
    --
    -- -   @Name@: The name of the configuration
    --
    -- -   @OwnerId@: The Amazon Web Services account number of the account
    --     that created the configuration
    --
    -- -   @ShareStatus@: Whether the configuration is shared with other Amazon
    --     Web Services accounts or shared with the current account by another
    --     Amazon Web Services account. Sharing is configured through Resource
    --     Access Manager (RAM).
    --
    -- -   @Status@: The current status of the configuration. Valid values
    --     include the following:
    --
    --     -   @CREATING@: Resolver is creating the query logging
    --         configuration.
    --
    --     -   @CREATED@: The query logging configuration was successfully
    --         created. Resolver is logging queries that originate in the
    --         specified VPC.
    --
    --     -   @DELETING@: Resolver is deleting this query logging
    --         configuration.
    --
    --     -   @FAILED@: Resolver either couldn\'t create or couldn\'t delete
    --         the query logging configuration. Here are two common causes:
    --
    --         -   The specified destination (for example, an Amazon S3 bucket)
    --             was deleted.
    --
    --         -   Permissions don\'t allow sending logs to the destination.
    ListResolverQueryLogConfigs -> Maybe Text
sortBy :: Prelude.Maybe Prelude.Text
  }
  deriving (ListResolverQueryLogConfigs -> ListResolverQueryLogConfigs -> Bool
(ListResolverQueryLogConfigs
 -> ListResolverQueryLogConfigs -> Bool)
-> (ListResolverQueryLogConfigs
    -> ListResolverQueryLogConfigs -> Bool)
-> Eq ListResolverQueryLogConfigs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListResolverQueryLogConfigs -> ListResolverQueryLogConfigs -> Bool
$c/= :: ListResolverQueryLogConfigs -> ListResolverQueryLogConfigs -> Bool
== :: ListResolverQueryLogConfigs -> ListResolverQueryLogConfigs -> Bool
$c== :: ListResolverQueryLogConfigs -> ListResolverQueryLogConfigs -> Bool
Prelude.Eq, ReadPrec [ListResolverQueryLogConfigs]
ReadPrec ListResolverQueryLogConfigs
Int -> ReadS ListResolverQueryLogConfigs
ReadS [ListResolverQueryLogConfigs]
(Int -> ReadS ListResolverQueryLogConfigs)
-> ReadS [ListResolverQueryLogConfigs]
-> ReadPrec ListResolverQueryLogConfigs
-> ReadPrec [ListResolverQueryLogConfigs]
-> Read ListResolverQueryLogConfigs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListResolverQueryLogConfigs]
$creadListPrec :: ReadPrec [ListResolverQueryLogConfigs]
readPrec :: ReadPrec ListResolverQueryLogConfigs
$creadPrec :: ReadPrec ListResolverQueryLogConfigs
readList :: ReadS [ListResolverQueryLogConfigs]
$creadList :: ReadS [ListResolverQueryLogConfigs]
readsPrec :: Int -> ReadS ListResolverQueryLogConfigs
$creadsPrec :: Int -> ReadS ListResolverQueryLogConfigs
Prelude.Read, Int -> ListResolverQueryLogConfigs -> ShowS
[ListResolverQueryLogConfigs] -> ShowS
ListResolverQueryLogConfigs -> String
(Int -> ListResolverQueryLogConfigs -> ShowS)
-> (ListResolverQueryLogConfigs -> String)
-> ([ListResolverQueryLogConfigs] -> ShowS)
-> Show ListResolverQueryLogConfigs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListResolverQueryLogConfigs] -> ShowS
$cshowList :: [ListResolverQueryLogConfigs] -> ShowS
show :: ListResolverQueryLogConfigs -> String
$cshow :: ListResolverQueryLogConfigs -> String
showsPrec :: Int -> ListResolverQueryLogConfigs -> ShowS
$cshowsPrec :: Int -> ListResolverQueryLogConfigs -> ShowS
Prelude.Show, (forall x.
 ListResolverQueryLogConfigs -> Rep ListResolverQueryLogConfigs x)
-> (forall x.
    Rep ListResolverQueryLogConfigs x -> ListResolverQueryLogConfigs)
-> Generic ListResolverQueryLogConfigs
forall x.
Rep ListResolverQueryLogConfigs x -> ListResolverQueryLogConfigs
forall x.
ListResolverQueryLogConfigs -> Rep ListResolverQueryLogConfigs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListResolverQueryLogConfigs x -> ListResolverQueryLogConfigs
$cfrom :: forall x.
ListResolverQueryLogConfigs -> Rep ListResolverQueryLogConfigs x
Prelude.Generic)

-- |
-- Create a value of 'ListResolverQueryLogConfigs' 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:
--
-- 'filters', 'listResolverQueryLogConfigs_filters' - An optional specification to return a subset of query logging
-- configurations.
--
-- If you submit a second or subsequent @ListResolverQueryLogConfigs@
-- request and specify the @NextToken@ parameter, you must use the same
-- values for @Filters@, if any, as in the previous request.
--
-- 'nextToken', 'listResolverQueryLogConfigs_nextToken' - For the first @ListResolverQueryLogConfigs@ request, omit this value.
--
-- If there are more than @MaxResults@ query logging configurations that
-- match the values that you specify for @Filters@, you can submit another
-- @ListResolverQueryLogConfigs@ request to get the next group of
-- configurations. In the next request, specify the value of @NextToken@
-- from the previous response.
--
-- 'sortOrder', 'listResolverQueryLogConfigs_sortOrder' - If you specified a value for @SortBy@, the order that you want query
-- logging configurations to be listed in, @ASCENDING@ or @DESCENDING@.
--
-- If you submit a second or subsequent @ListResolverQueryLogConfigs@
-- request and specify the @NextToken@ parameter, you must use the same
-- value for @SortOrder@, if any, as in the previous request.
--
-- 'maxResults', 'listResolverQueryLogConfigs_maxResults' - The maximum number of query logging configurations that you want to
-- return in the response to a @ListResolverQueryLogConfigs@ request. If
-- you don\'t specify a value for @MaxResults@, Resolver returns up to 100
-- query logging configurations.
--
-- 'sortBy', 'listResolverQueryLogConfigs_sortBy' - The element that you want Resolver to sort query logging configurations
-- by.
--
-- If you submit a second or subsequent @ListResolverQueryLogConfigs@
-- request and specify the @NextToken@ parameter, you must use the same
-- value for @SortBy@, if any, as in the previous request.
--
-- Valid values include the following elements:
--
-- -   @Arn@: The ARN of the query logging configuration
--
-- -   @AssociationCount@: The number of VPCs that are associated with the
--     specified configuration
--
-- -   @CreationTime@: The date and time that Resolver returned when the
--     configuration was created
--
-- -   @CreatorRequestId@: The value that was specified for
--     @CreatorRequestId@ when the configuration was created
--
-- -   @DestinationArn@: The location that logs are sent to
--
-- -   @Id@: The ID of the configuration
--
-- -   @Name@: The name of the configuration
--
-- -   @OwnerId@: The Amazon Web Services account number of the account
--     that created the configuration
--
-- -   @ShareStatus@: Whether the configuration is shared with other Amazon
--     Web Services accounts or shared with the current account by another
--     Amazon Web Services account. Sharing is configured through Resource
--     Access Manager (RAM).
--
-- -   @Status@: The current status of the configuration. Valid values
--     include the following:
--
--     -   @CREATING@: Resolver is creating the query logging
--         configuration.
--
--     -   @CREATED@: The query logging configuration was successfully
--         created. Resolver is logging queries that originate in the
--         specified VPC.
--
--     -   @DELETING@: Resolver is deleting this query logging
--         configuration.
--
--     -   @FAILED@: Resolver either couldn\'t create or couldn\'t delete
--         the query logging configuration. Here are two common causes:
--
--         -   The specified destination (for example, an Amazon S3 bucket)
--             was deleted.
--
--         -   Permissions don\'t allow sending logs to the destination.
newListResolverQueryLogConfigs ::
  ListResolverQueryLogConfigs
newListResolverQueryLogConfigs :: ListResolverQueryLogConfigs
newListResolverQueryLogConfigs =
  ListResolverQueryLogConfigs' :: Maybe [Filter]
-> Maybe Text
-> Maybe SortOrder
-> Maybe Natural
-> Maybe Text
-> ListResolverQueryLogConfigs
ListResolverQueryLogConfigs'
    { $sel:filters:ListResolverQueryLogConfigs' :: Maybe [Filter]
filters =
        Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListResolverQueryLogConfigs' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:ListResolverQueryLogConfigs' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListResolverQueryLogConfigs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:sortBy:ListResolverQueryLogConfigs' :: Maybe Text
sortBy = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | An optional specification to return a subset of query logging
-- configurations.
--
-- If you submit a second or subsequent @ListResolverQueryLogConfigs@
-- request and specify the @NextToken@ parameter, you must use the same
-- values for @Filters@, if any, as in the previous request.
listResolverQueryLogConfigs_filters :: Lens.Lens' ListResolverQueryLogConfigs (Prelude.Maybe [Filter])
listResolverQueryLogConfigs_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> ListResolverQueryLogConfigs -> f ListResolverQueryLogConfigs
listResolverQueryLogConfigs_filters = (ListResolverQueryLogConfigs -> Maybe [Filter])
-> (ListResolverQueryLogConfigs
    -> Maybe [Filter] -> ListResolverQueryLogConfigs)
-> Lens
     ListResolverQueryLogConfigs
     ListResolverQueryLogConfigs
     (Maybe [Filter])
     (Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigs' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:ListResolverQueryLogConfigs' :: ListResolverQueryLogConfigs -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: ListResolverQueryLogConfigs
s@ListResolverQueryLogConfigs' {} Maybe [Filter]
a -> ListResolverQueryLogConfigs
s {$sel:filters:ListResolverQueryLogConfigs' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: ListResolverQueryLogConfigs) ((Maybe [Filter] -> f (Maybe [Filter]))
 -> ListResolverQueryLogConfigs -> f ListResolverQueryLogConfigs)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
    -> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> ListResolverQueryLogConfigs
-> f ListResolverQueryLogConfigs
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Filter] [Filter] [Filter] [Filter]
-> Iso
     (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter])
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 [Filter] [Filter] [Filter] [Filter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | For the first @ListResolverQueryLogConfigs@ request, omit this value.
--
-- If there are more than @MaxResults@ query logging configurations that
-- match the values that you specify for @Filters@, you can submit another
-- @ListResolverQueryLogConfigs@ request to get the next group of
-- configurations. In the next request, specify the value of @NextToken@
-- from the previous response.
listResolverQueryLogConfigs_nextToken :: Lens.Lens' ListResolverQueryLogConfigs (Prelude.Maybe Prelude.Text)
listResolverQueryLogConfigs_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListResolverQueryLogConfigs -> f ListResolverQueryLogConfigs
listResolverQueryLogConfigs_nextToken = (ListResolverQueryLogConfigs -> Maybe Text)
-> (ListResolverQueryLogConfigs
    -> Maybe Text -> ListResolverQueryLogConfigs)
-> Lens
     ListResolverQueryLogConfigs
     ListResolverQueryLogConfigs
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListResolverQueryLogConfigs' :: ListResolverQueryLogConfigs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListResolverQueryLogConfigs
s@ListResolverQueryLogConfigs' {} Maybe Text
a -> ListResolverQueryLogConfigs
s {$sel:nextToken:ListResolverQueryLogConfigs' :: Maybe Text
nextToken = Maybe Text
a} :: ListResolverQueryLogConfigs)

-- | If you specified a value for @SortBy@, the order that you want query
-- logging configurations to be listed in, @ASCENDING@ or @DESCENDING@.
--
-- If you submit a second or subsequent @ListResolverQueryLogConfigs@
-- request and specify the @NextToken@ parameter, you must use the same
-- value for @SortOrder@, if any, as in the previous request.
listResolverQueryLogConfigs_sortOrder :: Lens.Lens' ListResolverQueryLogConfigs (Prelude.Maybe SortOrder)
listResolverQueryLogConfigs_sortOrder :: (Maybe SortOrder -> f (Maybe SortOrder))
-> ListResolverQueryLogConfigs -> f ListResolverQueryLogConfigs
listResolverQueryLogConfigs_sortOrder = (ListResolverQueryLogConfigs -> Maybe SortOrder)
-> (ListResolverQueryLogConfigs
    -> Maybe SortOrder -> ListResolverQueryLogConfigs)
-> Lens
     ListResolverQueryLogConfigs
     ListResolverQueryLogConfigs
     (Maybe SortOrder)
     (Maybe SortOrder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigs' {Maybe SortOrder
sortOrder :: Maybe SortOrder
$sel:sortOrder:ListResolverQueryLogConfigs' :: ListResolverQueryLogConfigs -> Maybe SortOrder
sortOrder} -> Maybe SortOrder
sortOrder) (\s :: ListResolverQueryLogConfigs
s@ListResolverQueryLogConfigs' {} Maybe SortOrder
a -> ListResolverQueryLogConfigs
s {$sel:sortOrder:ListResolverQueryLogConfigs' :: Maybe SortOrder
sortOrder = Maybe SortOrder
a} :: ListResolverQueryLogConfigs)

-- | The maximum number of query logging configurations that you want to
-- return in the response to a @ListResolverQueryLogConfigs@ request. If
-- you don\'t specify a value for @MaxResults@, Resolver returns up to 100
-- query logging configurations.
listResolverQueryLogConfigs_maxResults :: Lens.Lens' ListResolverQueryLogConfigs (Prelude.Maybe Prelude.Natural)
listResolverQueryLogConfigs_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListResolverQueryLogConfigs -> f ListResolverQueryLogConfigs
listResolverQueryLogConfigs_maxResults = (ListResolverQueryLogConfigs -> Maybe Natural)
-> (ListResolverQueryLogConfigs
    -> Maybe Natural -> ListResolverQueryLogConfigs)
-> Lens
     ListResolverQueryLogConfigs
     ListResolverQueryLogConfigs
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListResolverQueryLogConfigs' :: ListResolverQueryLogConfigs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListResolverQueryLogConfigs
s@ListResolverQueryLogConfigs' {} Maybe Natural
a -> ListResolverQueryLogConfigs
s {$sel:maxResults:ListResolverQueryLogConfigs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListResolverQueryLogConfigs)

-- | The element that you want Resolver to sort query logging configurations
-- by.
--
-- If you submit a second or subsequent @ListResolverQueryLogConfigs@
-- request and specify the @NextToken@ parameter, you must use the same
-- value for @SortBy@, if any, as in the previous request.
--
-- Valid values include the following elements:
--
-- -   @Arn@: The ARN of the query logging configuration
--
-- -   @AssociationCount@: The number of VPCs that are associated with the
--     specified configuration
--
-- -   @CreationTime@: The date and time that Resolver returned when the
--     configuration was created
--
-- -   @CreatorRequestId@: The value that was specified for
--     @CreatorRequestId@ when the configuration was created
--
-- -   @DestinationArn@: The location that logs are sent to
--
-- -   @Id@: The ID of the configuration
--
-- -   @Name@: The name of the configuration
--
-- -   @OwnerId@: The Amazon Web Services account number of the account
--     that created the configuration
--
-- -   @ShareStatus@: Whether the configuration is shared with other Amazon
--     Web Services accounts or shared with the current account by another
--     Amazon Web Services account. Sharing is configured through Resource
--     Access Manager (RAM).
--
-- -   @Status@: The current status of the configuration. Valid values
--     include the following:
--
--     -   @CREATING@: Resolver is creating the query logging
--         configuration.
--
--     -   @CREATED@: The query logging configuration was successfully
--         created. Resolver is logging queries that originate in the
--         specified VPC.
--
--     -   @DELETING@: Resolver is deleting this query logging
--         configuration.
--
--     -   @FAILED@: Resolver either couldn\'t create or couldn\'t delete
--         the query logging configuration. Here are two common causes:
--
--         -   The specified destination (for example, an Amazon S3 bucket)
--             was deleted.
--
--         -   Permissions don\'t allow sending logs to the destination.
listResolverQueryLogConfigs_sortBy :: Lens.Lens' ListResolverQueryLogConfigs (Prelude.Maybe Prelude.Text)
listResolverQueryLogConfigs_sortBy :: (Maybe Text -> f (Maybe Text))
-> ListResolverQueryLogConfigs -> f ListResolverQueryLogConfigs
listResolverQueryLogConfigs_sortBy = (ListResolverQueryLogConfigs -> Maybe Text)
-> (ListResolverQueryLogConfigs
    -> Maybe Text -> ListResolverQueryLogConfigs)
-> Lens
     ListResolverQueryLogConfigs
     ListResolverQueryLogConfigs
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigs' {Maybe Text
sortBy :: Maybe Text
$sel:sortBy:ListResolverQueryLogConfigs' :: ListResolverQueryLogConfigs -> Maybe Text
sortBy} -> Maybe Text
sortBy) (\s :: ListResolverQueryLogConfigs
s@ListResolverQueryLogConfigs' {} Maybe Text
a -> ListResolverQueryLogConfigs
s {$sel:sortBy:ListResolverQueryLogConfigs' :: Maybe Text
sortBy = Maybe Text
a} :: ListResolverQueryLogConfigs)

instance Core.AWSPager ListResolverQueryLogConfigs where
  page :: ListResolverQueryLogConfigs
-> AWSResponse ListResolverQueryLogConfigs
-> Maybe ListResolverQueryLogConfigs
page ListResolverQueryLogConfigs
rq AWSResponse ListResolverQueryLogConfigs
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListResolverQueryLogConfigs
ListResolverQueryLogConfigsResponse
rs
            ListResolverQueryLogConfigsResponse
-> Getting (First Text) ListResolverQueryLogConfigsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListResolverQueryLogConfigsResponse
-> Const (First Text) ListResolverQueryLogConfigsResponse
Lens' ListResolverQueryLogConfigsResponse (Maybe Text)
listResolverQueryLogConfigsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListResolverQueryLogConfigsResponse
 -> Const (First Text) ListResolverQueryLogConfigsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListResolverQueryLogConfigsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListResolverQueryLogConfigs
forall a. Maybe a
Prelude.Nothing
    | Maybe [ResolverQueryLogConfig] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListResolverQueryLogConfigs
ListResolverQueryLogConfigsResponse
rs
            ListResolverQueryLogConfigsResponse
-> Getting
     (First [ResolverQueryLogConfig])
     ListResolverQueryLogConfigsResponse
     [ResolverQueryLogConfig]
-> Maybe [ResolverQueryLogConfig]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ResolverQueryLogConfig]
 -> Const
      (First [ResolverQueryLogConfig]) (Maybe [ResolverQueryLogConfig]))
-> ListResolverQueryLogConfigsResponse
-> Const
     (First [ResolverQueryLogConfig])
     ListResolverQueryLogConfigsResponse
Lens'
  ListResolverQueryLogConfigsResponse
  (Maybe [ResolverQueryLogConfig])
listResolverQueryLogConfigsResponse_resolverQueryLogConfigs
              ((Maybe [ResolverQueryLogConfig]
  -> Const
       (First [ResolverQueryLogConfig]) (Maybe [ResolverQueryLogConfig]))
 -> ListResolverQueryLogConfigsResponse
 -> Const
      (First [ResolverQueryLogConfig])
      ListResolverQueryLogConfigsResponse)
-> (([ResolverQueryLogConfig]
     -> Const (First [ResolverQueryLogConfig]) [ResolverQueryLogConfig])
    -> Maybe [ResolverQueryLogConfig]
    -> Const
         (First [ResolverQueryLogConfig]) (Maybe [ResolverQueryLogConfig]))
-> Getting
     (First [ResolverQueryLogConfig])
     ListResolverQueryLogConfigsResponse
     [ResolverQueryLogConfig]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ResolverQueryLogConfig]
 -> Const (First [ResolverQueryLogConfig]) [ResolverQueryLogConfig])
-> Maybe [ResolverQueryLogConfig]
-> Const
     (First [ResolverQueryLogConfig]) (Maybe [ResolverQueryLogConfig])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListResolverQueryLogConfigs
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListResolverQueryLogConfigs -> Maybe ListResolverQueryLogConfigs
forall a. a -> Maybe a
Prelude.Just (ListResolverQueryLogConfigs -> Maybe ListResolverQueryLogConfigs)
-> ListResolverQueryLogConfigs -> Maybe ListResolverQueryLogConfigs
forall a b. (a -> b) -> a -> b
Prelude.$
        ListResolverQueryLogConfigs
rq
          ListResolverQueryLogConfigs
-> (ListResolverQueryLogConfigs -> ListResolverQueryLogConfigs)
-> ListResolverQueryLogConfigs
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListResolverQueryLogConfigs
-> Identity ListResolverQueryLogConfigs
Lens
  ListResolverQueryLogConfigs
  ListResolverQueryLogConfigs
  (Maybe Text)
  (Maybe Text)
listResolverQueryLogConfigs_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListResolverQueryLogConfigs
 -> Identity ListResolverQueryLogConfigs)
-> Maybe Text
-> ListResolverQueryLogConfigs
-> ListResolverQueryLogConfigs
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListResolverQueryLogConfigs
ListResolverQueryLogConfigsResponse
rs
          ListResolverQueryLogConfigsResponse
-> Getting (First Text) ListResolverQueryLogConfigsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListResolverQueryLogConfigsResponse
-> Const (First Text) ListResolverQueryLogConfigsResponse
Lens' ListResolverQueryLogConfigsResponse (Maybe Text)
listResolverQueryLogConfigsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListResolverQueryLogConfigsResponse
 -> Const (First Text) ListResolverQueryLogConfigsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListResolverQueryLogConfigsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListResolverQueryLogConfigs where
  type
    AWSResponse ListResolverQueryLogConfigs =
      ListResolverQueryLogConfigsResponse
  request :: ListResolverQueryLogConfigs -> Request ListResolverQueryLogConfigs
request = Service
-> ListResolverQueryLogConfigs
-> Request ListResolverQueryLogConfigs
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListResolverQueryLogConfigs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListResolverQueryLogConfigs)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListResolverQueryLogConfigs))
-> Logger
-> Service
-> Proxy ListResolverQueryLogConfigs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListResolverQueryLogConfigs)))
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 Int
-> Maybe [ResolverQueryLogConfig]
-> Maybe Text
-> Maybe Int
-> Int
-> ListResolverQueryLogConfigsResponse
ListResolverQueryLogConfigsResponse'
            (Maybe Int
 -> Maybe [ResolverQueryLogConfig]
 -> Maybe Text
 -> Maybe Int
 -> Int
 -> ListResolverQueryLogConfigsResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe [ResolverQueryLogConfig]
      -> Maybe Text
      -> Maybe Int
      -> Int
      -> ListResolverQueryLogConfigsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TotalFilteredCount")
            Either
  String
  (Maybe [ResolverQueryLogConfig]
   -> Maybe Text
   -> Maybe Int
   -> Int
   -> ListResolverQueryLogConfigsResponse)
-> Either String (Maybe [ResolverQueryLogConfig])
-> Either
     String
     (Maybe Text
      -> Maybe Int -> Int -> ListResolverQueryLogConfigsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [ResolverQueryLogConfig]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ResolverQueryLogConfigs"
                            Either String (Maybe (Maybe [ResolverQueryLogConfig]))
-> Maybe [ResolverQueryLogConfig]
-> Either String (Maybe [ResolverQueryLogConfig])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ResolverQueryLogConfig]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text
   -> Maybe Int -> Int -> ListResolverQueryLogConfigsResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Int -> Int -> ListResolverQueryLogConfigsResponse)
forall (f :: * -> *) a b. Applicative f => 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
"NextToken")
            Either
  String (Maybe Int -> Int -> ListResolverQueryLogConfigsResponse)
-> Either String (Maybe Int)
-> Either String (Int -> ListResolverQueryLogConfigsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TotalCount")
            Either String (Int -> ListResolverQueryLogConfigsResponse)
-> Either String Int
-> Either String ListResolverQueryLogConfigsResponse
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 ListResolverQueryLogConfigs

instance Prelude.NFData ListResolverQueryLogConfigs

instance Core.ToHeaders ListResolverQueryLogConfigs where
  toHeaders :: ListResolverQueryLogConfigs -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListResolverQueryLogConfigs -> 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.ListResolverQueryLogConfigs" ::
                          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 ListResolverQueryLogConfigs where
  toJSON :: ListResolverQueryLogConfigs -> Value
toJSON ListResolverQueryLogConfigs' {Maybe Natural
Maybe [Filter]
Maybe Text
Maybe SortOrder
sortBy :: Maybe Text
maxResults :: Maybe Natural
sortOrder :: Maybe SortOrder
nextToken :: Maybe Text
filters :: Maybe [Filter]
$sel:sortBy:ListResolverQueryLogConfigs' :: ListResolverQueryLogConfigs -> Maybe Text
$sel:maxResults:ListResolverQueryLogConfigs' :: ListResolverQueryLogConfigs -> Maybe Natural
$sel:sortOrder:ListResolverQueryLogConfigs' :: ListResolverQueryLogConfigs -> Maybe SortOrder
$sel:nextToken:ListResolverQueryLogConfigs' :: ListResolverQueryLogConfigs -> Maybe Text
$sel:filters:ListResolverQueryLogConfigs' :: ListResolverQueryLogConfigs -> Maybe [Filter]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Filters" Text -> [Filter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Filter] -> Pair) -> Maybe [Filter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters,
            (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"SortOrder" Text -> SortOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SortOrder -> Pair) -> Maybe SortOrder -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SortOrder
sortOrder,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Text
"SortBy" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sortBy
          ]
      )

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

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

-- | /See:/ 'newListResolverQueryLogConfigsResponse' smart constructor.
data ListResolverQueryLogConfigsResponse = ListResolverQueryLogConfigsResponse'
  { -- | The total number of query logging configurations that were created by
    -- the current account in the specified Region and that match the filters
    -- that were specified in the @ListResolverQueryLogConfigs@ request. For
    -- the total number of query logging configurations that were created by
    -- the current account in the specified Region, see @TotalCount@.
    ListResolverQueryLogConfigsResponse -> Maybe Int
totalFilteredCount :: Prelude.Maybe Prelude.Int,
    -- | A list that contains one @ResolverQueryLogConfig@ element for each query
    -- logging configuration that matches the values that you specified for
    -- @Filter@.
    ListResolverQueryLogConfigsResponse
-> Maybe [ResolverQueryLogConfig]
resolverQueryLogConfigs :: Prelude.Maybe [ResolverQueryLogConfig],
    -- | If there are more than @MaxResults@ query logging configurations, you
    -- can submit another @ListResolverQueryLogConfigs@ request to get the next
    -- group of configurations. In the next request, specify the value of
    -- @NextToken@ from the previous response.
    ListResolverQueryLogConfigsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The total number of query logging configurations that were created by
    -- the current account in the specified Region. This count can differ from
    -- the number of query logging configurations that are returned in a
    -- @ListResolverQueryLogConfigs@ response, depending on the values that you
    -- specify in the request.
    ListResolverQueryLogConfigsResponse -> Maybe Int
totalCount :: Prelude.Maybe Prelude.Int,
    -- | The response's http status code.
    ListResolverQueryLogConfigsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListResolverQueryLogConfigsResponse
-> ListResolverQueryLogConfigsResponse -> Bool
(ListResolverQueryLogConfigsResponse
 -> ListResolverQueryLogConfigsResponse -> Bool)
-> (ListResolverQueryLogConfigsResponse
    -> ListResolverQueryLogConfigsResponse -> Bool)
-> Eq ListResolverQueryLogConfigsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListResolverQueryLogConfigsResponse
-> ListResolverQueryLogConfigsResponse -> Bool
$c/= :: ListResolverQueryLogConfigsResponse
-> ListResolverQueryLogConfigsResponse -> Bool
== :: ListResolverQueryLogConfigsResponse
-> ListResolverQueryLogConfigsResponse -> Bool
$c== :: ListResolverQueryLogConfigsResponse
-> ListResolverQueryLogConfigsResponse -> Bool
Prelude.Eq, ReadPrec [ListResolverQueryLogConfigsResponse]
ReadPrec ListResolverQueryLogConfigsResponse
Int -> ReadS ListResolverQueryLogConfigsResponse
ReadS [ListResolverQueryLogConfigsResponse]
(Int -> ReadS ListResolverQueryLogConfigsResponse)
-> ReadS [ListResolverQueryLogConfigsResponse]
-> ReadPrec ListResolverQueryLogConfigsResponse
-> ReadPrec [ListResolverQueryLogConfigsResponse]
-> Read ListResolverQueryLogConfigsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListResolverQueryLogConfigsResponse]
$creadListPrec :: ReadPrec [ListResolverQueryLogConfigsResponse]
readPrec :: ReadPrec ListResolverQueryLogConfigsResponse
$creadPrec :: ReadPrec ListResolverQueryLogConfigsResponse
readList :: ReadS [ListResolverQueryLogConfigsResponse]
$creadList :: ReadS [ListResolverQueryLogConfigsResponse]
readsPrec :: Int -> ReadS ListResolverQueryLogConfigsResponse
$creadsPrec :: Int -> ReadS ListResolverQueryLogConfigsResponse
Prelude.Read, Int -> ListResolverQueryLogConfigsResponse -> ShowS
[ListResolverQueryLogConfigsResponse] -> ShowS
ListResolverQueryLogConfigsResponse -> String
(Int -> ListResolverQueryLogConfigsResponse -> ShowS)
-> (ListResolverQueryLogConfigsResponse -> String)
-> ([ListResolverQueryLogConfigsResponse] -> ShowS)
-> Show ListResolverQueryLogConfigsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListResolverQueryLogConfigsResponse] -> ShowS
$cshowList :: [ListResolverQueryLogConfigsResponse] -> ShowS
show :: ListResolverQueryLogConfigsResponse -> String
$cshow :: ListResolverQueryLogConfigsResponse -> String
showsPrec :: Int -> ListResolverQueryLogConfigsResponse -> ShowS
$cshowsPrec :: Int -> ListResolverQueryLogConfigsResponse -> ShowS
Prelude.Show, (forall x.
 ListResolverQueryLogConfigsResponse
 -> Rep ListResolverQueryLogConfigsResponse x)
-> (forall x.
    Rep ListResolverQueryLogConfigsResponse x
    -> ListResolverQueryLogConfigsResponse)
-> Generic ListResolverQueryLogConfigsResponse
forall x.
Rep ListResolverQueryLogConfigsResponse x
-> ListResolverQueryLogConfigsResponse
forall x.
ListResolverQueryLogConfigsResponse
-> Rep ListResolverQueryLogConfigsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListResolverQueryLogConfigsResponse x
-> ListResolverQueryLogConfigsResponse
$cfrom :: forall x.
ListResolverQueryLogConfigsResponse
-> Rep ListResolverQueryLogConfigsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListResolverQueryLogConfigsResponse' 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:
--
-- 'totalFilteredCount', 'listResolverQueryLogConfigsResponse_totalFilteredCount' - The total number of query logging configurations that were created by
-- the current account in the specified Region and that match the filters
-- that were specified in the @ListResolverQueryLogConfigs@ request. For
-- the total number of query logging configurations that were created by
-- the current account in the specified Region, see @TotalCount@.
--
-- 'resolverQueryLogConfigs', 'listResolverQueryLogConfigsResponse_resolverQueryLogConfigs' - A list that contains one @ResolverQueryLogConfig@ element for each query
-- logging configuration that matches the values that you specified for
-- @Filter@.
--
-- 'nextToken', 'listResolverQueryLogConfigsResponse_nextToken' - If there are more than @MaxResults@ query logging configurations, you
-- can submit another @ListResolverQueryLogConfigs@ request to get the next
-- group of configurations. In the next request, specify the value of
-- @NextToken@ from the previous response.
--
-- 'totalCount', 'listResolverQueryLogConfigsResponse_totalCount' - The total number of query logging configurations that were created by
-- the current account in the specified Region. This count can differ from
-- the number of query logging configurations that are returned in a
-- @ListResolverQueryLogConfigs@ response, depending on the values that you
-- specify in the request.
--
-- 'httpStatus', 'listResolverQueryLogConfigsResponse_httpStatus' - The response's http status code.
newListResolverQueryLogConfigsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListResolverQueryLogConfigsResponse
newListResolverQueryLogConfigsResponse :: Int -> ListResolverQueryLogConfigsResponse
newListResolverQueryLogConfigsResponse Int
pHttpStatus_ =
  ListResolverQueryLogConfigsResponse' :: Maybe Int
-> Maybe [ResolverQueryLogConfig]
-> Maybe Text
-> Maybe Int
-> Int
-> ListResolverQueryLogConfigsResponse
ListResolverQueryLogConfigsResponse'
    { $sel:totalFilteredCount:ListResolverQueryLogConfigsResponse' :: Maybe Int
totalFilteredCount =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:resolverQueryLogConfigs:ListResolverQueryLogConfigsResponse' :: Maybe [ResolverQueryLogConfig]
resolverQueryLogConfigs =
        Maybe [ResolverQueryLogConfig]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListResolverQueryLogConfigsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:totalCount:ListResolverQueryLogConfigsResponse' :: Maybe Int
totalCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListResolverQueryLogConfigsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The total number of query logging configurations that were created by
-- the current account in the specified Region and that match the filters
-- that were specified in the @ListResolverQueryLogConfigs@ request. For
-- the total number of query logging configurations that were created by
-- the current account in the specified Region, see @TotalCount@.
listResolverQueryLogConfigsResponse_totalFilteredCount :: Lens.Lens' ListResolverQueryLogConfigsResponse (Prelude.Maybe Prelude.Int)
listResolverQueryLogConfigsResponse_totalFilteredCount :: (Maybe Int -> f (Maybe Int))
-> ListResolverQueryLogConfigsResponse
-> f ListResolverQueryLogConfigsResponse
listResolverQueryLogConfigsResponse_totalFilteredCount = (ListResolverQueryLogConfigsResponse -> Maybe Int)
-> (ListResolverQueryLogConfigsResponse
    -> Maybe Int -> ListResolverQueryLogConfigsResponse)
-> Lens
     ListResolverQueryLogConfigsResponse
     ListResolverQueryLogConfigsResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigsResponse' {Maybe Int
totalFilteredCount :: Maybe Int
$sel:totalFilteredCount:ListResolverQueryLogConfigsResponse' :: ListResolverQueryLogConfigsResponse -> Maybe Int
totalFilteredCount} -> Maybe Int
totalFilteredCount) (\s :: ListResolverQueryLogConfigsResponse
s@ListResolverQueryLogConfigsResponse' {} Maybe Int
a -> ListResolverQueryLogConfigsResponse
s {$sel:totalFilteredCount:ListResolverQueryLogConfigsResponse' :: Maybe Int
totalFilteredCount = Maybe Int
a} :: ListResolverQueryLogConfigsResponse)

-- | A list that contains one @ResolverQueryLogConfig@ element for each query
-- logging configuration that matches the values that you specified for
-- @Filter@.
listResolverQueryLogConfigsResponse_resolverQueryLogConfigs :: Lens.Lens' ListResolverQueryLogConfigsResponse (Prelude.Maybe [ResolverQueryLogConfig])
listResolverQueryLogConfigsResponse_resolverQueryLogConfigs :: (Maybe [ResolverQueryLogConfig]
 -> f (Maybe [ResolverQueryLogConfig]))
-> ListResolverQueryLogConfigsResponse
-> f ListResolverQueryLogConfigsResponse
listResolverQueryLogConfigsResponse_resolverQueryLogConfigs = (ListResolverQueryLogConfigsResponse
 -> Maybe [ResolverQueryLogConfig])
-> (ListResolverQueryLogConfigsResponse
    -> Maybe [ResolverQueryLogConfig]
    -> ListResolverQueryLogConfigsResponse)
-> Lens'
     ListResolverQueryLogConfigsResponse
     (Maybe [ResolverQueryLogConfig])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigsResponse' {Maybe [ResolverQueryLogConfig]
resolverQueryLogConfigs :: Maybe [ResolverQueryLogConfig]
$sel:resolverQueryLogConfigs:ListResolverQueryLogConfigsResponse' :: ListResolverQueryLogConfigsResponse
-> Maybe [ResolverQueryLogConfig]
resolverQueryLogConfigs} -> Maybe [ResolverQueryLogConfig]
resolverQueryLogConfigs) (\s :: ListResolverQueryLogConfigsResponse
s@ListResolverQueryLogConfigsResponse' {} Maybe [ResolverQueryLogConfig]
a -> ListResolverQueryLogConfigsResponse
s {$sel:resolverQueryLogConfigs:ListResolverQueryLogConfigsResponse' :: Maybe [ResolverQueryLogConfig]
resolverQueryLogConfigs = Maybe [ResolverQueryLogConfig]
a} :: ListResolverQueryLogConfigsResponse) ((Maybe [ResolverQueryLogConfig]
  -> f (Maybe [ResolverQueryLogConfig]))
 -> ListResolverQueryLogConfigsResponse
 -> f ListResolverQueryLogConfigsResponse)
-> ((Maybe [ResolverQueryLogConfig]
     -> f (Maybe [ResolverQueryLogConfig]))
    -> Maybe [ResolverQueryLogConfig]
    -> f (Maybe [ResolverQueryLogConfig]))
-> (Maybe [ResolverQueryLogConfig]
    -> f (Maybe [ResolverQueryLogConfig]))
-> ListResolverQueryLogConfigsResponse
-> f ListResolverQueryLogConfigsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ResolverQueryLogConfig]
  [ResolverQueryLogConfig]
  [ResolverQueryLogConfig]
  [ResolverQueryLogConfig]
-> Iso
     (Maybe [ResolverQueryLogConfig])
     (Maybe [ResolverQueryLogConfig])
     (Maybe [ResolverQueryLogConfig])
     (Maybe [ResolverQueryLogConfig])
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
  [ResolverQueryLogConfig]
  [ResolverQueryLogConfig]
  [ResolverQueryLogConfig]
  [ResolverQueryLogConfig]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If there are more than @MaxResults@ query logging configurations, you
-- can submit another @ListResolverQueryLogConfigs@ request to get the next
-- group of configurations. In the next request, specify the value of
-- @NextToken@ from the previous response.
listResolverQueryLogConfigsResponse_nextToken :: Lens.Lens' ListResolverQueryLogConfigsResponse (Prelude.Maybe Prelude.Text)
listResolverQueryLogConfigsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListResolverQueryLogConfigsResponse
-> f ListResolverQueryLogConfigsResponse
listResolverQueryLogConfigsResponse_nextToken = (ListResolverQueryLogConfigsResponse -> Maybe Text)
-> (ListResolverQueryLogConfigsResponse
    -> Maybe Text -> ListResolverQueryLogConfigsResponse)
-> Lens' ListResolverQueryLogConfigsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListResolverQueryLogConfigsResponse' :: ListResolverQueryLogConfigsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListResolverQueryLogConfigsResponse
s@ListResolverQueryLogConfigsResponse' {} Maybe Text
a -> ListResolverQueryLogConfigsResponse
s {$sel:nextToken:ListResolverQueryLogConfigsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListResolverQueryLogConfigsResponse)

-- | The total number of query logging configurations that were created by
-- the current account in the specified Region. This count can differ from
-- the number of query logging configurations that are returned in a
-- @ListResolverQueryLogConfigs@ response, depending on the values that you
-- specify in the request.
listResolverQueryLogConfigsResponse_totalCount :: Lens.Lens' ListResolverQueryLogConfigsResponse (Prelude.Maybe Prelude.Int)
listResolverQueryLogConfigsResponse_totalCount :: (Maybe Int -> f (Maybe Int))
-> ListResolverQueryLogConfigsResponse
-> f ListResolverQueryLogConfigsResponse
listResolverQueryLogConfigsResponse_totalCount = (ListResolverQueryLogConfigsResponse -> Maybe Int)
-> (ListResolverQueryLogConfigsResponse
    -> Maybe Int -> ListResolverQueryLogConfigsResponse)
-> Lens
     ListResolverQueryLogConfigsResponse
     ListResolverQueryLogConfigsResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResolverQueryLogConfigsResponse' {Maybe Int
totalCount :: Maybe Int
$sel:totalCount:ListResolverQueryLogConfigsResponse' :: ListResolverQueryLogConfigsResponse -> Maybe Int
totalCount} -> Maybe Int
totalCount) (\s :: ListResolverQueryLogConfigsResponse
s@ListResolverQueryLogConfigsResponse' {} Maybe Int
a -> ListResolverQueryLogConfigsResponse
s {$sel:totalCount:ListResolverQueryLogConfigsResponse' :: Maybe Int
totalCount = Maybe Int
a} :: ListResolverQueryLogConfigsResponse)

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

instance
  Prelude.NFData
    ListResolverQueryLogConfigsResponse