{-# 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.DynamoDB.ListGlobalTables
-- 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 all global tables that have a replica in the specified Region.
--
-- This operation only applies to
-- <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html Version 2017.11.29>
-- of global tables.
module Amazonka.DynamoDB.ListGlobalTables
  ( -- * Creating a Request
    ListGlobalTables (..),
    newListGlobalTables,

    -- * Request Lenses
    listGlobalTables_regionName,
    listGlobalTables_exclusiveStartGlobalTableName,
    listGlobalTables_limit,

    -- * Destructuring the Response
    ListGlobalTablesResponse (..),
    newListGlobalTablesResponse,

    -- * Response Lenses
    listGlobalTablesResponse_lastEvaluatedGlobalTableName,
    listGlobalTablesResponse_globalTables,
    listGlobalTablesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.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

-- | /See:/ 'newListGlobalTables' smart constructor.
data ListGlobalTables = ListGlobalTables'
  { -- | Lists the global tables in a specific Region.
    ListGlobalTables -> Maybe Text
regionName :: Prelude.Maybe Prelude.Text,
    -- | The first global table name that this operation will evaluate.
    ListGlobalTables -> Maybe Text
exclusiveStartGlobalTableName :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of table names to return, if the parameter is not
    -- specified DynamoDB defaults to 100.
    --
    -- If the number of global tables DynamoDB finds reaches this limit, it
    -- stops the operation and returns the table names collected up to that
    -- point, with a table name in the @LastEvaluatedGlobalTableName@ to apply
    -- in a subsequent operation to the @ExclusiveStartGlobalTableName@
    -- parameter.
    ListGlobalTables -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListGlobalTables -> ListGlobalTables -> Bool
(ListGlobalTables -> ListGlobalTables -> Bool)
-> (ListGlobalTables -> ListGlobalTables -> Bool)
-> Eq ListGlobalTables
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListGlobalTables -> ListGlobalTables -> Bool
$c/= :: ListGlobalTables -> ListGlobalTables -> Bool
== :: ListGlobalTables -> ListGlobalTables -> Bool
$c== :: ListGlobalTables -> ListGlobalTables -> Bool
Prelude.Eq, ReadPrec [ListGlobalTables]
ReadPrec ListGlobalTables
Int -> ReadS ListGlobalTables
ReadS [ListGlobalTables]
(Int -> ReadS ListGlobalTables)
-> ReadS [ListGlobalTables]
-> ReadPrec ListGlobalTables
-> ReadPrec [ListGlobalTables]
-> Read ListGlobalTables
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListGlobalTables]
$creadListPrec :: ReadPrec [ListGlobalTables]
readPrec :: ReadPrec ListGlobalTables
$creadPrec :: ReadPrec ListGlobalTables
readList :: ReadS [ListGlobalTables]
$creadList :: ReadS [ListGlobalTables]
readsPrec :: Int -> ReadS ListGlobalTables
$creadsPrec :: Int -> ReadS ListGlobalTables
Prelude.Read, Int -> ListGlobalTables -> ShowS
[ListGlobalTables] -> ShowS
ListGlobalTables -> String
(Int -> ListGlobalTables -> ShowS)
-> (ListGlobalTables -> String)
-> ([ListGlobalTables] -> ShowS)
-> Show ListGlobalTables
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListGlobalTables] -> ShowS
$cshowList :: [ListGlobalTables] -> ShowS
show :: ListGlobalTables -> String
$cshow :: ListGlobalTables -> String
showsPrec :: Int -> ListGlobalTables -> ShowS
$cshowsPrec :: Int -> ListGlobalTables -> ShowS
Prelude.Show, (forall x. ListGlobalTables -> Rep ListGlobalTables x)
-> (forall x. Rep ListGlobalTables x -> ListGlobalTables)
-> Generic ListGlobalTables
forall x. Rep ListGlobalTables x -> ListGlobalTables
forall x. ListGlobalTables -> Rep ListGlobalTables x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListGlobalTables x -> ListGlobalTables
$cfrom :: forall x. ListGlobalTables -> Rep ListGlobalTables x
Prelude.Generic)

-- |
-- Create a value of 'ListGlobalTables' 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:
--
-- 'regionName', 'listGlobalTables_regionName' - Lists the global tables in a specific Region.
--
-- 'exclusiveStartGlobalTableName', 'listGlobalTables_exclusiveStartGlobalTableName' - The first global table name that this operation will evaluate.
--
-- 'limit', 'listGlobalTables_limit' - The maximum number of table names to return, if the parameter is not
-- specified DynamoDB defaults to 100.
--
-- If the number of global tables DynamoDB finds reaches this limit, it
-- stops the operation and returns the table names collected up to that
-- point, with a table name in the @LastEvaluatedGlobalTableName@ to apply
-- in a subsequent operation to the @ExclusiveStartGlobalTableName@
-- parameter.
newListGlobalTables ::
  ListGlobalTables
newListGlobalTables :: ListGlobalTables
newListGlobalTables =
  ListGlobalTables' :: Maybe Text -> Maybe Text -> Maybe Natural -> ListGlobalTables
ListGlobalTables'
    { $sel:regionName:ListGlobalTables' :: Maybe Text
regionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:exclusiveStartGlobalTableName:ListGlobalTables' :: Maybe Text
exclusiveStartGlobalTableName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:limit:ListGlobalTables' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Lists the global tables in a specific Region.
listGlobalTables_regionName :: Lens.Lens' ListGlobalTables (Prelude.Maybe Prelude.Text)
listGlobalTables_regionName :: (Maybe Text -> f (Maybe Text))
-> ListGlobalTables -> f ListGlobalTables
listGlobalTables_regionName = (ListGlobalTables -> Maybe Text)
-> (ListGlobalTables -> Maybe Text -> ListGlobalTables)
-> Lens ListGlobalTables ListGlobalTables (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGlobalTables' {Maybe Text
regionName :: Maybe Text
$sel:regionName:ListGlobalTables' :: ListGlobalTables -> Maybe Text
regionName} -> Maybe Text
regionName) (\s :: ListGlobalTables
s@ListGlobalTables' {} Maybe Text
a -> ListGlobalTables
s {$sel:regionName:ListGlobalTables' :: Maybe Text
regionName = Maybe Text
a} :: ListGlobalTables)

-- | The first global table name that this operation will evaluate.
listGlobalTables_exclusiveStartGlobalTableName :: Lens.Lens' ListGlobalTables (Prelude.Maybe Prelude.Text)
listGlobalTables_exclusiveStartGlobalTableName :: (Maybe Text -> f (Maybe Text))
-> ListGlobalTables -> f ListGlobalTables
listGlobalTables_exclusiveStartGlobalTableName = (ListGlobalTables -> Maybe Text)
-> (ListGlobalTables -> Maybe Text -> ListGlobalTables)
-> Lens ListGlobalTables ListGlobalTables (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGlobalTables' {Maybe Text
exclusiveStartGlobalTableName :: Maybe Text
$sel:exclusiveStartGlobalTableName:ListGlobalTables' :: ListGlobalTables -> Maybe Text
exclusiveStartGlobalTableName} -> Maybe Text
exclusiveStartGlobalTableName) (\s :: ListGlobalTables
s@ListGlobalTables' {} Maybe Text
a -> ListGlobalTables
s {$sel:exclusiveStartGlobalTableName:ListGlobalTables' :: Maybe Text
exclusiveStartGlobalTableName = Maybe Text
a} :: ListGlobalTables)

-- | The maximum number of table names to return, if the parameter is not
-- specified DynamoDB defaults to 100.
--
-- If the number of global tables DynamoDB finds reaches this limit, it
-- stops the operation and returns the table names collected up to that
-- point, with a table name in the @LastEvaluatedGlobalTableName@ to apply
-- in a subsequent operation to the @ExclusiveStartGlobalTableName@
-- parameter.
listGlobalTables_limit :: Lens.Lens' ListGlobalTables (Prelude.Maybe Prelude.Natural)
listGlobalTables_limit :: (Maybe Natural -> f (Maybe Natural))
-> ListGlobalTables -> f ListGlobalTables
listGlobalTables_limit = (ListGlobalTables -> Maybe Natural)
-> (ListGlobalTables -> Maybe Natural -> ListGlobalTables)
-> Lens
     ListGlobalTables ListGlobalTables (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGlobalTables' {Maybe Natural
limit :: Maybe Natural
$sel:limit:ListGlobalTables' :: ListGlobalTables -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: ListGlobalTables
s@ListGlobalTables' {} Maybe Natural
a -> ListGlobalTables
s {$sel:limit:ListGlobalTables' :: Maybe Natural
limit = Maybe Natural
a} :: ListGlobalTables)

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

instance Prelude.NFData ListGlobalTables

instance Core.ToHeaders ListGlobalTables where
  toHeaders :: ListGlobalTables -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListGlobalTables -> 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
"DynamoDB_20120810.ListGlobalTables" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON ListGlobalTables where
  toJSON :: ListGlobalTables -> Value
toJSON ListGlobalTables' {Maybe Natural
Maybe Text
limit :: Maybe Natural
exclusiveStartGlobalTableName :: Maybe Text
regionName :: Maybe Text
$sel:limit:ListGlobalTables' :: ListGlobalTables -> Maybe Natural
$sel:exclusiveStartGlobalTableName:ListGlobalTables' :: ListGlobalTables -> Maybe Text
$sel:regionName:ListGlobalTables' :: ListGlobalTables -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"RegionName" 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
regionName,
            (Text
"ExclusiveStartGlobalTableName" 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
exclusiveStartGlobalTableName,
            (Text
"Limit" 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
limit
          ]
      )

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

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

-- | /See:/ 'newListGlobalTablesResponse' smart constructor.
data ListGlobalTablesResponse = ListGlobalTablesResponse'
  { -- | Last evaluated global table name.
    ListGlobalTablesResponse -> Maybe Text
lastEvaluatedGlobalTableName :: Prelude.Maybe Prelude.Text,
    -- | List of global table names.
    ListGlobalTablesResponse -> Maybe [GlobalTable]
globalTables :: Prelude.Maybe [GlobalTable],
    -- | The response's http status code.
    ListGlobalTablesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListGlobalTablesResponse -> ListGlobalTablesResponse -> Bool
(ListGlobalTablesResponse -> ListGlobalTablesResponse -> Bool)
-> (ListGlobalTablesResponse -> ListGlobalTablesResponse -> Bool)
-> Eq ListGlobalTablesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListGlobalTablesResponse -> ListGlobalTablesResponse -> Bool
$c/= :: ListGlobalTablesResponse -> ListGlobalTablesResponse -> Bool
== :: ListGlobalTablesResponse -> ListGlobalTablesResponse -> Bool
$c== :: ListGlobalTablesResponse -> ListGlobalTablesResponse -> Bool
Prelude.Eq, ReadPrec [ListGlobalTablesResponse]
ReadPrec ListGlobalTablesResponse
Int -> ReadS ListGlobalTablesResponse
ReadS [ListGlobalTablesResponse]
(Int -> ReadS ListGlobalTablesResponse)
-> ReadS [ListGlobalTablesResponse]
-> ReadPrec ListGlobalTablesResponse
-> ReadPrec [ListGlobalTablesResponse]
-> Read ListGlobalTablesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListGlobalTablesResponse]
$creadListPrec :: ReadPrec [ListGlobalTablesResponse]
readPrec :: ReadPrec ListGlobalTablesResponse
$creadPrec :: ReadPrec ListGlobalTablesResponse
readList :: ReadS [ListGlobalTablesResponse]
$creadList :: ReadS [ListGlobalTablesResponse]
readsPrec :: Int -> ReadS ListGlobalTablesResponse
$creadsPrec :: Int -> ReadS ListGlobalTablesResponse
Prelude.Read, Int -> ListGlobalTablesResponse -> ShowS
[ListGlobalTablesResponse] -> ShowS
ListGlobalTablesResponse -> String
(Int -> ListGlobalTablesResponse -> ShowS)
-> (ListGlobalTablesResponse -> String)
-> ([ListGlobalTablesResponse] -> ShowS)
-> Show ListGlobalTablesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListGlobalTablesResponse] -> ShowS
$cshowList :: [ListGlobalTablesResponse] -> ShowS
show :: ListGlobalTablesResponse -> String
$cshow :: ListGlobalTablesResponse -> String
showsPrec :: Int -> ListGlobalTablesResponse -> ShowS
$cshowsPrec :: Int -> ListGlobalTablesResponse -> ShowS
Prelude.Show, (forall x.
 ListGlobalTablesResponse -> Rep ListGlobalTablesResponse x)
-> (forall x.
    Rep ListGlobalTablesResponse x -> ListGlobalTablesResponse)
-> Generic ListGlobalTablesResponse
forall x.
Rep ListGlobalTablesResponse x -> ListGlobalTablesResponse
forall x.
ListGlobalTablesResponse -> Rep ListGlobalTablesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListGlobalTablesResponse x -> ListGlobalTablesResponse
$cfrom :: forall x.
ListGlobalTablesResponse -> Rep ListGlobalTablesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListGlobalTablesResponse' 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:
--
-- 'lastEvaluatedGlobalTableName', 'listGlobalTablesResponse_lastEvaluatedGlobalTableName' - Last evaluated global table name.
--
-- 'globalTables', 'listGlobalTablesResponse_globalTables' - List of global table names.
--
-- 'httpStatus', 'listGlobalTablesResponse_httpStatus' - The response's http status code.
newListGlobalTablesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListGlobalTablesResponse
newListGlobalTablesResponse :: Int -> ListGlobalTablesResponse
newListGlobalTablesResponse Int
pHttpStatus_ =
  ListGlobalTablesResponse' :: Maybe Text
-> Maybe [GlobalTable] -> Int -> ListGlobalTablesResponse
ListGlobalTablesResponse'
    { $sel:lastEvaluatedGlobalTableName:ListGlobalTablesResponse' :: Maybe Text
lastEvaluatedGlobalTableName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:globalTables:ListGlobalTablesResponse' :: Maybe [GlobalTable]
globalTables = Maybe [GlobalTable]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListGlobalTablesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Last evaluated global table name.
listGlobalTablesResponse_lastEvaluatedGlobalTableName :: Lens.Lens' ListGlobalTablesResponse (Prelude.Maybe Prelude.Text)
listGlobalTablesResponse_lastEvaluatedGlobalTableName :: (Maybe Text -> f (Maybe Text))
-> ListGlobalTablesResponse -> f ListGlobalTablesResponse
listGlobalTablesResponse_lastEvaluatedGlobalTableName = (ListGlobalTablesResponse -> Maybe Text)
-> (ListGlobalTablesResponse
    -> Maybe Text -> ListGlobalTablesResponse)
-> Lens
     ListGlobalTablesResponse
     ListGlobalTablesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGlobalTablesResponse' {Maybe Text
lastEvaluatedGlobalTableName :: Maybe Text
$sel:lastEvaluatedGlobalTableName:ListGlobalTablesResponse' :: ListGlobalTablesResponse -> Maybe Text
lastEvaluatedGlobalTableName} -> Maybe Text
lastEvaluatedGlobalTableName) (\s :: ListGlobalTablesResponse
s@ListGlobalTablesResponse' {} Maybe Text
a -> ListGlobalTablesResponse
s {$sel:lastEvaluatedGlobalTableName:ListGlobalTablesResponse' :: Maybe Text
lastEvaluatedGlobalTableName = Maybe Text
a} :: ListGlobalTablesResponse)

-- | List of global table names.
listGlobalTablesResponse_globalTables :: Lens.Lens' ListGlobalTablesResponse (Prelude.Maybe [GlobalTable])
listGlobalTablesResponse_globalTables :: (Maybe [GlobalTable] -> f (Maybe [GlobalTable]))
-> ListGlobalTablesResponse -> f ListGlobalTablesResponse
listGlobalTablesResponse_globalTables = (ListGlobalTablesResponse -> Maybe [GlobalTable])
-> (ListGlobalTablesResponse
    -> Maybe [GlobalTable] -> ListGlobalTablesResponse)
-> Lens
     ListGlobalTablesResponse
     ListGlobalTablesResponse
     (Maybe [GlobalTable])
     (Maybe [GlobalTable])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGlobalTablesResponse' {Maybe [GlobalTable]
globalTables :: Maybe [GlobalTable]
$sel:globalTables:ListGlobalTablesResponse' :: ListGlobalTablesResponse -> Maybe [GlobalTable]
globalTables} -> Maybe [GlobalTable]
globalTables) (\s :: ListGlobalTablesResponse
s@ListGlobalTablesResponse' {} Maybe [GlobalTable]
a -> ListGlobalTablesResponse
s {$sel:globalTables:ListGlobalTablesResponse' :: Maybe [GlobalTable]
globalTables = Maybe [GlobalTable]
a} :: ListGlobalTablesResponse) ((Maybe [GlobalTable] -> f (Maybe [GlobalTable]))
 -> ListGlobalTablesResponse -> f ListGlobalTablesResponse)
-> ((Maybe [GlobalTable] -> f (Maybe [GlobalTable]))
    -> Maybe [GlobalTable] -> f (Maybe [GlobalTable]))
-> (Maybe [GlobalTable] -> f (Maybe [GlobalTable]))
-> ListGlobalTablesResponse
-> f ListGlobalTablesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [GlobalTable] [GlobalTable] [GlobalTable] [GlobalTable]
-> Iso
     (Maybe [GlobalTable])
     (Maybe [GlobalTable])
     (Maybe [GlobalTable])
     (Maybe [GlobalTable])
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 [GlobalTable] [GlobalTable] [GlobalTable] [GlobalTable]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListGlobalTablesResponse