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