{-# 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.MediaConvert.DisassociateCertificate
(
DisassociateCertificate (..),
newDisassociateCertificate,
disassociateCertificate_arn,
DisassociateCertificateResponse (..),
newDisassociateCertificateResponse,
disassociateCertificateResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConvert.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DisassociateCertificate = DisassociateCertificate'
{
DisassociateCertificate -> Text
arn :: Prelude.Text
}
deriving (DisassociateCertificate -> DisassociateCertificate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateCertificate -> DisassociateCertificate -> Bool
$c/= :: DisassociateCertificate -> DisassociateCertificate -> Bool
== :: DisassociateCertificate -> DisassociateCertificate -> Bool
$c== :: DisassociateCertificate -> DisassociateCertificate -> Bool
Prelude.Eq, ReadPrec [DisassociateCertificate]
ReadPrec DisassociateCertificate
Int -> ReadS DisassociateCertificate
ReadS [DisassociateCertificate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateCertificate]
$creadListPrec :: ReadPrec [DisassociateCertificate]
readPrec :: ReadPrec DisassociateCertificate
$creadPrec :: ReadPrec DisassociateCertificate
readList :: ReadS [DisassociateCertificate]
$creadList :: ReadS [DisassociateCertificate]
readsPrec :: Int -> ReadS DisassociateCertificate
$creadsPrec :: Int -> ReadS DisassociateCertificate
Prelude.Read, Int -> DisassociateCertificate -> ShowS
[DisassociateCertificate] -> ShowS
DisassociateCertificate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateCertificate] -> ShowS
$cshowList :: [DisassociateCertificate] -> ShowS
show :: DisassociateCertificate -> String
$cshow :: DisassociateCertificate -> String
showsPrec :: Int -> DisassociateCertificate -> ShowS
$cshowsPrec :: Int -> DisassociateCertificate -> ShowS
Prelude.Show, forall x. Rep DisassociateCertificate x -> DisassociateCertificate
forall x. DisassociateCertificate -> Rep DisassociateCertificate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DisassociateCertificate x -> DisassociateCertificate
$cfrom :: forall x. DisassociateCertificate -> Rep DisassociateCertificate x
Prelude.Generic)
newDisassociateCertificate ::
Prelude.Text ->
DisassociateCertificate
newDisassociateCertificate :: Text -> DisassociateCertificate
newDisassociateCertificate Text
pArn_ =
DisassociateCertificate' {$sel:arn:DisassociateCertificate' :: Text
arn = Text
pArn_}
disassociateCertificate_arn :: Lens.Lens' DisassociateCertificate Prelude.Text
disassociateCertificate_arn :: Lens' DisassociateCertificate Text
disassociateCertificate_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateCertificate' {Text
arn :: Text
$sel:arn:DisassociateCertificate' :: DisassociateCertificate -> Text
arn} -> Text
arn) (\s :: DisassociateCertificate
s@DisassociateCertificate' {} Text
a -> DisassociateCertificate
s {$sel:arn:DisassociateCertificate' :: Text
arn = Text
a} :: DisassociateCertificate)
instance Core.AWSRequest DisassociateCertificate where
type
AWSResponse DisassociateCertificate =
DisassociateCertificateResponse
request :: (Service -> Service)
-> DisassociateCertificate -> Request DisassociateCertificate
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DisassociateCertificate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateCertificate)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DisassociateCertificateResponse
DisassociateCertificateResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DisassociateCertificate where
hashWithSalt :: Int -> DisassociateCertificate -> Int
hashWithSalt Int
_salt DisassociateCertificate' {Text
arn :: Text
$sel:arn:DisassociateCertificate' :: DisassociateCertificate -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
instance Prelude.NFData DisassociateCertificate where
rnf :: DisassociateCertificate -> ()
rnf DisassociateCertificate' {Text
arn :: Text
$sel:arn:DisassociateCertificate' :: DisassociateCertificate -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
arn
instance Data.ToHeaders DisassociateCertificate where
toHeaders :: DisassociateCertificate -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath DisassociateCertificate where
toPath :: DisassociateCertificate -> ByteString
toPath DisassociateCertificate' {Text
arn :: Text
$sel:arn:DisassociateCertificate' :: DisassociateCertificate -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/2017-08-29/certificates/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
arn]
instance Data.ToQuery DisassociateCertificate where
toQuery :: DisassociateCertificate -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DisassociateCertificateResponse = DisassociateCertificateResponse'
{
DisassociateCertificateResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateCertificateResponse
-> DisassociateCertificateResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateCertificateResponse
-> DisassociateCertificateResponse -> Bool
$c/= :: DisassociateCertificateResponse
-> DisassociateCertificateResponse -> Bool
== :: DisassociateCertificateResponse
-> DisassociateCertificateResponse -> Bool
$c== :: DisassociateCertificateResponse
-> DisassociateCertificateResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateCertificateResponse]
ReadPrec DisassociateCertificateResponse
Int -> ReadS DisassociateCertificateResponse
ReadS [DisassociateCertificateResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateCertificateResponse]
$creadListPrec :: ReadPrec [DisassociateCertificateResponse]
readPrec :: ReadPrec DisassociateCertificateResponse
$creadPrec :: ReadPrec DisassociateCertificateResponse
readList :: ReadS [DisassociateCertificateResponse]
$creadList :: ReadS [DisassociateCertificateResponse]
readsPrec :: Int -> ReadS DisassociateCertificateResponse
$creadsPrec :: Int -> ReadS DisassociateCertificateResponse
Prelude.Read, Int -> DisassociateCertificateResponse -> ShowS
[DisassociateCertificateResponse] -> ShowS
DisassociateCertificateResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateCertificateResponse] -> ShowS
$cshowList :: [DisassociateCertificateResponse] -> ShowS
show :: DisassociateCertificateResponse -> String
$cshow :: DisassociateCertificateResponse -> String
showsPrec :: Int -> DisassociateCertificateResponse -> ShowS
$cshowsPrec :: Int -> DisassociateCertificateResponse -> ShowS
Prelude.Show, forall x.
Rep DisassociateCertificateResponse x
-> DisassociateCertificateResponse
forall x.
DisassociateCertificateResponse
-> Rep DisassociateCertificateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateCertificateResponse x
-> DisassociateCertificateResponse
$cfrom :: forall x.
DisassociateCertificateResponse
-> Rep DisassociateCertificateResponse x
Prelude.Generic)
newDisassociateCertificateResponse ::
Prelude.Int ->
DisassociateCertificateResponse
newDisassociateCertificateResponse :: Int -> DisassociateCertificateResponse
newDisassociateCertificateResponse Int
pHttpStatus_ =
DisassociateCertificateResponse'
{ $sel:httpStatus:DisassociateCertificateResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
disassociateCertificateResponse_httpStatus :: Lens.Lens' DisassociateCertificateResponse Prelude.Int
disassociateCertificateResponse_httpStatus :: Lens' DisassociateCertificateResponse Int
disassociateCertificateResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateCertificateResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateCertificateResponse' :: DisassociateCertificateResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisassociateCertificateResponse
s@DisassociateCertificateResponse' {} Int
a -> DisassociateCertificateResponse
s {$sel:httpStatus:DisassociateCertificateResponse' :: Int
httpStatus = Int
a} :: DisassociateCertificateResponse)
instance
Prelude.NFData
DisassociateCertificateResponse
where
rnf :: DisassociateCertificateResponse -> ()
rnf DisassociateCertificateResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateCertificateResponse' :: DisassociateCertificateResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus