{-# 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.IoT.ListCertificates
-- 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)
--
-- Lists the certificates registered in your Amazon Web Services account.
--
-- The results are paginated with a default page size of 25. You can use
-- the returned marker to retrieve additional results.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions ListCertificates>
-- action.
--
-- This operation returns paginated results.
module Amazonka.IoT.ListCertificates
  ( -- * Creating a Request
    ListCertificates (..),
    newListCertificates,

    -- * Request Lenses
    listCertificates_marker,
    listCertificates_ascendingOrder,
    listCertificates_pageSize,

    -- * Destructuring the Response
    ListCertificatesResponse (..),
    newListCertificatesResponse,

    -- * Response Lenses
    listCertificatesResponse_certificates,
    listCertificatesResponse_nextMarker,
    listCertificatesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoT.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

-- | The input for the ListCertificates operation.
--
-- /See:/ 'newListCertificates' smart constructor.
data ListCertificates = ListCertificates'
  { -- | The marker for the next set of results.
    ListCertificates -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | Specifies the order for results. If True, the results are returned in
    -- ascending order, based on the creation date.
    ListCertificates -> Maybe Bool
ascendingOrder :: Prelude.Maybe Prelude.Bool,
    -- | The result page size.
    ListCertificates -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListCertificates -> ListCertificates -> Bool
(ListCertificates -> ListCertificates -> Bool)
-> (ListCertificates -> ListCertificates -> Bool)
-> Eq ListCertificates
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCertificates -> ListCertificates -> Bool
$c/= :: ListCertificates -> ListCertificates -> Bool
== :: ListCertificates -> ListCertificates -> Bool
$c== :: ListCertificates -> ListCertificates -> Bool
Prelude.Eq, ReadPrec [ListCertificates]
ReadPrec ListCertificates
Int -> ReadS ListCertificates
ReadS [ListCertificates]
(Int -> ReadS ListCertificates)
-> ReadS [ListCertificates]
-> ReadPrec ListCertificates
-> ReadPrec [ListCertificates]
-> Read ListCertificates
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCertificates]
$creadListPrec :: ReadPrec [ListCertificates]
readPrec :: ReadPrec ListCertificates
$creadPrec :: ReadPrec ListCertificates
readList :: ReadS [ListCertificates]
$creadList :: ReadS [ListCertificates]
readsPrec :: Int -> ReadS ListCertificates
$creadsPrec :: Int -> ReadS ListCertificates
Prelude.Read, Int -> ListCertificates -> ShowS
[ListCertificates] -> ShowS
ListCertificates -> String
(Int -> ListCertificates -> ShowS)
-> (ListCertificates -> String)
-> ([ListCertificates] -> ShowS)
-> Show ListCertificates
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCertificates] -> ShowS
$cshowList :: [ListCertificates] -> ShowS
show :: ListCertificates -> String
$cshow :: ListCertificates -> String
showsPrec :: Int -> ListCertificates -> ShowS
$cshowsPrec :: Int -> ListCertificates -> ShowS
Prelude.Show, (forall x. ListCertificates -> Rep ListCertificates x)
-> (forall x. Rep ListCertificates x -> ListCertificates)
-> Generic ListCertificates
forall x. Rep ListCertificates x -> ListCertificates
forall x. ListCertificates -> Rep ListCertificates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListCertificates x -> ListCertificates
$cfrom :: forall x. ListCertificates -> Rep ListCertificates x
Prelude.Generic)

-- |
-- Create a value of 'ListCertificates' 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', 'listCertificates_marker' - The marker for the next set of results.
--
-- 'ascendingOrder', 'listCertificates_ascendingOrder' - Specifies the order for results. If True, the results are returned in
-- ascending order, based on the creation date.
--
-- 'pageSize', 'listCertificates_pageSize' - The result page size.
newListCertificates ::
  ListCertificates
newListCertificates :: ListCertificates
newListCertificates =
  ListCertificates' :: Maybe Text -> Maybe Bool -> Maybe Natural -> ListCertificates
ListCertificates'
    { $sel:marker:ListCertificates' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ascendingOrder:ListCertificates' :: Maybe Bool
ascendingOrder = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:pageSize:ListCertificates' :: Maybe Natural
pageSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The marker for the next set of results.
listCertificates_marker :: Lens.Lens' ListCertificates (Prelude.Maybe Prelude.Text)
listCertificates_marker :: (Maybe Text -> f (Maybe Text))
-> ListCertificates -> f ListCertificates
listCertificates_marker = (ListCertificates -> Maybe Text)
-> (ListCertificates -> Maybe Text -> ListCertificates)
-> Lens ListCertificates ListCertificates (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCertificates' {Maybe Text
marker :: Maybe Text
$sel:marker:ListCertificates' :: ListCertificates -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListCertificates
s@ListCertificates' {} Maybe Text
a -> ListCertificates
s {$sel:marker:ListCertificates' :: Maybe Text
marker = Maybe Text
a} :: ListCertificates)

-- | Specifies the order for results. If True, the results are returned in
-- ascending order, based on the creation date.
listCertificates_ascendingOrder :: Lens.Lens' ListCertificates (Prelude.Maybe Prelude.Bool)
listCertificates_ascendingOrder :: (Maybe Bool -> f (Maybe Bool))
-> ListCertificates -> f ListCertificates
listCertificates_ascendingOrder = (ListCertificates -> Maybe Bool)
-> (ListCertificates -> Maybe Bool -> ListCertificates)
-> Lens ListCertificates ListCertificates (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCertificates' {Maybe Bool
ascendingOrder :: Maybe Bool
$sel:ascendingOrder:ListCertificates' :: ListCertificates -> Maybe Bool
ascendingOrder} -> Maybe Bool
ascendingOrder) (\s :: ListCertificates
s@ListCertificates' {} Maybe Bool
a -> ListCertificates
s {$sel:ascendingOrder:ListCertificates' :: Maybe Bool
ascendingOrder = Maybe Bool
a} :: ListCertificates)

-- | The result page size.
listCertificates_pageSize :: Lens.Lens' ListCertificates (Prelude.Maybe Prelude.Natural)
listCertificates_pageSize :: (Maybe Natural -> f (Maybe Natural))
-> ListCertificates -> f ListCertificates
listCertificates_pageSize = (ListCertificates -> Maybe Natural)
-> (ListCertificates -> Maybe Natural -> ListCertificates)
-> Lens
     ListCertificates ListCertificates (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCertificates' {Maybe Natural
pageSize :: Maybe Natural
$sel:pageSize:ListCertificates' :: ListCertificates -> Maybe Natural
pageSize} -> Maybe Natural
pageSize) (\s :: ListCertificates
s@ListCertificates' {} Maybe Natural
a -> ListCertificates
s {$sel:pageSize:ListCertificates' :: Maybe Natural
pageSize = Maybe Natural
a} :: ListCertificates)

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

instance Prelude.NFData ListCertificates

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

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

instance Core.ToQuery ListCertificates where
  toQuery :: ListCertificates -> QueryString
toQuery ListCertificates' {Maybe Bool
Maybe Natural
Maybe Text
pageSize :: Maybe Natural
ascendingOrder :: Maybe Bool
marker :: Maybe Text
$sel:pageSize:ListCertificates' :: ListCertificates -> Maybe Natural
$sel:ascendingOrder:ListCertificates' :: ListCertificates -> Maybe Bool
$sel:marker:ListCertificates' :: ListCertificates -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
        ByteString
"isAscendingOrder" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
ascendingOrder,
        ByteString
"pageSize" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
pageSize
      ]

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

-- |
-- Create a value of 'ListCertificatesResponse' 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', 'listCertificatesResponse_certificates' - The descriptions of the certificates.
--
-- 'nextMarker', 'listCertificatesResponse_nextMarker' - The marker for the next set of results, or null if there are no
-- additional results.
--
-- 'httpStatus', 'listCertificatesResponse_httpStatus' - The response's http status code.
newListCertificatesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListCertificatesResponse
newListCertificatesResponse :: Int -> ListCertificatesResponse
newListCertificatesResponse Int
pHttpStatus_ =
  ListCertificatesResponse' :: Maybe [Certificate]
-> Maybe Text -> Int -> ListCertificatesResponse
ListCertificatesResponse'
    { $sel:certificates:ListCertificatesResponse' :: Maybe [Certificate]
certificates =
        Maybe [Certificate]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextMarker:ListCertificatesResponse' :: Maybe Text
nextMarker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListCertificatesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The descriptions of the certificates.
listCertificatesResponse_certificates :: Lens.Lens' ListCertificatesResponse (Prelude.Maybe [Certificate])
listCertificatesResponse_certificates :: (Maybe [Certificate] -> f (Maybe [Certificate]))
-> ListCertificatesResponse -> f ListCertificatesResponse
listCertificatesResponse_certificates = (ListCertificatesResponse -> Maybe [Certificate])
-> (ListCertificatesResponse
    -> Maybe [Certificate] -> ListCertificatesResponse)
-> Lens' ListCertificatesResponse (Maybe [Certificate])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCertificatesResponse' {Maybe [Certificate]
certificates :: Maybe [Certificate]
$sel:certificates:ListCertificatesResponse' :: ListCertificatesResponse -> Maybe [Certificate]
certificates} -> Maybe [Certificate]
certificates) (\s :: ListCertificatesResponse
s@ListCertificatesResponse' {} Maybe [Certificate]
a -> ListCertificatesResponse
s {$sel:certificates:ListCertificatesResponse' :: Maybe [Certificate]
certificates = Maybe [Certificate]
a} :: ListCertificatesResponse) ((Maybe [Certificate] -> f (Maybe [Certificate]))
 -> ListCertificatesResponse -> f ListCertificatesResponse)
-> ((Maybe [Certificate] -> f (Maybe [Certificate]))
    -> Maybe [Certificate] -> f (Maybe [Certificate]))
-> (Maybe [Certificate] -> f (Maybe [Certificate]))
-> ListCertificatesResponse
-> f ListCertificatesResponse
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

-- | The marker for the next set of results, or null if there are no
-- additional results.
listCertificatesResponse_nextMarker :: Lens.Lens' ListCertificatesResponse (Prelude.Maybe Prelude.Text)
listCertificatesResponse_nextMarker :: (Maybe Text -> f (Maybe Text))
-> ListCertificatesResponse -> f ListCertificatesResponse
listCertificatesResponse_nextMarker = (ListCertificatesResponse -> Maybe Text)
-> (ListCertificatesResponse
    -> Maybe Text -> ListCertificatesResponse)
-> Lens' ListCertificatesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCertificatesResponse' {Maybe Text
nextMarker :: Maybe Text
$sel:nextMarker:ListCertificatesResponse' :: ListCertificatesResponse -> Maybe Text
nextMarker} -> Maybe Text
nextMarker) (\s :: ListCertificatesResponse
s@ListCertificatesResponse' {} Maybe Text
a -> ListCertificatesResponse
s {$sel:nextMarker:ListCertificatesResponse' :: Maybe Text
nextMarker = Maybe Text
a} :: ListCertificatesResponse)

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

instance Prelude.NFData ListCertificatesResponse