{-# 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.GuardDuty.ListPublishingDestinations
-- 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)
--
-- Returns a list of publishing destinations associated with the specified
-- @dectectorId@.
module Amazonka.GuardDuty.ListPublishingDestinations
  ( -- * Creating a Request
    ListPublishingDestinations (..),
    newListPublishingDestinations,

    -- * Request Lenses
    listPublishingDestinations_nextToken,
    listPublishingDestinations_maxResults,
    listPublishingDestinations_detectorId,

    -- * Destructuring the Response
    ListPublishingDestinationsResponse (..),
    newListPublishingDestinationsResponse,

    -- * Response Lenses
    listPublishingDestinationsResponse_nextToken,
    listPublishingDestinationsResponse_httpStatus,
    listPublishingDestinationsResponse_destinations,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.GuardDuty.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:/ 'newListPublishingDestinations' smart constructor.
data ListPublishingDestinations = ListPublishingDestinations'
  { -- | A token to use for paginating results that are returned in the response.
    -- Set the value of this parameter to null for the first request to a list
    -- action. For subsequent calls, use the @NextToken@ value returned from
    -- the previous request to continue listing results after the first page.
    ListPublishingDestinations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return in the response.
    ListPublishingDestinations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The ID of the detector to retrieve publishing destinations for.
    ListPublishingDestinations -> Text
detectorId :: Prelude.Text
  }
  deriving (ListPublishingDestinations -> ListPublishingDestinations -> Bool
(ListPublishingDestinations -> ListPublishingDestinations -> Bool)
-> (ListPublishingDestinations
    -> ListPublishingDestinations -> Bool)
-> Eq ListPublishingDestinations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPublishingDestinations -> ListPublishingDestinations -> Bool
$c/= :: ListPublishingDestinations -> ListPublishingDestinations -> Bool
== :: ListPublishingDestinations -> ListPublishingDestinations -> Bool
$c== :: ListPublishingDestinations -> ListPublishingDestinations -> Bool
Prelude.Eq, ReadPrec [ListPublishingDestinations]
ReadPrec ListPublishingDestinations
Int -> ReadS ListPublishingDestinations
ReadS [ListPublishingDestinations]
(Int -> ReadS ListPublishingDestinations)
-> ReadS [ListPublishingDestinations]
-> ReadPrec ListPublishingDestinations
-> ReadPrec [ListPublishingDestinations]
-> Read ListPublishingDestinations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPublishingDestinations]
$creadListPrec :: ReadPrec [ListPublishingDestinations]
readPrec :: ReadPrec ListPublishingDestinations
$creadPrec :: ReadPrec ListPublishingDestinations
readList :: ReadS [ListPublishingDestinations]
$creadList :: ReadS [ListPublishingDestinations]
readsPrec :: Int -> ReadS ListPublishingDestinations
$creadsPrec :: Int -> ReadS ListPublishingDestinations
Prelude.Read, Int -> ListPublishingDestinations -> ShowS
[ListPublishingDestinations] -> ShowS
ListPublishingDestinations -> String
(Int -> ListPublishingDestinations -> ShowS)
-> (ListPublishingDestinations -> String)
-> ([ListPublishingDestinations] -> ShowS)
-> Show ListPublishingDestinations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPublishingDestinations] -> ShowS
$cshowList :: [ListPublishingDestinations] -> ShowS
show :: ListPublishingDestinations -> String
$cshow :: ListPublishingDestinations -> String
showsPrec :: Int -> ListPublishingDestinations -> ShowS
$cshowsPrec :: Int -> ListPublishingDestinations -> ShowS
Prelude.Show, (forall x.
 ListPublishingDestinations -> Rep ListPublishingDestinations x)
-> (forall x.
    Rep ListPublishingDestinations x -> ListPublishingDestinations)
-> Generic ListPublishingDestinations
forall x.
Rep ListPublishingDestinations x -> ListPublishingDestinations
forall x.
ListPublishingDestinations -> Rep ListPublishingDestinations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPublishingDestinations x -> ListPublishingDestinations
$cfrom :: forall x.
ListPublishingDestinations -> Rep ListPublishingDestinations x
Prelude.Generic)

-- |
-- Create a value of 'ListPublishingDestinations' 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', 'listPublishingDestinations_nextToken' - A token to use for paginating results that are returned in the response.
-- Set the value of this parameter to null for the first request to a list
-- action. For subsequent calls, use the @NextToken@ value returned from
-- the previous request to continue listing results after the first page.
--
-- 'maxResults', 'listPublishingDestinations_maxResults' - The maximum number of results to return in the response.
--
-- 'detectorId', 'listPublishingDestinations_detectorId' - The ID of the detector to retrieve publishing destinations for.
newListPublishingDestinations ::
  -- | 'detectorId'
  Prelude.Text ->
  ListPublishingDestinations
newListPublishingDestinations :: Text -> ListPublishingDestinations
newListPublishingDestinations Text
pDetectorId_ =
  ListPublishingDestinations' :: Maybe Text -> Maybe Natural -> Text -> ListPublishingDestinations
ListPublishingDestinations'
    { $sel:nextToken:ListPublishingDestinations' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListPublishingDestinations' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:detectorId:ListPublishingDestinations' :: Text
detectorId = Text
pDetectorId_
    }

-- | A token to use for paginating results that are returned in the response.
-- Set the value of this parameter to null for the first request to a list
-- action. For subsequent calls, use the @NextToken@ value returned from
-- the previous request to continue listing results after the first page.
listPublishingDestinations_nextToken :: Lens.Lens' ListPublishingDestinations (Prelude.Maybe Prelude.Text)
listPublishingDestinations_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPublishingDestinations -> f ListPublishingDestinations
listPublishingDestinations_nextToken = (ListPublishingDestinations -> Maybe Text)
-> (ListPublishingDestinations
    -> Maybe Text -> ListPublishingDestinations)
-> Lens
     ListPublishingDestinations
     ListPublishingDestinations
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPublishingDestinations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPublishingDestinations' :: ListPublishingDestinations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPublishingDestinations
s@ListPublishingDestinations' {} Maybe Text
a -> ListPublishingDestinations
s {$sel:nextToken:ListPublishingDestinations' :: Maybe Text
nextToken = Maybe Text
a} :: ListPublishingDestinations)

-- | The maximum number of results to return in the response.
listPublishingDestinations_maxResults :: Lens.Lens' ListPublishingDestinations (Prelude.Maybe Prelude.Natural)
listPublishingDestinations_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListPublishingDestinations -> f ListPublishingDestinations
listPublishingDestinations_maxResults = (ListPublishingDestinations -> Maybe Natural)
-> (ListPublishingDestinations
    -> Maybe Natural -> ListPublishingDestinations)
-> Lens
     ListPublishingDestinations
     ListPublishingDestinations
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPublishingDestinations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListPublishingDestinations' :: ListPublishingDestinations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListPublishingDestinations
s@ListPublishingDestinations' {} Maybe Natural
a -> ListPublishingDestinations
s {$sel:maxResults:ListPublishingDestinations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListPublishingDestinations)

-- | The ID of the detector to retrieve publishing destinations for.
listPublishingDestinations_detectorId :: Lens.Lens' ListPublishingDestinations Prelude.Text
listPublishingDestinations_detectorId :: (Text -> f Text)
-> ListPublishingDestinations -> f ListPublishingDestinations
listPublishingDestinations_detectorId = (ListPublishingDestinations -> Text)
-> (ListPublishingDestinations
    -> Text -> ListPublishingDestinations)
-> Lens
     ListPublishingDestinations ListPublishingDestinations Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPublishingDestinations' {Text
detectorId :: Text
$sel:detectorId:ListPublishingDestinations' :: ListPublishingDestinations -> Text
detectorId} -> Text
detectorId) (\s :: ListPublishingDestinations
s@ListPublishingDestinations' {} Text
a -> ListPublishingDestinations
s {$sel:detectorId:ListPublishingDestinations' :: Text
detectorId = Text
a} :: ListPublishingDestinations)

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

instance Prelude.Hashable ListPublishingDestinations

instance Prelude.NFData ListPublishingDestinations

instance Core.ToHeaders ListPublishingDestinations where
  toHeaders :: ListPublishingDestinations -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListPublishingDestinations -> 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 ListPublishingDestinations where
  toPath :: ListPublishingDestinations -> ByteString
toPath ListPublishingDestinations' {Maybe Natural
Maybe Text
Text
detectorId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:detectorId:ListPublishingDestinations' :: ListPublishingDestinations -> Text
$sel:maxResults:ListPublishingDestinations' :: ListPublishingDestinations -> Maybe Natural
$sel:nextToken:ListPublishingDestinations' :: ListPublishingDestinations -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/detector/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
detectorId,
        ByteString
"/publishingDestination"
      ]

instance Core.ToQuery ListPublishingDestinations where
  toQuery :: ListPublishingDestinations -> QueryString
toQuery ListPublishingDestinations' {Maybe Natural
Maybe Text
Text
detectorId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:detectorId:ListPublishingDestinations' :: ListPublishingDestinations -> Text
$sel:maxResults:ListPublishingDestinations' :: ListPublishingDestinations -> Maybe Natural
$sel:nextToken:ListPublishingDestinations' :: ListPublishingDestinations -> 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:/ 'newListPublishingDestinationsResponse' smart constructor.
data ListPublishingDestinationsResponse = ListPublishingDestinationsResponse'
  { -- | A token to use for paginating results that are returned in the response.
    -- Set the value of this parameter to null for the first request to a list
    -- action. For subsequent calls, use the @NextToken@ value returned from
    -- the previous request to continue listing results after the first page.
    ListPublishingDestinationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListPublishingDestinationsResponse -> Int
httpStatus :: Prelude.Int,
    -- | A @Destinations@ object that includes information about each publishing
    -- destination returned.
    ListPublishingDestinationsResponse -> [Destination]
destinations :: [Destination]
  }
  deriving (ListPublishingDestinationsResponse
-> ListPublishingDestinationsResponse -> Bool
(ListPublishingDestinationsResponse
 -> ListPublishingDestinationsResponse -> Bool)
-> (ListPublishingDestinationsResponse
    -> ListPublishingDestinationsResponse -> Bool)
-> Eq ListPublishingDestinationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPublishingDestinationsResponse
-> ListPublishingDestinationsResponse -> Bool
$c/= :: ListPublishingDestinationsResponse
-> ListPublishingDestinationsResponse -> Bool
== :: ListPublishingDestinationsResponse
-> ListPublishingDestinationsResponse -> Bool
$c== :: ListPublishingDestinationsResponse
-> ListPublishingDestinationsResponse -> Bool
Prelude.Eq, ReadPrec [ListPublishingDestinationsResponse]
ReadPrec ListPublishingDestinationsResponse
Int -> ReadS ListPublishingDestinationsResponse
ReadS [ListPublishingDestinationsResponse]
(Int -> ReadS ListPublishingDestinationsResponse)
-> ReadS [ListPublishingDestinationsResponse]
-> ReadPrec ListPublishingDestinationsResponse
-> ReadPrec [ListPublishingDestinationsResponse]
-> Read ListPublishingDestinationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPublishingDestinationsResponse]
$creadListPrec :: ReadPrec [ListPublishingDestinationsResponse]
readPrec :: ReadPrec ListPublishingDestinationsResponse
$creadPrec :: ReadPrec ListPublishingDestinationsResponse
readList :: ReadS [ListPublishingDestinationsResponse]
$creadList :: ReadS [ListPublishingDestinationsResponse]
readsPrec :: Int -> ReadS ListPublishingDestinationsResponse
$creadsPrec :: Int -> ReadS ListPublishingDestinationsResponse
Prelude.Read, Int -> ListPublishingDestinationsResponse -> ShowS
[ListPublishingDestinationsResponse] -> ShowS
ListPublishingDestinationsResponse -> String
(Int -> ListPublishingDestinationsResponse -> ShowS)
-> (ListPublishingDestinationsResponse -> String)
-> ([ListPublishingDestinationsResponse] -> ShowS)
-> Show ListPublishingDestinationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPublishingDestinationsResponse] -> ShowS
$cshowList :: [ListPublishingDestinationsResponse] -> ShowS
show :: ListPublishingDestinationsResponse -> String
$cshow :: ListPublishingDestinationsResponse -> String
showsPrec :: Int -> ListPublishingDestinationsResponse -> ShowS
$cshowsPrec :: Int -> ListPublishingDestinationsResponse -> ShowS
Prelude.Show, (forall x.
 ListPublishingDestinationsResponse
 -> Rep ListPublishingDestinationsResponse x)
-> (forall x.
    Rep ListPublishingDestinationsResponse x
    -> ListPublishingDestinationsResponse)
-> Generic ListPublishingDestinationsResponse
forall x.
Rep ListPublishingDestinationsResponse x
-> ListPublishingDestinationsResponse
forall x.
ListPublishingDestinationsResponse
-> Rep ListPublishingDestinationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListPublishingDestinationsResponse x
-> ListPublishingDestinationsResponse
$cfrom :: forall x.
ListPublishingDestinationsResponse
-> Rep ListPublishingDestinationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListPublishingDestinationsResponse' 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', 'listPublishingDestinationsResponse_nextToken' - A token to use for paginating results that are returned in the response.
-- Set the value of this parameter to null for the first request to a list
-- action. For subsequent calls, use the @NextToken@ value returned from
-- the previous request to continue listing results after the first page.
--
-- 'httpStatus', 'listPublishingDestinationsResponse_httpStatus' - The response's http status code.
--
-- 'destinations', 'listPublishingDestinationsResponse_destinations' - A @Destinations@ object that includes information about each publishing
-- destination returned.
newListPublishingDestinationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPublishingDestinationsResponse
newListPublishingDestinationsResponse :: Int -> ListPublishingDestinationsResponse
newListPublishingDestinationsResponse Int
pHttpStatus_ =
  ListPublishingDestinationsResponse' :: Maybe Text
-> Int -> [Destination] -> ListPublishingDestinationsResponse
ListPublishingDestinationsResponse'
    { $sel:nextToken:ListPublishingDestinationsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListPublishingDestinationsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:destinations:ListPublishingDestinationsResponse' :: [Destination]
destinations = [Destination]
forall a. Monoid a => a
Prelude.mempty
    }

-- | A token to use for paginating results that are returned in the response.
-- Set the value of this parameter to null for the first request to a list
-- action. For subsequent calls, use the @NextToken@ value returned from
-- the previous request to continue listing results after the first page.
listPublishingDestinationsResponse_nextToken :: Lens.Lens' ListPublishingDestinationsResponse (Prelude.Maybe Prelude.Text)
listPublishingDestinationsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListPublishingDestinationsResponse
-> f ListPublishingDestinationsResponse
listPublishingDestinationsResponse_nextToken = (ListPublishingDestinationsResponse -> Maybe Text)
-> (ListPublishingDestinationsResponse
    -> Maybe Text -> ListPublishingDestinationsResponse)
-> Lens
     ListPublishingDestinationsResponse
     ListPublishingDestinationsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPublishingDestinationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPublishingDestinationsResponse' :: ListPublishingDestinationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPublishingDestinationsResponse
s@ListPublishingDestinationsResponse' {} Maybe Text
a -> ListPublishingDestinationsResponse
s {$sel:nextToken:ListPublishingDestinationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListPublishingDestinationsResponse)

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

-- | A @Destinations@ object that includes information about each publishing
-- destination returned.
listPublishingDestinationsResponse_destinations :: Lens.Lens' ListPublishingDestinationsResponse [Destination]
listPublishingDestinationsResponse_destinations :: ([Destination] -> f [Destination])
-> ListPublishingDestinationsResponse
-> f ListPublishingDestinationsResponse
listPublishingDestinationsResponse_destinations = (ListPublishingDestinationsResponse -> [Destination])
-> (ListPublishingDestinationsResponse
    -> [Destination] -> ListPublishingDestinationsResponse)
-> Lens
     ListPublishingDestinationsResponse
     ListPublishingDestinationsResponse
     [Destination]
     [Destination]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPublishingDestinationsResponse' {[Destination]
destinations :: [Destination]
$sel:destinations:ListPublishingDestinationsResponse' :: ListPublishingDestinationsResponse -> [Destination]
destinations} -> [Destination]
destinations) (\s :: ListPublishingDestinationsResponse
s@ListPublishingDestinationsResponse' {} [Destination]
a -> ListPublishingDestinationsResponse
s {$sel:destinations:ListPublishingDestinationsResponse' :: [Destination]
destinations = [Destination]
a} :: ListPublishingDestinationsResponse) (([Destination] -> f [Destination])
 -> ListPublishingDestinationsResponse
 -> f ListPublishingDestinationsResponse)
-> (([Destination] -> f [Destination])
    -> [Destination] -> f [Destination])
-> ([Destination] -> f [Destination])
-> ListPublishingDestinationsResponse
-> f ListPublishingDestinationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Destination] -> f [Destination])
-> [Destination] -> f [Destination]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    ListPublishingDestinationsResponse