{-# 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 #-}
module Amazonka.IAM.ListServerCertificateTags
(
ListServerCertificateTags (..),
newListServerCertificateTags,
listServerCertificateTags_marker,
listServerCertificateTags_maxItems,
listServerCertificateTags_serverCertificateName,
ListServerCertificateTagsResponse (..),
newListServerCertificateTagsResponse,
listServerCertificateTagsResponse_isTruncated,
listServerCertificateTagsResponse_marker,
listServerCertificateTagsResponse_httpStatus,
listServerCertificateTagsResponse_tags,
)
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
data ListServerCertificateTags = ListServerCertificateTags'
{
ListServerCertificateTags -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListServerCertificateTags -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
ListServerCertificateTags -> Text
serverCertificateName :: Prelude.Text
}
deriving (ListServerCertificateTags -> ListServerCertificateTags -> Bool
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]
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
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.
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)
newListServerCertificateTags ::
Prelude.Text ->
ListServerCertificateTags
newListServerCertificateTags :: Text -> ListServerCertificateTags
newListServerCertificateTags Text
pServerCertificateName_ =
ListServerCertificateTags'
{ $sel:marker:ListServerCertificateTags' :: Maybe Text
marker =
forall a. Maybe a
Prelude.Nothing,
$sel:maxItems:ListServerCertificateTags' :: Maybe Natural
maxItems = forall a. Maybe a
Prelude.Nothing,
$sel:serverCertificateName:ListServerCertificateTags' :: Text
serverCertificateName = Text
pServerCertificateName_
}
listServerCertificateTags_marker :: Lens.Lens' ListServerCertificateTags (Prelude.Maybe Prelude.Text)
listServerCertificateTags_marker :: Lens' ListServerCertificateTags (Maybe Text)
listServerCertificateTags_marker = 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)
listServerCertificateTags_maxItems :: Lens.Lens' ListServerCertificateTags (Prelude.Maybe Prelude.Natural)
listServerCertificateTags_maxItems :: Lens' ListServerCertificateTags (Maybe Natural)
listServerCertificateTags_maxItems = 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)
listServerCertificateTags_serverCertificateName :: Lens.Lens' ListServerCertificateTags Prelude.Text
listServerCertificateTags_serverCertificateName :: Lens' ListServerCertificateTags Text
listServerCertificateTags_serverCertificateName = 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 :: (Service -> Service)
-> ListServerCertificateTags -> Request ListServerCertificateTags
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 ListServerCertificateTags
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListServerCertificateTags)))
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
"ListServerCertificateTagsResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Bool
-> Maybe Text -> Int -> [Tag] -> ListServerCertificateTagsResponse
ListServerCertificateTagsResponse'
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
"Tags"
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 ListServerCertificateTags where
hashWithSalt :: Int -> ListServerCertificateTags -> Int
hashWithSalt Int
_salt 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
..} =
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` Text
serverCertificateName
instance Prelude.NFData ListServerCertificateTags where
rnf :: ListServerCertificateTags -> ()
rnf 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
..} =
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 Text
serverCertificateName
instance Data.ToHeaders ListServerCertificateTags where
toHeaders :: ListServerCertificateTags -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath ListServerCertificateTags where
toPath :: ListServerCertificateTags -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.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
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ListServerCertificateTags" :: 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
"ServerCertificateName"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
serverCertificateName
]
data ListServerCertificateTagsResponse = ListServerCertificateTagsResponse'
{
ListServerCertificateTagsResponse -> Maybe Bool
isTruncated :: Prelude.Maybe Prelude.Bool,
ListServerCertificateTagsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListServerCertificateTagsResponse -> Int
httpStatus :: Prelude.Int,
ListServerCertificateTagsResponse -> [Tag]
tags :: [Tag]
}
deriving (ListServerCertificateTagsResponse
-> ListServerCertificateTagsResponse -> Bool
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]
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
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.
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)
newListServerCertificateTagsResponse ::
Prelude.Int ->
ListServerCertificateTagsResponse
newListServerCertificateTagsResponse :: Int -> ListServerCertificateTagsResponse
newListServerCertificateTagsResponse Int
pHttpStatus_ =
ListServerCertificateTagsResponse'
{ $sel:isTruncated:ListServerCertificateTagsResponse' :: Maybe Bool
isTruncated =
forall a. Maybe a
Prelude.Nothing,
$sel:marker:ListServerCertificateTagsResponse' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListServerCertificateTagsResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:tags:ListServerCertificateTagsResponse' :: [Tag]
tags = forall a. Monoid a => a
Prelude.mempty
}
listServerCertificateTagsResponse_isTruncated :: Lens.Lens' ListServerCertificateTagsResponse (Prelude.Maybe Prelude.Bool)
listServerCertificateTagsResponse_isTruncated :: Lens' ListServerCertificateTagsResponse (Maybe Bool)
listServerCertificateTagsResponse_isTruncated = 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)
listServerCertificateTagsResponse_marker :: Lens.Lens' ListServerCertificateTagsResponse (Prelude.Maybe Prelude.Text)
listServerCertificateTagsResponse_marker :: Lens' ListServerCertificateTagsResponse (Maybe Text)
listServerCertificateTagsResponse_marker = 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)
listServerCertificateTagsResponse_httpStatus :: Lens.Lens' ListServerCertificateTagsResponse Prelude.Int
listServerCertificateTagsResponse_httpStatus :: Lens' ListServerCertificateTagsResponse Int
listServerCertificateTagsResponse_httpStatus = 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)
listServerCertificateTagsResponse_tags :: Lens.Lens' ListServerCertificateTagsResponse [Tag]
listServerCertificateTagsResponse_tags :: Lens' ListServerCertificateTagsResponse [Tag]
listServerCertificateTagsResponse_tags = 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) 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
ListServerCertificateTagsResponse
where
rnf :: ListServerCertificateTagsResponse -> ()
rnf ListServerCertificateTagsResponse' {Int
[Tag]
Maybe Bool
Maybe Text
tags :: [Tag]
httpStatus :: Int
marker :: Maybe Text
isTruncated :: Maybe Bool
$sel:tags:ListServerCertificateTagsResponse' :: ListServerCertificateTagsResponse -> [Tag]
$sel:httpStatus:ListServerCertificateTagsResponse' :: ListServerCertificateTagsResponse -> Int
$sel:marker:ListServerCertificateTagsResponse' :: ListServerCertificateTagsResponse -> Maybe Text
$sel:isTruncated:ListServerCertificateTagsResponse' :: ListServerCertificateTagsResponse -> 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 [Tag]
tags