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