{-# 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.CertificateManager.RenewCertificate
(
RenewCertificate (..),
newRenewCertificate,
renewCertificate_certificateArn,
RenewCertificateResponse (..),
newRenewCertificateResponse,
)
where
import Amazonka.CertificateManager.Types
import qualified Amazonka.Core as Core
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 RenewCertificate = RenewCertificate'
{
RenewCertificate -> Text
certificateArn :: Prelude.Text
}
deriving (RenewCertificate -> RenewCertificate -> Bool
(RenewCertificate -> RenewCertificate -> Bool)
-> (RenewCertificate -> RenewCertificate -> Bool)
-> Eq RenewCertificate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RenewCertificate -> RenewCertificate -> Bool
$c/= :: RenewCertificate -> RenewCertificate -> Bool
== :: RenewCertificate -> RenewCertificate -> Bool
$c== :: RenewCertificate -> RenewCertificate -> Bool
Prelude.Eq, ReadPrec [RenewCertificate]
ReadPrec RenewCertificate
Int -> ReadS RenewCertificate
ReadS [RenewCertificate]
(Int -> ReadS RenewCertificate)
-> ReadS [RenewCertificate]
-> ReadPrec RenewCertificate
-> ReadPrec [RenewCertificate]
-> Read RenewCertificate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RenewCertificate]
$creadListPrec :: ReadPrec [RenewCertificate]
readPrec :: ReadPrec RenewCertificate
$creadPrec :: ReadPrec RenewCertificate
readList :: ReadS [RenewCertificate]
$creadList :: ReadS [RenewCertificate]
readsPrec :: Int -> ReadS RenewCertificate
$creadsPrec :: Int -> ReadS RenewCertificate
Prelude.Read, Int -> RenewCertificate -> ShowS
[RenewCertificate] -> ShowS
RenewCertificate -> String
(Int -> RenewCertificate -> ShowS)
-> (RenewCertificate -> String)
-> ([RenewCertificate] -> ShowS)
-> Show RenewCertificate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RenewCertificate] -> ShowS
$cshowList :: [RenewCertificate] -> ShowS
show :: RenewCertificate -> String
$cshow :: RenewCertificate -> String
showsPrec :: Int -> RenewCertificate -> ShowS
$cshowsPrec :: Int -> RenewCertificate -> ShowS
Prelude.Show, (forall x. RenewCertificate -> Rep RenewCertificate x)
-> (forall x. Rep RenewCertificate x -> RenewCertificate)
-> Generic RenewCertificate
forall x. Rep RenewCertificate x -> RenewCertificate
forall x. RenewCertificate -> Rep RenewCertificate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RenewCertificate x -> RenewCertificate
$cfrom :: forall x. RenewCertificate -> Rep RenewCertificate x
Prelude.Generic)
newRenewCertificate ::
Prelude.Text ->
RenewCertificate
newRenewCertificate :: Text -> RenewCertificate
newRenewCertificate Text
pCertificateArn_ =
RenewCertificate' :: Text -> RenewCertificate
RenewCertificate'
{ $sel:certificateArn:RenewCertificate' :: Text
certificateArn =
Text
pCertificateArn_
}
renewCertificate_certificateArn :: Lens.Lens' RenewCertificate Prelude.Text
renewCertificate_certificateArn :: (Text -> f Text) -> RenewCertificate -> f RenewCertificate
renewCertificate_certificateArn = (RenewCertificate -> Text)
-> (RenewCertificate -> Text -> RenewCertificate)
-> Lens RenewCertificate RenewCertificate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RenewCertificate' {Text
certificateArn :: Text
$sel:certificateArn:RenewCertificate' :: RenewCertificate -> Text
certificateArn} -> Text
certificateArn) (\s :: RenewCertificate
s@RenewCertificate' {} Text
a -> RenewCertificate
s {$sel:certificateArn:RenewCertificate' :: Text
certificateArn = Text
a} :: RenewCertificate)
instance Core.AWSRequest RenewCertificate where
type
AWSResponse RenewCertificate =
RenewCertificateResponse
request :: RenewCertificate -> Request RenewCertificate
request = Service -> RenewCertificate -> Request RenewCertificate
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy RenewCertificate
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RenewCertificate)))
response =
AWSResponse RenewCertificate
-> Logger
-> Service
-> Proxy RenewCertificate
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RenewCertificate)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse RenewCertificate
RenewCertificateResponse
RenewCertificateResponse'
instance Prelude.Hashable RenewCertificate
instance Prelude.NFData RenewCertificate
instance Core.ToHeaders RenewCertificate where
toHeaders :: RenewCertificate -> [Header]
toHeaders =
[Header] -> RenewCertificate -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"CertificateManager.RenewCertificate" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON RenewCertificate where
toJSON :: RenewCertificate -> Value
toJSON RenewCertificate' {Text
certificateArn :: Text
$sel:certificateArn:RenewCertificate' :: RenewCertificate -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"CertificateArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
certificateArn)
]
)
instance Core.ToPath RenewCertificate where
toPath :: RenewCertificate -> ByteString
toPath = ByteString -> RenewCertificate -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery RenewCertificate where
toQuery :: RenewCertificate -> QueryString
toQuery = QueryString -> RenewCertificate -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data RenewCertificateResponse = RenewCertificateResponse'
{
}
deriving (RenewCertificateResponse -> RenewCertificateResponse -> Bool
(RenewCertificateResponse -> RenewCertificateResponse -> Bool)
-> (RenewCertificateResponse -> RenewCertificateResponse -> Bool)
-> Eq RenewCertificateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RenewCertificateResponse -> RenewCertificateResponse -> Bool
$c/= :: RenewCertificateResponse -> RenewCertificateResponse -> Bool
== :: RenewCertificateResponse -> RenewCertificateResponse -> Bool
$c== :: RenewCertificateResponse -> RenewCertificateResponse -> Bool
Prelude.Eq, ReadPrec [RenewCertificateResponse]
ReadPrec RenewCertificateResponse
Int -> ReadS RenewCertificateResponse
ReadS [RenewCertificateResponse]
(Int -> ReadS RenewCertificateResponse)
-> ReadS [RenewCertificateResponse]
-> ReadPrec RenewCertificateResponse
-> ReadPrec [RenewCertificateResponse]
-> Read RenewCertificateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RenewCertificateResponse]
$creadListPrec :: ReadPrec [RenewCertificateResponse]
readPrec :: ReadPrec RenewCertificateResponse
$creadPrec :: ReadPrec RenewCertificateResponse
readList :: ReadS [RenewCertificateResponse]
$creadList :: ReadS [RenewCertificateResponse]
readsPrec :: Int -> ReadS RenewCertificateResponse
$creadsPrec :: Int -> ReadS RenewCertificateResponse
Prelude.Read, Int -> RenewCertificateResponse -> ShowS
[RenewCertificateResponse] -> ShowS
RenewCertificateResponse -> String
(Int -> RenewCertificateResponse -> ShowS)
-> (RenewCertificateResponse -> String)
-> ([RenewCertificateResponse] -> ShowS)
-> Show RenewCertificateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RenewCertificateResponse] -> ShowS
$cshowList :: [RenewCertificateResponse] -> ShowS
show :: RenewCertificateResponse -> String
$cshow :: RenewCertificateResponse -> String
showsPrec :: Int -> RenewCertificateResponse -> ShowS
$cshowsPrec :: Int -> RenewCertificateResponse -> ShowS
Prelude.Show, (forall x.
RenewCertificateResponse -> Rep RenewCertificateResponse x)
-> (forall x.
Rep RenewCertificateResponse x -> RenewCertificateResponse)
-> Generic RenewCertificateResponse
forall x.
Rep RenewCertificateResponse x -> RenewCertificateResponse
forall x.
RenewCertificateResponse -> Rep RenewCertificateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RenewCertificateResponse x -> RenewCertificateResponse
$cfrom :: forall x.
RenewCertificateResponse -> Rep RenewCertificateResponse x
Prelude.Generic)
newRenewCertificateResponse ::
RenewCertificateResponse
newRenewCertificateResponse :: RenewCertificateResponse
newRenewCertificateResponse =
RenewCertificateResponse
RenewCertificateResponse'
instance Prelude.NFData RenewCertificateResponse