{-# 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.ListServerCertificateTags
-- 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 tags that are attached to the specified IAM server
-- certificate. The returned list of tags is sorted by tag key. For more
-- information about tagging, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tagging IAM resources>
-- in the /IAM User Guide/.
--
-- For certificates in a Region supported by Certificate Manager (ACM), we
-- recommend that you don\'t use IAM server certificates. Instead, use ACM
-- to provision, manage, and deploy your server certificates. For more
-- information about IAM server certificates,
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html Working with server certificates>
-- in the /IAM User Guide/.
module Amazonka.IAM.ListServerCertificateTags
  ( -- * Creating a Request
    ListServerCertificateTags (..),
    newListServerCertificateTags,

    -- * Request Lenses
    listServerCertificateTags_marker,
    listServerCertificateTags_maxItems,
    listServerCertificateTags_serverCertificateName,

    -- * Destructuring the Response
    ListServerCertificateTagsResponse (..),
    newListServerCertificateTagsResponse,

    -- * Response Lenses
    listServerCertificateTagsResponse_marker,
    listServerCertificateTagsResponse_isTruncated,
    listServerCertificateTagsResponse_httpStatus,
    listServerCertificateTagsResponse_tags,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IAM.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:/ 'newListServerCertificateTags' smart constructor.
data ListServerCertificateTags = ListServerCertificateTags'
  { -- | 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.
    ListServerCertificateTags -> 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.
    ListServerCertificateTags -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
    -- | The name of the IAM server certificate whose tags you want to see.
    --
    -- 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: _+=,.\@-
    ListServerCertificateTags -> Text
serverCertificateName :: Prelude.Text
  }
  deriving (ListServerCertificateTags -> ListServerCertificateTags -> Bool
(ListServerCertificateTags -> ListServerCertificateTags -> Bool)
-> (ListServerCertificateTags -> ListServerCertificateTags -> Bool)
-> Eq ListServerCertificateTags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListServerCertificateTags -> ListServerCertificateTags -> Bool
$c/= :: ListServerCertificateTags -> ListServerCertificateTags -> Bool
== :: ListServerCertificateTags -> ListServerCertificateTags -> Bool
$c== :: ListServerCertificateTags -> ListServerCertificateTags -> Bool
Prelude.Eq, ReadPrec [ListServerCertificateTags]
ReadPrec ListServerCertificateTags
Int -> ReadS ListServerCertificateTags
ReadS [ListServerCertificateTags]
(Int -> ReadS ListServerCertificateTags)
-> ReadS [ListServerCertificateTags]
-> ReadPrec ListServerCertificateTags
-> ReadPrec [ListServerCertificateTags]
-> Read ListServerCertificateTags
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListServerCertificateTags]
$creadListPrec :: ReadPrec [ListServerCertificateTags]
readPrec :: ReadPrec ListServerCertificateTags
$creadPrec :: ReadPrec ListServerCertificateTags
readList :: ReadS [ListServerCertificateTags]
$creadList :: ReadS [ListServerCertificateTags]
readsPrec :: Int -> ReadS ListServerCertificateTags
$creadsPrec :: Int -> ReadS ListServerCertificateTags
Prelude.Read, Int -> ListServerCertificateTags -> ShowS
[ListServerCertificateTags] -> ShowS
ListServerCertificateTags -> String
(Int -> ListServerCertificateTags -> ShowS)
-> (ListServerCertificateTags -> String)
-> ([ListServerCertificateTags] -> ShowS)
-> Show ListServerCertificateTags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListServerCertificateTags] -> ShowS
$cshowList :: [ListServerCertificateTags] -> ShowS
show :: ListServerCertificateTags -> String
$cshow :: ListServerCertificateTags -> String
showsPrec :: Int -> ListServerCertificateTags -> ShowS
$cshowsPrec :: Int -> ListServerCertificateTags -> ShowS
Prelude.Show, (forall x.
 ListServerCertificateTags -> Rep ListServerCertificateTags x)
-> (forall x.
    Rep ListServerCertificateTags x -> ListServerCertificateTags)
-> Generic ListServerCertificateTags
forall x.
Rep ListServerCertificateTags x -> ListServerCertificateTags
forall x.
ListServerCertificateTags -> Rep ListServerCertificateTags x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListServerCertificateTags x -> ListServerCertificateTags
$cfrom :: forall x.
ListServerCertificateTags -> Rep ListServerCertificateTags x
Prelude.Generic)

-- |
-- Create a value of 'ListServerCertificateTags' 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', 'listServerCertificateTags_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', 'listServerCertificateTags_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.
--
-- 'serverCertificateName', 'listServerCertificateTags_serverCertificateName' - The name of the IAM server certificate whose tags you want to see.
--
-- 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: _+=,.\@-
newListServerCertificateTags ::
  -- | 'serverCertificateName'
  Prelude.Text ->
  ListServerCertificateTags
newListServerCertificateTags :: Text -> ListServerCertificateTags
newListServerCertificateTags Text
pServerCertificateName_ =
  ListServerCertificateTags' :: Maybe Text -> Maybe Natural -> Text -> ListServerCertificateTags
ListServerCertificateTags'
    { $sel:marker:ListServerCertificateTags' :: Maybe Text
marker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListServerCertificateTags' :: Maybe Natural
maxItems = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:serverCertificateName:ListServerCertificateTags' :: Text
serverCertificateName = Text
pServerCertificateName_
    }

-- | 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.
listServerCertificateTags_marker :: Lens.Lens' ListServerCertificateTags (Prelude.Maybe Prelude.Text)
listServerCertificateTags_marker :: (Maybe Text -> f (Maybe Text))
-> ListServerCertificateTags -> f ListServerCertificateTags
listServerCertificateTags_marker = (ListServerCertificateTags -> Maybe Text)
-> (ListServerCertificateTags
    -> Maybe Text -> ListServerCertificateTags)
-> Lens
     ListServerCertificateTags
     ListServerCertificateTags
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListServerCertificateTags' {Maybe Text
marker :: Maybe Text
$sel:marker:ListServerCertificateTags' :: ListServerCertificateTags -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListServerCertificateTags
s@ListServerCertificateTags' {} Maybe Text
a -> ListServerCertificateTags
s {$sel:marker:ListServerCertificateTags' :: Maybe Text
marker = Maybe Text
a} :: ListServerCertificateTags)

-- | 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.
listServerCertificateTags_maxItems :: Lens.Lens' ListServerCertificateTags (Prelude.Maybe Prelude.Natural)
listServerCertificateTags_maxItems :: (Maybe Natural -> f (Maybe Natural))
-> ListServerCertificateTags -> f ListServerCertificateTags
listServerCertificateTags_maxItems = (ListServerCertificateTags -> Maybe Natural)
-> (ListServerCertificateTags
    -> Maybe Natural -> ListServerCertificateTags)
-> Lens
     ListServerCertificateTags
     ListServerCertificateTags
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListServerCertificateTags' {Maybe Natural
maxItems :: Maybe Natural
$sel:maxItems:ListServerCertificateTags' :: ListServerCertificateTags -> Maybe Natural
maxItems} -> Maybe Natural
maxItems) (\s :: ListServerCertificateTags
s@ListServerCertificateTags' {} Maybe Natural
a -> ListServerCertificateTags
s {$sel:maxItems:ListServerCertificateTags' :: Maybe Natural
maxItems = Maybe Natural
a} :: ListServerCertificateTags)

-- | The name of the IAM server certificate whose tags you want to see.
--
-- 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: _+=,.\@-
listServerCertificateTags_serverCertificateName :: Lens.Lens' ListServerCertificateTags Prelude.Text
listServerCertificateTags_serverCertificateName :: (Text -> f Text)
-> ListServerCertificateTags -> f ListServerCertificateTags
listServerCertificateTags_serverCertificateName = (ListServerCertificateTags -> Text)
-> (ListServerCertificateTags -> Text -> ListServerCertificateTags)
-> Lens
     ListServerCertificateTags ListServerCertificateTags Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListServerCertificateTags' {Text
serverCertificateName :: Text
$sel:serverCertificateName:ListServerCertificateTags' :: ListServerCertificateTags -> Text
serverCertificateName} -> Text
serverCertificateName) (\s :: ListServerCertificateTags
s@ListServerCertificateTags' {} Text
a -> ListServerCertificateTags
s {$sel:serverCertificateName:ListServerCertificateTags' :: Text
serverCertificateName = Text
a} :: ListServerCertificateTags)

instance Core.AWSRequest ListServerCertificateTags where
  type
    AWSResponse ListServerCertificateTags =
      ListServerCertificateTagsResponse
  request :: ListServerCertificateTags -> Request ListServerCertificateTags
request = Service
-> ListServerCertificateTags -> Request ListServerCertificateTags
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ListServerCertificateTags
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListServerCertificateTags)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ListServerCertificateTags))
-> Logger
-> Service
-> Proxy ListServerCertificateTags
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListServerCertificateTags)))
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
"ListServerCertificateTagsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe Bool -> Int -> [Tag] -> ListServerCertificateTagsResponse
ListServerCertificateTagsResponse'
            (Maybe Text
 -> Maybe Bool -> Int -> [Tag] -> ListServerCertificateTagsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool -> Int -> [Tag] -> ListServerCertificateTagsResponse)
forall (f :: * -> *) a b. Functor 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
"Marker")
            Either
  String
  (Maybe Bool -> Int -> [Tag] -> ListServerCertificateTagsResponse)
-> Either String (Maybe Bool)
-> Either
     String (Int -> [Tag] -> ListServerCertificateTagsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IsTruncated")
            Either String (Int -> [Tag] -> ListServerCertificateTagsResponse)
-> Either String Int
-> Either String ([Tag] -> ListServerCertificateTagsResponse)
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 ([Tag] -> ListServerCertificateTagsResponse)
-> Either String [Tag]
-> Either String ListServerCertificateTagsResponse
forall (f :: * -> *) a b. Applicative f => 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
"Tags" 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 [Tag]) -> Either String [Tag]
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= Text -> [Node] -> Either String [Tag]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member"
                        )
      )

instance Prelude.Hashable ListServerCertificateTags

instance Prelude.NFData ListServerCertificateTags

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

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

instance Core.ToQuery ListServerCertificateTags where
  toQuery :: ListServerCertificateTags -> QueryString
toQuery ListServerCertificateTags' {Maybe Natural
Maybe Text
Text
serverCertificateName :: Text
maxItems :: Maybe Natural
marker :: Maybe Text
$sel:serverCertificateName:ListServerCertificateTags' :: ListServerCertificateTags -> Text
$sel:maxItems:ListServerCertificateTags' :: ListServerCertificateTags -> Maybe Natural
$sel:marker:ListServerCertificateTags' :: ListServerCertificateTags -> 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
"ListServerCertificateTags" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
        ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
        ByteString
"MaxItems" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxItems,
        ByteString
"ServerCertificateName"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
serverCertificateName
      ]

-- | /See:/ 'newListServerCertificateTagsResponse' smart constructor.
data ListServerCertificateTagsResponse = ListServerCertificateTagsResponse'
  { -- | When @IsTruncated@ is @true@, this element is present and contains the
    -- value to use for the @Marker@ parameter in a subsequent pagination
    -- request.
    ListServerCertificateTagsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | 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.
    ListServerCertificateTagsResponse -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
    -- | The response's http status code.
    ListServerCertificateTagsResponse -> Int
httpStatus :: Prelude.Int,
    -- | The list of tags that are currently attached to the IAM server
    -- certificate. Each tag consists of a key name and an associated value. If
    -- no tags are attached to the specified resource, the response contains an
    -- empty list.
    ListServerCertificateTagsResponse -> [Tag]
tags :: [Tag]
  }
  deriving (ListServerCertificateTagsResponse
-> ListServerCertificateTagsResponse -> Bool
(ListServerCertificateTagsResponse
 -> ListServerCertificateTagsResponse -> Bool)
-> (ListServerCertificateTagsResponse
    -> ListServerCertificateTagsResponse -> Bool)
-> Eq ListServerCertificateTagsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListServerCertificateTagsResponse
-> ListServerCertificateTagsResponse -> Bool
$c/= :: ListServerCertificateTagsResponse
-> ListServerCertificateTagsResponse -> Bool
== :: ListServerCertificateTagsResponse
-> ListServerCertificateTagsResponse -> Bool
$c== :: ListServerCertificateTagsResponse
-> ListServerCertificateTagsResponse -> Bool
Prelude.Eq, ReadPrec [ListServerCertificateTagsResponse]
ReadPrec ListServerCertificateTagsResponse
Int -> ReadS ListServerCertificateTagsResponse
ReadS [ListServerCertificateTagsResponse]
(Int -> ReadS ListServerCertificateTagsResponse)
-> ReadS [ListServerCertificateTagsResponse]
-> ReadPrec ListServerCertificateTagsResponse
-> ReadPrec [ListServerCertificateTagsResponse]
-> Read ListServerCertificateTagsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListServerCertificateTagsResponse]
$creadListPrec :: ReadPrec [ListServerCertificateTagsResponse]
readPrec :: ReadPrec ListServerCertificateTagsResponse
$creadPrec :: ReadPrec ListServerCertificateTagsResponse
readList :: ReadS [ListServerCertificateTagsResponse]
$creadList :: ReadS [ListServerCertificateTagsResponse]
readsPrec :: Int -> ReadS ListServerCertificateTagsResponse
$creadsPrec :: Int -> ReadS ListServerCertificateTagsResponse
Prelude.Read, Int -> ListServerCertificateTagsResponse -> ShowS
[ListServerCertificateTagsResponse] -> ShowS
ListServerCertificateTagsResponse -> String
(Int -> ListServerCertificateTagsResponse -> ShowS)
-> (ListServerCertificateTagsResponse -> String)
-> ([ListServerCertificateTagsResponse] -> ShowS)
-> Show ListServerCertificateTagsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListServerCertificateTagsResponse] -> ShowS
$cshowList :: [ListServerCertificateTagsResponse] -> ShowS
show :: ListServerCertificateTagsResponse -> String
$cshow :: ListServerCertificateTagsResponse -> String
showsPrec :: Int -> ListServerCertificateTagsResponse -> ShowS
$cshowsPrec :: Int -> ListServerCertificateTagsResponse -> ShowS
Prelude.Show, (forall x.
 ListServerCertificateTagsResponse
 -> Rep ListServerCertificateTagsResponse x)
-> (forall x.
    Rep ListServerCertificateTagsResponse x
    -> ListServerCertificateTagsResponse)
-> Generic ListServerCertificateTagsResponse
forall x.
Rep ListServerCertificateTagsResponse x
-> ListServerCertificateTagsResponse
forall x.
ListServerCertificateTagsResponse
-> Rep ListServerCertificateTagsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListServerCertificateTagsResponse x
-> ListServerCertificateTagsResponse
$cfrom :: forall x.
ListServerCertificateTagsResponse
-> Rep ListServerCertificateTagsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListServerCertificateTagsResponse' 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', 'listServerCertificateTagsResponse_marker' - When @IsTruncated@ is @true@, this element is present and contains the
-- value to use for the @Marker@ parameter in a subsequent pagination
-- request.
--
-- 'isTruncated', 'listServerCertificateTagsResponse_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.
--
-- 'httpStatus', 'listServerCertificateTagsResponse_httpStatus' - The response's http status code.
--
-- 'tags', 'listServerCertificateTagsResponse_tags' - The list of tags that are currently attached to the IAM server
-- certificate. Each tag consists of a key name and an associated value. If
-- no tags are attached to the specified resource, the response contains an
-- empty list.
newListServerCertificateTagsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListServerCertificateTagsResponse
newListServerCertificateTagsResponse :: Int -> ListServerCertificateTagsResponse
newListServerCertificateTagsResponse Int
pHttpStatus_ =
  ListServerCertificateTagsResponse' :: Maybe Text
-> Maybe Bool -> Int -> [Tag] -> ListServerCertificateTagsResponse
ListServerCertificateTagsResponse'
    { $sel:marker:ListServerCertificateTagsResponse' :: Maybe Text
marker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:isTruncated:ListServerCertificateTagsResponse' :: Maybe Bool
isTruncated = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListServerCertificateTagsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:tags:ListServerCertificateTagsResponse' :: [Tag]
tags = [Tag]
forall a. Monoid a => a
Prelude.mempty
    }

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

-- | 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.
listServerCertificateTagsResponse_isTruncated :: Lens.Lens' ListServerCertificateTagsResponse (Prelude.Maybe Prelude.Bool)
listServerCertificateTagsResponse_isTruncated :: (Maybe Bool -> f (Maybe Bool))
-> ListServerCertificateTagsResponse
-> f ListServerCertificateTagsResponse
listServerCertificateTagsResponse_isTruncated = (ListServerCertificateTagsResponse -> Maybe Bool)
-> (ListServerCertificateTagsResponse
    -> Maybe Bool -> ListServerCertificateTagsResponse)
-> Lens
     ListServerCertificateTagsResponse
     ListServerCertificateTagsResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListServerCertificateTagsResponse' {Maybe Bool
isTruncated :: Maybe Bool
$sel:isTruncated:ListServerCertificateTagsResponse' :: ListServerCertificateTagsResponse -> Maybe Bool
isTruncated} -> Maybe Bool
isTruncated) (\s :: ListServerCertificateTagsResponse
s@ListServerCertificateTagsResponse' {} Maybe Bool
a -> ListServerCertificateTagsResponse
s {$sel:isTruncated:ListServerCertificateTagsResponse' :: Maybe Bool
isTruncated = Maybe Bool
a} :: ListServerCertificateTagsResponse)

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

-- | The list of tags that are currently attached to the IAM server
-- certificate. Each tag consists of a key name and an associated value. If
-- no tags are attached to the specified resource, the response contains an
-- empty list.
listServerCertificateTagsResponse_tags :: Lens.Lens' ListServerCertificateTagsResponse [Tag]
listServerCertificateTagsResponse_tags :: ([Tag] -> f [Tag])
-> ListServerCertificateTagsResponse
-> f ListServerCertificateTagsResponse
listServerCertificateTagsResponse_tags = (ListServerCertificateTagsResponse -> [Tag])
-> (ListServerCertificateTagsResponse
    -> [Tag] -> ListServerCertificateTagsResponse)
-> Lens
     ListServerCertificateTagsResponse
     ListServerCertificateTagsResponse
     [Tag]
     [Tag]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListServerCertificateTagsResponse' {[Tag]
tags :: [Tag]
$sel:tags:ListServerCertificateTagsResponse' :: ListServerCertificateTagsResponse -> [Tag]
tags} -> [Tag]
tags) (\s :: ListServerCertificateTagsResponse
s@ListServerCertificateTagsResponse' {} [Tag]
a -> ListServerCertificateTagsResponse
s {$sel:tags:ListServerCertificateTagsResponse' :: [Tag]
tags = [Tag]
a} :: ListServerCertificateTagsResponse) (([Tag] -> f [Tag])
 -> ListServerCertificateTagsResponse
 -> f ListServerCertificateTagsResponse)
-> (([Tag] -> f [Tag]) -> [Tag] -> f [Tag])
-> ([Tag] -> f [Tag])
-> ListServerCertificateTagsResponse
-> f ListServerCertificateTagsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Tag] -> f [Tag]) -> [Tag] -> f [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    ListServerCertificateTagsResponse