{-# 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.TagServerCertificate
(
TagServerCertificate (..),
newTagServerCertificate,
tagServerCertificate_serverCertificateName,
tagServerCertificate_tags,
TagServerCertificateResponse (..),
newTagServerCertificateResponse,
)
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
data TagServerCertificate = TagServerCertificate'
{
TagServerCertificate -> Text
serverCertificateName :: Prelude.Text,
TagServerCertificate -> [Tag]
tags :: [Tag]
}
deriving (TagServerCertificate -> TagServerCertificate -> Bool
(TagServerCertificate -> TagServerCertificate -> Bool)
-> (TagServerCertificate -> TagServerCertificate -> Bool)
-> Eq TagServerCertificate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TagServerCertificate -> TagServerCertificate -> Bool
$c/= :: TagServerCertificate -> TagServerCertificate -> Bool
== :: TagServerCertificate -> TagServerCertificate -> Bool
$c== :: TagServerCertificate -> TagServerCertificate -> Bool
Prelude.Eq, ReadPrec [TagServerCertificate]
ReadPrec TagServerCertificate
Int -> ReadS TagServerCertificate
ReadS [TagServerCertificate]
(Int -> ReadS TagServerCertificate)
-> ReadS [TagServerCertificate]
-> ReadPrec TagServerCertificate
-> ReadPrec [TagServerCertificate]
-> Read TagServerCertificate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TagServerCertificate]
$creadListPrec :: ReadPrec [TagServerCertificate]
readPrec :: ReadPrec TagServerCertificate
$creadPrec :: ReadPrec TagServerCertificate
readList :: ReadS [TagServerCertificate]
$creadList :: ReadS [TagServerCertificate]
readsPrec :: Int -> ReadS TagServerCertificate
$creadsPrec :: Int -> ReadS TagServerCertificate
Prelude.Read, Int -> TagServerCertificate -> ShowS
[TagServerCertificate] -> ShowS
TagServerCertificate -> String
(Int -> TagServerCertificate -> ShowS)
-> (TagServerCertificate -> String)
-> ([TagServerCertificate] -> ShowS)
-> Show TagServerCertificate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TagServerCertificate] -> ShowS
$cshowList :: [TagServerCertificate] -> ShowS
show :: TagServerCertificate -> String
$cshow :: TagServerCertificate -> String
showsPrec :: Int -> TagServerCertificate -> ShowS
$cshowsPrec :: Int -> TagServerCertificate -> ShowS
Prelude.Show, (forall x. TagServerCertificate -> Rep TagServerCertificate x)
-> (forall x. Rep TagServerCertificate x -> TagServerCertificate)
-> Generic TagServerCertificate
forall x. Rep TagServerCertificate x -> TagServerCertificate
forall x. TagServerCertificate -> Rep TagServerCertificate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TagServerCertificate x -> TagServerCertificate
$cfrom :: forall x. TagServerCertificate -> Rep TagServerCertificate x
Prelude.Generic)
newTagServerCertificate ::
Prelude.Text ->
TagServerCertificate
newTagServerCertificate :: Text -> TagServerCertificate
newTagServerCertificate Text
pServerCertificateName_ =
TagServerCertificate' :: Text -> [Tag] -> TagServerCertificate
TagServerCertificate'
{ $sel:serverCertificateName:TagServerCertificate' :: Text
serverCertificateName =
Text
pServerCertificateName_,
$sel:tags:TagServerCertificate' :: [Tag]
tags = [Tag]
forall a. Monoid a => a
Prelude.mempty
}
tagServerCertificate_serverCertificateName :: Lens.Lens' TagServerCertificate Prelude.Text
tagServerCertificate_serverCertificateName :: (Text -> f Text) -> TagServerCertificate -> f TagServerCertificate
tagServerCertificate_serverCertificateName = (TagServerCertificate -> Text)
-> (TagServerCertificate -> Text -> TagServerCertificate)
-> Lens TagServerCertificate TagServerCertificate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagServerCertificate' {Text
serverCertificateName :: Text
$sel:serverCertificateName:TagServerCertificate' :: TagServerCertificate -> Text
serverCertificateName} -> Text
serverCertificateName) (\s :: TagServerCertificate
s@TagServerCertificate' {} Text
a -> TagServerCertificate
s {$sel:serverCertificateName:TagServerCertificate' :: Text
serverCertificateName = Text
a} :: TagServerCertificate)
tagServerCertificate_tags :: Lens.Lens' TagServerCertificate [Tag]
tagServerCertificate_tags :: ([Tag] -> f [Tag])
-> TagServerCertificate -> f TagServerCertificate
tagServerCertificate_tags = (TagServerCertificate -> [Tag])
-> (TagServerCertificate -> [Tag] -> TagServerCertificate)
-> Lens TagServerCertificate TagServerCertificate [Tag] [Tag]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagServerCertificate' {[Tag]
tags :: [Tag]
$sel:tags:TagServerCertificate' :: TagServerCertificate -> [Tag]
tags} -> [Tag]
tags) (\s :: TagServerCertificate
s@TagServerCertificate' {} [Tag]
a -> TagServerCertificate
s {$sel:tags:TagServerCertificate' :: [Tag]
tags = [Tag]
a} :: TagServerCertificate) (([Tag] -> f [Tag])
-> TagServerCertificate -> f TagServerCertificate)
-> (([Tag] -> f [Tag]) -> [Tag] -> f [Tag])
-> ([Tag] -> f [Tag])
-> TagServerCertificate
-> f TagServerCertificate
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 Core.AWSRequest TagServerCertificate where
type
AWSResponse TagServerCertificate =
TagServerCertificateResponse
request :: TagServerCertificate -> Request TagServerCertificate
request = Service -> TagServerCertificate -> Request TagServerCertificate
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy TagServerCertificate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse TagServerCertificate)))
response =
AWSResponse TagServerCertificate
-> Logger
-> Service
-> Proxy TagServerCertificate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse TagServerCertificate)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse TagServerCertificate
TagServerCertificateResponse
TagServerCertificateResponse'
instance Prelude.Hashable TagServerCertificate
instance Prelude.NFData TagServerCertificate
instance Core.ToHeaders TagServerCertificate where
toHeaders :: TagServerCertificate -> [Header]
toHeaders = [Header] -> TagServerCertificate -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath TagServerCertificate where
toPath :: TagServerCertificate -> ByteString
toPath = ByteString -> TagServerCertificate -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery TagServerCertificate where
toQuery :: TagServerCertificate -> QueryString
toQuery TagServerCertificate' {[Tag]
Text
tags :: [Tag]
serverCertificateName :: Text
$sel:tags:TagServerCertificate' :: TagServerCertificate -> [Tag]
$sel:serverCertificateName:TagServerCertificate' :: TagServerCertificate -> 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
"TagServerCertificate" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
ByteString
"ServerCertificateName"
ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
serverCertificateName,
ByteString
"Tags" ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" [Tag]
tags
]
data TagServerCertificateResponse = TagServerCertificateResponse'
{
}
deriving (TagServerCertificateResponse
-> TagServerCertificateResponse -> Bool
(TagServerCertificateResponse
-> TagServerCertificateResponse -> Bool)
-> (TagServerCertificateResponse
-> TagServerCertificateResponse -> Bool)
-> Eq TagServerCertificateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TagServerCertificateResponse
-> TagServerCertificateResponse -> Bool
$c/= :: TagServerCertificateResponse
-> TagServerCertificateResponse -> Bool
== :: TagServerCertificateResponse
-> TagServerCertificateResponse -> Bool
$c== :: TagServerCertificateResponse
-> TagServerCertificateResponse -> Bool
Prelude.Eq, ReadPrec [TagServerCertificateResponse]
ReadPrec TagServerCertificateResponse
Int -> ReadS TagServerCertificateResponse
ReadS [TagServerCertificateResponse]
(Int -> ReadS TagServerCertificateResponse)
-> ReadS [TagServerCertificateResponse]
-> ReadPrec TagServerCertificateResponse
-> ReadPrec [TagServerCertificateResponse]
-> Read TagServerCertificateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TagServerCertificateResponse]
$creadListPrec :: ReadPrec [TagServerCertificateResponse]
readPrec :: ReadPrec TagServerCertificateResponse
$creadPrec :: ReadPrec TagServerCertificateResponse
readList :: ReadS [TagServerCertificateResponse]
$creadList :: ReadS [TagServerCertificateResponse]
readsPrec :: Int -> ReadS TagServerCertificateResponse
$creadsPrec :: Int -> ReadS TagServerCertificateResponse
Prelude.Read, Int -> TagServerCertificateResponse -> ShowS
[TagServerCertificateResponse] -> ShowS
TagServerCertificateResponse -> String
(Int -> TagServerCertificateResponse -> ShowS)
-> (TagServerCertificateResponse -> String)
-> ([TagServerCertificateResponse] -> ShowS)
-> Show TagServerCertificateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TagServerCertificateResponse] -> ShowS
$cshowList :: [TagServerCertificateResponse] -> ShowS
show :: TagServerCertificateResponse -> String
$cshow :: TagServerCertificateResponse -> String
showsPrec :: Int -> TagServerCertificateResponse -> ShowS
$cshowsPrec :: Int -> TagServerCertificateResponse -> ShowS
Prelude.Show, (forall x.
TagServerCertificateResponse -> Rep TagServerCertificateResponse x)
-> (forall x.
Rep TagServerCertificateResponse x -> TagServerCertificateResponse)
-> Generic TagServerCertificateResponse
forall x.
Rep TagServerCertificateResponse x -> TagServerCertificateResponse
forall x.
TagServerCertificateResponse -> Rep TagServerCertificateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TagServerCertificateResponse x -> TagServerCertificateResponse
$cfrom :: forall x.
TagServerCertificateResponse -> Rep TagServerCertificateResponse x
Prelude.Generic)
newTagServerCertificateResponse ::
TagServerCertificateResponse
newTagServerCertificateResponse :: TagServerCertificateResponse
newTagServerCertificateResponse =
TagServerCertificateResponse
TagServerCertificateResponse'
instance Prelude.NFData TagServerCertificateResponse