{-# 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.UpdateServerCertificate
(
UpdateServerCertificate (..),
newUpdateServerCertificate,
updateServerCertificate_newPath,
updateServerCertificate_newServerCertificateName,
updateServerCertificate_serverCertificateName,
UpdateServerCertificateResponse (..),
newUpdateServerCertificateResponse,
)
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 UpdateServerCertificate = UpdateServerCertificate'
{
UpdateServerCertificate -> Maybe Text
newPath' :: Prelude.Maybe Prelude.Text,
UpdateServerCertificate -> Maybe Text
newServerCertificateName' :: Prelude.Maybe Prelude.Text,
UpdateServerCertificate -> Text
serverCertificateName :: Prelude.Text
}
deriving (UpdateServerCertificate -> UpdateServerCertificate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateServerCertificate -> UpdateServerCertificate -> Bool
$c/= :: UpdateServerCertificate -> UpdateServerCertificate -> Bool
== :: UpdateServerCertificate -> UpdateServerCertificate -> Bool
$c== :: UpdateServerCertificate -> UpdateServerCertificate -> Bool
Prelude.Eq, ReadPrec [UpdateServerCertificate]
ReadPrec UpdateServerCertificate
Int -> ReadS UpdateServerCertificate
ReadS [UpdateServerCertificate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateServerCertificate]
$creadListPrec :: ReadPrec [UpdateServerCertificate]
readPrec :: ReadPrec UpdateServerCertificate
$creadPrec :: ReadPrec UpdateServerCertificate
readList :: ReadS [UpdateServerCertificate]
$creadList :: ReadS [UpdateServerCertificate]
readsPrec :: Int -> ReadS UpdateServerCertificate
$creadsPrec :: Int -> ReadS UpdateServerCertificate
Prelude.Read, Int -> UpdateServerCertificate -> ShowS
[UpdateServerCertificate] -> ShowS
UpdateServerCertificate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateServerCertificate] -> ShowS
$cshowList :: [UpdateServerCertificate] -> ShowS
show :: UpdateServerCertificate -> String
$cshow :: UpdateServerCertificate -> String
showsPrec :: Int -> UpdateServerCertificate -> ShowS
$cshowsPrec :: Int -> UpdateServerCertificate -> ShowS
Prelude.Show, forall x. Rep UpdateServerCertificate x -> UpdateServerCertificate
forall x. UpdateServerCertificate -> Rep UpdateServerCertificate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateServerCertificate x -> UpdateServerCertificate
$cfrom :: forall x. UpdateServerCertificate -> Rep UpdateServerCertificate x
Prelude.Generic)
newUpdateServerCertificate ::
Prelude.Text ->
UpdateServerCertificate
newUpdateServerCertificate :: Text -> UpdateServerCertificate
newUpdateServerCertificate Text
pServerCertificateName_ =
UpdateServerCertificate'
{ $sel:newPath':UpdateServerCertificate' :: Maybe Text
newPath' =
forall a. Maybe a
Prelude.Nothing,
$sel:newServerCertificateName':UpdateServerCertificate' :: Maybe Text
newServerCertificateName' = forall a. Maybe a
Prelude.Nothing,
$sel:serverCertificateName:UpdateServerCertificate' :: Text
serverCertificateName = Text
pServerCertificateName_
}
updateServerCertificate_newPath :: Lens.Lens' UpdateServerCertificate (Prelude.Maybe Prelude.Text)
updateServerCertificate_newPath :: Lens' UpdateServerCertificate (Maybe Text)
updateServerCertificate_newPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServerCertificate' {Maybe Text
newPath' :: Maybe Text
$sel:newPath':UpdateServerCertificate' :: UpdateServerCertificate -> Maybe Text
newPath'} -> Maybe Text
newPath') (\s :: UpdateServerCertificate
s@UpdateServerCertificate' {} Maybe Text
a -> UpdateServerCertificate
s {$sel:newPath':UpdateServerCertificate' :: Maybe Text
newPath' = Maybe Text
a} :: UpdateServerCertificate)
updateServerCertificate_newServerCertificateName :: Lens.Lens' UpdateServerCertificate (Prelude.Maybe Prelude.Text)
updateServerCertificate_newServerCertificateName :: Lens' UpdateServerCertificate (Maybe Text)
updateServerCertificate_newServerCertificateName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServerCertificate' {Maybe Text
newServerCertificateName' :: Maybe Text
$sel:newServerCertificateName':UpdateServerCertificate' :: UpdateServerCertificate -> Maybe Text
newServerCertificateName'} -> Maybe Text
newServerCertificateName') (\s :: UpdateServerCertificate
s@UpdateServerCertificate' {} Maybe Text
a -> UpdateServerCertificate
s {$sel:newServerCertificateName':UpdateServerCertificate' :: Maybe Text
newServerCertificateName' = Maybe Text
a} :: UpdateServerCertificate)
updateServerCertificate_serverCertificateName :: Lens.Lens' UpdateServerCertificate Prelude.Text
updateServerCertificate_serverCertificateName :: Lens' UpdateServerCertificate Text
updateServerCertificate_serverCertificateName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServerCertificate' {Text
serverCertificateName :: Text
$sel:serverCertificateName:UpdateServerCertificate' :: UpdateServerCertificate -> Text
serverCertificateName} -> Text
serverCertificateName) (\s :: UpdateServerCertificate
s@UpdateServerCertificate' {} Text
a -> UpdateServerCertificate
s {$sel:serverCertificateName:UpdateServerCertificate' :: Text
serverCertificateName = Text
a} :: UpdateServerCertificate)
instance Core.AWSRequest UpdateServerCertificate where
type
AWSResponse UpdateServerCertificate =
UpdateServerCertificateResponse
request :: (Service -> Service)
-> UpdateServerCertificate -> Request UpdateServerCertificate
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 UpdateServerCertificate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateServerCertificate)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
UpdateServerCertificateResponse
UpdateServerCertificateResponse'
instance Prelude.Hashable UpdateServerCertificate where
hashWithSalt :: Int -> UpdateServerCertificate -> Int
hashWithSalt Int
_salt UpdateServerCertificate' {Maybe Text
Text
serverCertificateName :: Text
newServerCertificateName' :: Maybe Text
newPath' :: Maybe Text
$sel:serverCertificateName:UpdateServerCertificate' :: UpdateServerCertificate -> Text
$sel:newServerCertificateName':UpdateServerCertificate' :: UpdateServerCertificate -> Maybe Text
$sel:newPath':UpdateServerCertificate' :: UpdateServerCertificate -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
newPath'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
newServerCertificateName'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
serverCertificateName
instance Prelude.NFData UpdateServerCertificate where
rnf :: UpdateServerCertificate -> ()
rnf UpdateServerCertificate' {Maybe Text
Text
serverCertificateName :: Text
newServerCertificateName' :: Maybe Text
newPath' :: Maybe Text
$sel:serverCertificateName:UpdateServerCertificate' :: UpdateServerCertificate -> Text
$sel:newServerCertificateName':UpdateServerCertificate' :: UpdateServerCertificate -> Maybe Text
$sel:newPath':UpdateServerCertificate' :: UpdateServerCertificate -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
newPath'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
newServerCertificateName'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
serverCertificateName
instance Data.ToHeaders UpdateServerCertificate where
toHeaders :: UpdateServerCertificate -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath UpdateServerCertificate where
toPath :: UpdateServerCertificate -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery UpdateServerCertificate where
toQuery :: UpdateServerCertificate -> QueryString
toQuery UpdateServerCertificate' {Maybe Text
Text
serverCertificateName :: Text
newServerCertificateName' :: Maybe Text
newPath' :: Maybe Text
$sel:serverCertificateName:UpdateServerCertificate' :: UpdateServerCertificate -> Text
$sel:newServerCertificateName':UpdateServerCertificate' :: UpdateServerCertificate -> Maybe Text
$sel:newPath':UpdateServerCertificate' :: UpdateServerCertificate -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"UpdateServerCertificate" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
ByteString
"NewPath" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
newPath',
ByteString
"NewServerCertificateName"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
newServerCertificateName',
ByteString
"ServerCertificateName"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
serverCertificateName
]
data UpdateServerCertificateResponse = UpdateServerCertificateResponse'
{
}
deriving (UpdateServerCertificateResponse
-> UpdateServerCertificateResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateServerCertificateResponse
-> UpdateServerCertificateResponse -> Bool
$c/= :: UpdateServerCertificateResponse
-> UpdateServerCertificateResponse -> Bool
== :: UpdateServerCertificateResponse
-> UpdateServerCertificateResponse -> Bool
$c== :: UpdateServerCertificateResponse
-> UpdateServerCertificateResponse -> Bool
Prelude.Eq, ReadPrec [UpdateServerCertificateResponse]
ReadPrec UpdateServerCertificateResponse
Int -> ReadS UpdateServerCertificateResponse
ReadS [UpdateServerCertificateResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateServerCertificateResponse]
$creadListPrec :: ReadPrec [UpdateServerCertificateResponse]
readPrec :: ReadPrec UpdateServerCertificateResponse
$creadPrec :: ReadPrec UpdateServerCertificateResponse
readList :: ReadS [UpdateServerCertificateResponse]
$creadList :: ReadS [UpdateServerCertificateResponse]
readsPrec :: Int -> ReadS UpdateServerCertificateResponse
$creadsPrec :: Int -> ReadS UpdateServerCertificateResponse
Prelude.Read, Int -> UpdateServerCertificateResponse -> ShowS
[UpdateServerCertificateResponse] -> ShowS
UpdateServerCertificateResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateServerCertificateResponse] -> ShowS
$cshowList :: [UpdateServerCertificateResponse] -> ShowS
show :: UpdateServerCertificateResponse -> String
$cshow :: UpdateServerCertificateResponse -> String
showsPrec :: Int -> UpdateServerCertificateResponse -> ShowS
$cshowsPrec :: Int -> UpdateServerCertificateResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateServerCertificateResponse x
-> UpdateServerCertificateResponse
forall x.
UpdateServerCertificateResponse
-> Rep UpdateServerCertificateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateServerCertificateResponse x
-> UpdateServerCertificateResponse
$cfrom :: forall x.
UpdateServerCertificateResponse
-> Rep UpdateServerCertificateResponse x
Prelude.Generic)
newUpdateServerCertificateResponse ::
UpdateServerCertificateResponse
newUpdateServerCertificateResponse :: UpdateServerCertificateResponse
newUpdateServerCertificateResponse =
UpdateServerCertificateResponse
UpdateServerCertificateResponse'
instance
Prelude.NFData
UpdateServerCertificateResponse
where
rnf :: UpdateServerCertificateResponse -> ()
rnf UpdateServerCertificateResponse
_ = ()