{-# 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.IoT.CancelCertificateTransfer
(
CancelCertificateTransfer (..),
newCancelCertificateTransfer,
cancelCertificateTransfer_certificateId,
CancelCertificateTransferResponse (..),
newCancelCertificateTransferResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IoT.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 CancelCertificateTransfer = CancelCertificateTransfer'
{
CancelCertificateTransfer -> Text
certificateId :: Prelude.Text
}
deriving (CancelCertificateTransfer -> CancelCertificateTransfer -> Bool
(CancelCertificateTransfer -> CancelCertificateTransfer -> Bool)
-> (CancelCertificateTransfer -> CancelCertificateTransfer -> Bool)
-> Eq CancelCertificateTransfer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CancelCertificateTransfer -> CancelCertificateTransfer -> Bool
$c/= :: CancelCertificateTransfer -> CancelCertificateTransfer -> Bool
== :: CancelCertificateTransfer -> CancelCertificateTransfer -> Bool
$c== :: CancelCertificateTransfer -> CancelCertificateTransfer -> Bool
Prelude.Eq, ReadPrec [CancelCertificateTransfer]
ReadPrec CancelCertificateTransfer
Int -> ReadS CancelCertificateTransfer
ReadS [CancelCertificateTransfer]
(Int -> ReadS CancelCertificateTransfer)
-> ReadS [CancelCertificateTransfer]
-> ReadPrec CancelCertificateTransfer
-> ReadPrec [CancelCertificateTransfer]
-> Read CancelCertificateTransfer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CancelCertificateTransfer]
$creadListPrec :: ReadPrec [CancelCertificateTransfer]
readPrec :: ReadPrec CancelCertificateTransfer
$creadPrec :: ReadPrec CancelCertificateTransfer
readList :: ReadS [CancelCertificateTransfer]
$creadList :: ReadS [CancelCertificateTransfer]
readsPrec :: Int -> ReadS CancelCertificateTransfer
$creadsPrec :: Int -> ReadS CancelCertificateTransfer
Prelude.Read, Int -> CancelCertificateTransfer -> ShowS
[CancelCertificateTransfer] -> ShowS
CancelCertificateTransfer -> String
(Int -> CancelCertificateTransfer -> ShowS)
-> (CancelCertificateTransfer -> String)
-> ([CancelCertificateTransfer] -> ShowS)
-> Show CancelCertificateTransfer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CancelCertificateTransfer] -> ShowS
$cshowList :: [CancelCertificateTransfer] -> ShowS
show :: CancelCertificateTransfer -> String
$cshow :: CancelCertificateTransfer -> String
showsPrec :: Int -> CancelCertificateTransfer -> ShowS
$cshowsPrec :: Int -> CancelCertificateTransfer -> ShowS
Prelude.Show, (forall x.
CancelCertificateTransfer -> Rep CancelCertificateTransfer x)
-> (forall x.
Rep CancelCertificateTransfer x -> CancelCertificateTransfer)
-> Generic CancelCertificateTransfer
forall x.
Rep CancelCertificateTransfer x -> CancelCertificateTransfer
forall x.
CancelCertificateTransfer -> Rep CancelCertificateTransfer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CancelCertificateTransfer x -> CancelCertificateTransfer
$cfrom :: forall x.
CancelCertificateTransfer -> Rep CancelCertificateTransfer x
Prelude.Generic)
newCancelCertificateTransfer ::
Prelude.Text ->
CancelCertificateTransfer
newCancelCertificateTransfer :: Text -> CancelCertificateTransfer
newCancelCertificateTransfer Text
pCertificateId_ =
CancelCertificateTransfer' :: Text -> CancelCertificateTransfer
CancelCertificateTransfer'
{ $sel:certificateId:CancelCertificateTransfer' :: Text
certificateId =
Text
pCertificateId_
}
cancelCertificateTransfer_certificateId :: Lens.Lens' CancelCertificateTransfer Prelude.Text
cancelCertificateTransfer_certificateId :: (Text -> f Text)
-> CancelCertificateTransfer -> f CancelCertificateTransfer
cancelCertificateTransfer_certificateId = (CancelCertificateTransfer -> Text)
-> (CancelCertificateTransfer -> Text -> CancelCertificateTransfer)
-> Lens
CancelCertificateTransfer CancelCertificateTransfer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelCertificateTransfer' {Text
certificateId :: Text
$sel:certificateId:CancelCertificateTransfer' :: CancelCertificateTransfer -> Text
certificateId} -> Text
certificateId) (\s :: CancelCertificateTransfer
s@CancelCertificateTransfer' {} Text
a -> CancelCertificateTransfer
s {$sel:certificateId:CancelCertificateTransfer' :: Text
certificateId = Text
a} :: CancelCertificateTransfer)
instance Core.AWSRequest CancelCertificateTransfer where
type
AWSResponse CancelCertificateTransfer =
CancelCertificateTransferResponse
request :: CancelCertificateTransfer -> Request CancelCertificateTransfer
request = Service
-> CancelCertificateTransfer -> Request CancelCertificateTransfer
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CancelCertificateTransfer
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CancelCertificateTransfer)))
response =
AWSResponse CancelCertificateTransfer
-> Logger
-> Service
-> Proxy CancelCertificateTransfer
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CancelCertificateTransfer)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse CancelCertificateTransfer
CancelCertificateTransferResponse
CancelCertificateTransferResponse'
instance Prelude.Hashable CancelCertificateTransfer
instance Prelude.NFData CancelCertificateTransfer
instance Core.ToHeaders CancelCertificateTransfer where
toHeaders :: CancelCertificateTransfer -> [Header]
toHeaders = [Header] -> CancelCertificateTransfer -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON CancelCertificateTransfer where
toJSON :: CancelCertificateTransfer -> Value
toJSON = Value -> CancelCertificateTransfer -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)
instance Core.ToPath CancelCertificateTransfer where
toPath :: CancelCertificateTransfer -> ByteString
toPath CancelCertificateTransfer' {Text
certificateId :: Text
$sel:certificateId:CancelCertificateTransfer' :: CancelCertificateTransfer -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/cancel-certificate-transfer/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
certificateId
]
instance Core.ToQuery CancelCertificateTransfer where
toQuery :: CancelCertificateTransfer -> QueryString
toQuery = QueryString -> CancelCertificateTransfer -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CancelCertificateTransferResponse = CancelCertificateTransferResponse'
{
}
deriving (CancelCertificateTransferResponse
-> CancelCertificateTransferResponse -> Bool
(CancelCertificateTransferResponse
-> CancelCertificateTransferResponse -> Bool)
-> (CancelCertificateTransferResponse
-> CancelCertificateTransferResponse -> Bool)
-> Eq CancelCertificateTransferResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CancelCertificateTransferResponse
-> CancelCertificateTransferResponse -> Bool
$c/= :: CancelCertificateTransferResponse
-> CancelCertificateTransferResponse -> Bool
== :: CancelCertificateTransferResponse
-> CancelCertificateTransferResponse -> Bool
$c== :: CancelCertificateTransferResponse
-> CancelCertificateTransferResponse -> Bool
Prelude.Eq, ReadPrec [CancelCertificateTransferResponse]
ReadPrec CancelCertificateTransferResponse
Int -> ReadS CancelCertificateTransferResponse
ReadS [CancelCertificateTransferResponse]
(Int -> ReadS CancelCertificateTransferResponse)
-> ReadS [CancelCertificateTransferResponse]
-> ReadPrec CancelCertificateTransferResponse
-> ReadPrec [CancelCertificateTransferResponse]
-> Read CancelCertificateTransferResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CancelCertificateTransferResponse]
$creadListPrec :: ReadPrec [CancelCertificateTransferResponse]
readPrec :: ReadPrec CancelCertificateTransferResponse
$creadPrec :: ReadPrec CancelCertificateTransferResponse
readList :: ReadS [CancelCertificateTransferResponse]
$creadList :: ReadS [CancelCertificateTransferResponse]
readsPrec :: Int -> ReadS CancelCertificateTransferResponse
$creadsPrec :: Int -> ReadS CancelCertificateTransferResponse
Prelude.Read, Int -> CancelCertificateTransferResponse -> ShowS
[CancelCertificateTransferResponse] -> ShowS
CancelCertificateTransferResponse -> String
(Int -> CancelCertificateTransferResponse -> ShowS)
-> (CancelCertificateTransferResponse -> String)
-> ([CancelCertificateTransferResponse] -> ShowS)
-> Show CancelCertificateTransferResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CancelCertificateTransferResponse] -> ShowS
$cshowList :: [CancelCertificateTransferResponse] -> ShowS
show :: CancelCertificateTransferResponse -> String
$cshow :: CancelCertificateTransferResponse -> String
showsPrec :: Int -> CancelCertificateTransferResponse -> ShowS
$cshowsPrec :: Int -> CancelCertificateTransferResponse -> ShowS
Prelude.Show, (forall x.
CancelCertificateTransferResponse
-> Rep CancelCertificateTransferResponse x)
-> (forall x.
Rep CancelCertificateTransferResponse x
-> CancelCertificateTransferResponse)
-> Generic CancelCertificateTransferResponse
forall x.
Rep CancelCertificateTransferResponse x
-> CancelCertificateTransferResponse
forall x.
CancelCertificateTransferResponse
-> Rep CancelCertificateTransferResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CancelCertificateTransferResponse x
-> CancelCertificateTransferResponse
$cfrom :: forall x.
CancelCertificateTransferResponse
-> Rep CancelCertificateTransferResponse x
Prelude.Generic)
newCancelCertificateTransferResponse ::
CancelCertificateTransferResponse
newCancelCertificateTransferResponse :: CancelCertificateTransferResponse
newCancelCertificateTransferResponse =
CancelCertificateTransferResponse
CancelCertificateTransferResponse'
instance
Prelude.NFData
CancelCertificateTransferResponse