{-# 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.DataSync.ListLocations
(
ListLocations (..),
newListLocations,
listLocations_filters,
listLocations_nextToken,
listLocations_maxResults,
ListLocationsResponse (..),
newListLocationsResponse,
listLocationsResponse_nextToken,
listLocationsResponse_locations,
listLocationsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.DataSync.Types
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 ListLocations = ListLocations'
{
ListLocations -> Maybe [LocationFilter]
filters :: Prelude.Maybe [LocationFilter],
ListLocations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListLocations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (ListLocations -> ListLocations -> Bool
(ListLocations -> ListLocations -> Bool)
-> (ListLocations -> ListLocations -> Bool) -> Eq ListLocations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLocations -> ListLocations -> Bool
$c/= :: ListLocations -> ListLocations -> Bool
== :: ListLocations -> ListLocations -> Bool
$c== :: ListLocations -> ListLocations -> Bool
Prelude.Eq, ReadPrec [ListLocations]
ReadPrec ListLocations
Int -> ReadS ListLocations
ReadS [ListLocations]
(Int -> ReadS ListLocations)
-> ReadS [ListLocations]
-> ReadPrec ListLocations
-> ReadPrec [ListLocations]
-> Read ListLocations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListLocations]
$creadListPrec :: ReadPrec [ListLocations]
readPrec :: ReadPrec ListLocations
$creadPrec :: ReadPrec ListLocations
readList :: ReadS [ListLocations]
$creadList :: ReadS [ListLocations]
readsPrec :: Int -> ReadS ListLocations
$creadsPrec :: Int -> ReadS ListLocations
Prelude.Read, Int -> ListLocations -> ShowS
[ListLocations] -> ShowS
ListLocations -> String
(Int -> ListLocations -> ShowS)
-> (ListLocations -> String)
-> ([ListLocations] -> ShowS)
-> Show ListLocations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLocations] -> ShowS
$cshowList :: [ListLocations] -> ShowS
show :: ListLocations -> String
$cshow :: ListLocations -> String
showsPrec :: Int -> ListLocations -> ShowS
$cshowsPrec :: Int -> ListLocations -> ShowS
Prelude.Show, (forall x. ListLocations -> Rep ListLocations x)
-> (forall x. Rep ListLocations x -> ListLocations)
-> Generic ListLocations
forall x. Rep ListLocations x -> ListLocations
forall x. ListLocations -> Rep ListLocations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListLocations x -> ListLocations
$cfrom :: forall x. ListLocations -> Rep ListLocations x
Prelude.Generic)
newListLocations ::
ListLocations
newListLocations :: ListLocations
newListLocations =
ListLocations' :: Maybe [LocationFilter]
-> Maybe Text -> Maybe Natural -> ListLocations
ListLocations'
{ $sel:filters:ListLocations' :: Maybe [LocationFilter]
filters = Maybe [LocationFilter]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListLocations' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListLocations' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listLocations_filters :: Lens.Lens' ListLocations (Prelude.Maybe [LocationFilter])
listLocations_filters :: (Maybe [LocationFilter] -> f (Maybe [LocationFilter]))
-> ListLocations -> f ListLocations
listLocations_filters = (ListLocations -> Maybe [LocationFilter])
-> (ListLocations -> Maybe [LocationFilter] -> ListLocations)
-> Lens
ListLocations
ListLocations
(Maybe [LocationFilter])
(Maybe [LocationFilter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLocations' {Maybe [LocationFilter]
filters :: Maybe [LocationFilter]
$sel:filters:ListLocations' :: ListLocations -> Maybe [LocationFilter]
filters} -> Maybe [LocationFilter]
filters) (\s :: ListLocations
s@ListLocations' {} Maybe [LocationFilter]
a -> ListLocations
s {$sel:filters:ListLocations' :: Maybe [LocationFilter]
filters = Maybe [LocationFilter]
a} :: ListLocations) ((Maybe [LocationFilter] -> f (Maybe [LocationFilter]))
-> ListLocations -> f ListLocations)
-> ((Maybe [LocationFilter] -> f (Maybe [LocationFilter]))
-> Maybe [LocationFilter] -> f (Maybe [LocationFilter]))
-> (Maybe [LocationFilter] -> f (Maybe [LocationFilter]))
-> ListLocations
-> f ListLocations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[LocationFilter] [LocationFilter] [LocationFilter] [LocationFilter]
-> Iso
(Maybe [LocationFilter])
(Maybe [LocationFilter])
(Maybe [LocationFilter])
(Maybe [LocationFilter])
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
[LocationFilter] [LocationFilter] [LocationFilter] [LocationFilter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listLocations_nextToken :: Lens.Lens' ListLocations (Prelude.Maybe Prelude.Text)
listLocations_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListLocations -> f ListLocations
listLocations_nextToken = (ListLocations -> Maybe Text)
-> (ListLocations -> Maybe Text -> ListLocations)
-> Lens ListLocations ListLocations (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLocations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListLocations' :: ListLocations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListLocations
s@ListLocations' {} Maybe Text
a -> ListLocations
s {$sel:nextToken:ListLocations' :: Maybe Text
nextToken = Maybe Text
a} :: ListLocations)
listLocations_maxResults :: Lens.Lens' ListLocations (Prelude.Maybe Prelude.Natural)
listLocations_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListLocations -> f ListLocations
listLocations_maxResults = (ListLocations -> Maybe Natural)
-> (ListLocations -> Maybe Natural -> ListLocations)
-> Lens ListLocations ListLocations (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLocations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListLocations' :: ListLocations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListLocations
s@ListLocations' {} Maybe Natural
a -> ListLocations
s {$sel:maxResults:ListLocations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListLocations)
instance Core.AWSPager ListLocations where
page :: ListLocations -> AWSResponse ListLocations -> Maybe ListLocations
page ListLocations
rq AWSResponse ListLocations
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListLocations
ListLocationsResponse
rs
ListLocationsResponse
-> Getting (First Text) ListLocationsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListLocationsResponse
-> Const (First Text) ListLocationsResponse
Lens' ListLocationsResponse (Maybe Text)
listLocationsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListLocationsResponse
-> Const (First Text) ListLocationsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListLocationsResponse 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 ListLocations
forall a. Maybe a
Prelude.Nothing
| Maybe [LocationListEntry] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListLocations
ListLocationsResponse
rs
ListLocationsResponse
-> Getting
(First [LocationListEntry])
ListLocationsResponse
[LocationListEntry]
-> Maybe [LocationListEntry]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [LocationListEntry]
-> Const (First [LocationListEntry]) (Maybe [LocationListEntry]))
-> ListLocationsResponse
-> Const (First [LocationListEntry]) ListLocationsResponse
Lens' ListLocationsResponse (Maybe [LocationListEntry])
listLocationsResponse_locations ((Maybe [LocationListEntry]
-> Const (First [LocationListEntry]) (Maybe [LocationListEntry]))
-> ListLocationsResponse
-> Const (First [LocationListEntry]) ListLocationsResponse)
-> (([LocationListEntry]
-> Const (First [LocationListEntry]) [LocationListEntry])
-> Maybe [LocationListEntry]
-> Const (First [LocationListEntry]) (Maybe [LocationListEntry]))
-> Getting
(First [LocationListEntry])
ListLocationsResponse
[LocationListEntry]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([LocationListEntry]
-> Const (First [LocationListEntry]) [LocationListEntry])
-> Maybe [LocationListEntry]
-> Const (First [LocationListEntry]) (Maybe [LocationListEntry])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListLocations
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListLocations -> Maybe ListLocations
forall a. a -> Maybe a
Prelude.Just (ListLocations -> Maybe ListLocations)
-> ListLocations -> Maybe ListLocations
forall a b. (a -> b) -> a -> b
Prelude.$
ListLocations
rq
ListLocations -> (ListLocations -> ListLocations) -> ListLocations
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListLocations -> Identity ListLocations
Lens ListLocations ListLocations (Maybe Text) (Maybe Text)
listLocations_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListLocations -> Identity ListLocations)
-> Maybe Text -> ListLocations -> ListLocations
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListLocations
ListLocationsResponse
rs
ListLocationsResponse
-> Getting (First Text) ListLocationsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListLocationsResponse
-> Const (First Text) ListLocationsResponse
Lens' ListLocationsResponse (Maybe Text)
listLocationsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListLocationsResponse
-> Const (First Text) ListLocationsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListLocationsResponse 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 ListLocations where
type
AWSResponse ListLocations =
ListLocationsResponse
request :: ListLocations -> Request ListLocations
request = Service -> ListLocations -> Request ListLocations
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListLocations
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListLocations)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListLocations))
-> Logger
-> Service
-> Proxy ListLocations
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListLocations)))
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 [LocationListEntry] -> Int -> ListLocationsResponse
ListLocationsResponse'
(Maybe Text
-> Maybe [LocationListEntry] -> Int -> ListLocationsResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe [LocationListEntry] -> Int -> ListLocationsResponse)
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 [LocationListEntry] -> Int -> ListLocationsResponse)
-> Either String (Maybe [LocationListEntry])
-> Either String (Int -> ListLocationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [LocationListEntry]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Locations" Either String (Maybe (Maybe [LocationListEntry]))
-> Maybe [LocationListEntry]
-> Either String (Maybe [LocationListEntry])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [LocationListEntry]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> ListLocationsResponse)
-> Either String Int -> Either String ListLocationsResponse
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 ListLocations
instance Prelude.NFData ListLocations
instance Core.ToHeaders ListLocations where
toHeaders :: ListLocations -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListLocations -> 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
"FmrsService.ListLocations" :: 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 ListLocations where
toJSON :: ListLocations -> Value
toJSON ListLocations' {Maybe Natural
Maybe [LocationFilter]
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
filters :: Maybe [LocationFilter]
$sel:maxResults:ListLocations' :: ListLocations -> Maybe Natural
$sel:nextToken:ListLocations' :: ListLocations -> Maybe Text
$sel:filters:ListLocations' :: ListLocations -> Maybe [LocationFilter]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Filters" Text -> [LocationFilter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([LocationFilter] -> Pair) -> Maybe [LocationFilter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LocationFilter]
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
"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 ListLocations where
toPath :: ListLocations -> ByteString
toPath = ByteString -> ListLocations -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListLocations where
toQuery :: ListLocations -> QueryString
toQuery = QueryString -> ListLocations -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListLocationsResponse = ListLocationsResponse'
{
ListLocationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListLocationsResponse -> Maybe [LocationListEntry]
locations :: Prelude.Maybe [LocationListEntry],
ListLocationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListLocationsResponse -> ListLocationsResponse -> Bool
(ListLocationsResponse -> ListLocationsResponse -> Bool)
-> (ListLocationsResponse -> ListLocationsResponse -> Bool)
-> Eq ListLocationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListLocationsResponse -> ListLocationsResponse -> Bool
$c/= :: ListLocationsResponse -> ListLocationsResponse -> Bool
== :: ListLocationsResponse -> ListLocationsResponse -> Bool
$c== :: ListLocationsResponse -> ListLocationsResponse -> Bool
Prelude.Eq, ReadPrec [ListLocationsResponse]
ReadPrec ListLocationsResponse
Int -> ReadS ListLocationsResponse
ReadS [ListLocationsResponse]
(Int -> ReadS ListLocationsResponse)
-> ReadS [ListLocationsResponse]
-> ReadPrec ListLocationsResponse
-> ReadPrec [ListLocationsResponse]
-> Read ListLocationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListLocationsResponse]
$creadListPrec :: ReadPrec [ListLocationsResponse]
readPrec :: ReadPrec ListLocationsResponse
$creadPrec :: ReadPrec ListLocationsResponse
readList :: ReadS [ListLocationsResponse]
$creadList :: ReadS [ListLocationsResponse]
readsPrec :: Int -> ReadS ListLocationsResponse
$creadsPrec :: Int -> ReadS ListLocationsResponse
Prelude.Read, Int -> ListLocationsResponse -> ShowS
[ListLocationsResponse] -> ShowS
ListLocationsResponse -> String
(Int -> ListLocationsResponse -> ShowS)
-> (ListLocationsResponse -> String)
-> ([ListLocationsResponse] -> ShowS)
-> Show ListLocationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListLocationsResponse] -> ShowS
$cshowList :: [ListLocationsResponse] -> ShowS
show :: ListLocationsResponse -> String
$cshow :: ListLocationsResponse -> String
showsPrec :: Int -> ListLocationsResponse -> ShowS
$cshowsPrec :: Int -> ListLocationsResponse -> ShowS
Prelude.Show, (forall x. ListLocationsResponse -> Rep ListLocationsResponse x)
-> (forall x. Rep ListLocationsResponse x -> ListLocationsResponse)
-> Generic ListLocationsResponse
forall x. Rep ListLocationsResponse x -> ListLocationsResponse
forall x. ListLocationsResponse -> Rep ListLocationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListLocationsResponse x -> ListLocationsResponse
$cfrom :: forall x. ListLocationsResponse -> Rep ListLocationsResponse x
Prelude.Generic)
newListLocationsResponse ::
Prelude.Int ->
ListLocationsResponse
newListLocationsResponse :: Int -> ListLocationsResponse
newListLocationsResponse Int
pHttpStatus_ =
ListLocationsResponse' :: Maybe Text
-> Maybe [LocationListEntry] -> Int -> ListLocationsResponse
ListLocationsResponse'
{ $sel:nextToken:ListLocationsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:locations:ListLocationsResponse' :: Maybe [LocationListEntry]
locations = Maybe [LocationListEntry]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListLocationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listLocationsResponse_nextToken :: Lens.Lens' ListLocationsResponse (Prelude.Maybe Prelude.Text)
listLocationsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListLocationsResponse -> f ListLocationsResponse
listLocationsResponse_nextToken = (ListLocationsResponse -> Maybe Text)
-> (ListLocationsResponse -> Maybe Text -> ListLocationsResponse)
-> Lens' ListLocationsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLocationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListLocationsResponse' :: ListLocationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListLocationsResponse
s@ListLocationsResponse' {} Maybe Text
a -> ListLocationsResponse
s {$sel:nextToken:ListLocationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListLocationsResponse)
listLocationsResponse_locations :: Lens.Lens' ListLocationsResponse (Prelude.Maybe [LocationListEntry])
listLocationsResponse_locations :: (Maybe [LocationListEntry] -> f (Maybe [LocationListEntry]))
-> ListLocationsResponse -> f ListLocationsResponse
listLocationsResponse_locations = (ListLocationsResponse -> Maybe [LocationListEntry])
-> (ListLocationsResponse
-> Maybe [LocationListEntry] -> ListLocationsResponse)
-> Lens' ListLocationsResponse (Maybe [LocationListEntry])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLocationsResponse' {Maybe [LocationListEntry]
locations :: Maybe [LocationListEntry]
$sel:locations:ListLocationsResponse' :: ListLocationsResponse -> Maybe [LocationListEntry]
locations} -> Maybe [LocationListEntry]
locations) (\s :: ListLocationsResponse
s@ListLocationsResponse' {} Maybe [LocationListEntry]
a -> ListLocationsResponse
s {$sel:locations:ListLocationsResponse' :: Maybe [LocationListEntry]
locations = Maybe [LocationListEntry]
a} :: ListLocationsResponse) ((Maybe [LocationListEntry] -> f (Maybe [LocationListEntry]))
-> ListLocationsResponse -> f ListLocationsResponse)
-> ((Maybe [LocationListEntry] -> f (Maybe [LocationListEntry]))
-> Maybe [LocationListEntry] -> f (Maybe [LocationListEntry]))
-> (Maybe [LocationListEntry] -> f (Maybe [LocationListEntry]))
-> ListLocationsResponse
-> f ListLocationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[LocationListEntry]
[LocationListEntry]
[LocationListEntry]
[LocationListEntry]
-> Iso
(Maybe [LocationListEntry])
(Maybe [LocationListEntry])
(Maybe [LocationListEntry])
(Maybe [LocationListEntry])
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
[LocationListEntry]
[LocationListEntry]
[LocationListEntry]
[LocationListEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listLocationsResponse_httpStatus :: Lens.Lens' ListLocationsResponse Prelude.Int
listLocationsResponse_httpStatus :: (Int -> f Int) -> ListLocationsResponse -> f ListLocationsResponse
listLocationsResponse_httpStatus = (ListLocationsResponse -> Int)
-> (ListLocationsResponse -> Int -> ListLocationsResponse)
-> Lens ListLocationsResponse ListLocationsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListLocationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListLocationsResponse' :: ListLocationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListLocationsResponse
s@ListLocationsResponse' {} Int
a -> ListLocationsResponse
s {$sel:httpStatus:ListLocationsResponse' :: Int
httpStatus = Int
a} :: ListLocationsResponse)
instance Prelude.NFData ListLocationsResponse