{-# 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.IAM.ListSigningCertificates
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns information about the signing certificates associated with the
-- specified IAM user. If none exists, the operation returns an empty list.
--
-- Although each user is limited to a small number of signing certificates,
-- you can still paginate the results using the @MaxItems@ and @Marker@
-- parameters.
--
-- If the @UserName@ field is not specified, the user name is determined
-- implicitly based on the Amazon Web Services access key ID used to sign
-- the request for this operation. This operation works for access keys
-- under the Amazon Web Services account. Consequently, you can use this
-- operation to manage Amazon Web Services account root user credentials
-- even if the Amazon Web Services account has no associated users.
--
-- This operation returns paginated results.
module Amazonka.IAM.ListSigningCertificates
  ( -- * Creating a Request
    ListSigningCertificates (..),
    newListSigningCertificates,

    -- * Request Lenses
    listSigningCertificates_marker,
    listSigningCertificates_maxItems,
    listSigningCertificates_userName,

    -- * Destructuring the Response
    ListSigningCertificatesResponse (..),
    newListSigningCertificatesResponse,

    -- * Response Lenses
    listSigningCertificatesResponse_isTruncated,
    listSigningCertificatesResponse_marker,
    listSigningCertificatesResponse_httpStatus,
    listSigningCertificatesResponse_certificates,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IAM.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListSigningCertificates' smart constructor.
data ListSigningCertificates = ListSigningCertificates'
  { -- | Use this parameter only when paginating results and only after you
    -- receive a response indicating that the results are truncated. Set it to
    -- the value of the @Marker@ element in the response that you received to
    -- indicate where the next call should start.
    ListSigningCertificates -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | Use this only when paginating results to indicate the maximum number of
    -- items you want in the response. If additional items exist beyond the
    -- maximum you specify, the @IsTruncated@ response element is @true@.
    --
    -- If you do not include this parameter, the number of items defaults to
    -- 100. Note that IAM might return fewer results, even when there are more
    -- results available. In that case, the @IsTruncated@ response element
    -- returns @true@, and @Marker@ contains a value to include in the
    -- subsequent call that tells the service where to continue from.
    ListSigningCertificates -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
    -- | The name of the IAM user whose signing certificates you want to examine.
    --
    -- This parameter allows (through its
    -- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
    -- consisting of upper and lowercase alphanumeric characters with no
    -- spaces. You can also include any of the following characters: _+=,.\@-
    ListSigningCertificates -> Maybe Text
userName :: Prelude.Maybe Prelude.Text
  }
  deriving (ListSigningCertificates -> ListSigningCertificates -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSigningCertificates -> ListSigningCertificates -> Bool
$c/= :: ListSigningCertificates -> ListSigningCertificates -> Bool
== :: ListSigningCertificates -> ListSigningCertificates -> Bool
$c== :: ListSigningCertificates -> ListSigningCertificates -> Bool
Prelude.Eq, ReadPrec [ListSigningCertificates]
ReadPrec ListSigningCertificates
Int -> ReadS ListSigningCertificates
ReadS [ListSigningCertificates]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSigningCertificates]
$creadListPrec :: ReadPrec [ListSigningCertificates]
readPrec :: ReadPrec ListSigningCertificates
$creadPrec :: ReadPrec ListSigningCertificates
readList :: ReadS [ListSigningCertificates]
$creadList :: ReadS [ListSigningCertificates]
readsPrec :: Int -> ReadS ListSigningCertificates
$creadsPrec :: Int -> ReadS ListSigningCertificates
Prelude.Read, Int -> ListSigningCertificates -> ShowS
[ListSigningCertificates] -> ShowS
ListSigningCertificates -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSigningCertificates] -> ShowS
$cshowList :: [ListSigningCertificates] -> ShowS
show :: ListSigningCertificates -> String
$cshow :: ListSigningCertificates -> String
showsPrec :: Int -> ListSigningCertificates -> ShowS
$cshowsPrec :: Int -> ListSigningCertificates -> ShowS
Prelude.Show, forall x. Rep ListSigningCertificates x -> ListSigningCertificates
forall x. ListSigningCertificates -> Rep ListSigningCertificates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListSigningCertificates x -> ListSigningCertificates
$cfrom :: forall x. ListSigningCertificates -> Rep ListSigningCertificates x
Prelude.Generic)

-- |
-- Create a value of 'ListSigningCertificates' 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', 'listSigningCertificates_marker' - Use this parameter only when paginating results and only after you
-- receive a response indicating that the results are truncated. Set it to
-- the value of the @Marker@ element in the response that you received to
-- indicate where the next call should start.
--
-- 'maxItems', 'listSigningCertificates_maxItems' - Use this only when paginating results to indicate the maximum number of
-- items you want in the response. If additional items exist beyond the
-- maximum you specify, the @IsTruncated@ response element is @true@.
--
-- If you do not include this parameter, the number of items defaults to
-- 100. Note that IAM might return fewer results, even when there are more
-- results available. In that case, the @IsTruncated@ response element
-- returns @true@, and @Marker@ contains a value to include in the
-- subsequent call that tells the service where to continue from.
--
-- 'userName', 'listSigningCertificates_userName' - The name of the IAM user whose signing certificates you want to examine.
--
-- This parameter allows (through its
-- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
-- consisting of upper and lowercase alphanumeric characters with no
-- spaces. You can also include any of the following characters: _+=,.\@-
newListSigningCertificates ::
  ListSigningCertificates
newListSigningCertificates :: ListSigningCertificates
newListSigningCertificates =
  ListSigningCertificates'
    { $sel:marker:ListSigningCertificates' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListSigningCertificates' :: Maybe Natural
maxItems = forall a. Maybe a
Prelude.Nothing,
      $sel:userName:ListSigningCertificates' :: Maybe Text
userName = forall a. Maybe a
Prelude.Nothing
    }

-- | Use this parameter only when paginating results and only after you
-- receive a response indicating that the results are truncated. Set it to
-- the value of the @Marker@ element in the response that you received to
-- indicate where the next call should start.
listSigningCertificates_marker :: Lens.Lens' ListSigningCertificates (Prelude.Maybe Prelude.Text)
listSigningCertificates_marker :: Lens' ListSigningCertificates (Maybe Text)
listSigningCertificates_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSigningCertificates' {Maybe Text
marker :: Maybe Text
$sel:marker:ListSigningCertificates' :: ListSigningCertificates -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListSigningCertificates
s@ListSigningCertificates' {} Maybe Text
a -> ListSigningCertificates
s {$sel:marker:ListSigningCertificates' :: Maybe Text
marker = Maybe Text
a} :: ListSigningCertificates)

-- | Use this only when paginating results to indicate the maximum number of
-- items you want in the response. If additional items exist beyond the
-- maximum you specify, the @IsTruncated@ response element is @true@.
--
-- If you do not include this parameter, the number of items defaults to
-- 100. Note that IAM might return fewer results, even when there are more
-- results available. In that case, the @IsTruncated@ response element
-- returns @true@, and @Marker@ contains a value to include in the
-- subsequent call that tells the service where to continue from.
listSigningCertificates_maxItems :: Lens.Lens' ListSigningCertificates (Prelude.Maybe Prelude.Natural)
listSigningCertificates_maxItems :: Lens' ListSigningCertificates (Maybe Natural)
listSigningCertificates_maxItems = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSigningCertificates' {Maybe Natural
maxItems :: Maybe Natural
$sel:maxItems:ListSigningCertificates' :: ListSigningCertificates -> Maybe Natural
maxItems} -> Maybe Natural
maxItems) (\s :: ListSigningCertificates
s@ListSigningCertificates' {} Maybe Natural
a -> ListSigningCertificates
s {$sel:maxItems:ListSigningCertificates' :: Maybe Natural
maxItems = Maybe Natural
a} :: ListSigningCertificates)

-- | The name of the IAM user whose signing certificates you want to examine.
--
-- This parameter allows (through its
-- <http://wikipedia.org/wiki/regex regex pattern>) a string of characters
-- consisting of upper and lowercase alphanumeric characters with no
-- spaces. You can also include any of the following characters: _+=,.\@-
listSigningCertificates_userName :: Lens.Lens' ListSigningCertificates (Prelude.Maybe Prelude.Text)
listSigningCertificates_userName :: Lens' ListSigningCertificates (Maybe Text)
listSigningCertificates_userName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSigningCertificates' {Maybe Text
userName :: Maybe Text
$sel:userName:ListSigningCertificates' :: ListSigningCertificates -> Maybe Text
userName} -> Maybe Text
userName) (\s :: ListSigningCertificates
s@ListSigningCertificates' {} Maybe Text
a -> ListSigningCertificates
s {$sel:userName:ListSigningCertificates' :: Maybe Text
userName = Maybe Text
a} :: ListSigningCertificates)

instance Core.AWSPager ListSigningCertificates where
  page :: ListSigningCertificates
-> AWSResponse ListSigningCertificates
-> Maybe ListSigningCertificates
page ListSigningCertificates
rq AWSResponse ListSigningCertificates
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSigningCertificates
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSigningCertificatesResponse (Maybe Bool)
listSigningCertificatesResponse_isTruncated
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. Maybe a -> Bool
Prelude.isNothing
        ( AWSResponse ListSigningCertificates
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSigningCertificatesResponse (Maybe Text)
listSigningCertificatesResponse_marker
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListSigningCertificates
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListSigningCertificates (Maybe Text)
listSigningCertificates_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListSigningCertificates
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSigningCertificatesResponse (Maybe Text)
listSigningCertificatesResponse_marker
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListSigningCertificates where
  type
    AWSResponse ListSigningCertificates =
      ListSigningCertificatesResponse
  request :: (Service -> Service)
-> ListSigningCertificates -> Request ListSigningCertificates
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListSigningCertificates
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListSigningCertificates)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"ListSigningCertificatesResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Bool
-> Maybe Text
-> Int
-> [SigningCertificate]
-> ListSigningCertificatesResponse
ListSigningCertificatesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"IsTruncated")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Marker")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Certificates"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member"
                        )
      )

instance Prelude.Hashable ListSigningCertificates where
  hashWithSalt :: Int -> ListSigningCertificates -> Int
hashWithSalt Int
_salt ListSigningCertificates' {Maybe Natural
Maybe Text
userName :: Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:userName:ListSigningCertificates' :: ListSigningCertificates -> Maybe Text
$sel:maxItems:ListSigningCertificates' :: ListSigningCertificates -> Maybe Natural
$sel:marker:ListSigningCertificates' :: ListSigningCertificates -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxItems
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userName

instance Prelude.NFData ListSigningCertificates where
  rnf :: ListSigningCertificates -> ()
rnf ListSigningCertificates' {Maybe Natural
Maybe Text
userName :: Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:userName:ListSigningCertificates' :: ListSigningCertificates -> Maybe Text
$sel:maxItems:ListSigningCertificates' :: ListSigningCertificates -> Maybe Natural
$sel:marker:ListSigningCertificates' :: ListSigningCertificates -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxItems
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
userName

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

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

instance Data.ToQuery ListSigningCertificates where
  toQuery :: ListSigningCertificates -> QueryString
toQuery ListSigningCertificates' {Maybe Natural
Maybe Text
userName :: Maybe Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:userName:ListSigningCertificates' :: ListSigningCertificates -> Maybe Text
$sel:maxItems:ListSigningCertificates' :: ListSigningCertificates -> Maybe Natural
$sel:marker:ListSigningCertificates' :: ListSigningCertificates -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ListSigningCertificates" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
        ByteString
"Marker" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
marker,
        ByteString
"MaxItems" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxItems,
        ByteString
"UserName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
userName
      ]

-- | Contains the response to a successful ListSigningCertificates request.
--
-- /See:/ 'newListSigningCertificatesResponse' smart constructor.
data ListSigningCertificatesResponse = ListSigningCertificatesResponse'
  { -- | A flag that indicates whether there are more items to return. If your
    -- results were truncated, you can make a subsequent pagination request
    -- using the @Marker@ request parameter to retrieve more items. Note that
    -- IAM might return fewer than the @MaxItems@ number of results even when
    -- there are more results available. We recommend that you check
    -- @IsTruncated@ after every call to ensure that you receive all your
    -- results.
    ListSigningCertificatesResponse -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
    -- | When @IsTruncated@ is @true@, this element is present and contains the
    -- value to use for the @Marker@ parameter in a subsequent pagination
    -- request.
    ListSigningCertificatesResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListSigningCertificatesResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of the user\'s signing certificate information.
    ListSigningCertificatesResponse -> [SigningCertificate]
certificates :: [SigningCertificate]
  }
  deriving (ListSigningCertificatesResponse
-> ListSigningCertificatesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSigningCertificatesResponse
-> ListSigningCertificatesResponse -> Bool
$c/= :: ListSigningCertificatesResponse
-> ListSigningCertificatesResponse -> Bool
== :: ListSigningCertificatesResponse
-> ListSigningCertificatesResponse -> Bool
$c== :: ListSigningCertificatesResponse
-> ListSigningCertificatesResponse -> Bool
Prelude.Eq, ReadPrec [ListSigningCertificatesResponse]
ReadPrec ListSigningCertificatesResponse
Int -> ReadS ListSigningCertificatesResponse
ReadS [ListSigningCertificatesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSigningCertificatesResponse]
$creadListPrec :: ReadPrec [ListSigningCertificatesResponse]
readPrec :: ReadPrec ListSigningCertificatesResponse
$creadPrec :: ReadPrec ListSigningCertificatesResponse
readList :: ReadS [ListSigningCertificatesResponse]
$creadList :: ReadS [ListSigningCertificatesResponse]
readsPrec :: Int -> ReadS ListSigningCertificatesResponse
$creadsPrec :: Int -> ReadS ListSigningCertificatesResponse
Prelude.Read, Int -> ListSigningCertificatesResponse -> ShowS
[ListSigningCertificatesResponse] -> ShowS
ListSigningCertificatesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSigningCertificatesResponse] -> ShowS
$cshowList :: [ListSigningCertificatesResponse] -> ShowS
show :: ListSigningCertificatesResponse -> String
$cshow :: ListSigningCertificatesResponse -> String
showsPrec :: Int -> ListSigningCertificatesResponse -> ShowS
$cshowsPrec :: Int -> ListSigningCertificatesResponse -> ShowS
Prelude.Show, forall x.
Rep ListSigningCertificatesResponse x
-> ListSigningCertificatesResponse
forall x.
ListSigningCertificatesResponse
-> Rep ListSigningCertificatesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSigningCertificatesResponse x
-> ListSigningCertificatesResponse
$cfrom :: forall x.
ListSigningCertificatesResponse
-> Rep ListSigningCertificatesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListSigningCertificatesResponse' 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:
--
-- 'isTruncated', 'listSigningCertificatesResponse_isTruncated' - A flag that indicates whether there are more items to return. If your
-- results were truncated, you can make a subsequent pagination request
-- using the @Marker@ request parameter to retrieve more items. Note that
-- IAM might return fewer than the @MaxItems@ number of results even when
-- there are more results available. We recommend that you check
-- @IsTruncated@ after every call to ensure that you receive all your
-- results.
--
-- 'marker', 'listSigningCertificatesResponse_marker' - When @IsTruncated@ is @true@, this element is present and contains the
-- value to use for the @Marker@ parameter in a subsequent pagination
-- request.
--
-- 'httpStatus', 'listSigningCertificatesResponse_httpStatus' - The response's http status code.
--
-- 'certificates', 'listSigningCertificatesResponse_certificates' - A list of the user\'s signing certificate information.
newListSigningCertificatesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListSigningCertificatesResponse
newListSigningCertificatesResponse :: Int -> ListSigningCertificatesResponse
newListSigningCertificatesResponse Int
pHttpStatus_ =
  ListSigningCertificatesResponse'
    { $sel:isTruncated:ListSigningCertificatesResponse' :: Maybe Bool
isTruncated =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:ListSigningCertificatesResponse' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListSigningCertificatesResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:certificates:ListSigningCertificatesResponse' :: [SigningCertificate]
certificates = forall a. Monoid a => a
Prelude.mempty
    }

-- | A flag that indicates whether there are more items to return. If your
-- results were truncated, you can make a subsequent pagination request
-- using the @Marker@ request parameter to retrieve more items. Note that
-- IAM might return fewer than the @MaxItems@ number of results even when
-- there are more results available. We recommend that you check
-- @IsTruncated@ after every call to ensure that you receive all your
-- results.
listSigningCertificatesResponse_isTruncated :: Lens.Lens' ListSigningCertificatesResponse (Prelude.Maybe Prelude.Bool)
listSigningCertificatesResponse_isTruncated :: Lens' ListSigningCertificatesResponse (Maybe Bool)
listSigningCertificatesResponse_isTruncated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSigningCertificatesResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListSigningCertificatesResponse' :: ListSigningCertificatesResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListSigningCertificatesResponse
s@ListSigningCertificatesResponse' {} Maybe Bool
a -> ListSigningCertificatesResponse
s {$sel:isTruncated:ListSigningCertificatesResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListSigningCertificatesResponse)

-- | When @IsTruncated@ is @true@, this element is present and contains the
-- value to use for the @Marker@ parameter in a subsequent pagination
-- request.
listSigningCertificatesResponse_marker :: Lens.Lens' ListSigningCertificatesResponse (Prelude.Maybe Prelude.Text)
listSigningCertificatesResponse_marker :: Lens' ListSigningCertificatesResponse (Maybe Text)
listSigningCertificatesResponse_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSigningCertificatesResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:ListSigningCertificatesResponse' :: ListSigningCertificatesResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListSigningCertificatesResponse
s@ListSigningCertificatesResponse' {} Maybe Text
a -> ListSigningCertificatesResponse
s {$sel:marker:ListSigningCertificatesResponse' :: Maybe Text
marker = Maybe Text
a} :: ListSigningCertificatesResponse)

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

-- | A list of the user\'s signing certificate information.
listSigningCertificatesResponse_certificates :: Lens.Lens' ListSigningCertificatesResponse [SigningCertificate]
listSigningCertificatesResponse_certificates :: Lens' ListSigningCertificatesResponse [SigningCertificate]
listSigningCertificatesResponse_certificates = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSigningCertificatesResponse' {[SigningCertificate]
certificates :: [SigningCertificate]
$sel:certificates:ListSigningCertificatesResponse' :: ListSigningCertificatesResponse -> [SigningCertificate]
certificates} -> [SigningCertificate]
certificates) (\s :: ListSigningCertificatesResponse
s@ListSigningCertificatesResponse' {} [SigningCertificate]
a -> ListSigningCertificatesResponse
s {$sel:certificates:ListSigningCertificatesResponse' :: [SigningCertificate]
certificates = [SigningCertificate]
a} :: ListSigningCertificatesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    ListSigningCertificatesResponse
  where
  rnf :: ListSigningCertificatesResponse -> ()
rnf ListSigningCertificatesResponse' {Int
[SigningCertificate]
Maybe Bool
Maybe Text
certificates :: [SigningCertificate]
httpStatus :: Int
marker :: Maybe Text
isTruncated :: Maybe Bool
$sel:certificates:ListSigningCertificatesResponse' :: ListSigningCertificatesResponse -> [SigningCertificate]
$sel:httpStatus:ListSigningCertificatesResponse' :: ListSigningCertificatesResponse -> Int
$sel:marker:ListSigningCertificatesResponse' :: ListSigningCertificatesResponse -> Maybe Text
$sel:isTruncated:ListSigningCertificatesResponse' :: ListSigningCertificatesResponse -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isTruncated
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [SigningCertificate]
certificates