{-# 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.IoTAnalytics.ListDatastores
-- 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)
--
-- Retrieves a list of data stores.
--
-- This operation returns paginated results.
module Amazonka.IoTAnalytics.ListDatastores
  ( -- * Creating a Request
    ListDatastores (..),
    newListDatastores,

    -- * Request Lenses
    listDatastores_nextToken,
    listDatastores_maxResults,

    -- * Destructuring the Response
    ListDatastoresResponse (..),
    newListDatastoresResponse,

    -- * Response Lenses
    listDatastoresResponse_nextToken,
    listDatastoresResponse_datastoreSummaries,
    listDatastoresResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoTAnalytics.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:/ 'newListDatastores' smart constructor.
data ListDatastores = ListDatastores'
  { -- | The token for the next set of results.
    ListDatastores -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return in this request.
    --
    -- The default value is 100.
    ListDatastores -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListDatastores -> ListDatastores -> Bool
(ListDatastores -> ListDatastores -> Bool)
-> (ListDatastores -> ListDatastores -> Bool) -> Eq ListDatastores
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDatastores -> ListDatastores -> Bool
$c/= :: ListDatastores -> ListDatastores -> Bool
== :: ListDatastores -> ListDatastores -> Bool
$c== :: ListDatastores -> ListDatastores -> Bool
Prelude.Eq, ReadPrec [ListDatastores]
ReadPrec ListDatastores
Int -> ReadS ListDatastores
ReadS [ListDatastores]
(Int -> ReadS ListDatastores)
-> ReadS [ListDatastores]
-> ReadPrec ListDatastores
-> ReadPrec [ListDatastores]
-> Read ListDatastores
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDatastores]
$creadListPrec :: ReadPrec [ListDatastores]
readPrec :: ReadPrec ListDatastores
$creadPrec :: ReadPrec ListDatastores
readList :: ReadS [ListDatastores]
$creadList :: ReadS [ListDatastores]
readsPrec :: Int -> ReadS ListDatastores
$creadsPrec :: Int -> ReadS ListDatastores
Prelude.Read, Int -> ListDatastores -> ShowS
[ListDatastores] -> ShowS
ListDatastores -> String
(Int -> ListDatastores -> ShowS)
-> (ListDatastores -> String)
-> ([ListDatastores] -> ShowS)
-> Show ListDatastores
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDatastores] -> ShowS
$cshowList :: [ListDatastores] -> ShowS
show :: ListDatastores -> String
$cshow :: ListDatastores -> String
showsPrec :: Int -> ListDatastores -> ShowS
$cshowsPrec :: Int -> ListDatastores -> ShowS
Prelude.Show, (forall x. ListDatastores -> Rep ListDatastores x)
-> (forall x. Rep ListDatastores x -> ListDatastores)
-> Generic ListDatastores
forall x. Rep ListDatastores x -> ListDatastores
forall x. ListDatastores -> Rep ListDatastores x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDatastores x -> ListDatastores
$cfrom :: forall x. ListDatastores -> Rep ListDatastores x
Prelude.Generic)

-- |
-- Create a value of 'ListDatastores' 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', 'listDatastores_nextToken' - The token for the next set of results.
--
-- 'maxResults', 'listDatastores_maxResults' - The maximum number of results to return in this request.
--
-- The default value is 100.
newListDatastores ::
  ListDatastores
newListDatastores :: ListDatastores
newListDatastores =
  ListDatastores' :: Maybe Text -> Maybe Natural -> ListDatastores
ListDatastores'
    { $sel:nextToken:ListDatastores' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListDatastores' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The token for the next set of results.
listDatastores_nextToken :: Lens.Lens' ListDatastores (Prelude.Maybe Prelude.Text)
listDatastores_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDatastores -> f ListDatastores
listDatastores_nextToken = (ListDatastores -> Maybe Text)
-> (ListDatastores -> Maybe Text -> ListDatastores)
-> Lens ListDatastores ListDatastores (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatastores' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDatastores' :: ListDatastores -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDatastores
s@ListDatastores' {} Maybe Text
a -> ListDatastores
s {$sel:nextToken:ListDatastores' :: Maybe Text
nextToken = Maybe Text
a} :: ListDatastores)

-- | The maximum number of results to return in this request.
--
-- The default value is 100.
listDatastores_maxResults :: Lens.Lens' ListDatastores (Prelude.Maybe Prelude.Natural)
listDatastores_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListDatastores -> f ListDatastores
listDatastores_maxResults = (ListDatastores -> Maybe Natural)
-> (ListDatastores -> Maybe Natural -> ListDatastores)
-> Lens
     ListDatastores ListDatastores (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatastores' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListDatastores' :: ListDatastores -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListDatastores
s@ListDatastores' {} Maybe Natural
a -> ListDatastores
s {$sel:maxResults:ListDatastores' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListDatastores)

instance Core.AWSPager ListDatastores where
  page :: ListDatastores
-> AWSResponse ListDatastores -> Maybe ListDatastores
page ListDatastores
rq AWSResponse ListDatastores
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDatastores
ListDatastoresResponse
rs
            ListDatastoresResponse
-> Getting (First Text) ListDatastoresResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDatastoresResponse
-> Const (First Text) ListDatastoresResponse
Lens' ListDatastoresResponse (Maybe Text)
listDatastoresResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDatastoresResponse
 -> Const (First Text) ListDatastoresResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDatastoresResponse 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 ListDatastores
forall a. Maybe a
Prelude.Nothing
    | Maybe [DatastoreSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDatastores
ListDatastoresResponse
rs
            ListDatastoresResponse
-> Getting
     (First [DatastoreSummary])
     ListDatastoresResponse
     [DatastoreSummary]
-> Maybe [DatastoreSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [DatastoreSummary]
 -> Const (First [DatastoreSummary]) (Maybe [DatastoreSummary]))
-> ListDatastoresResponse
-> Const (First [DatastoreSummary]) ListDatastoresResponse
Lens' ListDatastoresResponse (Maybe [DatastoreSummary])
listDatastoresResponse_datastoreSummaries
              ((Maybe [DatastoreSummary]
  -> Const (First [DatastoreSummary]) (Maybe [DatastoreSummary]))
 -> ListDatastoresResponse
 -> Const (First [DatastoreSummary]) ListDatastoresResponse)
-> (([DatastoreSummary]
     -> Const (First [DatastoreSummary]) [DatastoreSummary])
    -> Maybe [DatastoreSummary]
    -> Const (First [DatastoreSummary]) (Maybe [DatastoreSummary]))
-> Getting
     (First [DatastoreSummary])
     ListDatastoresResponse
     [DatastoreSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DatastoreSummary]
 -> Const (First [DatastoreSummary]) [DatastoreSummary])
-> Maybe [DatastoreSummary]
-> Const (First [DatastoreSummary]) (Maybe [DatastoreSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListDatastores
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListDatastores -> Maybe ListDatastores
forall a. a -> Maybe a
Prelude.Just (ListDatastores -> Maybe ListDatastores)
-> ListDatastores -> Maybe ListDatastores
forall a b. (a -> b) -> a -> b
Prelude.$
        ListDatastores
rq
          ListDatastores
-> (ListDatastores -> ListDatastores) -> ListDatastores
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListDatastores -> Identity ListDatastores
Lens ListDatastores ListDatastores (Maybe Text) (Maybe Text)
listDatastores_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListDatastores -> Identity ListDatastores)
-> Maybe Text -> ListDatastores -> ListDatastores
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDatastores
ListDatastoresResponse
rs
          ListDatastoresResponse
-> Getting (First Text) ListDatastoresResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDatastoresResponse
-> Const (First Text) ListDatastoresResponse
Lens' ListDatastoresResponse (Maybe Text)
listDatastoresResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDatastoresResponse
 -> Const (First Text) ListDatastoresResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDatastoresResponse 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 ListDatastores where
  type
    AWSResponse ListDatastores =
      ListDatastoresResponse
  request :: ListDatastores -> Request ListDatastores
request = Service -> ListDatastores -> Request ListDatastores
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListDatastores
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListDatastores)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListDatastores))
-> Logger
-> Service
-> Proxy ListDatastores
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListDatastores)))
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 [DatastoreSummary] -> Int -> ListDatastoresResponse
ListDatastoresResponse'
            (Maybe Text
 -> Maybe [DatastoreSummary] -> Int -> ListDatastoresResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [DatastoreSummary] -> Int -> ListDatastoresResponse)
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 [DatastoreSummary] -> Int -> ListDatastoresResponse)
-> Either String (Maybe [DatastoreSummary])
-> Either String (Int -> ListDatastoresResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [DatastoreSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"datastoreSummaries"
                            Either String (Maybe (Maybe [DatastoreSummary]))
-> Maybe [DatastoreSummary]
-> Either String (Maybe [DatastoreSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [DatastoreSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListDatastoresResponse)
-> Either String Int -> Either String ListDatastoresResponse
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 ListDatastores

instance Prelude.NFData ListDatastores

instance Core.ToHeaders ListDatastores where
  toHeaders :: ListDatastores -> ResponseHeaders
toHeaders = ResponseHeaders -> ListDatastores -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

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

instance Core.ToQuery ListDatastores where
  toQuery :: ListDatastores -> QueryString
toQuery ListDatastores' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListDatastores' :: ListDatastores -> Maybe Natural
$sel:nextToken:ListDatastores' :: ListDatastores -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListDatastoresResponse' smart constructor.
data ListDatastoresResponse = ListDatastoresResponse'
  { -- | The token to retrieve the next set of results, or @null@ if there are no
    -- more results.
    ListDatastoresResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of @DatastoreSummary@ objects.
    ListDatastoresResponse -> Maybe [DatastoreSummary]
datastoreSummaries :: Prelude.Maybe [DatastoreSummary],
    -- | The response's http status code.
    ListDatastoresResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListDatastoresResponse -> ListDatastoresResponse -> Bool
(ListDatastoresResponse -> ListDatastoresResponse -> Bool)
-> (ListDatastoresResponse -> ListDatastoresResponse -> Bool)
-> Eq ListDatastoresResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDatastoresResponse -> ListDatastoresResponse -> Bool
$c/= :: ListDatastoresResponse -> ListDatastoresResponse -> Bool
== :: ListDatastoresResponse -> ListDatastoresResponse -> Bool
$c== :: ListDatastoresResponse -> ListDatastoresResponse -> Bool
Prelude.Eq, ReadPrec [ListDatastoresResponse]
ReadPrec ListDatastoresResponse
Int -> ReadS ListDatastoresResponse
ReadS [ListDatastoresResponse]
(Int -> ReadS ListDatastoresResponse)
-> ReadS [ListDatastoresResponse]
-> ReadPrec ListDatastoresResponse
-> ReadPrec [ListDatastoresResponse]
-> Read ListDatastoresResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDatastoresResponse]
$creadListPrec :: ReadPrec [ListDatastoresResponse]
readPrec :: ReadPrec ListDatastoresResponse
$creadPrec :: ReadPrec ListDatastoresResponse
readList :: ReadS [ListDatastoresResponse]
$creadList :: ReadS [ListDatastoresResponse]
readsPrec :: Int -> ReadS ListDatastoresResponse
$creadsPrec :: Int -> ReadS ListDatastoresResponse
Prelude.Read, Int -> ListDatastoresResponse -> ShowS
[ListDatastoresResponse] -> ShowS
ListDatastoresResponse -> String
(Int -> ListDatastoresResponse -> ShowS)
-> (ListDatastoresResponse -> String)
-> ([ListDatastoresResponse] -> ShowS)
-> Show ListDatastoresResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDatastoresResponse] -> ShowS
$cshowList :: [ListDatastoresResponse] -> ShowS
show :: ListDatastoresResponse -> String
$cshow :: ListDatastoresResponse -> String
showsPrec :: Int -> ListDatastoresResponse -> ShowS
$cshowsPrec :: Int -> ListDatastoresResponse -> ShowS
Prelude.Show, (forall x. ListDatastoresResponse -> Rep ListDatastoresResponse x)
-> (forall x.
    Rep ListDatastoresResponse x -> ListDatastoresResponse)
-> Generic ListDatastoresResponse
forall x. Rep ListDatastoresResponse x -> ListDatastoresResponse
forall x. ListDatastoresResponse -> Rep ListDatastoresResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDatastoresResponse x -> ListDatastoresResponse
$cfrom :: forall x. ListDatastoresResponse -> Rep ListDatastoresResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDatastoresResponse' 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', 'listDatastoresResponse_nextToken' - The token to retrieve the next set of results, or @null@ if there are no
-- more results.
--
-- 'datastoreSummaries', 'listDatastoresResponse_datastoreSummaries' - A list of @DatastoreSummary@ objects.
--
-- 'httpStatus', 'listDatastoresResponse_httpStatus' - The response's http status code.
newListDatastoresResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDatastoresResponse
newListDatastoresResponse :: Int -> ListDatastoresResponse
newListDatastoresResponse Int
pHttpStatus_ =
  ListDatastoresResponse' :: Maybe Text
-> Maybe [DatastoreSummary] -> Int -> ListDatastoresResponse
ListDatastoresResponse'
    { $sel:nextToken:ListDatastoresResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:datastoreSummaries:ListDatastoresResponse' :: Maybe [DatastoreSummary]
datastoreSummaries = Maybe [DatastoreSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDatastoresResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token to retrieve the next set of results, or @null@ if there are no
-- more results.
listDatastoresResponse_nextToken :: Lens.Lens' ListDatastoresResponse (Prelude.Maybe Prelude.Text)
listDatastoresResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDatastoresResponse -> f ListDatastoresResponse
listDatastoresResponse_nextToken = (ListDatastoresResponse -> Maybe Text)
-> (ListDatastoresResponse -> Maybe Text -> ListDatastoresResponse)
-> Lens' ListDatastoresResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatastoresResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDatastoresResponse' :: ListDatastoresResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDatastoresResponse
s@ListDatastoresResponse' {} Maybe Text
a -> ListDatastoresResponse
s {$sel:nextToken:ListDatastoresResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDatastoresResponse)

-- | A list of @DatastoreSummary@ objects.
listDatastoresResponse_datastoreSummaries :: Lens.Lens' ListDatastoresResponse (Prelude.Maybe [DatastoreSummary])
listDatastoresResponse_datastoreSummaries :: (Maybe [DatastoreSummary] -> f (Maybe [DatastoreSummary]))
-> ListDatastoresResponse -> f ListDatastoresResponse
listDatastoresResponse_datastoreSummaries = (ListDatastoresResponse -> Maybe [DatastoreSummary])
-> (ListDatastoresResponse
    -> Maybe [DatastoreSummary] -> ListDatastoresResponse)
-> Lens' ListDatastoresResponse (Maybe [DatastoreSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDatastoresResponse' {Maybe [DatastoreSummary]
datastoreSummaries :: Maybe [DatastoreSummary]
$sel:datastoreSummaries:ListDatastoresResponse' :: ListDatastoresResponse -> Maybe [DatastoreSummary]
datastoreSummaries} -> Maybe [DatastoreSummary]
datastoreSummaries) (\s :: ListDatastoresResponse
s@ListDatastoresResponse' {} Maybe [DatastoreSummary]
a -> ListDatastoresResponse
s {$sel:datastoreSummaries:ListDatastoresResponse' :: Maybe [DatastoreSummary]
datastoreSummaries = Maybe [DatastoreSummary]
a} :: ListDatastoresResponse) ((Maybe [DatastoreSummary] -> f (Maybe [DatastoreSummary]))
 -> ListDatastoresResponse -> f ListDatastoresResponse)
-> ((Maybe [DatastoreSummary] -> f (Maybe [DatastoreSummary]))
    -> Maybe [DatastoreSummary] -> f (Maybe [DatastoreSummary]))
-> (Maybe [DatastoreSummary] -> f (Maybe [DatastoreSummary]))
-> ListDatastoresResponse
-> f ListDatastoresResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DatastoreSummary]
  [DatastoreSummary]
  [DatastoreSummary]
  [DatastoreSummary]
-> Iso
     (Maybe [DatastoreSummary])
     (Maybe [DatastoreSummary])
     (Maybe [DatastoreSummary])
     (Maybe [DatastoreSummary])
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
  [DatastoreSummary]
  [DatastoreSummary]
  [DatastoreSummary]
  [DatastoreSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListDatastoresResponse