{-# 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.ELBV2.DescribeListenerCertificates
-- 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)
--
-- Describes the default certificate and the certificate list for the
-- specified HTTPS or TLS listener.
--
-- If the default certificate is also in the certificate list, it appears
-- twice in the results (once with @IsDefault@ set to true and once with
-- @IsDefault@ set to false).
--
-- For more information, see
-- <https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#https-listener-certificates SSL certificates>
-- in the /Application Load Balancers Guide/ or
-- <https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#tls-listener-certificate Server certificates>
-- in the /Network Load Balancers Guide/.
--
-- This operation returns paginated results.
module Amazonka.ELBV2.DescribeListenerCertificates
  ( -- * Creating a Request
    DescribeListenerCertificates (..),
    newDescribeListenerCertificates,

    -- * Request Lenses
    describeListenerCertificates_marker,
    describeListenerCertificates_pageSize,
    describeListenerCertificates_listenerArn,

    -- * Destructuring the Response
    DescribeListenerCertificatesResponse (..),
    newDescribeListenerCertificatesResponse,

    -- * Response Lenses
    describeListenerCertificatesResponse_certificates,
    describeListenerCertificatesResponse_nextMarker,
    describeListenerCertificatesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ELBV2.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:/ 'newDescribeListenerCertificates' smart constructor.
data DescribeListenerCertificates = DescribeListenerCertificates'
  { -- | The marker for the next set of results. (You received this marker from a
    -- previous call.)
    DescribeListenerCertificates -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return with this call.
    DescribeListenerCertificates -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural,
    -- | The Amazon Resource Names (ARN) of the listener.
    DescribeListenerCertificates -> Text
listenerArn :: Prelude.Text
  }
  deriving (DescribeListenerCertificates
-> DescribeListenerCertificates -> Bool
(DescribeListenerCertificates
 -> DescribeListenerCertificates -> Bool)
-> (DescribeListenerCertificates
    -> DescribeListenerCertificates -> Bool)
-> Eq DescribeListenerCertificates
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeListenerCertificates
-> DescribeListenerCertificates -> Bool
$c/= :: DescribeListenerCertificates
-> DescribeListenerCertificates -> Bool
== :: DescribeListenerCertificates
-> DescribeListenerCertificates -> Bool
$c== :: DescribeListenerCertificates
-> DescribeListenerCertificates -> Bool
Prelude.Eq, ReadPrec [DescribeListenerCertificates]
ReadPrec DescribeListenerCertificates
Int -> ReadS DescribeListenerCertificates
ReadS [DescribeListenerCertificates]
(Int -> ReadS DescribeListenerCertificates)
-> ReadS [DescribeListenerCertificates]
-> ReadPrec DescribeListenerCertificates
-> ReadPrec [DescribeListenerCertificates]
-> Read DescribeListenerCertificates
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeListenerCertificates]
$creadListPrec :: ReadPrec [DescribeListenerCertificates]
readPrec :: ReadPrec DescribeListenerCertificates
$creadPrec :: ReadPrec DescribeListenerCertificates
readList :: ReadS [DescribeListenerCertificates]
$creadList :: ReadS [DescribeListenerCertificates]
readsPrec :: Int -> ReadS DescribeListenerCertificates
$creadsPrec :: Int -> ReadS DescribeListenerCertificates
Prelude.Read, Int -> DescribeListenerCertificates -> ShowS
[DescribeListenerCertificates] -> ShowS
DescribeListenerCertificates -> String
(Int -> DescribeListenerCertificates -> ShowS)
-> (DescribeListenerCertificates -> String)
-> ([DescribeListenerCertificates] -> ShowS)
-> Show DescribeListenerCertificates
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeListenerCertificates] -> ShowS
$cshowList :: [DescribeListenerCertificates] -> ShowS
show :: DescribeListenerCertificates -> String
$cshow :: DescribeListenerCertificates -> String
showsPrec :: Int -> DescribeListenerCertificates -> ShowS
$cshowsPrec :: Int -> DescribeListenerCertificates -> ShowS
Prelude.Show, (forall x.
 DescribeListenerCertificates -> Rep DescribeListenerCertificates x)
-> (forall x.
    Rep DescribeListenerCertificates x -> DescribeListenerCertificates)
-> Generic DescribeListenerCertificates
forall x.
Rep DescribeListenerCertificates x -> DescribeListenerCertificates
forall x.
DescribeListenerCertificates -> Rep DescribeListenerCertificates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeListenerCertificates x -> DescribeListenerCertificates
$cfrom :: forall x.
DescribeListenerCertificates -> Rep DescribeListenerCertificates x
Prelude.Generic)

-- |
-- Create a value of 'DescribeListenerCertificates' 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:
--
-- 'marker', 'describeListenerCertificates_marker' - The marker for the next set of results. (You received this marker from a
-- previous call.)
--
-- 'pageSize', 'describeListenerCertificates_pageSize' - The maximum number of results to return with this call.
--
-- 'listenerArn', 'describeListenerCertificates_listenerArn' - The Amazon Resource Names (ARN) of the listener.
newDescribeListenerCertificates ::
  -- | 'listenerArn'
  Prelude.Text ->
  DescribeListenerCertificates
newDescribeListenerCertificates :: Text -> DescribeListenerCertificates
newDescribeListenerCertificates Text
pListenerArn_ =
  DescribeListenerCertificates' :: Maybe Text -> Maybe Natural -> Text -> DescribeListenerCertificates
DescribeListenerCertificates'
    { $sel:marker:DescribeListenerCertificates' :: Maybe Text
marker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pageSize:DescribeListenerCertificates' :: Maybe Natural
pageSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:listenerArn:DescribeListenerCertificates' :: Text
listenerArn = Text
pListenerArn_
    }

-- | The marker for the next set of results. (You received this marker from a
-- previous call.)
describeListenerCertificates_marker :: Lens.Lens' DescribeListenerCertificates (Prelude.Maybe Prelude.Text)
describeListenerCertificates_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeListenerCertificates -> f DescribeListenerCertificates
describeListenerCertificates_marker = (DescribeListenerCertificates -> Maybe Text)
-> (DescribeListenerCertificates
    -> Maybe Text -> DescribeListenerCertificates)
-> Lens
     DescribeListenerCertificates
     DescribeListenerCertificates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeListenerCertificates' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeListenerCertificates' :: DescribeListenerCertificates -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeListenerCertificates
s@DescribeListenerCertificates' {} Maybe Text
a -> DescribeListenerCertificates
s {$sel:marker:DescribeListenerCertificates' :: Maybe Text
marker = Maybe Text
a} :: DescribeListenerCertificates)

-- | The maximum number of results to return with this call.
describeListenerCertificates_pageSize :: Lens.Lens' DescribeListenerCertificates (Prelude.Maybe Prelude.Natural)
describeListenerCertificates_pageSize :: (Maybe Natural -> f (Maybe Natural))
-> DescribeListenerCertificates -> f DescribeListenerCertificates
describeListenerCertificates_pageSize = (DescribeListenerCertificates -> Maybe Natural)
-> (DescribeListenerCertificates
    -> Maybe Natural -> DescribeListenerCertificates)
-> Lens
     DescribeListenerCertificates
     DescribeListenerCertificates
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeListenerCertificates' {Maybe Natural
pageSize :: Maybe Natural
$sel:pageSize:DescribeListenerCertificates' :: DescribeListenerCertificates -> Maybe Natural
pageSize} -> Maybe Natural
pageSize) (\s :: DescribeListenerCertificates
s@DescribeListenerCertificates' {} Maybe Natural
a -> DescribeListenerCertificates
s {$sel:pageSize:DescribeListenerCertificates' :: Maybe Natural
pageSize = Maybe Natural
a} :: DescribeListenerCertificates)

-- | The Amazon Resource Names (ARN) of the listener.
describeListenerCertificates_listenerArn :: Lens.Lens' DescribeListenerCertificates Prelude.Text
describeListenerCertificates_listenerArn :: (Text -> f Text)
-> DescribeListenerCertificates -> f DescribeListenerCertificates
describeListenerCertificates_listenerArn = (DescribeListenerCertificates -> Text)
-> (DescribeListenerCertificates
    -> Text -> DescribeListenerCertificates)
-> Lens
     DescribeListenerCertificates DescribeListenerCertificates Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeListenerCertificates' {Text
listenerArn :: Text
$sel:listenerArn:DescribeListenerCertificates' :: DescribeListenerCertificates -> Text
listenerArn} -> Text
listenerArn) (\s :: DescribeListenerCertificates
s@DescribeListenerCertificates' {} Text
a -> DescribeListenerCertificates
s {$sel:listenerArn:DescribeListenerCertificates' :: Text
listenerArn = Text
a} :: DescribeListenerCertificates)

instance Core.AWSPager DescribeListenerCertificates where
  page :: DescribeListenerCertificates
-> AWSResponse DescribeListenerCertificates
-> Maybe DescribeListenerCertificates
page DescribeListenerCertificates
rq AWSResponse DescribeListenerCertificates
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeListenerCertificates
DescribeListenerCertificatesResponse
rs
            DescribeListenerCertificatesResponse
-> Getting (First Text) DescribeListenerCertificatesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeListenerCertificatesResponse
-> Const (First Text) DescribeListenerCertificatesResponse
Lens' DescribeListenerCertificatesResponse (Maybe Text)
describeListenerCertificatesResponse_nextMarker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeListenerCertificatesResponse
 -> Const (First Text) DescribeListenerCertificatesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeListenerCertificatesResponse 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 DescribeListenerCertificates
forall a. Maybe a
Prelude.Nothing
    | Maybe [Certificate] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeListenerCertificates
DescribeListenerCertificatesResponse
rs
            DescribeListenerCertificatesResponse
-> Getting
     (First [Certificate])
     DescribeListenerCertificatesResponse
     [Certificate]
-> Maybe [Certificate]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Certificate]
 -> Const (First [Certificate]) (Maybe [Certificate]))
-> DescribeListenerCertificatesResponse
-> Const (First [Certificate]) DescribeListenerCertificatesResponse
Lens' DescribeListenerCertificatesResponse (Maybe [Certificate])
describeListenerCertificatesResponse_certificates
              ((Maybe [Certificate]
  -> Const (First [Certificate]) (Maybe [Certificate]))
 -> DescribeListenerCertificatesResponse
 -> Const
      (First [Certificate]) DescribeListenerCertificatesResponse)
-> (([Certificate] -> Const (First [Certificate]) [Certificate])
    -> Maybe [Certificate]
    -> Const (First [Certificate]) (Maybe [Certificate]))
-> Getting
     (First [Certificate])
     DescribeListenerCertificatesResponse
     [Certificate]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Certificate] -> Const (First [Certificate]) [Certificate])
-> Maybe [Certificate]
-> Const (First [Certificate]) (Maybe [Certificate])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeListenerCertificates
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeListenerCertificates -> Maybe DescribeListenerCertificates
forall a. a -> Maybe a
Prelude.Just (DescribeListenerCertificates
 -> Maybe DescribeListenerCertificates)
-> DescribeListenerCertificates
-> Maybe DescribeListenerCertificates
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeListenerCertificates
rq
          DescribeListenerCertificates
-> (DescribeListenerCertificates -> DescribeListenerCertificates)
-> DescribeListenerCertificates
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeListenerCertificates
-> Identity DescribeListenerCertificates
Lens
  DescribeListenerCertificates
  DescribeListenerCertificates
  (Maybe Text)
  (Maybe Text)
describeListenerCertificates_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeListenerCertificates
 -> Identity DescribeListenerCertificates)
-> Maybe Text
-> DescribeListenerCertificates
-> DescribeListenerCertificates
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeListenerCertificates
DescribeListenerCertificatesResponse
rs
          DescribeListenerCertificatesResponse
-> Getting (First Text) DescribeListenerCertificatesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeListenerCertificatesResponse
-> Const (First Text) DescribeListenerCertificatesResponse
Lens' DescribeListenerCertificatesResponse (Maybe Text)
describeListenerCertificatesResponse_nextMarker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeListenerCertificatesResponse
 -> Const (First Text) DescribeListenerCertificatesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeListenerCertificatesResponse 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 DescribeListenerCertificates where
  type
    AWSResponse DescribeListenerCertificates =
      DescribeListenerCertificatesResponse
  request :: DescribeListenerCertificates
-> Request DescribeListenerCertificates
request = Service
-> DescribeListenerCertificates
-> Request DescribeListenerCertificates
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeListenerCertificates
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeListenerCertificates)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeListenerCertificates))
-> Logger
-> Service
-> Proxy DescribeListenerCertificates
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeListenerCertificates)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeListenerCertificatesResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [Certificate]
-> Maybe Text -> Int -> DescribeListenerCertificatesResponse
DescribeListenerCertificatesResponse'
            (Maybe [Certificate]
 -> Maybe Text -> Int -> DescribeListenerCertificatesResponse)
-> Either String (Maybe [Certificate])
-> Either
     String (Maybe Text -> Int -> DescribeListenerCertificatesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Certificates" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [Certificate]))
-> Either String (Maybe [Certificate])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Certificate])
-> [Node] -> Either String (Maybe [Certificate])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Certificate]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either
  String (Maybe Text -> Int -> DescribeListenerCertificatesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeListenerCertificatesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NextMarker")
            Either String (Int -> DescribeListenerCertificatesResponse)
-> Either String Int
-> Either String DescribeListenerCertificatesResponse
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
    DescribeListenerCertificates

instance Prelude.NFData DescribeListenerCertificates

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

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

instance Core.ToQuery DescribeListenerCertificates where
  toQuery :: DescribeListenerCertificates -> QueryString
toQuery DescribeListenerCertificates' {Maybe Natural
Maybe Text
Text
listenerArn :: Text
pageSize :: Maybe Natural
marker :: Maybe Text
$sel:listenerArn:DescribeListenerCertificates' :: DescribeListenerCertificates -> Text
$sel:pageSize:DescribeListenerCertificates' :: DescribeListenerCertificates -> Maybe Natural
$sel:marker:DescribeListenerCertificates' :: DescribeListenerCertificates -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"DescribeListenerCertificates" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-12-01" :: Prelude.ByteString),
        ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
        ByteString
"PageSize" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
pageSize,
        ByteString
"ListenerArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
listenerArn
      ]

-- | /See:/ 'newDescribeListenerCertificatesResponse' smart constructor.
data DescribeListenerCertificatesResponse = DescribeListenerCertificatesResponse'
  { -- | Information about the certificates.
    DescribeListenerCertificatesResponse -> Maybe [Certificate]
certificates :: Prelude.Maybe [Certificate],
    -- | If there are additional results, this is the marker for the next set of
    -- results. Otherwise, this is null.
    DescribeListenerCertificatesResponse -> Maybe Text
nextMarker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeListenerCertificatesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeListenerCertificatesResponse
-> DescribeListenerCertificatesResponse -> Bool
(DescribeListenerCertificatesResponse
 -> DescribeListenerCertificatesResponse -> Bool)
-> (DescribeListenerCertificatesResponse
    -> DescribeListenerCertificatesResponse -> Bool)
-> Eq DescribeListenerCertificatesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeListenerCertificatesResponse
-> DescribeListenerCertificatesResponse -> Bool
$c/= :: DescribeListenerCertificatesResponse
-> DescribeListenerCertificatesResponse -> Bool
== :: DescribeListenerCertificatesResponse
-> DescribeListenerCertificatesResponse -> Bool
$c== :: DescribeListenerCertificatesResponse
-> DescribeListenerCertificatesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeListenerCertificatesResponse]
ReadPrec DescribeListenerCertificatesResponse
Int -> ReadS DescribeListenerCertificatesResponse
ReadS [DescribeListenerCertificatesResponse]
(Int -> ReadS DescribeListenerCertificatesResponse)
-> ReadS [DescribeListenerCertificatesResponse]
-> ReadPrec DescribeListenerCertificatesResponse
-> ReadPrec [DescribeListenerCertificatesResponse]
-> Read DescribeListenerCertificatesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeListenerCertificatesResponse]
$creadListPrec :: ReadPrec [DescribeListenerCertificatesResponse]
readPrec :: ReadPrec DescribeListenerCertificatesResponse
$creadPrec :: ReadPrec DescribeListenerCertificatesResponse
readList :: ReadS [DescribeListenerCertificatesResponse]
$creadList :: ReadS [DescribeListenerCertificatesResponse]
readsPrec :: Int -> ReadS DescribeListenerCertificatesResponse
$creadsPrec :: Int -> ReadS DescribeListenerCertificatesResponse
Prelude.Read, Int -> DescribeListenerCertificatesResponse -> ShowS
[DescribeListenerCertificatesResponse] -> ShowS
DescribeListenerCertificatesResponse -> String
(Int -> DescribeListenerCertificatesResponse -> ShowS)
-> (DescribeListenerCertificatesResponse -> String)
-> ([DescribeListenerCertificatesResponse] -> ShowS)
-> Show DescribeListenerCertificatesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeListenerCertificatesResponse] -> ShowS
$cshowList :: [DescribeListenerCertificatesResponse] -> ShowS
show :: DescribeListenerCertificatesResponse -> String
$cshow :: DescribeListenerCertificatesResponse -> String
showsPrec :: Int -> DescribeListenerCertificatesResponse -> ShowS
$cshowsPrec :: Int -> DescribeListenerCertificatesResponse -> ShowS
Prelude.Show, (forall x.
 DescribeListenerCertificatesResponse
 -> Rep DescribeListenerCertificatesResponse x)
-> (forall x.
    Rep DescribeListenerCertificatesResponse x
    -> DescribeListenerCertificatesResponse)
-> Generic DescribeListenerCertificatesResponse
forall x.
Rep DescribeListenerCertificatesResponse x
-> DescribeListenerCertificatesResponse
forall x.
DescribeListenerCertificatesResponse
-> Rep DescribeListenerCertificatesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeListenerCertificatesResponse x
-> DescribeListenerCertificatesResponse
$cfrom :: forall x.
DescribeListenerCertificatesResponse
-> Rep DescribeListenerCertificatesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeListenerCertificatesResponse' 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:
--
-- 'certificates', 'describeListenerCertificatesResponse_certificates' - Information about the certificates.
--
-- 'nextMarker', 'describeListenerCertificatesResponse_nextMarker' - If there are additional results, this is the marker for the next set of
-- results. Otherwise, this is null.
--
-- 'httpStatus', 'describeListenerCertificatesResponse_httpStatus' - The response's http status code.
newDescribeListenerCertificatesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeListenerCertificatesResponse
newDescribeListenerCertificatesResponse :: Int -> DescribeListenerCertificatesResponse
newDescribeListenerCertificatesResponse Int
pHttpStatus_ =
  DescribeListenerCertificatesResponse' :: Maybe [Certificate]
-> Maybe Text -> Int -> DescribeListenerCertificatesResponse
DescribeListenerCertificatesResponse'
    { $sel:certificates:DescribeListenerCertificatesResponse' :: Maybe [Certificate]
certificates =
        Maybe [Certificate]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextMarker:DescribeListenerCertificatesResponse' :: Maybe Text
nextMarker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeListenerCertificatesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the certificates.
describeListenerCertificatesResponse_certificates :: Lens.Lens' DescribeListenerCertificatesResponse (Prelude.Maybe [Certificate])
describeListenerCertificatesResponse_certificates :: (Maybe [Certificate] -> f (Maybe [Certificate]))
-> DescribeListenerCertificatesResponse
-> f DescribeListenerCertificatesResponse
describeListenerCertificatesResponse_certificates = (DescribeListenerCertificatesResponse -> Maybe [Certificate])
-> (DescribeListenerCertificatesResponse
    -> Maybe [Certificate] -> DescribeListenerCertificatesResponse)
-> Lens' DescribeListenerCertificatesResponse (Maybe [Certificate])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeListenerCertificatesResponse' {Maybe [Certificate]
certificates :: Maybe [Certificate]
$sel:certificates:DescribeListenerCertificatesResponse' :: DescribeListenerCertificatesResponse -> Maybe [Certificate]
certificates} -> Maybe [Certificate]
certificates) (\s :: DescribeListenerCertificatesResponse
s@DescribeListenerCertificatesResponse' {} Maybe [Certificate]
a -> DescribeListenerCertificatesResponse
s {$sel:certificates:DescribeListenerCertificatesResponse' :: Maybe [Certificate]
certificates = Maybe [Certificate]
a} :: DescribeListenerCertificatesResponse) ((Maybe [Certificate] -> f (Maybe [Certificate]))
 -> DescribeListenerCertificatesResponse
 -> f DescribeListenerCertificatesResponse)
-> ((Maybe [Certificate] -> f (Maybe [Certificate]))
    -> Maybe [Certificate] -> f (Maybe [Certificate]))
-> (Maybe [Certificate] -> f (Maybe [Certificate]))
-> DescribeListenerCertificatesResponse
-> f DescribeListenerCertificatesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Certificate] [Certificate] [Certificate] [Certificate]
-> Iso
     (Maybe [Certificate])
     (Maybe [Certificate])
     (Maybe [Certificate])
     (Maybe [Certificate])
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 [Certificate] [Certificate] [Certificate] [Certificate]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If there are additional results, this is the marker for the next set of
-- results. Otherwise, this is null.
describeListenerCertificatesResponse_nextMarker :: Lens.Lens' DescribeListenerCertificatesResponse (Prelude.Maybe Prelude.Text)
describeListenerCertificatesResponse_nextMarker :: (Maybe Text -> f (Maybe Text))
-> DescribeListenerCertificatesResponse
-> f DescribeListenerCertificatesResponse
describeListenerCertificatesResponse_nextMarker = (DescribeListenerCertificatesResponse -> Maybe Text)
-> (DescribeListenerCertificatesResponse
    -> Maybe Text -> DescribeListenerCertificatesResponse)
-> Lens' DescribeListenerCertificatesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeListenerCertificatesResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:DescribeListenerCertificatesResponse' :: DescribeListenerCertificatesResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: DescribeListenerCertificatesResponse
s@DescribeListenerCertificatesResponse' {} Maybe Text
a -> DescribeListenerCertificatesResponse
s {$sel:nextMarker:DescribeListenerCertificatesResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: DescribeListenerCertificatesResponse)

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

instance
  Prelude.NFData
    DescribeListenerCertificatesResponse