{-# 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.Athena.ListNamedQueries
(
ListNamedQueries (..),
newListNamedQueries,
listNamedQueries_nextToken,
listNamedQueries_workGroup,
listNamedQueries_maxResults,
ListNamedQueriesResponse (..),
newListNamedQueriesResponse,
listNamedQueriesResponse_nextToken,
listNamedQueriesResponse_namedQueryIds,
listNamedQueriesResponse_httpStatus,
)
where
import Amazonka.Athena.Types
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
data ListNamedQueries = ListNamedQueries'
{
ListNamedQueries -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListNamedQueries -> Maybe Text
workGroup :: Prelude.Maybe Prelude.Text,
ListNamedQueries -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (ListNamedQueries -> ListNamedQueries -> Bool
(ListNamedQueries -> ListNamedQueries -> Bool)
-> (ListNamedQueries -> ListNamedQueries -> Bool)
-> Eq ListNamedQueries
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListNamedQueries -> ListNamedQueries -> Bool
$c/= :: ListNamedQueries -> ListNamedQueries -> Bool
== :: ListNamedQueries -> ListNamedQueries -> Bool
$c== :: ListNamedQueries -> ListNamedQueries -> Bool
Prelude.Eq, ReadPrec [ListNamedQueries]
ReadPrec ListNamedQueries
Int -> ReadS ListNamedQueries
ReadS [ListNamedQueries]
(Int -> ReadS ListNamedQueries)
-> ReadS [ListNamedQueries]
-> ReadPrec ListNamedQueries
-> ReadPrec [ListNamedQueries]
-> Read ListNamedQueries
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListNamedQueries]
$creadListPrec :: ReadPrec [ListNamedQueries]
readPrec :: ReadPrec ListNamedQueries
$creadPrec :: ReadPrec ListNamedQueries
readList :: ReadS [ListNamedQueries]
$creadList :: ReadS [ListNamedQueries]
readsPrec :: Int -> ReadS ListNamedQueries
$creadsPrec :: Int -> ReadS ListNamedQueries
Prelude.Read, Int -> ListNamedQueries -> ShowS
[ListNamedQueries] -> ShowS
ListNamedQueries -> String
(Int -> ListNamedQueries -> ShowS)
-> (ListNamedQueries -> String)
-> ([ListNamedQueries] -> ShowS)
-> Show ListNamedQueries
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListNamedQueries] -> ShowS
$cshowList :: [ListNamedQueries] -> ShowS
show :: ListNamedQueries -> String
$cshow :: ListNamedQueries -> String
showsPrec :: Int -> ListNamedQueries -> ShowS
$cshowsPrec :: Int -> ListNamedQueries -> ShowS
Prelude.Show, (forall x. ListNamedQueries -> Rep ListNamedQueries x)
-> (forall x. Rep ListNamedQueries x -> ListNamedQueries)
-> Generic ListNamedQueries
forall x. Rep ListNamedQueries x -> ListNamedQueries
forall x. ListNamedQueries -> Rep ListNamedQueries x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListNamedQueries x -> ListNamedQueries
$cfrom :: forall x. ListNamedQueries -> Rep ListNamedQueries x
Prelude.Generic)
newListNamedQueries ::
ListNamedQueries
newListNamedQueries :: ListNamedQueries
newListNamedQueries =
ListNamedQueries' :: Maybe Text -> Maybe Text -> Maybe Natural -> ListNamedQueries
ListNamedQueries'
{ $sel:nextToken:ListNamedQueries' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:workGroup:ListNamedQueries' :: Maybe Text
workGroup = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListNamedQueries' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listNamedQueries_nextToken :: Lens.Lens' ListNamedQueries (Prelude.Maybe Prelude.Text)
listNamedQueries_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListNamedQueries -> f ListNamedQueries
listNamedQueries_nextToken = (ListNamedQueries -> Maybe Text)
-> (ListNamedQueries -> Maybe Text -> ListNamedQueries)
-> Lens ListNamedQueries ListNamedQueries (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNamedQueries' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListNamedQueries' :: ListNamedQueries -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListNamedQueries
s@ListNamedQueries' {} Maybe Text
a -> ListNamedQueries
s {$sel:nextToken:ListNamedQueries' :: Maybe Text
nextToken = Maybe Text
a} :: ListNamedQueries)
listNamedQueries_workGroup :: Lens.Lens' ListNamedQueries (Prelude.Maybe Prelude.Text)
listNamedQueries_workGroup :: (Maybe Text -> f (Maybe Text))
-> ListNamedQueries -> f ListNamedQueries
listNamedQueries_workGroup = (ListNamedQueries -> Maybe Text)
-> (ListNamedQueries -> Maybe Text -> ListNamedQueries)
-> Lens ListNamedQueries ListNamedQueries (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNamedQueries' {Maybe Text
workGroup :: Maybe Text
$sel:workGroup:ListNamedQueries' :: ListNamedQueries -> Maybe Text
workGroup} -> Maybe Text
workGroup) (\s :: ListNamedQueries
s@ListNamedQueries' {} Maybe Text
a -> ListNamedQueries
s {$sel:workGroup:ListNamedQueries' :: Maybe Text
workGroup = Maybe Text
a} :: ListNamedQueries)
listNamedQueries_maxResults :: Lens.Lens' ListNamedQueries (Prelude.Maybe Prelude.Natural)
listNamedQueries_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListNamedQueries -> f ListNamedQueries
listNamedQueries_maxResults = (ListNamedQueries -> Maybe Natural)
-> (ListNamedQueries -> Maybe Natural -> ListNamedQueries)
-> Lens
ListNamedQueries ListNamedQueries (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNamedQueries' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListNamedQueries' :: ListNamedQueries -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListNamedQueries
s@ListNamedQueries' {} Maybe Natural
a -> ListNamedQueries
s {$sel:maxResults:ListNamedQueries' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListNamedQueries)
instance Core.AWSPager ListNamedQueries where
page :: ListNamedQueries
-> AWSResponse ListNamedQueries -> Maybe ListNamedQueries
page ListNamedQueries
rq AWSResponse ListNamedQueries
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListNamedQueries
ListNamedQueriesResponse
rs
ListNamedQueriesResponse
-> Getting (First Text) ListNamedQueriesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListNamedQueriesResponse
-> Const (First Text) ListNamedQueriesResponse
Lens' ListNamedQueriesResponse (Maybe Text)
listNamedQueriesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListNamedQueriesResponse
-> Const (First Text) ListNamedQueriesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListNamedQueriesResponse 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 ListNamedQueries
forall a. Maybe a
Prelude.Nothing
| Maybe [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListNamedQueries
ListNamedQueriesResponse
rs
ListNamedQueriesResponse
-> Getting (First [Text]) ListNamedQueriesResponse [Text]
-> Maybe [Text]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe (NonEmpty Text)
-> Const (First [Text]) (Maybe (NonEmpty Text)))
-> ListNamedQueriesResponse
-> Const (First [Text]) ListNamedQueriesResponse
Lens' ListNamedQueriesResponse (Maybe (NonEmpty Text))
listNamedQueriesResponse_namedQueryIds
((Maybe (NonEmpty Text)
-> Const (First [Text]) (Maybe (NonEmpty Text)))
-> ListNamedQueriesResponse
-> Const (First [Text]) ListNamedQueriesResponse)
-> (([Text] -> Const (First [Text]) [Text])
-> Maybe (NonEmpty Text)
-> Const (First [Text]) (Maybe (NonEmpty Text)))
-> Getting (First [Text]) ListNamedQueriesResponse [Text]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> Const (First [Text]) (NonEmpty Text))
-> Maybe (NonEmpty Text)
-> Const (First [Text]) (Maybe (NonEmpty Text))
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
((NonEmpty Text -> Const (First [Text]) (NonEmpty Text))
-> Maybe (NonEmpty Text)
-> Const (First [Text]) (Maybe (NonEmpty Text)))
-> (([Text] -> Const (First [Text]) [Text])
-> NonEmpty Text -> Const (First [Text]) (NonEmpty Text))
-> ([Text] -> Const (First [Text]) [Text])
-> Maybe (NonEmpty Text)
-> Const (First [Text]) (Maybe (NonEmpty Text))
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> [Text])
-> ([Text] -> Const (First [Text]) [Text])
-> NonEmpty Text
-> Const (First [Text]) (NonEmpty Text)
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to NonEmpty Text -> [Text]
forall l. IsList l => l -> [Item l]
Prelude.toList
) =
Maybe ListNamedQueries
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListNamedQueries -> Maybe ListNamedQueries
forall a. a -> Maybe a
Prelude.Just (ListNamedQueries -> Maybe ListNamedQueries)
-> ListNamedQueries -> Maybe ListNamedQueries
forall a b. (a -> b) -> a -> b
Prelude.$
ListNamedQueries
rq
ListNamedQueries
-> (ListNamedQueries -> ListNamedQueries) -> ListNamedQueries
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListNamedQueries -> Identity ListNamedQueries
Lens ListNamedQueries ListNamedQueries (Maybe Text) (Maybe Text)
listNamedQueries_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListNamedQueries -> Identity ListNamedQueries)
-> Maybe Text -> ListNamedQueries -> ListNamedQueries
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListNamedQueries
ListNamedQueriesResponse
rs
ListNamedQueriesResponse
-> Getting (First Text) ListNamedQueriesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListNamedQueriesResponse
-> Const (First Text) ListNamedQueriesResponse
Lens' ListNamedQueriesResponse (Maybe Text)
listNamedQueriesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListNamedQueriesResponse
-> Const (First Text) ListNamedQueriesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListNamedQueriesResponse 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 ListNamedQueries where
type
AWSResponse ListNamedQueries =
ListNamedQueriesResponse
request :: ListNamedQueries -> Request ListNamedQueries
request = Service -> ListNamedQueries -> Request ListNamedQueries
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListNamedQueries
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListNamedQueries)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListNamedQueries))
-> Logger
-> Service
-> Proxy ListNamedQueries
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListNamedQueries)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe (NonEmpty Text) -> Int -> ListNamedQueriesResponse
ListNamedQueriesResponse'
(Maybe Text
-> Maybe (NonEmpty Text) -> Int -> ListNamedQueriesResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe (NonEmpty Text) -> Int -> ListNamedQueriesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
Either
String (Maybe (NonEmpty Text) -> Int -> ListNamedQueriesResponse)
-> Either String (Maybe (NonEmpty Text))
-> Either String (Int -> ListNamedQueriesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NamedQueryIds")
Either String (Int -> ListNamedQueriesResponse)
-> Either String Int -> Either String ListNamedQueriesResponse
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 ListNamedQueries
instance Prelude.NFData ListNamedQueries
instance Core.ToHeaders ListNamedQueries where
toHeaders :: ListNamedQueries -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListNamedQueries -> 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
"AmazonAthena.ListNamedQueries" ::
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 ListNamedQueries where
toJSON :: ListNamedQueries -> Value
toJSON ListNamedQueries' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
workGroup :: Maybe Text
nextToken :: Maybe Text
$sel:maxResults:ListNamedQueries' :: ListNamedQueries -> Maybe Natural
$sel:workGroup:ListNamedQueries' :: ListNamedQueries -> Maybe Text
$sel:nextToken:ListNamedQueries' :: ListNamedQueries -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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
"WorkGroup" 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
workGroup,
(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
]
)
instance Core.ToPath ListNamedQueries where
toPath :: ListNamedQueries -> ByteString
toPath = ByteString -> ListNamedQueries -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListNamedQueries where
toQuery :: ListNamedQueries -> QueryString
toQuery = QueryString -> ListNamedQueries -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListNamedQueriesResponse = ListNamedQueriesResponse'
{
ListNamedQueriesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListNamedQueriesResponse -> Maybe (NonEmpty Text)
namedQueryIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
ListNamedQueriesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListNamedQueriesResponse -> ListNamedQueriesResponse -> Bool
(ListNamedQueriesResponse -> ListNamedQueriesResponse -> Bool)
-> (ListNamedQueriesResponse -> ListNamedQueriesResponse -> Bool)
-> Eq ListNamedQueriesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListNamedQueriesResponse -> ListNamedQueriesResponse -> Bool
$c/= :: ListNamedQueriesResponse -> ListNamedQueriesResponse -> Bool
== :: ListNamedQueriesResponse -> ListNamedQueriesResponse -> Bool
$c== :: ListNamedQueriesResponse -> ListNamedQueriesResponse -> Bool
Prelude.Eq, ReadPrec [ListNamedQueriesResponse]
ReadPrec ListNamedQueriesResponse
Int -> ReadS ListNamedQueriesResponse
ReadS [ListNamedQueriesResponse]
(Int -> ReadS ListNamedQueriesResponse)
-> ReadS [ListNamedQueriesResponse]
-> ReadPrec ListNamedQueriesResponse
-> ReadPrec [ListNamedQueriesResponse]
-> Read ListNamedQueriesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListNamedQueriesResponse]
$creadListPrec :: ReadPrec [ListNamedQueriesResponse]
readPrec :: ReadPrec ListNamedQueriesResponse
$creadPrec :: ReadPrec ListNamedQueriesResponse
readList :: ReadS [ListNamedQueriesResponse]
$creadList :: ReadS [ListNamedQueriesResponse]
readsPrec :: Int -> ReadS ListNamedQueriesResponse
$creadsPrec :: Int -> ReadS ListNamedQueriesResponse
Prelude.Read, Int -> ListNamedQueriesResponse -> ShowS
[ListNamedQueriesResponse] -> ShowS
ListNamedQueriesResponse -> String
(Int -> ListNamedQueriesResponse -> ShowS)
-> (ListNamedQueriesResponse -> String)
-> ([ListNamedQueriesResponse] -> ShowS)
-> Show ListNamedQueriesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListNamedQueriesResponse] -> ShowS
$cshowList :: [ListNamedQueriesResponse] -> ShowS
show :: ListNamedQueriesResponse -> String
$cshow :: ListNamedQueriesResponse -> String
showsPrec :: Int -> ListNamedQueriesResponse -> ShowS
$cshowsPrec :: Int -> ListNamedQueriesResponse -> ShowS
Prelude.Show, (forall x.
ListNamedQueriesResponse -> Rep ListNamedQueriesResponse x)
-> (forall x.
Rep ListNamedQueriesResponse x -> ListNamedQueriesResponse)
-> Generic ListNamedQueriesResponse
forall x.
Rep ListNamedQueriesResponse x -> ListNamedQueriesResponse
forall x.
ListNamedQueriesResponse -> Rep ListNamedQueriesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListNamedQueriesResponse x -> ListNamedQueriesResponse
$cfrom :: forall x.
ListNamedQueriesResponse -> Rep ListNamedQueriesResponse x
Prelude.Generic)
newListNamedQueriesResponse ::
Prelude.Int ->
ListNamedQueriesResponse
newListNamedQueriesResponse :: Int -> ListNamedQueriesResponse
newListNamedQueriesResponse Int
pHttpStatus_ =
ListNamedQueriesResponse' :: Maybe Text
-> Maybe (NonEmpty Text) -> Int -> ListNamedQueriesResponse
ListNamedQueriesResponse'
{ $sel:nextToken:ListNamedQueriesResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:namedQueryIds:ListNamedQueriesResponse' :: Maybe (NonEmpty Text)
namedQueryIds = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListNamedQueriesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listNamedQueriesResponse_nextToken :: Lens.Lens' ListNamedQueriesResponse (Prelude.Maybe Prelude.Text)
listNamedQueriesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListNamedQueriesResponse -> f ListNamedQueriesResponse
listNamedQueriesResponse_nextToken = (ListNamedQueriesResponse -> Maybe Text)
-> (ListNamedQueriesResponse
-> Maybe Text -> ListNamedQueriesResponse)
-> Lens' ListNamedQueriesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNamedQueriesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListNamedQueriesResponse' :: ListNamedQueriesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListNamedQueriesResponse
s@ListNamedQueriesResponse' {} Maybe Text
a -> ListNamedQueriesResponse
s {$sel:nextToken:ListNamedQueriesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListNamedQueriesResponse)
listNamedQueriesResponse_namedQueryIds :: Lens.Lens' ListNamedQueriesResponse (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
listNamedQueriesResponse_namedQueryIds :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListNamedQueriesResponse -> f ListNamedQueriesResponse
listNamedQueriesResponse_namedQueryIds = (ListNamedQueriesResponse -> Maybe (NonEmpty Text))
-> (ListNamedQueriesResponse
-> Maybe (NonEmpty Text) -> ListNamedQueriesResponse)
-> Lens' ListNamedQueriesResponse (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNamedQueriesResponse' {Maybe (NonEmpty Text)
namedQueryIds :: Maybe (NonEmpty Text)
$sel:namedQueryIds:ListNamedQueriesResponse' :: ListNamedQueriesResponse -> Maybe (NonEmpty Text)
namedQueryIds} -> Maybe (NonEmpty Text)
namedQueryIds) (\s :: ListNamedQueriesResponse
s@ListNamedQueriesResponse' {} Maybe (NonEmpty Text)
a -> ListNamedQueriesResponse
s {$sel:namedQueryIds:ListNamedQueriesResponse' :: Maybe (NonEmpty Text)
namedQueryIds = Maybe (NonEmpty Text)
a} :: ListNamedQueriesResponse) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListNamedQueriesResponse -> f ListNamedQueriesResponse)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListNamedQueriesResponse
-> f ListNamedQueriesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listNamedQueriesResponse_httpStatus :: Lens.Lens' ListNamedQueriesResponse Prelude.Int
listNamedQueriesResponse_httpStatus :: (Int -> f Int)
-> ListNamedQueriesResponse -> f ListNamedQueriesResponse
listNamedQueriesResponse_httpStatus = (ListNamedQueriesResponse -> Int)
-> (ListNamedQueriesResponse -> Int -> ListNamedQueriesResponse)
-> Lens ListNamedQueriesResponse ListNamedQueriesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNamedQueriesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListNamedQueriesResponse' :: ListNamedQueriesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListNamedQueriesResponse
s@ListNamedQueriesResponse' {} Int
a -> ListNamedQueriesResponse
s {$sel:httpStatus:ListNamedQueriesResponse' :: Int
httpStatus = Int
a} :: ListNamedQueriesResponse)
instance Prelude.NFData ListNamedQueriesResponse