{-# 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.DeleteJobExecution
(
DeleteJobExecution (..),
newDeleteJobExecution,
deleteJobExecution_force,
deleteJobExecution_namespaceId,
deleteJobExecution_jobId,
deleteJobExecution_thingName,
deleteJobExecution_executionNumber,
DeleteJobExecutionResponse (..),
newDeleteJobExecutionResponse,
)
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 DeleteJobExecution = DeleteJobExecution'
{
DeleteJobExecution -> Maybe Bool
force :: Prelude.Maybe Prelude.Bool,
DeleteJobExecution -> Maybe Text
namespaceId :: Prelude.Maybe Prelude.Text,
DeleteJobExecution -> Text
jobId :: Prelude.Text,
DeleteJobExecution -> Text
thingName :: Prelude.Text,
DeleteJobExecution -> Integer
executionNumber :: Prelude.Integer
}
deriving (DeleteJobExecution -> DeleteJobExecution -> Bool
(DeleteJobExecution -> DeleteJobExecution -> Bool)
-> (DeleteJobExecution -> DeleteJobExecution -> Bool)
-> Eq DeleteJobExecution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteJobExecution -> DeleteJobExecution -> Bool
$c/= :: DeleteJobExecution -> DeleteJobExecution -> Bool
== :: DeleteJobExecution -> DeleteJobExecution -> Bool
$c== :: DeleteJobExecution -> DeleteJobExecution -> Bool
Prelude.Eq, ReadPrec [DeleteJobExecution]
ReadPrec DeleteJobExecution
Int -> ReadS DeleteJobExecution
ReadS [DeleteJobExecution]
(Int -> ReadS DeleteJobExecution)
-> ReadS [DeleteJobExecution]
-> ReadPrec DeleteJobExecution
-> ReadPrec [DeleteJobExecution]
-> Read DeleteJobExecution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteJobExecution]
$creadListPrec :: ReadPrec [DeleteJobExecution]
readPrec :: ReadPrec DeleteJobExecution
$creadPrec :: ReadPrec DeleteJobExecution
readList :: ReadS [DeleteJobExecution]
$creadList :: ReadS [DeleteJobExecution]
readsPrec :: Int -> ReadS DeleteJobExecution
$creadsPrec :: Int -> ReadS DeleteJobExecution
Prelude.Read, Int -> DeleteJobExecution -> ShowS
[DeleteJobExecution] -> ShowS
DeleteJobExecution -> String
(Int -> DeleteJobExecution -> ShowS)
-> (DeleteJobExecution -> String)
-> ([DeleteJobExecution] -> ShowS)
-> Show DeleteJobExecution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteJobExecution] -> ShowS
$cshowList :: [DeleteJobExecution] -> ShowS
show :: DeleteJobExecution -> String
$cshow :: DeleteJobExecution -> String
showsPrec :: Int -> DeleteJobExecution -> ShowS
$cshowsPrec :: Int -> DeleteJobExecution -> ShowS
Prelude.Show, (forall x. DeleteJobExecution -> Rep DeleteJobExecution x)
-> (forall x. Rep DeleteJobExecution x -> DeleteJobExecution)
-> Generic DeleteJobExecution
forall x. Rep DeleteJobExecution x -> DeleteJobExecution
forall x. DeleteJobExecution -> Rep DeleteJobExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteJobExecution x -> DeleteJobExecution
$cfrom :: forall x. DeleteJobExecution -> Rep DeleteJobExecution x
Prelude.Generic)
newDeleteJobExecution ::
Prelude.Text ->
Prelude.Text ->
Prelude.Integer ->
DeleteJobExecution
newDeleteJobExecution :: Text -> Text -> Integer -> DeleteJobExecution
newDeleteJobExecution
Text
pJobId_
Text
pThingName_
Integer
pExecutionNumber_ =
DeleteJobExecution' :: Maybe Bool
-> Maybe Text -> Text -> Text -> Integer -> DeleteJobExecution
DeleteJobExecution'
{ $sel:force:DeleteJobExecution' :: Maybe Bool
force = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:namespaceId:DeleteJobExecution' :: Maybe Text
namespaceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:jobId:DeleteJobExecution' :: Text
jobId = Text
pJobId_,
$sel:thingName:DeleteJobExecution' :: Text
thingName = Text
pThingName_,
$sel:executionNumber:DeleteJobExecution' :: Integer
executionNumber = Integer
pExecutionNumber_
}
deleteJobExecution_force :: Lens.Lens' DeleteJobExecution (Prelude.Maybe Prelude.Bool)
deleteJobExecution_force :: (Maybe Bool -> f (Maybe Bool))
-> DeleteJobExecution -> f DeleteJobExecution
deleteJobExecution_force = (DeleteJobExecution -> Maybe Bool)
-> (DeleteJobExecution -> Maybe Bool -> DeleteJobExecution)
-> Lens
DeleteJobExecution DeleteJobExecution (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteJobExecution' {Maybe Bool
force :: Maybe Bool
$sel:force:DeleteJobExecution' :: DeleteJobExecution -> Maybe Bool
force} -> Maybe Bool
force) (\s :: DeleteJobExecution
s@DeleteJobExecution' {} Maybe Bool
a -> DeleteJobExecution
s {$sel:force:DeleteJobExecution' :: Maybe Bool
force = Maybe Bool
a} :: DeleteJobExecution)
deleteJobExecution_namespaceId :: Lens.Lens' DeleteJobExecution (Prelude.Maybe Prelude.Text)
deleteJobExecution_namespaceId :: (Maybe Text -> f (Maybe Text))
-> DeleteJobExecution -> f DeleteJobExecution
deleteJobExecution_namespaceId = (DeleteJobExecution -> Maybe Text)
-> (DeleteJobExecution -> Maybe Text -> DeleteJobExecution)
-> Lens
DeleteJobExecution DeleteJobExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteJobExecution' {Maybe Text
namespaceId :: Maybe Text
$sel:namespaceId:DeleteJobExecution' :: DeleteJobExecution -> Maybe Text
namespaceId} -> Maybe Text
namespaceId) (\s :: DeleteJobExecution
s@DeleteJobExecution' {} Maybe Text
a -> DeleteJobExecution
s {$sel:namespaceId:DeleteJobExecution' :: Maybe Text
namespaceId = Maybe Text
a} :: DeleteJobExecution)
deleteJobExecution_jobId :: Lens.Lens' DeleteJobExecution Prelude.Text
deleteJobExecution_jobId :: (Text -> f Text) -> DeleteJobExecution -> f DeleteJobExecution
deleteJobExecution_jobId = (DeleteJobExecution -> Text)
-> (DeleteJobExecution -> Text -> DeleteJobExecution)
-> Lens DeleteJobExecution DeleteJobExecution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteJobExecution' {Text
jobId :: Text
$sel:jobId:DeleteJobExecution' :: DeleteJobExecution -> Text
jobId} -> Text
jobId) (\s :: DeleteJobExecution
s@DeleteJobExecution' {} Text
a -> DeleteJobExecution
s {$sel:jobId:DeleteJobExecution' :: Text
jobId = Text
a} :: DeleteJobExecution)
deleteJobExecution_thingName :: Lens.Lens' DeleteJobExecution Prelude.Text
deleteJobExecution_thingName :: (Text -> f Text) -> DeleteJobExecution -> f DeleteJobExecution
deleteJobExecution_thingName = (DeleteJobExecution -> Text)
-> (DeleteJobExecution -> Text -> DeleteJobExecution)
-> Lens DeleteJobExecution DeleteJobExecution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteJobExecution' {Text
thingName :: Text
$sel:thingName:DeleteJobExecution' :: DeleteJobExecution -> Text
thingName} -> Text
thingName) (\s :: DeleteJobExecution
s@DeleteJobExecution' {} Text
a -> DeleteJobExecution
s {$sel:thingName:DeleteJobExecution' :: Text
thingName = Text
a} :: DeleteJobExecution)
deleteJobExecution_executionNumber :: Lens.Lens' DeleteJobExecution Prelude.Integer
deleteJobExecution_executionNumber :: (Integer -> f Integer)
-> DeleteJobExecution -> f DeleteJobExecution
deleteJobExecution_executionNumber = (DeleteJobExecution -> Integer)
-> (DeleteJobExecution -> Integer -> DeleteJobExecution)
-> Lens DeleteJobExecution DeleteJobExecution Integer Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteJobExecution' {Integer
executionNumber :: Integer
$sel:executionNumber:DeleteJobExecution' :: DeleteJobExecution -> Integer
executionNumber} -> Integer
executionNumber) (\s :: DeleteJobExecution
s@DeleteJobExecution' {} Integer
a -> DeleteJobExecution
s {$sel:executionNumber:DeleteJobExecution' :: Integer
executionNumber = Integer
a} :: DeleteJobExecution)
instance Core.AWSRequest DeleteJobExecution where
type
AWSResponse DeleteJobExecution =
DeleteJobExecutionResponse
request :: DeleteJobExecution -> Request DeleteJobExecution
request = Service -> DeleteJobExecution -> Request DeleteJobExecution
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteJobExecution
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteJobExecution)))
response =
AWSResponse DeleteJobExecution
-> Logger
-> Service
-> Proxy DeleteJobExecution
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteJobExecution)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteJobExecution
DeleteJobExecutionResponse
DeleteJobExecutionResponse'
instance Prelude.Hashable DeleteJobExecution
instance Prelude.NFData DeleteJobExecution
instance Core.ToHeaders DeleteJobExecution where
toHeaders :: DeleteJobExecution -> [Header]
toHeaders = [Header] -> DeleteJobExecution -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteJobExecution where
toPath :: DeleteJobExecution -> ByteString
toPath DeleteJobExecution' {Integer
Maybe Bool
Maybe Text
Text
executionNumber :: Integer
thingName :: Text
jobId :: Text
namespaceId :: Maybe Text
force :: Maybe Bool
$sel:executionNumber:DeleteJobExecution' :: DeleteJobExecution -> Integer
$sel:thingName:DeleteJobExecution' :: DeleteJobExecution -> Text
$sel:jobId:DeleteJobExecution' :: DeleteJobExecution -> Text
$sel:namespaceId:DeleteJobExecution' :: DeleteJobExecution -> Maybe Text
$sel:force:DeleteJobExecution' :: DeleteJobExecution -> Maybe Bool
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/things/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
thingName,
ByteString
"/jobs/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
jobId,
ByteString
"/executionNumber/",
Integer -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Integer
executionNumber
]
instance Core.ToQuery DeleteJobExecution where
toQuery :: DeleteJobExecution -> QueryString
toQuery DeleteJobExecution' {Integer
Maybe Bool
Maybe Text
Text
executionNumber :: Integer
thingName :: Text
jobId :: Text
namespaceId :: Maybe Text
force :: Maybe Bool
$sel:executionNumber:DeleteJobExecution' :: DeleteJobExecution -> Integer
$sel:thingName:DeleteJobExecution' :: DeleteJobExecution -> Text
$sel:jobId:DeleteJobExecution' :: DeleteJobExecution -> Text
$sel:namespaceId:DeleteJobExecution' :: DeleteJobExecution -> Maybe Text
$sel:force:DeleteJobExecution' :: DeleteJobExecution -> Maybe Bool
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"force" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
force,
ByteString
"namespaceId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
namespaceId
]
data DeleteJobExecutionResponse = DeleteJobExecutionResponse'
{
}
deriving (DeleteJobExecutionResponse -> DeleteJobExecutionResponse -> Bool
(DeleteJobExecutionResponse -> DeleteJobExecutionResponse -> Bool)
-> (DeleteJobExecutionResponse
-> DeleteJobExecutionResponse -> Bool)
-> Eq DeleteJobExecutionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteJobExecutionResponse -> DeleteJobExecutionResponse -> Bool
$c/= :: DeleteJobExecutionResponse -> DeleteJobExecutionResponse -> Bool
== :: DeleteJobExecutionResponse -> DeleteJobExecutionResponse -> Bool
$c== :: DeleteJobExecutionResponse -> DeleteJobExecutionResponse -> Bool
Prelude.Eq, ReadPrec [DeleteJobExecutionResponse]
ReadPrec DeleteJobExecutionResponse
Int -> ReadS DeleteJobExecutionResponse
ReadS [DeleteJobExecutionResponse]
(Int -> ReadS DeleteJobExecutionResponse)
-> ReadS [DeleteJobExecutionResponse]
-> ReadPrec DeleteJobExecutionResponse
-> ReadPrec [DeleteJobExecutionResponse]
-> Read DeleteJobExecutionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteJobExecutionResponse]
$creadListPrec :: ReadPrec [DeleteJobExecutionResponse]
readPrec :: ReadPrec DeleteJobExecutionResponse
$creadPrec :: ReadPrec DeleteJobExecutionResponse
readList :: ReadS [DeleteJobExecutionResponse]
$creadList :: ReadS [DeleteJobExecutionResponse]
readsPrec :: Int -> ReadS DeleteJobExecutionResponse
$creadsPrec :: Int -> ReadS DeleteJobExecutionResponse
Prelude.Read, Int -> DeleteJobExecutionResponse -> ShowS
[DeleteJobExecutionResponse] -> ShowS
DeleteJobExecutionResponse -> String
(Int -> DeleteJobExecutionResponse -> ShowS)
-> (DeleteJobExecutionResponse -> String)
-> ([DeleteJobExecutionResponse] -> ShowS)
-> Show DeleteJobExecutionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteJobExecutionResponse] -> ShowS
$cshowList :: [DeleteJobExecutionResponse] -> ShowS
show :: DeleteJobExecutionResponse -> String
$cshow :: DeleteJobExecutionResponse -> String
showsPrec :: Int -> DeleteJobExecutionResponse -> ShowS
$cshowsPrec :: Int -> DeleteJobExecutionResponse -> ShowS
Prelude.Show, (forall x.
DeleteJobExecutionResponse -> Rep DeleteJobExecutionResponse x)
-> (forall x.
Rep DeleteJobExecutionResponse x -> DeleteJobExecutionResponse)
-> Generic DeleteJobExecutionResponse
forall x.
Rep DeleteJobExecutionResponse x -> DeleteJobExecutionResponse
forall x.
DeleteJobExecutionResponse -> Rep DeleteJobExecutionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteJobExecutionResponse x -> DeleteJobExecutionResponse
$cfrom :: forall x.
DeleteJobExecutionResponse -> Rep DeleteJobExecutionResponse x
Prelude.Generic)
newDeleteJobExecutionResponse ::
DeleteJobExecutionResponse
newDeleteJobExecutionResponse :: DeleteJobExecutionResponse
newDeleteJobExecutionResponse =
DeleteJobExecutionResponse
DeleteJobExecutionResponse'
instance Prelude.NFData DeleteJobExecutionResponse