{-# 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 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 TagServerCertificate = TagServerCertificate'
{
TagServerCertificate -> Text
serverCertificateName :: Prelude.Text,
TagServerCertificate -> [Tag]
tags :: [Tag]
}
deriving (TagServerCertificate -> TagServerCertificate -> Bool
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]
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
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. 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'
{ $sel:serverCertificateName:TagServerCertificate' :: Text
serverCertificateName =
Text
pServerCertificateName_,
$sel:tags:TagServerCertificate' :: [Tag]
tags = forall a. Monoid a => a
Prelude.mempty
}
tagServerCertificate_serverCertificateName :: Lens.Lens' TagServerCertificate Prelude.Text
tagServerCertificate_serverCertificateName :: Lens' TagServerCertificate Text
tagServerCertificate_serverCertificateName = 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 :: Lens' TagServerCertificate [Tag]
tagServerCertificate_tags = 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) 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 Core.AWSRequest TagServerCertificate where
type
AWSResponse TagServerCertificate =
TagServerCertificateResponse
request :: (Service -> Service)
-> TagServerCertificate -> Request TagServerCertificate
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 TagServerCertificate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse TagServerCertificate)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull TagServerCertificateResponse
TagServerCertificateResponse'
instance Prelude.Hashable TagServerCertificate where
hashWithSalt :: Int -> TagServerCertificate -> Int
hashWithSalt Int
_salt TagServerCertificate' {[Tag]
Text
tags :: [Tag]
serverCertificateName :: Text
$sel:tags:TagServerCertificate' :: TagServerCertificate -> [Tag]
$sel:serverCertificateName:TagServerCertificate' :: TagServerCertificate -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
serverCertificateName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Tag]
tags
instance Prelude.NFData TagServerCertificate where
rnf :: TagServerCertificate -> ()
rnf TagServerCertificate' {[Tag]
Text
tags :: [Tag]
serverCertificateName :: Text
$sel:tags:TagServerCertificate' :: TagServerCertificate -> [Tag]
$sel:serverCertificateName:TagServerCertificate' :: TagServerCertificate -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
serverCertificateName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Tag]
tags
instance Data.ToHeaders TagServerCertificate where
toHeaders :: TagServerCertificate -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath TagServerCertificate where
toPath :: TagServerCertificate -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery TagServerCertificate where
toQuery :: TagServerCertificate -> QueryString
toQuery TagServerCertificate' {[Tag]
Text
tags :: [Tag]
serverCertificateName :: Text
$sel:tags:TagServerCertificate' :: TagServerCertificate -> [Tag]
$sel:serverCertificateName:TagServerCertificate' :: TagServerCertificate -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"TagServerCertificate" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
ByteString
"ServerCertificateName"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
serverCertificateName,
ByteString
"Tags" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" [Tag]
tags
]
data TagServerCertificateResponse = TagServerCertificateResponse'
{
}
deriving (TagServerCertificateResponse
-> TagServerCertificateResponse -> Bool
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]
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
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.
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 where
rnf :: TagServerCertificateResponse -> ()
rnf TagServerCertificateResponse
_ = ()