{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Route53Resolver.ListResolverQueryLogConfigs
(
ListResolverQueryLogConfigs (..),
newListResolverQueryLogConfigs,
listResolverQueryLogConfigs_filters,
listResolverQueryLogConfigs_nextToken,
listResolverQueryLogConfigs_sortOrder,
listResolverQueryLogConfigs_maxResults,
listResolverQueryLogConfigs_sortBy,
ListResolverQueryLogConfigsResponse (..),
newListResolverQueryLogConfigsResponse,
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
data ListResolverQueryLogConfigs = ListResolverQueryLogConfigs'
{
ListResolverQueryLogConfigs -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
ListResolverQueryLogConfigs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListResolverQueryLogConfigs -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder,
ListResolverQueryLogConfigs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
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)
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
}
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
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)
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)
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)
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
data ListResolverQueryLogConfigsResponse = ListResolverQueryLogConfigsResponse'
{
ListResolverQueryLogConfigsResponse -> Maybe Int
totalFilteredCount :: Prelude.Maybe Prelude.Int,
ListResolverQueryLogConfigsResponse
-> Maybe [ResolverQueryLogConfig]
resolverQueryLogConfigs :: Prelude.Maybe [ResolverQueryLogConfig],
ListResolverQueryLogConfigsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListResolverQueryLogConfigsResponse -> Maybe Int
totalCount :: Prelude.Maybe Prelude.Int,
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)
newListResolverQueryLogConfigsResponse ::
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_
}
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)
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
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)
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)
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