{-# 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.DeleteProvisioningTemplateVersion
(
DeleteProvisioningTemplateVersion (..),
newDeleteProvisioningTemplateVersion,
deleteProvisioningTemplateVersion_templateName,
deleteProvisioningTemplateVersion_versionId,
DeleteProvisioningTemplateVersionResponse (..),
newDeleteProvisioningTemplateVersionResponse,
deleteProvisioningTemplateVersionResponse_httpStatus,
)
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 DeleteProvisioningTemplateVersion = DeleteProvisioningTemplateVersion'
{
DeleteProvisioningTemplateVersion -> Text
templateName :: Prelude.Text,
DeleteProvisioningTemplateVersion -> Int
versionId :: Prelude.Int
}
deriving (DeleteProvisioningTemplateVersion
-> DeleteProvisioningTemplateVersion -> Bool
(DeleteProvisioningTemplateVersion
-> DeleteProvisioningTemplateVersion -> Bool)
-> (DeleteProvisioningTemplateVersion
-> DeleteProvisioningTemplateVersion -> Bool)
-> Eq DeleteProvisioningTemplateVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteProvisioningTemplateVersion
-> DeleteProvisioningTemplateVersion -> Bool
$c/= :: DeleteProvisioningTemplateVersion
-> DeleteProvisioningTemplateVersion -> Bool
== :: DeleteProvisioningTemplateVersion
-> DeleteProvisioningTemplateVersion -> Bool
$c== :: DeleteProvisioningTemplateVersion
-> DeleteProvisioningTemplateVersion -> Bool
Prelude.Eq, ReadPrec [DeleteProvisioningTemplateVersion]
ReadPrec DeleteProvisioningTemplateVersion
Int -> ReadS DeleteProvisioningTemplateVersion
ReadS [DeleteProvisioningTemplateVersion]
(Int -> ReadS DeleteProvisioningTemplateVersion)
-> ReadS [DeleteProvisioningTemplateVersion]
-> ReadPrec DeleteProvisioningTemplateVersion
-> ReadPrec [DeleteProvisioningTemplateVersion]
-> Read DeleteProvisioningTemplateVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteProvisioningTemplateVersion]
$creadListPrec :: ReadPrec [DeleteProvisioningTemplateVersion]
readPrec :: ReadPrec DeleteProvisioningTemplateVersion
$creadPrec :: ReadPrec DeleteProvisioningTemplateVersion
readList :: ReadS [DeleteProvisioningTemplateVersion]
$creadList :: ReadS [DeleteProvisioningTemplateVersion]
readsPrec :: Int -> ReadS DeleteProvisioningTemplateVersion
$creadsPrec :: Int -> ReadS DeleteProvisioningTemplateVersion
Prelude.Read, Int -> DeleteProvisioningTemplateVersion -> ShowS
[DeleteProvisioningTemplateVersion] -> ShowS
DeleteProvisioningTemplateVersion -> String
(Int -> DeleteProvisioningTemplateVersion -> ShowS)
-> (DeleteProvisioningTemplateVersion -> String)
-> ([DeleteProvisioningTemplateVersion] -> ShowS)
-> Show DeleteProvisioningTemplateVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteProvisioningTemplateVersion] -> ShowS
$cshowList :: [DeleteProvisioningTemplateVersion] -> ShowS
show :: DeleteProvisioningTemplateVersion -> String
$cshow :: DeleteProvisioningTemplateVersion -> String
showsPrec :: Int -> DeleteProvisioningTemplateVersion -> ShowS
$cshowsPrec :: Int -> DeleteProvisioningTemplateVersion -> ShowS
Prelude.Show, (forall x.
DeleteProvisioningTemplateVersion
-> Rep DeleteProvisioningTemplateVersion x)
-> (forall x.
Rep DeleteProvisioningTemplateVersion x
-> DeleteProvisioningTemplateVersion)
-> Generic DeleteProvisioningTemplateVersion
forall x.
Rep DeleteProvisioningTemplateVersion x
-> DeleteProvisioningTemplateVersion
forall x.
DeleteProvisioningTemplateVersion
-> Rep DeleteProvisioningTemplateVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteProvisioningTemplateVersion x
-> DeleteProvisioningTemplateVersion
$cfrom :: forall x.
DeleteProvisioningTemplateVersion
-> Rep DeleteProvisioningTemplateVersion x
Prelude.Generic)
newDeleteProvisioningTemplateVersion ::
Prelude.Text ->
Prelude.Int ->
DeleteProvisioningTemplateVersion
newDeleteProvisioningTemplateVersion :: Text -> Int -> DeleteProvisioningTemplateVersion
newDeleteProvisioningTemplateVersion
Text
pTemplateName_
Int
pVersionId_ =
DeleteProvisioningTemplateVersion' :: Text -> Int -> DeleteProvisioningTemplateVersion
DeleteProvisioningTemplateVersion'
{ $sel:templateName:DeleteProvisioningTemplateVersion' :: Text
templateName =
Text
pTemplateName_,
$sel:versionId:DeleteProvisioningTemplateVersion' :: Int
versionId = Int
pVersionId_
}
deleteProvisioningTemplateVersion_templateName :: Lens.Lens' DeleteProvisioningTemplateVersion Prelude.Text
deleteProvisioningTemplateVersion_templateName :: (Text -> f Text)
-> DeleteProvisioningTemplateVersion
-> f DeleteProvisioningTemplateVersion
deleteProvisioningTemplateVersion_templateName = (DeleteProvisioningTemplateVersion -> Text)
-> (DeleteProvisioningTemplateVersion
-> Text -> DeleteProvisioningTemplateVersion)
-> Lens
DeleteProvisioningTemplateVersion
DeleteProvisioningTemplateVersion
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteProvisioningTemplateVersion' {Text
templateName :: Text
$sel:templateName:DeleteProvisioningTemplateVersion' :: DeleteProvisioningTemplateVersion -> Text
templateName} -> Text
templateName) (\s :: DeleteProvisioningTemplateVersion
s@DeleteProvisioningTemplateVersion' {} Text
a -> DeleteProvisioningTemplateVersion
s {$sel:templateName:DeleteProvisioningTemplateVersion' :: Text
templateName = Text
a} :: DeleteProvisioningTemplateVersion)
deleteProvisioningTemplateVersion_versionId :: Lens.Lens' DeleteProvisioningTemplateVersion Prelude.Int
deleteProvisioningTemplateVersion_versionId :: (Int -> f Int)
-> DeleteProvisioningTemplateVersion
-> f DeleteProvisioningTemplateVersion
deleteProvisioningTemplateVersion_versionId = (DeleteProvisioningTemplateVersion -> Int)
-> (DeleteProvisioningTemplateVersion
-> Int -> DeleteProvisioningTemplateVersion)
-> Lens
DeleteProvisioningTemplateVersion
DeleteProvisioningTemplateVersion
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteProvisioningTemplateVersion' {Int
versionId :: Int
$sel:versionId:DeleteProvisioningTemplateVersion' :: DeleteProvisioningTemplateVersion -> Int
versionId} -> Int
versionId) (\s :: DeleteProvisioningTemplateVersion
s@DeleteProvisioningTemplateVersion' {} Int
a -> DeleteProvisioningTemplateVersion
s {$sel:versionId:DeleteProvisioningTemplateVersion' :: Int
versionId = Int
a} :: DeleteProvisioningTemplateVersion)
instance
Core.AWSRequest
DeleteProvisioningTemplateVersion
where
type
AWSResponse DeleteProvisioningTemplateVersion =
DeleteProvisioningTemplateVersionResponse
request :: DeleteProvisioningTemplateVersion
-> Request DeleteProvisioningTemplateVersion
request = Service
-> DeleteProvisioningTemplateVersion
-> Request DeleteProvisioningTemplateVersion
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteProvisioningTemplateVersion
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteProvisioningTemplateVersion)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteProvisioningTemplateVersion))
-> Logger
-> Service
-> Proxy DeleteProvisioningTemplateVersion
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteProvisioningTemplateVersion)))
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 -> DeleteProvisioningTemplateVersionResponse
DeleteProvisioningTemplateVersionResponse'
(Int -> DeleteProvisioningTemplateVersionResponse)
-> Either String Int
-> Either String DeleteProvisioningTemplateVersionResponse
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
DeleteProvisioningTemplateVersion
instance
Prelude.NFData
DeleteProvisioningTemplateVersion
instance
Core.ToHeaders
DeleteProvisioningTemplateVersion
where
toHeaders :: DeleteProvisioningTemplateVersion -> ResponseHeaders
toHeaders = ResponseHeaders
-> DeleteProvisioningTemplateVersion -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Core.ToPath
DeleteProvisioningTemplateVersion
where
toPath :: DeleteProvisioningTemplateVersion -> ByteString
toPath DeleteProvisioningTemplateVersion' {Int
Text
versionId :: Int
templateName :: Text
$sel:versionId:DeleteProvisioningTemplateVersion' :: DeleteProvisioningTemplateVersion -> Int
$sel:templateName:DeleteProvisioningTemplateVersion' :: DeleteProvisioningTemplateVersion -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/provisioning-templates/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
templateName,
ByteString
"/versions/",
Int -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Int
versionId
]
instance
Core.ToQuery
DeleteProvisioningTemplateVersion
where
toQuery :: DeleteProvisioningTemplateVersion -> QueryString
toQuery = QueryString -> DeleteProvisioningTemplateVersion -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteProvisioningTemplateVersionResponse = DeleteProvisioningTemplateVersionResponse'
{
DeleteProvisioningTemplateVersionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteProvisioningTemplateVersionResponse
-> DeleteProvisioningTemplateVersionResponse -> Bool
(DeleteProvisioningTemplateVersionResponse
-> DeleteProvisioningTemplateVersionResponse -> Bool)
-> (DeleteProvisioningTemplateVersionResponse
-> DeleteProvisioningTemplateVersionResponse -> Bool)
-> Eq DeleteProvisioningTemplateVersionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteProvisioningTemplateVersionResponse
-> DeleteProvisioningTemplateVersionResponse -> Bool
$c/= :: DeleteProvisioningTemplateVersionResponse
-> DeleteProvisioningTemplateVersionResponse -> Bool
== :: DeleteProvisioningTemplateVersionResponse
-> DeleteProvisioningTemplateVersionResponse -> Bool
$c== :: DeleteProvisioningTemplateVersionResponse
-> DeleteProvisioningTemplateVersionResponse -> Bool
Prelude.Eq, ReadPrec [DeleteProvisioningTemplateVersionResponse]
ReadPrec DeleteProvisioningTemplateVersionResponse
Int -> ReadS DeleteProvisioningTemplateVersionResponse
ReadS [DeleteProvisioningTemplateVersionResponse]
(Int -> ReadS DeleteProvisioningTemplateVersionResponse)
-> ReadS [DeleteProvisioningTemplateVersionResponse]
-> ReadPrec DeleteProvisioningTemplateVersionResponse
-> ReadPrec [DeleteProvisioningTemplateVersionResponse]
-> Read DeleteProvisioningTemplateVersionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteProvisioningTemplateVersionResponse]
$creadListPrec :: ReadPrec [DeleteProvisioningTemplateVersionResponse]
readPrec :: ReadPrec DeleteProvisioningTemplateVersionResponse
$creadPrec :: ReadPrec DeleteProvisioningTemplateVersionResponse
readList :: ReadS [DeleteProvisioningTemplateVersionResponse]
$creadList :: ReadS [DeleteProvisioningTemplateVersionResponse]
readsPrec :: Int -> ReadS DeleteProvisioningTemplateVersionResponse
$creadsPrec :: Int -> ReadS DeleteProvisioningTemplateVersionResponse
Prelude.Read, Int -> DeleteProvisioningTemplateVersionResponse -> ShowS
[DeleteProvisioningTemplateVersionResponse] -> ShowS
DeleteProvisioningTemplateVersionResponse -> String
(Int -> DeleteProvisioningTemplateVersionResponse -> ShowS)
-> (DeleteProvisioningTemplateVersionResponse -> String)
-> ([DeleteProvisioningTemplateVersionResponse] -> ShowS)
-> Show DeleteProvisioningTemplateVersionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteProvisioningTemplateVersionResponse] -> ShowS
$cshowList :: [DeleteProvisioningTemplateVersionResponse] -> ShowS
show :: DeleteProvisioningTemplateVersionResponse -> String
$cshow :: DeleteProvisioningTemplateVersionResponse -> String
showsPrec :: Int -> DeleteProvisioningTemplateVersionResponse -> ShowS
$cshowsPrec :: Int -> DeleteProvisioningTemplateVersionResponse -> ShowS
Prelude.Show, (forall x.
DeleteProvisioningTemplateVersionResponse
-> Rep DeleteProvisioningTemplateVersionResponse x)
-> (forall x.
Rep DeleteProvisioningTemplateVersionResponse x
-> DeleteProvisioningTemplateVersionResponse)
-> Generic DeleteProvisioningTemplateVersionResponse
forall x.
Rep DeleteProvisioningTemplateVersionResponse x
-> DeleteProvisioningTemplateVersionResponse
forall x.
DeleteProvisioningTemplateVersionResponse
-> Rep DeleteProvisioningTemplateVersionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteProvisioningTemplateVersionResponse x
-> DeleteProvisioningTemplateVersionResponse
$cfrom :: forall x.
DeleteProvisioningTemplateVersionResponse
-> Rep DeleteProvisioningTemplateVersionResponse x
Prelude.Generic)
newDeleteProvisioningTemplateVersionResponse ::
Prelude.Int ->
DeleteProvisioningTemplateVersionResponse
newDeleteProvisioningTemplateVersionResponse :: Int -> DeleteProvisioningTemplateVersionResponse
newDeleteProvisioningTemplateVersionResponse
Int
pHttpStatus_ =
DeleteProvisioningTemplateVersionResponse' :: Int -> DeleteProvisioningTemplateVersionResponse
DeleteProvisioningTemplateVersionResponse'
{ $sel:httpStatus:DeleteProvisioningTemplateVersionResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteProvisioningTemplateVersionResponse_httpStatus :: Lens.Lens' DeleteProvisioningTemplateVersionResponse Prelude.Int
deleteProvisioningTemplateVersionResponse_httpStatus :: (Int -> f Int)
-> DeleteProvisioningTemplateVersionResponse
-> f DeleteProvisioningTemplateVersionResponse
deleteProvisioningTemplateVersionResponse_httpStatus = (DeleteProvisioningTemplateVersionResponse -> Int)
-> (DeleteProvisioningTemplateVersionResponse
-> Int -> DeleteProvisioningTemplateVersionResponse)
-> Lens
DeleteProvisioningTemplateVersionResponse
DeleteProvisioningTemplateVersionResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteProvisioningTemplateVersionResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteProvisioningTemplateVersionResponse' :: DeleteProvisioningTemplateVersionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteProvisioningTemplateVersionResponse
s@DeleteProvisioningTemplateVersionResponse' {} Int
a -> DeleteProvisioningTemplateVersionResponse
s {$sel:httpStatus:DeleteProvisioningTemplateVersionResponse' :: Int
httpStatus = Int
a} :: DeleteProvisioningTemplateVersionResponse)
instance
Prelude.NFData
DeleteProvisioningTemplateVersionResponse