{-# 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.Lens as Lens
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
(DisassociateCertificate -> DisassociateCertificate -> Bool)
-> (DisassociateCertificate -> DisassociateCertificate -> Bool)
-> Eq DisassociateCertificate
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]
(Int -> ReadS DisassociateCertificate)
-> ReadS [DisassociateCertificate]
-> ReadPrec DisassociateCertificate
-> ReadPrec [DisassociateCertificate]
-> Read 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
(Int -> DisassociateCertificate -> ShowS)
-> (DisassociateCertificate -> String)
-> ([DisassociateCertificate] -> ShowS)
-> Show DisassociateCertificate
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.
DisassociateCertificate -> Rep DisassociateCertificate x)
-> (forall x.
Rep DisassociateCertificate x -> DisassociateCertificate)
-> Generic DisassociateCertificate
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' :: Text -> DisassociateCertificate
DisassociateCertificate' {$sel:arn:DisassociateCertificate' :: Text
arn = Text
pArn_}
disassociateCertificate_arn :: Lens.Lens' DisassociateCertificate Prelude.Text
disassociateCertificate_arn :: (Text -> f Text)
-> DisassociateCertificate -> f DisassociateCertificate
disassociateCertificate_arn = (DisassociateCertificate -> Text)
-> (DisassociateCertificate -> Text -> DisassociateCertificate)
-> Lens DisassociateCertificate DisassociateCertificate Text Text
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 :: DisassociateCertificate -> Request DisassociateCertificate
request = Service
-> DisassociateCertificate -> Request DisassociateCertificate
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DisassociateCertificate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateCertificate)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DisassociateCertificate))
-> Logger
-> Service
-> Proxy DisassociateCertificate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateCertificate)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DisassociateCertificateResponse
DisassociateCertificateResponse'
(Int -> DisassociateCertificateResponse)
-> Either String Int
-> Either String DisassociateCertificateResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DisassociateCertificate
instance Prelude.NFData DisassociateCertificate
instance Core.ToHeaders DisassociateCertificate where
toHeaders :: DisassociateCertificate -> ResponseHeaders
toHeaders =
ResponseHeaders -> DisassociateCertificate -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToPath DisassociateCertificate where
toPath :: DisassociateCertificate -> ByteString
toPath DisassociateCertificate' {Text
arn :: Text
$sel:arn:DisassociateCertificate' :: DisassociateCertificate -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/2017-08-29/certificates/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
arn]
instance Core.ToQuery DisassociateCertificate where
toQuery :: DisassociateCertificate -> QueryString
toQuery = QueryString -> DisassociateCertificate -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DisassociateCertificateResponse = DisassociateCertificateResponse'
{
DisassociateCertificateResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateCertificateResponse
-> DisassociateCertificateResponse -> Bool
(DisassociateCertificateResponse
-> DisassociateCertificateResponse -> Bool)
-> (DisassociateCertificateResponse
-> DisassociateCertificateResponse -> Bool)
-> Eq DisassociateCertificateResponse
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]
(Int -> ReadS DisassociateCertificateResponse)
-> ReadS [DisassociateCertificateResponse]
-> ReadPrec DisassociateCertificateResponse
-> ReadPrec [DisassociateCertificateResponse]
-> Read 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
(Int -> DisassociateCertificateResponse -> ShowS)
-> (DisassociateCertificateResponse -> String)
-> ([DisassociateCertificateResponse] -> ShowS)
-> Show DisassociateCertificateResponse
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.
DisassociateCertificateResponse
-> Rep DisassociateCertificateResponse x)
-> (forall x.
Rep DisassociateCertificateResponse x
-> DisassociateCertificateResponse)
-> Generic DisassociateCertificateResponse
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' :: Int -> DisassociateCertificateResponse
DisassociateCertificateResponse'
{ $sel:httpStatus:DisassociateCertificateResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
disassociateCertificateResponse_httpStatus :: Lens.Lens' DisassociateCertificateResponse Prelude.Int
disassociateCertificateResponse_httpStatus :: (Int -> f Int)
-> DisassociateCertificateResponse
-> f DisassociateCertificateResponse
disassociateCertificateResponse_httpStatus = (DisassociateCertificateResponse -> Int)
-> (DisassociateCertificateResponse
-> Int -> DisassociateCertificateResponse)
-> Lens
DisassociateCertificateResponse
DisassociateCertificateResponse
Int
Int
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