{-# 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.RobOMaker.CancelSimulationJob
(
CancelSimulationJob (..),
newCancelSimulationJob,
cancelSimulationJob_job,
CancelSimulationJobResponse (..),
newCancelSimulationJobResponse,
cancelSimulationJobResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.RobOMaker.Types
data CancelSimulationJob = CancelSimulationJob'
{
CancelSimulationJob -> Text
job :: Prelude.Text
}
deriving (CancelSimulationJob -> CancelSimulationJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CancelSimulationJob -> CancelSimulationJob -> Bool
$c/= :: CancelSimulationJob -> CancelSimulationJob -> Bool
== :: CancelSimulationJob -> CancelSimulationJob -> Bool
$c== :: CancelSimulationJob -> CancelSimulationJob -> Bool
Prelude.Eq, ReadPrec [CancelSimulationJob]
ReadPrec CancelSimulationJob
Int -> ReadS CancelSimulationJob
ReadS [CancelSimulationJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CancelSimulationJob]
$creadListPrec :: ReadPrec [CancelSimulationJob]
readPrec :: ReadPrec CancelSimulationJob
$creadPrec :: ReadPrec CancelSimulationJob
readList :: ReadS [CancelSimulationJob]
$creadList :: ReadS [CancelSimulationJob]
readsPrec :: Int -> ReadS CancelSimulationJob
$creadsPrec :: Int -> ReadS CancelSimulationJob
Prelude.Read, Int -> CancelSimulationJob -> ShowS
[CancelSimulationJob] -> ShowS
CancelSimulationJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CancelSimulationJob] -> ShowS
$cshowList :: [CancelSimulationJob] -> ShowS
show :: CancelSimulationJob -> String
$cshow :: CancelSimulationJob -> String
showsPrec :: Int -> CancelSimulationJob -> ShowS
$cshowsPrec :: Int -> CancelSimulationJob -> ShowS
Prelude.Show, forall x. Rep CancelSimulationJob x -> CancelSimulationJob
forall x. CancelSimulationJob -> Rep CancelSimulationJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CancelSimulationJob x -> CancelSimulationJob
$cfrom :: forall x. CancelSimulationJob -> Rep CancelSimulationJob x
Prelude.Generic)
newCancelSimulationJob ::
Prelude.Text ->
CancelSimulationJob
newCancelSimulationJob :: Text -> CancelSimulationJob
newCancelSimulationJob Text
pJob_ =
CancelSimulationJob' {$sel:job:CancelSimulationJob' :: Text
job = Text
pJob_}
cancelSimulationJob_job :: Lens.Lens' CancelSimulationJob Prelude.Text
cancelSimulationJob_job :: Lens' CancelSimulationJob Text
cancelSimulationJob_job = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelSimulationJob' {Text
job :: Text
$sel:job:CancelSimulationJob' :: CancelSimulationJob -> Text
job} -> Text
job) (\s :: CancelSimulationJob
s@CancelSimulationJob' {} Text
a -> CancelSimulationJob
s {$sel:job:CancelSimulationJob' :: Text
job = Text
a} :: CancelSimulationJob)
instance Core.AWSRequest CancelSimulationJob where
type
AWSResponse CancelSimulationJob =
CancelSimulationJobResponse
request :: (Service -> Service)
-> CancelSimulationJob -> Request CancelSimulationJob
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CancelSimulationJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CancelSimulationJob)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> CancelSimulationJobResponse
CancelSimulationJobResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CancelSimulationJob where
hashWithSalt :: Int -> CancelSimulationJob -> Int
hashWithSalt Int
_salt CancelSimulationJob' {Text
job :: Text
$sel:job:CancelSimulationJob' :: CancelSimulationJob -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
job
instance Prelude.NFData CancelSimulationJob where
rnf :: CancelSimulationJob -> ()
rnf CancelSimulationJob' {Text
job :: Text
$sel:job:CancelSimulationJob' :: CancelSimulationJob -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
job
instance Data.ToHeaders CancelSimulationJob where
toHeaders :: CancelSimulationJob -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CancelSimulationJob where
toJSON :: CancelSimulationJob -> Value
toJSON CancelSimulationJob' {Text
job :: Text
$sel:job:CancelSimulationJob' :: CancelSimulationJob -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"job" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
job)]
)
instance Data.ToPath CancelSimulationJob where
toPath :: CancelSimulationJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/cancelSimulationJob"
instance Data.ToQuery CancelSimulationJob where
toQuery :: CancelSimulationJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CancelSimulationJobResponse = CancelSimulationJobResponse'
{
CancelSimulationJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CancelSimulationJobResponse -> CancelSimulationJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CancelSimulationJobResponse -> CancelSimulationJobResponse -> Bool
$c/= :: CancelSimulationJobResponse -> CancelSimulationJobResponse -> Bool
== :: CancelSimulationJobResponse -> CancelSimulationJobResponse -> Bool
$c== :: CancelSimulationJobResponse -> CancelSimulationJobResponse -> Bool
Prelude.Eq, ReadPrec [CancelSimulationJobResponse]
ReadPrec CancelSimulationJobResponse
Int -> ReadS CancelSimulationJobResponse
ReadS [CancelSimulationJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CancelSimulationJobResponse]
$creadListPrec :: ReadPrec [CancelSimulationJobResponse]
readPrec :: ReadPrec CancelSimulationJobResponse
$creadPrec :: ReadPrec CancelSimulationJobResponse
readList :: ReadS [CancelSimulationJobResponse]
$creadList :: ReadS [CancelSimulationJobResponse]
readsPrec :: Int -> ReadS CancelSimulationJobResponse
$creadsPrec :: Int -> ReadS CancelSimulationJobResponse
Prelude.Read, Int -> CancelSimulationJobResponse -> ShowS
[CancelSimulationJobResponse] -> ShowS
CancelSimulationJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CancelSimulationJobResponse] -> ShowS
$cshowList :: [CancelSimulationJobResponse] -> ShowS
show :: CancelSimulationJobResponse -> String
$cshow :: CancelSimulationJobResponse -> String
showsPrec :: Int -> CancelSimulationJobResponse -> ShowS
$cshowsPrec :: Int -> CancelSimulationJobResponse -> ShowS
Prelude.Show, forall x.
Rep CancelSimulationJobResponse x -> CancelSimulationJobResponse
forall x.
CancelSimulationJobResponse -> Rep CancelSimulationJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CancelSimulationJobResponse x -> CancelSimulationJobResponse
$cfrom :: forall x.
CancelSimulationJobResponse -> Rep CancelSimulationJobResponse x
Prelude.Generic)
newCancelSimulationJobResponse ::
Prelude.Int ->
CancelSimulationJobResponse
newCancelSimulationJobResponse :: Int -> CancelSimulationJobResponse
newCancelSimulationJobResponse Int
pHttpStatus_ =
CancelSimulationJobResponse'
{ $sel:httpStatus:CancelSimulationJobResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
cancelSimulationJobResponse_httpStatus :: Lens.Lens' CancelSimulationJobResponse Prelude.Int
cancelSimulationJobResponse_httpStatus :: Lens' CancelSimulationJobResponse Int
cancelSimulationJobResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelSimulationJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:CancelSimulationJobResponse' :: CancelSimulationJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CancelSimulationJobResponse
s@CancelSimulationJobResponse' {} Int
a -> CancelSimulationJobResponse
s {$sel:httpStatus:CancelSimulationJobResponse' :: Int
httpStatus = Int
a} :: CancelSimulationJobResponse)
instance Prelude.NFData CancelSimulationJobResponse where
rnf :: CancelSimulationJobResponse -> ()
rnf CancelSimulationJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:CancelSimulationJobResponse' :: CancelSimulationJobResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus