{-# 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.DeleteLayerVersion
(
DeleteLayerVersion (..),
newDeleteLayerVersion,
deleteLayerVersion_layerName,
deleteLayerVersion_versionNumber,
DeleteLayerVersionResponse (..),
newDeleteLayerVersionResponse,
)
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 DeleteLayerVersion = DeleteLayerVersion'
{
DeleteLayerVersion -> Text
layerName :: Prelude.Text,
DeleteLayerVersion -> Integer
versionNumber :: Prelude.Integer
}
deriving (DeleteLayerVersion -> DeleteLayerVersion -> Bool
(DeleteLayerVersion -> DeleteLayerVersion -> Bool)
-> (DeleteLayerVersion -> DeleteLayerVersion -> Bool)
-> Eq DeleteLayerVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteLayerVersion -> DeleteLayerVersion -> Bool
$c/= :: DeleteLayerVersion -> DeleteLayerVersion -> Bool
== :: DeleteLayerVersion -> DeleteLayerVersion -> Bool
$c== :: DeleteLayerVersion -> DeleteLayerVersion -> Bool
Prelude.Eq, ReadPrec [DeleteLayerVersion]
ReadPrec DeleteLayerVersion
Int -> ReadS DeleteLayerVersion
ReadS [DeleteLayerVersion]
(Int -> ReadS DeleteLayerVersion)
-> ReadS [DeleteLayerVersion]
-> ReadPrec DeleteLayerVersion
-> ReadPrec [DeleteLayerVersion]
-> Read DeleteLayerVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteLayerVersion]
$creadListPrec :: ReadPrec [DeleteLayerVersion]
readPrec :: ReadPrec DeleteLayerVersion
$creadPrec :: ReadPrec DeleteLayerVersion
readList :: ReadS [DeleteLayerVersion]
$creadList :: ReadS [DeleteLayerVersion]
readsPrec :: Int -> ReadS DeleteLayerVersion
$creadsPrec :: Int -> ReadS DeleteLayerVersion
Prelude.Read, Int -> DeleteLayerVersion -> ShowS
[DeleteLayerVersion] -> ShowS
DeleteLayerVersion -> String
(Int -> DeleteLayerVersion -> ShowS)
-> (DeleteLayerVersion -> String)
-> ([DeleteLayerVersion] -> ShowS)
-> Show DeleteLayerVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteLayerVersion] -> ShowS
$cshowList :: [DeleteLayerVersion] -> ShowS
show :: DeleteLayerVersion -> String
$cshow :: DeleteLayerVersion -> String
showsPrec :: Int -> DeleteLayerVersion -> ShowS
$cshowsPrec :: Int -> DeleteLayerVersion -> ShowS
Prelude.Show, (forall x. DeleteLayerVersion -> Rep DeleteLayerVersion x)
-> (forall x. Rep DeleteLayerVersion x -> DeleteLayerVersion)
-> Generic DeleteLayerVersion
forall x. Rep DeleteLayerVersion x -> DeleteLayerVersion
forall x. DeleteLayerVersion -> Rep DeleteLayerVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteLayerVersion x -> DeleteLayerVersion
$cfrom :: forall x. DeleteLayerVersion -> Rep DeleteLayerVersion x
Prelude.Generic)
newDeleteLayerVersion ::
Prelude.Text ->
Prelude.Integer ->
DeleteLayerVersion
newDeleteLayerVersion :: Text -> Integer -> DeleteLayerVersion
newDeleteLayerVersion Text
pLayerName_ Integer
pVersionNumber_ =
DeleteLayerVersion' :: Text -> Integer -> DeleteLayerVersion
DeleteLayerVersion'
{ $sel:layerName:DeleteLayerVersion' :: Text
layerName = Text
pLayerName_,
$sel:versionNumber:DeleteLayerVersion' :: Integer
versionNumber = Integer
pVersionNumber_
}
deleteLayerVersion_layerName :: Lens.Lens' DeleteLayerVersion Prelude.Text
deleteLayerVersion_layerName :: (Text -> f Text) -> DeleteLayerVersion -> f DeleteLayerVersion
deleteLayerVersion_layerName = (DeleteLayerVersion -> Text)
-> (DeleteLayerVersion -> Text -> DeleteLayerVersion)
-> Lens DeleteLayerVersion DeleteLayerVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLayerVersion' {Text
layerName :: Text
$sel:layerName:DeleteLayerVersion' :: DeleteLayerVersion -> Text
layerName} -> Text
layerName) (\s :: DeleteLayerVersion
s@DeleteLayerVersion' {} Text
a -> DeleteLayerVersion
s {$sel:layerName:DeleteLayerVersion' :: Text
layerName = Text
a} :: DeleteLayerVersion)
deleteLayerVersion_versionNumber :: Lens.Lens' DeleteLayerVersion Prelude.Integer
deleteLayerVersion_versionNumber :: (Integer -> f Integer)
-> DeleteLayerVersion -> f DeleteLayerVersion
deleteLayerVersion_versionNumber = (DeleteLayerVersion -> Integer)
-> (DeleteLayerVersion -> Integer -> DeleteLayerVersion)
-> Lens DeleteLayerVersion DeleteLayerVersion Integer Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLayerVersion' {Integer
versionNumber :: Integer
$sel:versionNumber:DeleteLayerVersion' :: DeleteLayerVersion -> Integer
versionNumber} -> Integer
versionNumber) (\s :: DeleteLayerVersion
s@DeleteLayerVersion' {} Integer
a -> DeleteLayerVersion
s {$sel:versionNumber:DeleteLayerVersion' :: Integer
versionNumber = Integer
a} :: DeleteLayerVersion)
instance Core.AWSRequest DeleteLayerVersion where
type
AWSResponse DeleteLayerVersion =
DeleteLayerVersionResponse
request :: DeleteLayerVersion -> Request DeleteLayerVersion
request = Service -> DeleteLayerVersion -> Request DeleteLayerVersion
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteLayerVersion
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteLayerVersion)))
response =
AWSResponse DeleteLayerVersion
-> Logger
-> Service
-> Proxy DeleteLayerVersion
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteLayerVersion)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteLayerVersion
DeleteLayerVersionResponse
DeleteLayerVersionResponse'
instance Prelude.Hashable DeleteLayerVersion
instance Prelude.NFData DeleteLayerVersion
instance Core.ToHeaders DeleteLayerVersion where
toHeaders :: DeleteLayerVersion -> [Header]
toHeaders = [Header] -> DeleteLayerVersion -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteLayerVersion where
toPath :: DeleteLayerVersion -> ByteString
toPath DeleteLayerVersion' {Integer
Text
versionNumber :: Integer
layerName :: Text
$sel:versionNumber:DeleteLayerVersion' :: DeleteLayerVersion -> Integer
$sel:layerName:DeleteLayerVersion' :: DeleteLayerVersion -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2018-10-31/layers/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
layerName,
ByteString
"/versions/",
Integer -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Integer
versionNumber
]
instance Core.ToQuery DeleteLayerVersion where
toQuery :: DeleteLayerVersion -> QueryString
toQuery = QueryString -> DeleteLayerVersion -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteLayerVersionResponse = DeleteLayerVersionResponse'
{
}
deriving (DeleteLayerVersionResponse -> DeleteLayerVersionResponse -> Bool
(DeleteLayerVersionResponse -> DeleteLayerVersionResponse -> Bool)
-> (DeleteLayerVersionResponse
-> DeleteLayerVersionResponse -> Bool)
-> Eq DeleteLayerVersionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteLayerVersionResponse -> DeleteLayerVersionResponse -> Bool
$c/= :: DeleteLayerVersionResponse -> DeleteLayerVersionResponse -> Bool
== :: DeleteLayerVersionResponse -> DeleteLayerVersionResponse -> Bool
$c== :: DeleteLayerVersionResponse -> DeleteLayerVersionResponse -> Bool
Prelude.Eq, ReadPrec [DeleteLayerVersionResponse]
ReadPrec DeleteLayerVersionResponse
Int -> ReadS DeleteLayerVersionResponse
ReadS [DeleteLayerVersionResponse]
(Int -> ReadS DeleteLayerVersionResponse)
-> ReadS [DeleteLayerVersionResponse]
-> ReadPrec DeleteLayerVersionResponse
-> ReadPrec [DeleteLayerVersionResponse]
-> Read DeleteLayerVersionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteLayerVersionResponse]
$creadListPrec :: ReadPrec [DeleteLayerVersionResponse]
readPrec :: ReadPrec DeleteLayerVersionResponse
$creadPrec :: ReadPrec DeleteLayerVersionResponse
readList :: ReadS [DeleteLayerVersionResponse]
$creadList :: ReadS [DeleteLayerVersionResponse]
readsPrec :: Int -> ReadS DeleteLayerVersionResponse
$creadsPrec :: Int -> ReadS DeleteLayerVersionResponse
Prelude.Read, Int -> DeleteLayerVersionResponse -> ShowS
[DeleteLayerVersionResponse] -> ShowS
DeleteLayerVersionResponse -> String
(Int -> DeleteLayerVersionResponse -> ShowS)
-> (DeleteLayerVersionResponse -> String)
-> ([DeleteLayerVersionResponse] -> ShowS)
-> Show DeleteLayerVersionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteLayerVersionResponse] -> ShowS
$cshowList :: [DeleteLayerVersionResponse] -> ShowS
show :: DeleteLayerVersionResponse -> String
$cshow :: DeleteLayerVersionResponse -> String
showsPrec :: Int -> DeleteLayerVersionResponse -> ShowS
$cshowsPrec :: Int -> DeleteLayerVersionResponse -> ShowS
Prelude.Show, (forall x.
DeleteLayerVersionResponse -> Rep DeleteLayerVersionResponse x)
-> (forall x.
Rep DeleteLayerVersionResponse x -> DeleteLayerVersionResponse)
-> Generic DeleteLayerVersionResponse
forall x.
Rep DeleteLayerVersionResponse x -> DeleteLayerVersionResponse
forall x.
DeleteLayerVersionResponse -> Rep DeleteLayerVersionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteLayerVersionResponse x -> DeleteLayerVersionResponse
$cfrom :: forall x.
DeleteLayerVersionResponse -> Rep DeleteLayerVersionResponse x
Prelude.Generic)
newDeleteLayerVersionResponse ::
DeleteLayerVersionResponse
newDeleteLayerVersionResponse :: DeleteLayerVersionResponse
newDeleteLayerVersionResponse =
DeleteLayerVersionResponse
DeleteLayerVersionResponse'
instance Prelude.NFData DeleteLayerVersionResponse