{-# 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.ListApiDestinations
-- 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 API destination in the account in the current
-- Region.
module Amazonka.CloudWatchEvents.ListApiDestinations
  ( -- * Creating a Request
    ListApiDestinations (..),
    newListApiDestinations,

    -- * Request Lenses
    listApiDestinations_nextToken,
    listApiDestinations_namePrefix,
    listApiDestinations_limit,
    listApiDestinations_connectionArn,

    -- * Destructuring the Response
    ListApiDestinationsResponse (..),
    newListApiDestinationsResponse,

    -- * Response Lenses
    listApiDestinationsResponse_apiDestinations,
    listApiDestinationsResponse_nextToken,
    listApiDestinationsResponse_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:/ 'newListApiDestinations' smart constructor.
data ListApiDestinations = ListApiDestinations'
  { -- | The token returned by a previous call to retrieve the next set of
    -- results.
    ListApiDestinations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A name prefix to filter results returned. Only API destinations with a
    -- name that starts with the prefix are returned.
    ListApiDestinations -> Maybe Text
namePrefix :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of API destinations to include in the response.
    ListApiDestinations -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | The ARN of the connection specified for the API destination.
    ListApiDestinations -> Maybe Text
connectionArn :: Prelude.Maybe Prelude.Text
  }
  deriving (ListApiDestinations -> ListApiDestinations -> Bool
(ListApiDestinations -> ListApiDestinations -> Bool)
-> (ListApiDestinations -> ListApiDestinations -> Bool)
-> Eq ListApiDestinations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListApiDestinations -> ListApiDestinations -> Bool
$c/= :: ListApiDestinations -> ListApiDestinations -> Bool
== :: ListApiDestinations -> ListApiDestinations -> Bool
$c== :: ListApiDestinations -> ListApiDestinations -> Bool
Prelude.Eq, ReadPrec [ListApiDestinations]
ReadPrec ListApiDestinations
Int -> ReadS ListApiDestinations
ReadS [ListApiDestinations]
(Int -> ReadS ListApiDestinations)
-> ReadS [ListApiDestinations]
-> ReadPrec ListApiDestinations
-> ReadPrec [ListApiDestinations]
-> Read ListApiDestinations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListApiDestinations]
$creadListPrec :: ReadPrec [ListApiDestinations]
readPrec :: ReadPrec ListApiDestinations
$creadPrec :: ReadPrec ListApiDestinations
readList :: ReadS [ListApiDestinations]
$creadList :: ReadS [ListApiDestinations]
readsPrec :: Int -> ReadS ListApiDestinations
$creadsPrec :: Int -> ReadS ListApiDestinations
Prelude.Read, Int -> ListApiDestinations -> ShowS
[ListApiDestinations] -> ShowS
ListApiDestinations -> String
(Int -> ListApiDestinations -> ShowS)
-> (ListApiDestinations -> String)
-> ([ListApiDestinations] -> ShowS)
-> Show ListApiDestinations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListApiDestinations] -> ShowS
$cshowList :: [ListApiDestinations] -> ShowS
show :: ListApiDestinations -> String
$cshow :: ListApiDestinations -> String
showsPrec :: Int -> ListApiDestinations -> ShowS
$cshowsPrec :: Int -> ListApiDestinations -> ShowS
Prelude.Show, (forall x. ListApiDestinations -> Rep ListApiDestinations x)
-> (forall x. Rep ListApiDestinations x -> ListApiDestinations)
-> Generic ListApiDestinations
forall x. Rep ListApiDestinations x -> ListApiDestinations
forall x. ListApiDestinations -> Rep ListApiDestinations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListApiDestinations x -> ListApiDestinations
$cfrom :: forall x. ListApiDestinations -> Rep ListApiDestinations x
Prelude.Generic)

-- |
-- Create a value of 'ListApiDestinations' 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', 'listApiDestinations_nextToken' - The token returned by a previous call to retrieve the next set of
-- results.
--
-- 'namePrefix', 'listApiDestinations_namePrefix' - A name prefix to filter results returned. Only API destinations with a
-- name that starts with the prefix are returned.
--
-- 'limit', 'listApiDestinations_limit' - The maximum number of API destinations to include in the response.
--
-- 'connectionArn', 'listApiDestinations_connectionArn' - The ARN of the connection specified for the API destination.
newListApiDestinations ::
  ListApiDestinations
newListApiDestinations :: ListApiDestinations
newListApiDestinations =
  ListApiDestinations' :: Maybe Text
-> Maybe Text -> Maybe Natural -> Maybe Text -> ListApiDestinations
ListApiDestinations'
    { $sel:nextToken:ListApiDestinations' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:namePrefix:ListApiDestinations' :: Maybe Text
namePrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:limit:ListApiDestinations' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionArn:ListApiDestinations' :: Maybe Text
connectionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

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

-- | A name prefix to filter results returned. Only API destinations with a
-- name that starts with the prefix are returned.
listApiDestinations_namePrefix :: Lens.Lens' ListApiDestinations (Prelude.Maybe Prelude.Text)
listApiDestinations_namePrefix :: (Maybe Text -> f (Maybe Text))
-> ListApiDestinations -> f ListApiDestinations
listApiDestinations_namePrefix = (ListApiDestinations -> Maybe Text)
-> (ListApiDestinations -> Maybe Text -> ListApiDestinations)
-> Lens
     ListApiDestinations ListApiDestinations (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApiDestinations' {Maybe Text
namePrefix :: Maybe Text
$sel:namePrefix:ListApiDestinations' :: ListApiDestinations -> Maybe Text
namePrefix} -> Maybe Text
namePrefix) (\s :: ListApiDestinations
s@ListApiDestinations' {} Maybe Text
a -> ListApiDestinations
s {$sel:namePrefix:ListApiDestinations' :: Maybe Text
namePrefix = Maybe Text
a} :: ListApiDestinations)

-- | The maximum number of API destinations to include in the response.
listApiDestinations_limit :: Lens.Lens' ListApiDestinations (Prelude.Maybe Prelude.Natural)
listApiDestinations_limit :: (Maybe Natural -> f (Maybe Natural))
-> ListApiDestinations -> f ListApiDestinations
listApiDestinations_limit = (ListApiDestinations -> Maybe Natural)
-> (ListApiDestinations -> Maybe Natural -> ListApiDestinations)
-> Lens
     ListApiDestinations
     ListApiDestinations
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApiDestinations' {Maybe Natural
limit :: Maybe Natural
$sel:limit:ListApiDestinations' :: ListApiDestinations -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: ListApiDestinations
s@ListApiDestinations' {} Maybe Natural
a -> ListApiDestinations
s {$sel:limit:ListApiDestinations' :: Maybe Natural
limit = Maybe Natural
a} :: ListApiDestinations)

-- | The ARN of the connection specified for the API destination.
listApiDestinations_connectionArn :: Lens.Lens' ListApiDestinations (Prelude.Maybe Prelude.Text)
listApiDestinations_connectionArn :: (Maybe Text -> f (Maybe Text))
-> ListApiDestinations -> f ListApiDestinations
listApiDestinations_connectionArn = (ListApiDestinations -> Maybe Text)
-> (ListApiDestinations -> Maybe Text -> ListApiDestinations)
-> Lens
     ListApiDestinations ListApiDestinations (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApiDestinations' {Maybe Text
connectionArn :: Maybe Text
$sel:connectionArn:ListApiDestinations' :: ListApiDestinations -> Maybe Text
connectionArn} -> Maybe Text
connectionArn) (\s :: ListApiDestinations
s@ListApiDestinations' {} Maybe Text
a -> ListApiDestinations
s {$sel:connectionArn:ListApiDestinations' :: Maybe Text
connectionArn = Maybe Text
a} :: ListApiDestinations)

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

instance Prelude.NFData ListApiDestinations

instance Core.ToHeaders ListApiDestinations where
  toHeaders :: ListApiDestinations -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListApiDestinations -> 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.ListApiDestinations" ::
                          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 ListApiDestinations where
  toJSON :: ListApiDestinations -> Value
toJSON ListApiDestinations' {Maybe Natural
Maybe Text
connectionArn :: Maybe Text
limit :: Maybe Natural
namePrefix :: Maybe Text
nextToken :: Maybe Text
$sel:connectionArn:ListApiDestinations' :: ListApiDestinations -> Maybe Text
$sel:limit:ListApiDestinations' :: ListApiDestinations -> Maybe Natural
$sel:namePrefix:ListApiDestinations' :: ListApiDestinations -> Maybe Text
$sel:nextToken:ListApiDestinations' :: ListApiDestinations -> 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
"NamePrefix" 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
namePrefix,
            (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,
            (Text
"ConnectionArn" 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
connectionArn
          ]
      )

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

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

-- | /See:/ 'newListApiDestinationsResponse' smart constructor.
data ListApiDestinationsResponse = ListApiDestinationsResponse'
  { -- | An array of @ApiDestination@ objects that include information about an
    -- API destination.
    ListApiDestinationsResponse -> Maybe [ApiDestination]
apiDestinations :: Prelude.Maybe [ApiDestination],
    -- | A token you can use in a subsequent request to retrieve the next set of
    -- results.
    ListApiDestinationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListApiDestinationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListApiDestinationsResponse -> ListApiDestinationsResponse -> Bool
(ListApiDestinationsResponse
 -> ListApiDestinationsResponse -> Bool)
-> (ListApiDestinationsResponse
    -> ListApiDestinationsResponse -> Bool)
-> Eq ListApiDestinationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListApiDestinationsResponse -> ListApiDestinationsResponse -> Bool
$c/= :: ListApiDestinationsResponse -> ListApiDestinationsResponse -> Bool
== :: ListApiDestinationsResponse -> ListApiDestinationsResponse -> Bool
$c== :: ListApiDestinationsResponse -> ListApiDestinationsResponse -> Bool
Prelude.Eq, ReadPrec [ListApiDestinationsResponse]
ReadPrec ListApiDestinationsResponse
Int -> ReadS ListApiDestinationsResponse
ReadS [ListApiDestinationsResponse]
(Int -> ReadS ListApiDestinationsResponse)
-> ReadS [ListApiDestinationsResponse]
-> ReadPrec ListApiDestinationsResponse
-> ReadPrec [ListApiDestinationsResponse]
-> Read ListApiDestinationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListApiDestinationsResponse]
$creadListPrec :: ReadPrec [ListApiDestinationsResponse]
readPrec :: ReadPrec ListApiDestinationsResponse
$creadPrec :: ReadPrec ListApiDestinationsResponse
readList :: ReadS [ListApiDestinationsResponse]
$creadList :: ReadS [ListApiDestinationsResponse]
readsPrec :: Int -> ReadS ListApiDestinationsResponse
$creadsPrec :: Int -> ReadS ListApiDestinationsResponse
Prelude.Read, Int -> ListApiDestinationsResponse -> ShowS
[ListApiDestinationsResponse] -> ShowS
ListApiDestinationsResponse -> String
(Int -> ListApiDestinationsResponse -> ShowS)
-> (ListApiDestinationsResponse -> String)
-> ([ListApiDestinationsResponse] -> ShowS)
-> Show ListApiDestinationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListApiDestinationsResponse] -> ShowS
$cshowList :: [ListApiDestinationsResponse] -> ShowS
show :: ListApiDestinationsResponse -> String
$cshow :: ListApiDestinationsResponse -> String
showsPrec :: Int -> ListApiDestinationsResponse -> ShowS
$cshowsPrec :: Int -> ListApiDestinationsResponse -> ShowS
Prelude.Show, (forall x.
 ListApiDestinationsResponse -> Rep ListApiDestinationsResponse x)
-> (forall x.
    Rep ListApiDestinationsResponse x -> ListApiDestinationsResponse)
-> Generic ListApiDestinationsResponse
forall x.
Rep ListApiDestinationsResponse x -> ListApiDestinationsResponse
forall x.
ListApiDestinationsResponse -> Rep ListApiDestinationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListApiDestinationsResponse x -> ListApiDestinationsResponse
$cfrom :: forall x.
ListApiDestinationsResponse -> Rep ListApiDestinationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListApiDestinationsResponse' 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:
--
-- 'apiDestinations', 'listApiDestinationsResponse_apiDestinations' - An array of @ApiDestination@ objects that include information about an
-- API destination.
--
-- 'nextToken', 'listApiDestinationsResponse_nextToken' - A token you can use in a subsequent request to retrieve the next set of
-- results.
--
-- 'httpStatus', 'listApiDestinationsResponse_httpStatus' - The response's http status code.
newListApiDestinationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListApiDestinationsResponse
newListApiDestinationsResponse :: Int -> ListApiDestinationsResponse
newListApiDestinationsResponse Int
pHttpStatus_ =
  ListApiDestinationsResponse' :: Maybe [ApiDestination]
-> Maybe Text -> Int -> ListApiDestinationsResponse
ListApiDestinationsResponse'
    { $sel:apiDestinations:ListApiDestinationsResponse' :: Maybe [ApiDestination]
apiDestinations =
        Maybe [ApiDestination]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListApiDestinationsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListApiDestinationsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of @ApiDestination@ objects that include information about an
-- API destination.
listApiDestinationsResponse_apiDestinations :: Lens.Lens' ListApiDestinationsResponse (Prelude.Maybe [ApiDestination])
listApiDestinationsResponse_apiDestinations :: (Maybe [ApiDestination] -> f (Maybe [ApiDestination]))
-> ListApiDestinationsResponse -> f ListApiDestinationsResponse
listApiDestinationsResponse_apiDestinations = (ListApiDestinationsResponse -> Maybe [ApiDestination])
-> (ListApiDestinationsResponse
    -> Maybe [ApiDestination] -> ListApiDestinationsResponse)
-> Lens
     ListApiDestinationsResponse
     ListApiDestinationsResponse
     (Maybe [ApiDestination])
     (Maybe [ApiDestination])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApiDestinationsResponse' {Maybe [ApiDestination]
apiDestinations :: Maybe [ApiDestination]
$sel:apiDestinations:ListApiDestinationsResponse' :: ListApiDestinationsResponse -> Maybe [ApiDestination]
apiDestinations} -> Maybe [ApiDestination]
apiDestinations) (\s :: ListApiDestinationsResponse
s@ListApiDestinationsResponse' {} Maybe [ApiDestination]
a -> ListApiDestinationsResponse
s {$sel:apiDestinations:ListApiDestinationsResponse' :: Maybe [ApiDestination]
apiDestinations = Maybe [ApiDestination]
a} :: ListApiDestinationsResponse) ((Maybe [ApiDestination] -> f (Maybe [ApiDestination]))
 -> ListApiDestinationsResponse -> f ListApiDestinationsResponse)
-> ((Maybe [ApiDestination] -> f (Maybe [ApiDestination]))
    -> Maybe [ApiDestination] -> f (Maybe [ApiDestination]))
-> (Maybe [ApiDestination] -> f (Maybe [ApiDestination]))
-> ListApiDestinationsResponse
-> f ListApiDestinationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ApiDestination] [ApiDestination] [ApiDestination] [ApiDestination]
-> Iso
     (Maybe [ApiDestination])
     (Maybe [ApiDestination])
     (Maybe [ApiDestination])
     (Maybe [ApiDestination])
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
  [ApiDestination] [ApiDestination] [ApiDestination] [ApiDestination]
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 request to retrieve the next set of
-- results.
listApiDestinationsResponse_nextToken :: Lens.Lens' ListApiDestinationsResponse (Prelude.Maybe Prelude.Text)
listApiDestinationsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListApiDestinationsResponse -> f ListApiDestinationsResponse
listApiDestinationsResponse_nextToken = (ListApiDestinationsResponse -> Maybe Text)
-> (ListApiDestinationsResponse
    -> Maybe Text -> ListApiDestinationsResponse)
-> Lens
     ListApiDestinationsResponse
     ListApiDestinationsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApiDestinationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListApiDestinationsResponse' :: ListApiDestinationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListApiDestinationsResponse
s@ListApiDestinationsResponse' {} Maybe Text
a -> ListApiDestinationsResponse
s {$sel:nextToken:ListApiDestinationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListApiDestinationsResponse)

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

instance Prelude.NFData ListApiDestinationsResponse