{-# 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.Location.ListGeofenceCollections
-- 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 geofence collections in your AWS account.
--
-- This operation returns paginated results.
module Amazonka.Location.ListGeofenceCollections
  ( -- * Creating a Request
    ListGeofenceCollections (..),
    newListGeofenceCollections,

    -- * Request Lenses
    listGeofenceCollections_nextToken,
    listGeofenceCollections_maxResults,

    -- * Destructuring the Response
    ListGeofenceCollectionsResponse (..),
    newListGeofenceCollectionsResponse,

    -- * Response Lenses
    listGeofenceCollectionsResponse_nextToken,
    listGeofenceCollectionsResponse_httpStatus,
    listGeofenceCollectionsResponse_entries,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Location.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListGeofenceCollections' smart constructor.
data ListGeofenceCollections = ListGeofenceCollections'
  { -- | The pagination token specifying which page of results to return in the
    -- response. If no token is provided, the default page is the first page.
    --
    -- Default value: @null@
    ListGeofenceCollections -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | An optional limit for the number of resources returned in a single call.
    --
    -- Default value: @100@
    ListGeofenceCollections -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListGeofenceCollections -> ListGeofenceCollections -> Bool
(ListGeofenceCollections -> ListGeofenceCollections -> Bool)
-> (ListGeofenceCollections -> ListGeofenceCollections -> Bool)
-> Eq ListGeofenceCollections
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListGeofenceCollections -> ListGeofenceCollections -> Bool
$c/= :: ListGeofenceCollections -> ListGeofenceCollections -> Bool
== :: ListGeofenceCollections -> ListGeofenceCollections -> Bool
$c== :: ListGeofenceCollections -> ListGeofenceCollections -> Bool
Prelude.Eq, ReadPrec [ListGeofenceCollections]
ReadPrec ListGeofenceCollections
Int -> ReadS ListGeofenceCollections
ReadS [ListGeofenceCollections]
(Int -> ReadS ListGeofenceCollections)
-> ReadS [ListGeofenceCollections]
-> ReadPrec ListGeofenceCollections
-> ReadPrec [ListGeofenceCollections]
-> Read ListGeofenceCollections
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListGeofenceCollections]
$creadListPrec :: ReadPrec [ListGeofenceCollections]
readPrec :: ReadPrec ListGeofenceCollections
$creadPrec :: ReadPrec ListGeofenceCollections
readList :: ReadS [ListGeofenceCollections]
$creadList :: ReadS [ListGeofenceCollections]
readsPrec :: Int -> ReadS ListGeofenceCollections
$creadsPrec :: Int -> ReadS ListGeofenceCollections
Prelude.Read, Int -> ListGeofenceCollections -> ShowS
[ListGeofenceCollections] -> ShowS
ListGeofenceCollections -> String
(Int -> ListGeofenceCollections -> ShowS)
-> (ListGeofenceCollections -> String)
-> ([ListGeofenceCollections] -> ShowS)
-> Show ListGeofenceCollections
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListGeofenceCollections] -> ShowS
$cshowList :: [ListGeofenceCollections] -> ShowS
show :: ListGeofenceCollections -> String
$cshow :: ListGeofenceCollections -> String
showsPrec :: Int -> ListGeofenceCollections -> ShowS
$cshowsPrec :: Int -> ListGeofenceCollections -> ShowS
Prelude.Show, (forall x.
 ListGeofenceCollections -> Rep ListGeofenceCollections x)
-> (forall x.
    Rep ListGeofenceCollections x -> ListGeofenceCollections)
-> Generic ListGeofenceCollections
forall x. Rep ListGeofenceCollections x -> ListGeofenceCollections
forall x. ListGeofenceCollections -> Rep ListGeofenceCollections x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListGeofenceCollections x -> ListGeofenceCollections
$cfrom :: forall x. ListGeofenceCollections -> Rep ListGeofenceCollections x
Prelude.Generic)

-- |
-- Create a value of 'ListGeofenceCollections' 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:
--
-- 'nextToken', 'listGeofenceCollections_nextToken' - The pagination token specifying which page of results to return in the
-- response. If no token is provided, the default page is the first page.
--
-- Default value: @null@
--
-- 'maxResults', 'listGeofenceCollections_maxResults' - An optional limit for the number of resources returned in a single call.
--
-- Default value: @100@
newListGeofenceCollections ::
  ListGeofenceCollections
newListGeofenceCollections :: ListGeofenceCollections
newListGeofenceCollections =
  ListGeofenceCollections' :: Maybe Text -> Maybe Natural -> ListGeofenceCollections
ListGeofenceCollections'
    { $sel:nextToken:ListGeofenceCollections' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListGeofenceCollections' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The pagination token specifying which page of results to return in the
-- response. If no token is provided, the default page is the first page.
--
-- Default value: @null@
listGeofenceCollections_nextToken :: Lens.Lens' ListGeofenceCollections (Prelude.Maybe Prelude.Text)
listGeofenceCollections_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListGeofenceCollections -> f ListGeofenceCollections
listGeofenceCollections_nextToken = (ListGeofenceCollections -> Maybe Text)
-> (ListGeofenceCollections
    -> Maybe Text -> ListGeofenceCollections)
-> Lens
     ListGeofenceCollections
     ListGeofenceCollections
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGeofenceCollections' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListGeofenceCollections' :: ListGeofenceCollections -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListGeofenceCollections
s@ListGeofenceCollections' {} Maybe Text
a -> ListGeofenceCollections
s {$sel:nextToken:ListGeofenceCollections' :: Maybe Text
nextToken = Maybe Text
a} :: ListGeofenceCollections)

-- | An optional limit for the number of resources returned in a single call.
--
-- Default value: @100@
listGeofenceCollections_maxResults :: Lens.Lens' ListGeofenceCollections (Prelude.Maybe Prelude.Natural)
listGeofenceCollections_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListGeofenceCollections -> f ListGeofenceCollections
listGeofenceCollections_maxResults = (ListGeofenceCollections -> Maybe Natural)
-> (ListGeofenceCollections
    -> Maybe Natural -> ListGeofenceCollections)
-> Lens
     ListGeofenceCollections
     ListGeofenceCollections
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGeofenceCollections' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListGeofenceCollections' :: ListGeofenceCollections -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListGeofenceCollections
s@ListGeofenceCollections' {} Maybe Natural
a -> ListGeofenceCollections
s {$sel:maxResults:ListGeofenceCollections' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListGeofenceCollections)

instance Core.AWSPager ListGeofenceCollections where
  page :: ListGeofenceCollections
-> AWSResponse ListGeofenceCollections
-> Maybe ListGeofenceCollections
page ListGeofenceCollections
rq AWSResponse ListGeofenceCollections
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListGeofenceCollections
ListGeofenceCollectionsResponse
rs
            ListGeofenceCollectionsResponse
-> Getting (First Text) ListGeofenceCollectionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListGeofenceCollectionsResponse
-> Const (First Text) ListGeofenceCollectionsResponse
Lens' ListGeofenceCollectionsResponse (Maybe Text)
listGeofenceCollectionsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListGeofenceCollectionsResponse
 -> Const (First Text) ListGeofenceCollectionsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListGeofenceCollectionsResponse 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 ListGeofenceCollections
forall a. Maybe a
Prelude.Nothing
    | [ListGeofenceCollectionsResponseEntry] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        (AWSResponse ListGeofenceCollections
ListGeofenceCollectionsResponse
rs ListGeofenceCollectionsResponse
-> Getting
     [ListGeofenceCollectionsResponseEntry]
     ListGeofenceCollectionsResponse
     [ListGeofenceCollectionsResponseEntry]
-> [ListGeofenceCollectionsResponseEntry]
forall s a. s -> Getting a s a -> a
Lens.^. Getting
  [ListGeofenceCollectionsResponseEntry]
  ListGeofenceCollectionsResponse
  [ListGeofenceCollectionsResponseEntry]
Lens'
  ListGeofenceCollectionsResponse
  [ListGeofenceCollectionsResponseEntry]
listGeofenceCollectionsResponse_entries) =
      Maybe ListGeofenceCollections
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListGeofenceCollections -> Maybe ListGeofenceCollections
forall a. a -> Maybe a
Prelude.Just (ListGeofenceCollections -> Maybe ListGeofenceCollections)
-> ListGeofenceCollections -> Maybe ListGeofenceCollections
forall a b. (a -> b) -> a -> b
Prelude.$
        ListGeofenceCollections
rq
          ListGeofenceCollections
-> (ListGeofenceCollections -> ListGeofenceCollections)
-> ListGeofenceCollections
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListGeofenceCollections -> Identity ListGeofenceCollections
Lens
  ListGeofenceCollections
  ListGeofenceCollections
  (Maybe Text)
  (Maybe Text)
listGeofenceCollections_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListGeofenceCollections -> Identity ListGeofenceCollections)
-> Maybe Text -> ListGeofenceCollections -> ListGeofenceCollections
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListGeofenceCollections
ListGeofenceCollectionsResponse
rs
          ListGeofenceCollectionsResponse
-> Getting (First Text) ListGeofenceCollectionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListGeofenceCollectionsResponse
-> Const (First Text) ListGeofenceCollectionsResponse
Lens' ListGeofenceCollectionsResponse (Maybe Text)
listGeofenceCollectionsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListGeofenceCollectionsResponse
 -> Const (First Text) ListGeofenceCollectionsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListGeofenceCollectionsResponse 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 ListGeofenceCollections where
  type
    AWSResponse ListGeofenceCollections =
      ListGeofenceCollectionsResponse
  request :: ListGeofenceCollections -> Request ListGeofenceCollections
request = Service
-> ListGeofenceCollections -> Request ListGeofenceCollections
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListGeofenceCollections
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListGeofenceCollections)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListGeofenceCollections))
-> Logger
-> Service
-> Proxy ListGeofenceCollections
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListGeofenceCollections)))
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
-> Int
-> [ListGeofenceCollectionsResponseEntry]
-> ListGeofenceCollectionsResponse
ListGeofenceCollectionsResponse'
            (Maybe Text
 -> Int
 -> [ListGeofenceCollectionsResponseEntry]
 -> ListGeofenceCollectionsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Int
      -> [ListGeofenceCollectionsResponseEntry]
      -> ListGeofenceCollectionsResponse)
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
  (Int
   -> [ListGeofenceCollectionsResponseEntry]
   -> ListGeofenceCollectionsResponse)
-> Either String Int
-> Either
     String
     ([ListGeofenceCollectionsResponseEntry]
      -> ListGeofenceCollectionsResponse)
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))
            Either
  String
  ([ListGeofenceCollectionsResponseEntry]
   -> ListGeofenceCollectionsResponse)
-> Either String [ListGeofenceCollectionsResponseEntry]
-> Either String ListGeofenceCollectionsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe [ListGeofenceCollectionsResponseEntry])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Entries" Either String (Maybe [ListGeofenceCollectionsResponseEntry])
-> [ListGeofenceCollectionsResponseEntry]
-> Either String [ListGeofenceCollectionsResponseEntry]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [ListGeofenceCollectionsResponseEntry]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ListGeofenceCollections

instance Prelude.NFData ListGeofenceCollections

instance Core.ToHeaders ListGeofenceCollections where
  toHeaders :: ListGeofenceCollections -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListGeofenceCollections -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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 ListGeofenceCollections where
  toJSON :: ListGeofenceCollections -> Value
toJSON ListGeofenceCollections' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListGeofenceCollections' :: ListGeofenceCollections -> Maybe Natural
$sel:nextToken:ListGeofenceCollections' :: ListGeofenceCollections -> 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
"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 ListGeofenceCollections where
  toPath :: ListGeofenceCollections -> ByteString
toPath =
    ByteString -> ListGeofenceCollections -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/geofencing/v0/list-collections"

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

-- | /See:/ 'newListGeofenceCollectionsResponse' smart constructor.
data ListGeofenceCollectionsResponse = ListGeofenceCollectionsResponse'
  { -- | A pagination token indicating there are additional pages available. You
    -- can use the token in a following request to fetch the next set of
    -- results.
    ListGeofenceCollectionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListGeofenceCollectionsResponse -> Int
httpStatus :: Prelude.Int,
    -- | Lists the geofence collections that exist in your AWS account.
    ListGeofenceCollectionsResponse
-> [ListGeofenceCollectionsResponseEntry]
entries :: [ListGeofenceCollectionsResponseEntry]
  }
  deriving (ListGeofenceCollectionsResponse
-> ListGeofenceCollectionsResponse -> Bool
(ListGeofenceCollectionsResponse
 -> ListGeofenceCollectionsResponse -> Bool)
-> (ListGeofenceCollectionsResponse
    -> ListGeofenceCollectionsResponse -> Bool)
-> Eq ListGeofenceCollectionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListGeofenceCollectionsResponse
-> ListGeofenceCollectionsResponse -> Bool
$c/= :: ListGeofenceCollectionsResponse
-> ListGeofenceCollectionsResponse -> Bool
== :: ListGeofenceCollectionsResponse
-> ListGeofenceCollectionsResponse -> Bool
$c== :: ListGeofenceCollectionsResponse
-> ListGeofenceCollectionsResponse -> Bool
Prelude.Eq, ReadPrec [ListGeofenceCollectionsResponse]
ReadPrec ListGeofenceCollectionsResponse
Int -> ReadS ListGeofenceCollectionsResponse
ReadS [ListGeofenceCollectionsResponse]
(Int -> ReadS ListGeofenceCollectionsResponse)
-> ReadS [ListGeofenceCollectionsResponse]
-> ReadPrec ListGeofenceCollectionsResponse
-> ReadPrec [ListGeofenceCollectionsResponse]
-> Read ListGeofenceCollectionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListGeofenceCollectionsResponse]
$creadListPrec :: ReadPrec [ListGeofenceCollectionsResponse]
readPrec :: ReadPrec ListGeofenceCollectionsResponse
$creadPrec :: ReadPrec ListGeofenceCollectionsResponse
readList :: ReadS [ListGeofenceCollectionsResponse]
$creadList :: ReadS [ListGeofenceCollectionsResponse]
readsPrec :: Int -> ReadS ListGeofenceCollectionsResponse
$creadsPrec :: Int -> ReadS ListGeofenceCollectionsResponse
Prelude.Read, Int -> ListGeofenceCollectionsResponse -> ShowS
[ListGeofenceCollectionsResponse] -> ShowS
ListGeofenceCollectionsResponse -> String
(Int -> ListGeofenceCollectionsResponse -> ShowS)
-> (ListGeofenceCollectionsResponse -> String)
-> ([ListGeofenceCollectionsResponse] -> ShowS)
-> Show ListGeofenceCollectionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListGeofenceCollectionsResponse] -> ShowS
$cshowList :: [ListGeofenceCollectionsResponse] -> ShowS
show :: ListGeofenceCollectionsResponse -> String
$cshow :: ListGeofenceCollectionsResponse -> String
showsPrec :: Int -> ListGeofenceCollectionsResponse -> ShowS
$cshowsPrec :: Int -> ListGeofenceCollectionsResponse -> ShowS
Prelude.Show, (forall x.
 ListGeofenceCollectionsResponse
 -> Rep ListGeofenceCollectionsResponse x)
-> (forall x.
    Rep ListGeofenceCollectionsResponse x
    -> ListGeofenceCollectionsResponse)
-> Generic ListGeofenceCollectionsResponse
forall x.
Rep ListGeofenceCollectionsResponse x
-> ListGeofenceCollectionsResponse
forall x.
ListGeofenceCollectionsResponse
-> Rep ListGeofenceCollectionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListGeofenceCollectionsResponse x
-> ListGeofenceCollectionsResponse
$cfrom :: forall x.
ListGeofenceCollectionsResponse
-> Rep ListGeofenceCollectionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListGeofenceCollectionsResponse' 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:
--
-- 'nextToken', 'listGeofenceCollectionsResponse_nextToken' - A pagination token indicating there are additional pages available. You
-- can use the token in a following request to fetch the next set of
-- results.
--
-- 'httpStatus', 'listGeofenceCollectionsResponse_httpStatus' - The response's http status code.
--
-- 'entries', 'listGeofenceCollectionsResponse_entries' - Lists the geofence collections that exist in your AWS account.
newListGeofenceCollectionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListGeofenceCollectionsResponse
newListGeofenceCollectionsResponse :: Int -> ListGeofenceCollectionsResponse
newListGeofenceCollectionsResponse Int
pHttpStatus_ =
  ListGeofenceCollectionsResponse' :: Maybe Text
-> Int
-> [ListGeofenceCollectionsResponseEntry]
-> ListGeofenceCollectionsResponse
ListGeofenceCollectionsResponse'
    { $sel:nextToken:ListGeofenceCollectionsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListGeofenceCollectionsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:entries:ListGeofenceCollectionsResponse' :: [ListGeofenceCollectionsResponseEntry]
entries = [ListGeofenceCollectionsResponseEntry]
forall a. Monoid a => a
Prelude.mempty
    }

-- | A pagination token indicating there are additional pages available. You
-- can use the token in a following request to fetch the next set of
-- results.
listGeofenceCollectionsResponse_nextToken :: Lens.Lens' ListGeofenceCollectionsResponse (Prelude.Maybe Prelude.Text)
listGeofenceCollectionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListGeofenceCollectionsResponse
-> f ListGeofenceCollectionsResponse
listGeofenceCollectionsResponse_nextToken = (ListGeofenceCollectionsResponse -> Maybe Text)
-> (ListGeofenceCollectionsResponse
    -> Maybe Text -> ListGeofenceCollectionsResponse)
-> Lens' ListGeofenceCollectionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGeofenceCollectionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListGeofenceCollectionsResponse' :: ListGeofenceCollectionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListGeofenceCollectionsResponse
s@ListGeofenceCollectionsResponse' {} Maybe Text
a -> ListGeofenceCollectionsResponse
s {$sel:nextToken:ListGeofenceCollectionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListGeofenceCollectionsResponse)

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

-- | Lists the geofence collections that exist in your AWS account.
listGeofenceCollectionsResponse_entries :: Lens.Lens' ListGeofenceCollectionsResponse [ListGeofenceCollectionsResponseEntry]
listGeofenceCollectionsResponse_entries :: ([ListGeofenceCollectionsResponseEntry]
 -> f [ListGeofenceCollectionsResponseEntry])
-> ListGeofenceCollectionsResponse
-> f ListGeofenceCollectionsResponse
listGeofenceCollectionsResponse_entries = (ListGeofenceCollectionsResponse
 -> [ListGeofenceCollectionsResponseEntry])
-> (ListGeofenceCollectionsResponse
    -> [ListGeofenceCollectionsResponseEntry]
    -> ListGeofenceCollectionsResponse)
-> Lens'
     ListGeofenceCollectionsResponse
     [ListGeofenceCollectionsResponseEntry]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGeofenceCollectionsResponse' {[ListGeofenceCollectionsResponseEntry]
entries :: [ListGeofenceCollectionsResponseEntry]
$sel:entries:ListGeofenceCollectionsResponse' :: ListGeofenceCollectionsResponse
-> [ListGeofenceCollectionsResponseEntry]
entries} -> [ListGeofenceCollectionsResponseEntry]
entries) (\s :: ListGeofenceCollectionsResponse
s@ListGeofenceCollectionsResponse' {} [ListGeofenceCollectionsResponseEntry]
a -> ListGeofenceCollectionsResponse
s {$sel:entries:ListGeofenceCollectionsResponse' :: [ListGeofenceCollectionsResponseEntry]
entries = [ListGeofenceCollectionsResponseEntry]
a} :: ListGeofenceCollectionsResponse) (([ListGeofenceCollectionsResponseEntry]
  -> f [ListGeofenceCollectionsResponseEntry])
 -> ListGeofenceCollectionsResponse
 -> f ListGeofenceCollectionsResponse)
-> (([ListGeofenceCollectionsResponseEntry]
     -> f [ListGeofenceCollectionsResponseEntry])
    -> [ListGeofenceCollectionsResponseEntry]
    -> f [ListGeofenceCollectionsResponseEntry])
-> ([ListGeofenceCollectionsResponseEntry]
    -> f [ListGeofenceCollectionsResponseEntry])
-> ListGeofenceCollectionsResponse
-> f ListGeofenceCollectionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ListGeofenceCollectionsResponseEntry]
 -> f [ListGeofenceCollectionsResponseEntry])
-> [ListGeofenceCollectionsResponseEntry]
-> f [ListGeofenceCollectionsResponseEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    ListGeofenceCollectionsResponse