{-# 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.CloudWatchEvents.ListPartnerEventSources
-- 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)
--
-- An SaaS partner can use this operation to list all the partner event
-- source names that they have created. This operation is not used by
-- Amazon Web Services customers.
module Amazonka.CloudWatchEvents.ListPartnerEventSources
  ( -- * Creating a Request
    ListPartnerEventSources (..),
    newListPartnerEventSources,

    -- * Request Lenses
    listPartnerEventSources_nextToken,
    listPartnerEventSources_limit,
    listPartnerEventSources_namePrefix,

    -- * Destructuring the Response
    ListPartnerEventSourcesResponse (..),
    newListPartnerEventSourcesResponse,

    -- * Response Lenses
    listPartnerEventSourcesResponse_partnerEventSources,
    listPartnerEventSourcesResponse_nextToken,
    listPartnerEventSourcesResponse_httpStatus,
  )
where

import Amazonka.CloudWatchEvents.Types
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

-- | /See:/ 'newListPartnerEventSources' smart constructor.
data ListPartnerEventSources = ListPartnerEventSources'
  { -- | The token returned by a previous call to this operation. Specifying this
    -- retrieves the next set of results.
    ListPartnerEventSources -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | pecifying this limits the number of results returned by this operation.
    -- The operation also returns a NextToken which you can use in a subsequent
    -- operation to retrieve the next set of results.
    ListPartnerEventSources -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | If you specify this, the results are limited to only those partner event
    -- sources that start with the string you specify.
    ListPartnerEventSources -> Text
namePrefix :: Prelude.Text
  }
  deriving (ListPartnerEventSources -> ListPartnerEventSources -> Bool
(ListPartnerEventSources -> ListPartnerEventSources -> Bool)
-> (ListPartnerEventSources -> ListPartnerEventSources -> Bool)
-> Eq ListPartnerEventSources
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPartnerEventSources -> ListPartnerEventSources -> Bool
$c/= :: ListPartnerEventSources -> ListPartnerEventSources -> Bool
== :: ListPartnerEventSources -> ListPartnerEventSources -> Bool
$c== :: ListPartnerEventSources -> ListPartnerEventSources -> Bool
Prelude.Eq, ReadPrec [ListPartnerEventSources]
ReadPrec ListPartnerEventSources
Int -> ReadS ListPartnerEventSources
ReadS [ListPartnerEventSources]
(Int -> ReadS ListPartnerEventSources)
-> ReadS [ListPartnerEventSources]
-> ReadPrec ListPartnerEventSources
-> ReadPrec [ListPartnerEventSources]
-> Read ListPartnerEventSources
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPartnerEventSources]
$creadListPrec :: ReadPrec [ListPartnerEventSources]
readPrec :: ReadPrec ListPartnerEventSources
$creadPrec :: ReadPrec ListPartnerEventSources
readList :: ReadS [ListPartnerEventSources]
$creadList :: ReadS [ListPartnerEventSources]
readsPrec :: Int -> ReadS ListPartnerEventSources
$creadsPrec :: Int -> ReadS ListPartnerEventSources
Prelude.Read, Int -> ListPartnerEventSources -> ShowS
[ListPartnerEventSources] -> ShowS
ListPartnerEventSources -> String
(Int -> ListPartnerEventSources -> ShowS)
-> (ListPartnerEventSources -> String)
-> ([ListPartnerEventSources] -> ShowS)
-> Show ListPartnerEventSources
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPartnerEventSources] -> ShowS
$cshowList :: [ListPartnerEventSources] -> ShowS
show :: ListPartnerEventSources -> String
$cshow :: ListPartnerEventSources -> String
showsPrec :: Int -> ListPartnerEventSources -> ShowS
$cshowsPrec :: Int -> ListPartnerEventSources -> ShowS
Prelude.Show, (forall x.
 ListPartnerEventSources -> Rep ListPartnerEventSources x)
-> (forall x.
    Rep ListPartnerEventSources x -> ListPartnerEventSources)
-> Generic ListPartnerEventSources
forall x. Rep ListPartnerEventSources x -> ListPartnerEventSources
forall x. ListPartnerEventSources -> Rep ListPartnerEventSources x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListPartnerEventSources x -> ListPartnerEventSources
$cfrom :: forall x. ListPartnerEventSources -> Rep ListPartnerEventSources x
Prelude.Generic)

-- |
-- Create a value of 'ListPartnerEventSources' 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', 'listPartnerEventSources_nextToken' - The token returned by a previous call to this operation. Specifying this
-- retrieves the next set of results.
--
-- 'limit', 'listPartnerEventSources_limit' - pecifying this limits the number of results returned by this operation.
-- The operation also returns a NextToken which you can use in a subsequent
-- operation to retrieve the next set of results.
--
-- 'namePrefix', 'listPartnerEventSources_namePrefix' - If you specify this, the results are limited to only those partner event
-- sources that start with the string you specify.
newListPartnerEventSources ::
  -- | 'namePrefix'
  Prelude.Text ->
  ListPartnerEventSources
newListPartnerEventSources :: Text -> ListPartnerEventSources
newListPartnerEventSources Text
pNamePrefix_ =
  ListPartnerEventSources' :: Maybe Text -> Maybe Natural -> Text -> ListPartnerEventSources
ListPartnerEventSources'
    { $sel:nextToken:ListPartnerEventSources' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:limit:ListPartnerEventSources' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:namePrefix:ListPartnerEventSources' :: Text
namePrefix = Text
pNamePrefix_
    }

-- | The token returned by a previous call to this operation. Specifying this
-- retrieves the next set of results.
listPartnerEventSources_nextToken :: Lens.Lens' ListPartnerEventSources (Prelude.Maybe Prelude.Text)
listPartnerEventSources_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPartnerEventSources -> f ListPartnerEventSources
listPartnerEventSources_nextToken = (ListPartnerEventSources -> Maybe Text)
-> (ListPartnerEventSources
    -> Maybe Text -> ListPartnerEventSources)
-> Lens
     ListPartnerEventSources
     ListPartnerEventSources
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartnerEventSources' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPartnerEventSources' :: ListPartnerEventSources -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPartnerEventSources
s@ListPartnerEventSources' {} Maybe Text
a -> ListPartnerEventSources
s {$sel:nextToken:ListPartnerEventSources' :: Maybe Text
nextToken = Maybe Text
a} :: ListPartnerEventSources)

-- | pecifying this limits the number of results returned by this operation.
-- The operation also returns a NextToken which you can use in a subsequent
-- operation to retrieve the next set of results.
listPartnerEventSources_limit :: Lens.Lens' ListPartnerEventSources (Prelude.Maybe Prelude.Natural)
listPartnerEventSources_limit :: (Maybe Natural -> f (Maybe Natural))
-> ListPartnerEventSources -> f ListPartnerEventSources
listPartnerEventSources_limit = (ListPartnerEventSources -> Maybe Natural)
-> (ListPartnerEventSources
    -> Maybe Natural -> ListPartnerEventSources)
-> Lens
     ListPartnerEventSources
     ListPartnerEventSources
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartnerEventSources' {Maybe Natural
limit :: Maybe Natural
$sel:limit:ListPartnerEventSources' :: ListPartnerEventSources -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: ListPartnerEventSources
s@ListPartnerEventSources' {} Maybe Natural
a -> ListPartnerEventSources
s {$sel:limit:ListPartnerEventSources' :: Maybe Natural
limit = Maybe Natural
a} :: ListPartnerEventSources)

-- | If you specify this, the results are limited to only those partner event
-- sources that start with the string you specify.
listPartnerEventSources_namePrefix :: Lens.Lens' ListPartnerEventSources Prelude.Text
listPartnerEventSources_namePrefix :: (Text -> f Text)
-> ListPartnerEventSources -> f ListPartnerEventSources
listPartnerEventSources_namePrefix = (ListPartnerEventSources -> Text)
-> (ListPartnerEventSources -> Text -> ListPartnerEventSources)
-> Lens ListPartnerEventSources ListPartnerEventSources Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartnerEventSources' {Text
namePrefix :: Text
$sel:namePrefix:ListPartnerEventSources' :: ListPartnerEventSources -> Text
namePrefix} -> Text
namePrefix) (\s :: ListPartnerEventSources
s@ListPartnerEventSources' {} Text
a -> ListPartnerEventSources
s {$sel:namePrefix:ListPartnerEventSources' :: Text
namePrefix = Text
a} :: ListPartnerEventSources)

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

instance Prelude.NFData ListPartnerEventSources

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

instance Core.ToJSON ListPartnerEventSources where
  toJSON :: ListPartnerEventSources -> Value
toJSON ListPartnerEventSources' {Maybe Natural
Maybe Text
Text
namePrefix :: Text
limit :: Maybe Natural
nextToken :: Maybe Text
$sel:namePrefix:ListPartnerEventSources' :: ListPartnerEventSources -> Text
$sel:limit:ListPartnerEventSources' :: ListPartnerEventSources -> Maybe Natural
$sel:nextToken:ListPartnerEventSources' :: ListPartnerEventSources -> 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
"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,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"NamePrefix" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
namePrefix)
          ]
      )

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

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

-- | /See:/ 'newListPartnerEventSourcesResponse' smart constructor.
data ListPartnerEventSourcesResponse = ListPartnerEventSourcesResponse'
  { -- | The list of partner event sources returned by the operation.
    ListPartnerEventSourcesResponse -> Maybe [PartnerEventSource]
partnerEventSources :: Prelude.Maybe [PartnerEventSource],
    -- | A token you can use in a subsequent operation to retrieve the next set
    -- of results.
    ListPartnerEventSourcesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListPartnerEventSourcesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListPartnerEventSourcesResponse
-> ListPartnerEventSourcesResponse -> Bool
(ListPartnerEventSourcesResponse
 -> ListPartnerEventSourcesResponse -> Bool)
-> (ListPartnerEventSourcesResponse
    -> ListPartnerEventSourcesResponse -> Bool)
-> Eq ListPartnerEventSourcesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPartnerEventSourcesResponse
-> ListPartnerEventSourcesResponse -> Bool
$c/= :: ListPartnerEventSourcesResponse
-> ListPartnerEventSourcesResponse -> Bool
== :: ListPartnerEventSourcesResponse
-> ListPartnerEventSourcesResponse -> Bool
$c== :: ListPartnerEventSourcesResponse
-> ListPartnerEventSourcesResponse -> Bool
Prelude.Eq, ReadPrec [ListPartnerEventSourcesResponse]
ReadPrec ListPartnerEventSourcesResponse
Int -> ReadS ListPartnerEventSourcesResponse
ReadS [ListPartnerEventSourcesResponse]
(Int -> ReadS ListPartnerEventSourcesResponse)
-> ReadS [ListPartnerEventSourcesResponse]
-> ReadPrec ListPartnerEventSourcesResponse
-> ReadPrec [ListPartnerEventSourcesResponse]
-> Read ListPartnerEventSourcesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPartnerEventSourcesResponse]
$creadListPrec :: ReadPrec [ListPartnerEventSourcesResponse]
readPrec :: ReadPrec ListPartnerEventSourcesResponse
$creadPrec :: ReadPrec ListPartnerEventSourcesResponse
readList :: ReadS [ListPartnerEventSourcesResponse]
$creadList :: ReadS [ListPartnerEventSourcesResponse]
readsPrec :: Int -> ReadS ListPartnerEventSourcesResponse
$creadsPrec :: Int -> ReadS ListPartnerEventSourcesResponse
Prelude.Read, Int -> ListPartnerEventSourcesResponse -> ShowS
[ListPartnerEventSourcesResponse] -> ShowS
ListPartnerEventSourcesResponse -> String
(Int -> ListPartnerEventSourcesResponse -> ShowS)
-> (ListPartnerEventSourcesResponse -> String)
-> ([ListPartnerEventSourcesResponse] -> ShowS)
-> Show ListPartnerEventSourcesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPartnerEventSourcesResponse] -> ShowS
$cshowList :: [ListPartnerEventSourcesResponse] -> ShowS
show :: ListPartnerEventSourcesResponse -> String
$cshow :: ListPartnerEventSourcesResponse -> String
showsPrec :: Int -> ListPartnerEventSourcesResponse -> ShowS
$cshowsPrec :: Int -> ListPartnerEventSourcesResponse -> ShowS
Prelude.Show, (forall x.
 ListPartnerEventSourcesResponse
 -> Rep ListPartnerEventSourcesResponse x)
-> (forall x.
    Rep ListPartnerEventSourcesResponse x
    -> ListPartnerEventSourcesResponse)
-> Generic ListPartnerEventSourcesResponse
forall x.
Rep ListPartnerEventSourcesResponse x
-> ListPartnerEventSourcesResponse
forall x.
ListPartnerEventSourcesResponse
-> Rep ListPartnerEventSourcesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPartnerEventSourcesResponse x
-> ListPartnerEventSourcesResponse
$cfrom :: forall x.
ListPartnerEventSourcesResponse
-> Rep ListPartnerEventSourcesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListPartnerEventSourcesResponse' 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:
--
-- 'partnerEventSources', 'listPartnerEventSourcesResponse_partnerEventSources' - The list of partner event sources returned by the operation.
--
-- 'nextToken', 'listPartnerEventSourcesResponse_nextToken' - A token you can use in a subsequent operation to retrieve the next set
-- of results.
--
-- 'httpStatus', 'listPartnerEventSourcesResponse_httpStatus' - The response's http status code.
newListPartnerEventSourcesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPartnerEventSourcesResponse
newListPartnerEventSourcesResponse :: Int -> ListPartnerEventSourcesResponse
newListPartnerEventSourcesResponse Int
pHttpStatus_ =
  ListPartnerEventSourcesResponse' :: Maybe [PartnerEventSource]
-> Maybe Text -> Int -> ListPartnerEventSourcesResponse
ListPartnerEventSourcesResponse'
    { $sel:partnerEventSources:ListPartnerEventSourcesResponse' :: Maybe [PartnerEventSource]
partnerEventSources =
        Maybe [PartnerEventSource]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListPartnerEventSourcesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListPartnerEventSourcesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The list of partner event sources returned by the operation.
listPartnerEventSourcesResponse_partnerEventSources :: Lens.Lens' ListPartnerEventSourcesResponse (Prelude.Maybe [PartnerEventSource])
listPartnerEventSourcesResponse_partnerEventSources :: (Maybe [PartnerEventSource] -> f (Maybe [PartnerEventSource]))
-> ListPartnerEventSourcesResponse
-> f ListPartnerEventSourcesResponse
listPartnerEventSourcesResponse_partnerEventSources = (ListPartnerEventSourcesResponse -> Maybe [PartnerEventSource])
-> (ListPartnerEventSourcesResponse
    -> Maybe [PartnerEventSource] -> ListPartnerEventSourcesResponse)
-> Lens
     ListPartnerEventSourcesResponse
     ListPartnerEventSourcesResponse
     (Maybe [PartnerEventSource])
     (Maybe [PartnerEventSource])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartnerEventSourcesResponse' {Maybe [PartnerEventSource]
partnerEventSources :: Maybe [PartnerEventSource]
$sel:partnerEventSources:ListPartnerEventSourcesResponse' :: ListPartnerEventSourcesResponse -> Maybe [PartnerEventSource]
partnerEventSources} -> Maybe [PartnerEventSource]
partnerEventSources) (\s :: ListPartnerEventSourcesResponse
s@ListPartnerEventSourcesResponse' {} Maybe [PartnerEventSource]
a -> ListPartnerEventSourcesResponse
s {$sel:partnerEventSources:ListPartnerEventSourcesResponse' :: Maybe [PartnerEventSource]
partnerEventSources = Maybe [PartnerEventSource]
a} :: ListPartnerEventSourcesResponse) ((Maybe [PartnerEventSource] -> f (Maybe [PartnerEventSource]))
 -> ListPartnerEventSourcesResponse
 -> f ListPartnerEventSourcesResponse)
-> ((Maybe [PartnerEventSource] -> f (Maybe [PartnerEventSource]))
    -> Maybe [PartnerEventSource] -> f (Maybe [PartnerEventSource]))
-> (Maybe [PartnerEventSource] -> f (Maybe [PartnerEventSource]))
-> ListPartnerEventSourcesResponse
-> f ListPartnerEventSourcesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PartnerEventSource]
  [PartnerEventSource]
  [PartnerEventSource]
  [PartnerEventSource]
-> Iso
     (Maybe [PartnerEventSource])
     (Maybe [PartnerEventSource])
     (Maybe [PartnerEventSource])
     (Maybe [PartnerEventSource])
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
  [PartnerEventSource]
  [PartnerEventSource]
  [PartnerEventSource]
  [PartnerEventSource]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A token you can use in a subsequent operation to retrieve the next set
-- of results.
listPartnerEventSourcesResponse_nextToken :: Lens.Lens' ListPartnerEventSourcesResponse (Prelude.Maybe Prelude.Text)
listPartnerEventSourcesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPartnerEventSourcesResponse
-> f ListPartnerEventSourcesResponse
listPartnerEventSourcesResponse_nextToken = (ListPartnerEventSourcesResponse -> Maybe Text)
-> (ListPartnerEventSourcesResponse
    -> Maybe Text -> ListPartnerEventSourcesResponse)
-> Lens
     ListPartnerEventSourcesResponse
     ListPartnerEventSourcesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPartnerEventSourcesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPartnerEventSourcesResponse' :: ListPartnerEventSourcesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPartnerEventSourcesResponse
s@ListPartnerEventSourcesResponse' {} Maybe Text
a -> ListPartnerEventSourcesResponse
s {$sel:nextToken:ListPartnerEventSourcesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListPartnerEventSourcesResponse)

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

instance
  Prelude.NFData
    ListPartnerEventSourcesResponse