{-# 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.Schemas.ListDiscoverers
-- 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)
--
-- List the discoverers.
--
-- This operation returns paginated results.
module Amazonka.Schemas.ListDiscoverers
  ( -- * Creating a Request
    ListDiscoverers (..),
    newListDiscoverers,

    -- * Request Lenses
    listDiscoverers_sourceArnPrefix,
    listDiscoverers_discovererIdPrefix,
    listDiscoverers_nextToken,
    listDiscoverers_limit,

    -- * Destructuring the Response
    ListDiscoverersResponse (..),
    newListDiscoverersResponse,

    -- * Response Lenses
    listDiscoverersResponse_discoverers,
    listDiscoverersResponse_nextToken,
    listDiscoverersResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListDiscoverers' smart constructor.
data ListDiscoverers = ListDiscoverers'
  { -- | Specifying this limits the results to only those ARNs that start with
    -- the specified prefix.
    ListDiscoverers -> Maybe Text
sourceArnPrefix :: Prelude.Maybe Prelude.Text,
    -- | Specifying this limits the results to only those discoverer IDs that
    -- start with the specified prefix.
    ListDiscoverers -> Maybe Text
discovererIdPrefix :: Prelude.Maybe Prelude.Text,
    -- | The token that specifies the next page of results to return. To request
    -- the first page, leave NextToken empty. The token will expire in 24
    -- hours, and cannot be shared with other accounts.
    ListDiscoverers -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    ListDiscoverers -> Maybe Int
limit :: Prelude.Maybe Prelude.Int
  }
  deriving (ListDiscoverers -> ListDiscoverers -> Bool
(ListDiscoverers -> ListDiscoverers -> Bool)
-> (ListDiscoverers -> ListDiscoverers -> Bool)
-> Eq ListDiscoverers
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDiscoverers -> ListDiscoverers -> Bool
$c/= :: ListDiscoverers -> ListDiscoverers -> Bool
== :: ListDiscoverers -> ListDiscoverers -> Bool
$c== :: ListDiscoverers -> ListDiscoverers -> Bool
Prelude.Eq, ReadPrec [ListDiscoverers]
ReadPrec ListDiscoverers
Int -> ReadS ListDiscoverers
ReadS [ListDiscoverers]
(Int -> ReadS ListDiscoverers)
-> ReadS [ListDiscoverers]
-> ReadPrec ListDiscoverers
-> ReadPrec [ListDiscoverers]
-> Read ListDiscoverers
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDiscoverers]
$creadListPrec :: ReadPrec [ListDiscoverers]
readPrec :: ReadPrec ListDiscoverers
$creadPrec :: ReadPrec ListDiscoverers
readList :: ReadS [ListDiscoverers]
$creadList :: ReadS [ListDiscoverers]
readsPrec :: Int -> ReadS ListDiscoverers
$creadsPrec :: Int -> ReadS ListDiscoverers
Prelude.Read, Int -> ListDiscoverers -> ShowS
[ListDiscoverers] -> ShowS
ListDiscoverers -> String
(Int -> ListDiscoverers -> ShowS)
-> (ListDiscoverers -> String)
-> ([ListDiscoverers] -> ShowS)
-> Show ListDiscoverers
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDiscoverers] -> ShowS
$cshowList :: [ListDiscoverers] -> ShowS
show :: ListDiscoverers -> String
$cshow :: ListDiscoverers -> String
showsPrec :: Int -> ListDiscoverers -> ShowS
$cshowsPrec :: Int -> ListDiscoverers -> ShowS
Prelude.Show, (forall x. ListDiscoverers -> Rep ListDiscoverers x)
-> (forall x. Rep ListDiscoverers x -> ListDiscoverers)
-> Generic ListDiscoverers
forall x. Rep ListDiscoverers x -> ListDiscoverers
forall x. ListDiscoverers -> Rep ListDiscoverers x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDiscoverers x -> ListDiscoverers
$cfrom :: forall x. ListDiscoverers -> Rep ListDiscoverers x
Prelude.Generic)

-- |
-- Create a value of 'ListDiscoverers' 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:
--
-- 'sourceArnPrefix', 'listDiscoverers_sourceArnPrefix' - Specifying this limits the results to only those ARNs that start with
-- the specified prefix.
--
-- 'discovererIdPrefix', 'listDiscoverers_discovererIdPrefix' - Specifying this limits the results to only those discoverer IDs that
-- start with the specified prefix.
--
-- 'nextToken', 'listDiscoverers_nextToken' - The token that specifies the next page of results to return. To request
-- the first page, leave NextToken empty. The token will expire in 24
-- hours, and cannot be shared with other accounts.
--
-- 'limit', 'listDiscoverers_limit' - Undocumented member.
newListDiscoverers ::
  ListDiscoverers
newListDiscoverers :: ListDiscoverers
newListDiscoverers =
  ListDiscoverers' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Int -> ListDiscoverers
ListDiscoverers'
    { $sel:sourceArnPrefix:ListDiscoverers' :: Maybe Text
sourceArnPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:discovererIdPrefix:ListDiscoverers' :: Maybe Text
discovererIdPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDiscoverers' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:limit:ListDiscoverers' :: Maybe Int
limit = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | Specifying this limits the results to only those ARNs that start with
-- the specified prefix.
listDiscoverers_sourceArnPrefix :: Lens.Lens' ListDiscoverers (Prelude.Maybe Prelude.Text)
listDiscoverers_sourceArnPrefix :: (Maybe Text -> f (Maybe Text))
-> ListDiscoverers -> f ListDiscoverers
listDiscoverers_sourceArnPrefix = (ListDiscoverers -> Maybe Text)
-> (ListDiscoverers -> Maybe Text -> ListDiscoverers)
-> Lens ListDiscoverers ListDiscoverers (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDiscoverers' {Maybe Text
sourceArnPrefix :: Maybe Text
$sel:sourceArnPrefix:ListDiscoverers' :: ListDiscoverers -> Maybe Text
sourceArnPrefix} -> Maybe Text
sourceArnPrefix) (\s :: ListDiscoverers
s@ListDiscoverers' {} Maybe Text
a -> ListDiscoverers
s {$sel:sourceArnPrefix:ListDiscoverers' :: Maybe Text
sourceArnPrefix = Maybe Text
a} :: ListDiscoverers)

-- | Specifying this limits the results to only those discoverer IDs that
-- start with the specified prefix.
listDiscoverers_discovererIdPrefix :: Lens.Lens' ListDiscoverers (Prelude.Maybe Prelude.Text)
listDiscoverers_discovererIdPrefix :: (Maybe Text -> f (Maybe Text))
-> ListDiscoverers -> f ListDiscoverers
listDiscoverers_discovererIdPrefix = (ListDiscoverers -> Maybe Text)
-> (ListDiscoverers -> Maybe Text -> ListDiscoverers)
-> Lens ListDiscoverers ListDiscoverers (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDiscoverers' {Maybe Text
discovererIdPrefix :: Maybe Text
$sel:discovererIdPrefix:ListDiscoverers' :: ListDiscoverers -> Maybe Text
discovererIdPrefix} -> Maybe Text
discovererIdPrefix) (\s :: ListDiscoverers
s@ListDiscoverers' {} Maybe Text
a -> ListDiscoverers
s {$sel:discovererIdPrefix:ListDiscoverers' :: Maybe Text
discovererIdPrefix = Maybe Text
a} :: ListDiscoverers)

-- | The token that specifies the next page of results to return. To request
-- the first page, leave NextToken empty. The token will expire in 24
-- hours, and cannot be shared with other accounts.
listDiscoverers_nextToken :: Lens.Lens' ListDiscoverers (Prelude.Maybe Prelude.Text)
listDiscoverers_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDiscoverers -> f ListDiscoverers
listDiscoverers_nextToken = (ListDiscoverers -> Maybe Text)
-> (ListDiscoverers -> Maybe Text -> ListDiscoverers)
-> Lens ListDiscoverers ListDiscoverers (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDiscoverers' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDiscoverers' :: ListDiscoverers -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDiscoverers
s@ListDiscoverers' {} Maybe Text
a -> ListDiscoverers
s {$sel:nextToken:ListDiscoverers' :: Maybe Text
nextToken = Maybe Text
a} :: ListDiscoverers)

-- | Undocumented member.
listDiscoverers_limit :: Lens.Lens' ListDiscoverers (Prelude.Maybe Prelude.Int)
listDiscoverers_limit :: (Maybe Int -> f (Maybe Int))
-> ListDiscoverers -> f ListDiscoverers
listDiscoverers_limit = (ListDiscoverers -> Maybe Int)
-> (ListDiscoverers -> Maybe Int -> ListDiscoverers)
-> Lens ListDiscoverers ListDiscoverers (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDiscoverers' {Maybe Int
limit :: Maybe Int
$sel:limit:ListDiscoverers' :: ListDiscoverers -> Maybe Int
limit} -> Maybe Int
limit) (\s :: ListDiscoverers
s@ListDiscoverers' {} Maybe Int
a -> ListDiscoverers
s {$sel:limit:ListDiscoverers' :: Maybe Int
limit = Maybe Int
a} :: ListDiscoverers)

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

instance Prelude.NFData ListDiscoverers

instance Core.ToHeaders ListDiscoverers where
  toHeaders :: ListDiscoverers -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListDiscoverers -> 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.ToPath ListDiscoverers where
  toPath :: ListDiscoverers -> ByteString
toPath = ByteString -> ListDiscoverers -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/v1/discoverers"

instance Core.ToQuery ListDiscoverers where
  toQuery :: ListDiscoverers -> QueryString
toQuery ListDiscoverers' {Maybe Int
Maybe Text
limit :: Maybe Int
nextToken :: Maybe Text
discovererIdPrefix :: Maybe Text
sourceArnPrefix :: Maybe Text
$sel:limit:ListDiscoverers' :: ListDiscoverers -> Maybe Int
$sel:nextToken:ListDiscoverers' :: ListDiscoverers -> Maybe Text
$sel:discovererIdPrefix:ListDiscoverers' :: ListDiscoverers -> Maybe Text
$sel:sourceArnPrefix:ListDiscoverers' :: ListDiscoverers -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"sourceArnPrefix" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
sourceArnPrefix,
        ByteString
"discovererIdPrefix" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
discovererIdPrefix,
        ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"limit" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
limit
      ]

-- | /See:/ 'newListDiscoverersResponse' smart constructor.
data ListDiscoverersResponse = ListDiscoverersResponse'
  { -- | An array of DiscovererSummary information.
    ListDiscoverersResponse -> Maybe [DiscovererSummary]
discoverers :: Prelude.Maybe [DiscovererSummary],
    -- | The token that specifies the next page of results to return. To request
    -- the first page, leave NextToken empty. The token will expire in 24
    -- hours, and cannot be shared with other accounts.
    ListDiscoverersResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListDiscoverersResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListDiscoverersResponse -> ListDiscoverersResponse -> Bool
(ListDiscoverersResponse -> ListDiscoverersResponse -> Bool)
-> (ListDiscoverersResponse -> ListDiscoverersResponse -> Bool)
-> Eq ListDiscoverersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDiscoverersResponse -> ListDiscoverersResponse -> Bool
$c/= :: ListDiscoverersResponse -> ListDiscoverersResponse -> Bool
== :: ListDiscoverersResponse -> ListDiscoverersResponse -> Bool
$c== :: ListDiscoverersResponse -> ListDiscoverersResponse -> Bool
Prelude.Eq, ReadPrec [ListDiscoverersResponse]
ReadPrec ListDiscoverersResponse
Int -> ReadS ListDiscoverersResponse
ReadS [ListDiscoverersResponse]
(Int -> ReadS ListDiscoverersResponse)
-> ReadS [ListDiscoverersResponse]
-> ReadPrec ListDiscoverersResponse
-> ReadPrec [ListDiscoverersResponse]
-> Read ListDiscoverersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDiscoverersResponse]
$creadListPrec :: ReadPrec [ListDiscoverersResponse]
readPrec :: ReadPrec ListDiscoverersResponse
$creadPrec :: ReadPrec ListDiscoverersResponse
readList :: ReadS [ListDiscoverersResponse]
$creadList :: ReadS [ListDiscoverersResponse]
readsPrec :: Int -> ReadS ListDiscoverersResponse
$creadsPrec :: Int -> ReadS ListDiscoverersResponse
Prelude.Read, Int -> ListDiscoverersResponse -> ShowS
[ListDiscoverersResponse] -> ShowS
ListDiscoverersResponse -> String
(Int -> ListDiscoverersResponse -> ShowS)
-> (ListDiscoverersResponse -> String)
-> ([ListDiscoverersResponse] -> ShowS)
-> Show ListDiscoverersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDiscoverersResponse] -> ShowS
$cshowList :: [ListDiscoverersResponse] -> ShowS
show :: ListDiscoverersResponse -> String
$cshow :: ListDiscoverersResponse -> String
showsPrec :: Int -> ListDiscoverersResponse -> ShowS
$cshowsPrec :: Int -> ListDiscoverersResponse -> ShowS
Prelude.Show, (forall x.
 ListDiscoverersResponse -> Rep ListDiscoverersResponse x)
-> (forall x.
    Rep ListDiscoverersResponse x -> ListDiscoverersResponse)
-> Generic ListDiscoverersResponse
forall x. Rep ListDiscoverersResponse x -> ListDiscoverersResponse
forall x. ListDiscoverersResponse -> Rep ListDiscoverersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDiscoverersResponse x -> ListDiscoverersResponse
$cfrom :: forall x. ListDiscoverersResponse -> Rep ListDiscoverersResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDiscoverersResponse' 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:
--
-- 'discoverers', 'listDiscoverersResponse_discoverers' - An array of DiscovererSummary information.
--
-- 'nextToken', 'listDiscoverersResponse_nextToken' - The token that specifies the next page of results to return. To request
-- the first page, leave NextToken empty. The token will expire in 24
-- hours, and cannot be shared with other accounts.
--
-- 'httpStatus', 'listDiscoverersResponse_httpStatus' - The response's http status code.
newListDiscoverersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDiscoverersResponse
newListDiscoverersResponse :: Int -> ListDiscoverersResponse
newListDiscoverersResponse Int
pHttpStatus_ =
  ListDiscoverersResponse' :: Maybe [DiscovererSummary]
-> Maybe Text -> Int -> ListDiscoverersResponse
ListDiscoverersResponse'
    { $sel:discoverers:ListDiscoverersResponse' :: Maybe [DiscovererSummary]
discoverers =
        Maybe [DiscovererSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDiscoverersResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDiscoverersResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of DiscovererSummary information.
listDiscoverersResponse_discoverers :: Lens.Lens' ListDiscoverersResponse (Prelude.Maybe [DiscovererSummary])
listDiscoverersResponse_discoverers :: (Maybe [DiscovererSummary] -> f (Maybe [DiscovererSummary]))
-> ListDiscoverersResponse -> f ListDiscoverersResponse
listDiscoverersResponse_discoverers = (ListDiscoverersResponse -> Maybe [DiscovererSummary])
-> (ListDiscoverersResponse
    -> Maybe [DiscovererSummary] -> ListDiscoverersResponse)
-> Lens' ListDiscoverersResponse (Maybe [DiscovererSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDiscoverersResponse' {Maybe [DiscovererSummary]
discoverers :: Maybe [DiscovererSummary]
$sel:discoverers:ListDiscoverersResponse' :: ListDiscoverersResponse -> Maybe [DiscovererSummary]
discoverers} -> Maybe [DiscovererSummary]
discoverers) (\s :: ListDiscoverersResponse
s@ListDiscoverersResponse' {} Maybe [DiscovererSummary]
a -> ListDiscoverersResponse
s {$sel:discoverers:ListDiscoverersResponse' :: Maybe [DiscovererSummary]
discoverers = Maybe [DiscovererSummary]
a} :: ListDiscoverersResponse) ((Maybe [DiscovererSummary] -> f (Maybe [DiscovererSummary]))
 -> ListDiscoverersResponse -> f ListDiscoverersResponse)
-> ((Maybe [DiscovererSummary] -> f (Maybe [DiscovererSummary]))
    -> Maybe [DiscovererSummary] -> f (Maybe [DiscovererSummary]))
-> (Maybe [DiscovererSummary] -> f (Maybe [DiscovererSummary]))
-> ListDiscoverersResponse
-> f ListDiscoverersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DiscovererSummary]
  [DiscovererSummary]
  [DiscovererSummary]
  [DiscovererSummary]
-> Iso
     (Maybe [DiscovererSummary])
     (Maybe [DiscovererSummary])
     (Maybe [DiscovererSummary])
     (Maybe [DiscovererSummary])
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
  [DiscovererSummary]
  [DiscovererSummary]
  [DiscovererSummary]
  [DiscovererSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token that specifies the next page of results to return. To request
-- the first page, leave NextToken empty. The token will expire in 24
-- hours, and cannot be shared with other accounts.
listDiscoverersResponse_nextToken :: Lens.Lens' ListDiscoverersResponse (Prelude.Maybe Prelude.Text)
listDiscoverersResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDiscoverersResponse -> f ListDiscoverersResponse
listDiscoverersResponse_nextToken = (ListDiscoverersResponse -> Maybe Text)
-> (ListDiscoverersResponse
    -> Maybe Text -> ListDiscoverersResponse)
-> Lens' ListDiscoverersResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDiscoverersResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDiscoverersResponse' :: ListDiscoverersResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDiscoverersResponse
s@ListDiscoverersResponse' {} Maybe Text
a -> ListDiscoverersResponse
s {$sel:nextToken:ListDiscoverersResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDiscoverersResponse)

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

instance Prelude.NFData ListDiscoverersResponse