{-# 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.Lambda.DeleteCodeSigningConfig
(
DeleteCodeSigningConfig (..),
newDeleteCodeSigningConfig,
deleteCodeSigningConfig_codeSigningConfigArn,
DeleteCodeSigningConfigResponse (..),
newDeleteCodeSigningConfigResponse,
deleteCodeSigningConfigResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Lambda.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 DeleteCodeSigningConfig = DeleteCodeSigningConfig'
{
DeleteCodeSigningConfig -> Text
codeSigningConfigArn :: Prelude.Text
}
deriving (DeleteCodeSigningConfig -> DeleteCodeSigningConfig -> Bool
(DeleteCodeSigningConfig -> DeleteCodeSigningConfig -> Bool)
-> (DeleteCodeSigningConfig -> DeleteCodeSigningConfig -> Bool)
-> Eq DeleteCodeSigningConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteCodeSigningConfig -> DeleteCodeSigningConfig -> Bool
$c/= :: DeleteCodeSigningConfig -> DeleteCodeSigningConfig -> Bool
== :: DeleteCodeSigningConfig -> DeleteCodeSigningConfig -> Bool
$c== :: DeleteCodeSigningConfig -> DeleteCodeSigningConfig -> Bool
Prelude.Eq, ReadPrec [DeleteCodeSigningConfig]
ReadPrec DeleteCodeSigningConfig
Int -> ReadS DeleteCodeSigningConfig
ReadS [DeleteCodeSigningConfig]
(Int -> ReadS DeleteCodeSigningConfig)
-> ReadS [DeleteCodeSigningConfig]
-> ReadPrec DeleteCodeSigningConfig
-> ReadPrec [DeleteCodeSigningConfig]
-> Read DeleteCodeSigningConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteCodeSigningConfig]
$creadListPrec :: ReadPrec [DeleteCodeSigningConfig]
readPrec :: ReadPrec DeleteCodeSigningConfig
$creadPrec :: ReadPrec DeleteCodeSigningConfig
readList :: ReadS [DeleteCodeSigningConfig]
$creadList :: ReadS [DeleteCodeSigningConfig]
readsPrec :: Int -> ReadS DeleteCodeSigningConfig
$creadsPrec :: Int -> ReadS DeleteCodeSigningConfig
Prelude.Read, Int -> DeleteCodeSigningConfig -> ShowS
[DeleteCodeSigningConfig] -> ShowS
DeleteCodeSigningConfig -> String
(Int -> DeleteCodeSigningConfig -> ShowS)
-> (DeleteCodeSigningConfig -> String)
-> ([DeleteCodeSigningConfig] -> ShowS)
-> Show DeleteCodeSigningConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteCodeSigningConfig] -> ShowS
$cshowList :: [DeleteCodeSigningConfig] -> ShowS
show :: DeleteCodeSigningConfig -> String
$cshow :: DeleteCodeSigningConfig -> String
showsPrec :: Int -> DeleteCodeSigningConfig -> ShowS
$cshowsPrec :: Int -> DeleteCodeSigningConfig -> ShowS
Prelude.Show, (forall x.
DeleteCodeSigningConfig -> Rep DeleteCodeSigningConfig x)
-> (forall x.
Rep DeleteCodeSigningConfig x -> DeleteCodeSigningConfig)
-> Generic DeleteCodeSigningConfig
forall x. Rep DeleteCodeSigningConfig x -> DeleteCodeSigningConfig
forall x. DeleteCodeSigningConfig -> Rep DeleteCodeSigningConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteCodeSigningConfig x -> DeleteCodeSigningConfig
$cfrom :: forall x. DeleteCodeSigningConfig -> Rep DeleteCodeSigningConfig x
Prelude.Generic)
newDeleteCodeSigningConfig ::
Prelude.Text ->
DeleteCodeSigningConfig
newDeleteCodeSigningConfig :: Text -> DeleteCodeSigningConfig
newDeleteCodeSigningConfig Text
pCodeSigningConfigArn_ =
DeleteCodeSigningConfig' :: Text -> DeleteCodeSigningConfig
DeleteCodeSigningConfig'
{ $sel:codeSigningConfigArn:DeleteCodeSigningConfig' :: Text
codeSigningConfigArn =
Text
pCodeSigningConfigArn_
}
deleteCodeSigningConfig_codeSigningConfigArn :: Lens.Lens' DeleteCodeSigningConfig Prelude.Text
deleteCodeSigningConfig_codeSigningConfigArn :: (Text -> f Text)
-> DeleteCodeSigningConfig -> f DeleteCodeSigningConfig
deleteCodeSigningConfig_codeSigningConfigArn = (DeleteCodeSigningConfig -> Text)
-> (DeleteCodeSigningConfig -> Text -> DeleteCodeSigningConfig)
-> Lens DeleteCodeSigningConfig DeleteCodeSigningConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteCodeSigningConfig' {Text
codeSigningConfigArn :: Text
$sel:codeSigningConfigArn:DeleteCodeSigningConfig' :: DeleteCodeSigningConfig -> Text
codeSigningConfigArn} -> Text
codeSigningConfigArn) (\s :: DeleteCodeSigningConfig
s@DeleteCodeSigningConfig' {} Text
a -> DeleteCodeSigningConfig
s {$sel:codeSigningConfigArn:DeleteCodeSigningConfig' :: Text
codeSigningConfigArn = Text
a} :: DeleteCodeSigningConfig)
instance Core.AWSRequest DeleteCodeSigningConfig where
type
AWSResponse DeleteCodeSigningConfig =
DeleteCodeSigningConfigResponse
request :: DeleteCodeSigningConfig -> Request DeleteCodeSigningConfig
request = Service
-> DeleteCodeSigningConfig -> Request DeleteCodeSigningConfig
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteCodeSigningConfig
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteCodeSigningConfig)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteCodeSigningConfig))
-> Logger
-> Service
-> Proxy DeleteCodeSigningConfig
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteCodeSigningConfig)))
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 -> DeleteCodeSigningConfigResponse
DeleteCodeSigningConfigResponse'
(Int -> DeleteCodeSigningConfigResponse)
-> Either String Int
-> Either String DeleteCodeSigningConfigResponse
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 DeleteCodeSigningConfig
instance Prelude.NFData DeleteCodeSigningConfig
instance Core.ToHeaders DeleteCodeSigningConfig where
toHeaders :: DeleteCodeSigningConfig -> ResponseHeaders
toHeaders = ResponseHeaders -> DeleteCodeSigningConfig -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteCodeSigningConfig where
toPath :: DeleteCodeSigningConfig -> ByteString
toPath DeleteCodeSigningConfig' {Text
codeSigningConfigArn :: Text
$sel:codeSigningConfigArn:DeleteCodeSigningConfig' :: DeleteCodeSigningConfig -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2020-04-22/code-signing-configs/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
codeSigningConfigArn
]
instance Core.ToQuery DeleteCodeSigningConfig where
toQuery :: DeleteCodeSigningConfig -> QueryString
toQuery = QueryString -> DeleteCodeSigningConfig -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteCodeSigningConfigResponse = DeleteCodeSigningConfigResponse'
{
DeleteCodeSigningConfigResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteCodeSigningConfigResponse
-> DeleteCodeSigningConfigResponse -> Bool
(DeleteCodeSigningConfigResponse
-> DeleteCodeSigningConfigResponse -> Bool)
-> (DeleteCodeSigningConfigResponse
-> DeleteCodeSigningConfigResponse -> Bool)
-> Eq DeleteCodeSigningConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteCodeSigningConfigResponse
-> DeleteCodeSigningConfigResponse -> Bool
$c/= :: DeleteCodeSigningConfigResponse
-> DeleteCodeSigningConfigResponse -> Bool
== :: DeleteCodeSigningConfigResponse
-> DeleteCodeSigningConfigResponse -> Bool
$c== :: DeleteCodeSigningConfigResponse
-> DeleteCodeSigningConfigResponse -> Bool
Prelude.Eq, ReadPrec [DeleteCodeSigningConfigResponse]
ReadPrec DeleteCodeSigningConfigResponse
Int -> ReadS DeleteCodeSigningConfigResponse
ReadS [DeleteCodeSigningConfigResponse]
(Int -> ReadS DeleteCodeSigningConfigResponse)
-> ReadS [DeleteCodeSigningConfigResponse]
-> ReadPrec DeleteCodeSigningConfigResponse
-> ReadPrec [DeleteCodeSigningConfigResponse]
-> Read DeleteCodeSigningConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteCodeSigningConfigResponse]
$creadListPrec :: ReadPrec [DeleteCodeSigningConfigResponse]
readPrec :: ReadPrec DeleteCodeSigningConfigResponse
$creadPrec :: ReadPrec DeleteCodeSigningConfigResponse
readList :: ReadS [DeleteCodeSigningConfigResponse]
$creadList :: ReadS [DeleteCodeSigningConfigResponse]
readsPrec :: Int -> ReadS DeleteCodeSigningConfigResponse
$creadsPrec :: Int -> ReadS DeleteCodeSigningConfigResponse
Prelude.Read, Int -> DeleteCodeSigningConfigResponse -> ShowS
[DeleteCodeSigningConfigResponse] -> ShowS
DeleteCodeSigningConfigResponse -> String
(Int -> DeleteCodeSigningConfigResponse -> ShowS)
-> (DeleteCodeSigningConfigResponse -> String)
-> ([DeleteCodeSigningConfigResponse] -> ShowS)
-> Show DeleteCodeSigningConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteCodeSigningConfigResponse] -> ShowS
$cshowList :: [DeleteCodeSigningConfigResponse] -> ShowS
show :: DeleteCodeSigningConfigResponse -> String
$cshow :: DeleteCodeSigningConfigResponse -> String
showsPrec :: Int -> DeleteCodeSigningConfigResponse -> ShowS
$cshowsPrec :: Int -> DeleteCodeSigningConfigResponse -> ShowS
Prelude.Show, (forall x.
DeleteCodeSigningConfigResponse
-> Rep DeleteCodeSigningConfigResponse x)
-> (forall x.
Rep DeleteCodeSigningConfigResponse x
-> DeleteCodeSigningConfigResponse)
-> Generic DeleteCodeSigningConfigResponse
forall x.
Rep DeleteCodeSigningConfigResponse x
-> DeleteCodeSigningConfigResponse
forall x.
DeleteCodeSigningConfigResponse
-> Rep DeleteCodeSigningConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteCodeSigningConfigResponse x
-> DeleteCodeSigningConfigResponse
$cfrom :: forall x.
DeleteCodeSigningConfigResponse
-> Rep DeleteCodeSigningConfigResponse x
Prelude.Generic)
newDeleteCodeSigningConfigResponse ::
Prelude.Int ->
DeleteCodeSigningConfigResponse
newDeleteCodeSigningConfigResponse :: Int -> DeleteCodeSigningConfigResponse
newDeleteCodeSigningConfigResponse Int
pHttpStatus_ =
DeleteCodeSigningConfigResponse' :: Int -> DeleteCodeSigningConfigResponse
DeleteCodeSigningConfigResponse'
{ $sel:httpStatus:DeleteCodeSigningConfigResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteCodeSigningConfigResponse_httpStatus :: Lens.Lens' DeleteCodeSigningConfigResponse Prelude.Int
deleteCodeSigningConfigResponse_httpStatus :: (Int -> f Int)
-> DeleteCodeSigningConfigResponse
-> f DeleteCodeSigningConfigResponse
deleteCodeSigningConfigResponse_httpStatus = (DeleteCodeSigningConfigResponse -> Int)
-> (DeleteCodeSigningConfigResponse
-> Int -> DeleteCodeSigningConfigResponse)
-> Lens
DeleteCodeSigningConfigResponse
DeleteCodeSigningConfigResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteCodeSigningConfigResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteCodeSigningConfigResponse' :: DeleteCodeSigningConfigResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteCodeSigningConfigResponse
s@DeleteCodeSigningConfigResponse' {} Int
a -> DeleteCodeSigningConfigResponse
s {$sel:httpStatus:DeleteCodeSigningConfigResponse' :: Int
httpStatus = Int
a} :: DeleteCodeSigningConfigResponse)
instance
Prelude.NFData
DeleteCodeSigningConfigResponse