{-# 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.DeleteSimulationApplication
(
DeleteSimulationApplication (..),
newDeleteSimulationApplication,
deleteSimulationApplication_applicationVersion,
deleteSimulationApplication_application,
DeleteSimulationApplicationResponse (..),
newDeleteSimulationApplicationResponse,
deleteSimulationApplicationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.RobOMaker.Types
data DeleteSimulationApplication = DeleteSimulationApplication'
{
DeleteSimulationApplication -> Maybe Text
applicationVersion :: Prelude.Maybe Prelude.Text,
DeleteSimulationApplication -> Text
application :: Prelude.Text
}
deriving (DeleteSimulationApplication -> DeleteSimulationApplication -> Bool
(DeleteSimulationApplication
-> DeleteSimulationApplication -> Bool)
-> (DeleteSimulationApplication
-> DeleteSimulationApplication -> Bool)
-> Eq DeleteSimulationApplication
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSimulationApplication -> DeleteSimulationApplication -> Bool
$c/= :: DeleteSimulationApplication -> DeleteSimulationApplication -> Bool
== :: DeleteSimulationApplication -> DeleteSimulationApplication -> Bool
$c== :: DeleteSimulationApplication -> DeleteSimulationApplication -> Bool
Prelude.Eq, ReadPrec [DeleteSimulationApplication]
ReadPrec DeleteSimulationApplication
Int -> ReadS DeleteSimulationApplication
ReadS [DeleteSimulationApplication]
(Int -> ReadS DeleteSimulationApplication)
-> ReadS [DeleteSimulationApplication]
-> ReadPrec DeleteSimulationApplication
-> ReadPrec [DeleteSimulationApplication]
-> Read DeleteSimulationApplication
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSimulationApplication]
$creadListPrec :: ReadPrec [DeleteSimulationApplication]
readPrec :: ReadPrec DeleteSimulationApplication
$creadPrec :: ReadPrec DeleteSimulationApplication
readList :: ReadS [DeleteSimulationApplication]
$creadList :: ReadS [DeleteSimulationApplication]
readsPrec :: Int -> ReadS DeleteSimulationApplication
$creadsPrec :: Int -> ReadS DeleteSimulationApplication
Prelude.Read, Int -> DeleteSimulationApplication -> ShowS
[DeleteSimulationApplication] -> ShowS
DeleteSimulationApplication -> String
(Int -> DeleteSimulationApplication -> ShowS)
-> (DeleteSimulationApplication -> String)
-> ([DeleteSimulationApplication] -> ShowS)
-> Show DeleteSimulationApplication
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSimulationApplication] -> ShowS
$cshowList :: [DeleteSimulationApplication] -> ShowS
show :: DeleteSimulationApplication -> String
$cshow :: DeleteSimulationApplication -> String
showsPrec :: Int -> DeleteSimulationApplication -> ShowS
$cshowsPrec :: Int -> DeleteSimulationApplication -> ShowS
Prelude.Show, (forall x.
DeleteSimulationApplication -> Rep DeleteSimulationApplication x)
-> (forall x.
Rep DeleteSimulationApplication x -> DeleteSimulationApplication)
-> Generic DeleteSimulationApplication
forall x.
Rep DeleteSimulationApplication x -> DeleteSimulationApplication
forall x.
DeleteSimulationApplication -> Rep DeleteSimulationApplication x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteSimulationApplication x -> DeleteSimulationApplication
$cfrom :: forall x.
DeleteSimulationApplication -> Rep DeleteSimulationApplication x
Prelude.Generic)
newDeleteSimulationApplication ::
Prelude.Text ->
DeleteSimulationApplication
newDeleteSimulationApplication :: Text -> DeleteSimulationApplication
newDeleteSimulationApplication Text
pApplication_ =
DeleteSimulationApplication' :: Maybe Text -> Text -> DeleteSimulationApplication
DeleteSimulationApplication'
{ $sel:applicationVersion:DeleteSimulationApplication' :: Maybe Text
applicationVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:application:DeleteSimulationApplication' :: Text
application = Text
pApplication_
}
deleteSimulationApplication_applicationVersion :: Lens.Lens' DeleteSimulationApplication (Prelude.Maybe Prelude.Text)
deleteSimulationApplication_applicationVersion :: (Maybe Text -> f (Maybe Text))
-> DeleteSimulationApplication -> f DeleteSimulationApplication
deleteSimulationApplication_applicationVersion = (DeleteSimulationApplication -> Maybe Text)
-> (DeleteSimulationApplication
-> Maybe Text -> DeleteSimulationApplication)
-> Lens
DeleteSimulationApplication
DeleteSimulationApplication
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSimulationApplication' {Maybe Text
applicationVersion :: Maybe Text
$sel:applicationVersion:DeleteSimulationApplication' :: DeleteSimulationApplication -> Maybe Text
applicationVersion} -> Maybe Text
applicationVersion) (\s :: DeleteSimulationApplication
s@DeleteSimulationApplication' {} Maybe Text
a -> DeleteSimulationApplication
s {$sel:applicationVersion:DeleteSimulationApplication' :: Maybe Text
applicationVersion = Maybe Text
a} :: DeleteSimulationApplication)
deleteSimulationApplication_application :: Lens.Lens' DeleteSimulationApplication Prelude.Text
deleteSimulationApplication_application :: (Text -> f Text)
-> DeleteSimulationApplication -> f DeleteSimulationApplication
deleteSimulationApplication_application = (DeleteSimulationApplication -> Text)
-> (DeleteSimulationApplication
-> Text -> DeleteSimulationApplication)
-> Lens
DeleteSimulationApplication DeleteSimulationApplication Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSimulationApplication' {Text
application :: Text
$sel:application:DeleteSimulationApplication' :: DeleteSimulationApplication -> Text
application} -> Text
application) (\s :: DeleteSimulationApplication
s@DeleteSimulationApplication' {} Text
a -> DeleteSimulationApplication
s {$sel:application:DeleteSimulationApplication' :: Text
application = Text
a} :: DeleteSimulationApplication)
instance Core.AWSRequest DeleteSimulationApplication where
type
AWSResponse DeleteSimulationApplication =
DeleteSimulationApplicationResponse
request :: DeleteSimulationApplication -> Request DeleteSimulationApplication
request = Service
-> DeleteSimulationApplication
-> Request DeleteSimulationApplication
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteSimulationApplication
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteSimulationApplication)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteSimulationApplication))
-> Logger
-> Service
-> Proxy DeleteSimulationApplication
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteSimulationApplication)))
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 -> DeleteSimulationApplicationResponse
DeleteSimulationApplicationResponse'
(Int -> DeleteSimulationApplicationResponse)
-> Either String Int
-> Either String DeleteSimulationApplicationResponse
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 DeleteSimulationApplication
instance Prelude.NFData DeleteSimulationApplication
instance Core.ToHeaders DeleteSimulationApplication where
toHeaders :: DeleteSimulationApplication -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteSimulationApplication -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DeleteSimulationApplication where
toJSON :: DeleteSimulationApplication -> Value
toJSON DeleteSimulationApplication' {Maybe Text
Text
application :: Text
applicationVersion :: Maybe Text
$sel:application:DeleteSimulationApplication' :: DeleteSimulationApplication -> Text
$sel:applicationVersion:DeleteSimulationApplication' :: DeleteSimulationApplication -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"applicationVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
applicationVersion,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"application" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
application)
]
)
instance Core.ToPath DeleteSimulationApplication where
toPath :: DeleteSimulationApplication -> ByteString
toPath = ByteString -> DeleteSimulationApplication -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/deleteSimulationApplication"
instance Core.ToQuery DeleteSimulationApplication where
toQuery :: DeleteSimulationApplication -> QueryString
toQuery = QueryString -> DeleteSimulationApplication -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteSimulationApplicationResponse = DeleteSimulationApplicationResponse'
{
DeleteSimulationApplicationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteSimulationApplicationResponse
-> DeleteSimulationApplicationResponse -> Bool
(DeleteSimulationApplicationResponse
-> DeleteSimulationApplicationResponse -> Bool)
-> (DeleteSimulationApplicationResponse
-> DeleteSimulationApplicationResponse -> Bool)
-> Eq DeleteSimulationApplicationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSimulationApplicationResponse
-> DeleteSimulationApplicationResponse -> Bool
$c/= :: DeleteSimulationApplicationResponse
-> DeleteSimulationApplicationResponse -> Bool
== :: DeleteSimulationApplicationResponse
-> DeleteSimulationApplicationResponse -> Bool
$c== :: DeleteSimulationApplicationResponse
-> DeleteSimulationApplicationResponse -> Bool
Prelude.Eq, ReadPrec [DeleteSimulationApplicationResponse]
ReadPrec DeleteSimulationApplicationResponse
Int -> ReadS DeleteSimulationApplicationResponse
ReadS [DeleteSimulationApplicationResponse]
(Int -> ReadS DeleteSimulationApplicationResponse)
-> ReadS [DeleteSimulationApplicationResponse]
-> ReadPrec DeleteSimulationApplicationResponse
-> ReadPrec [DeleteSimulationApplicationResponse]
-> Read DeleteSimulationApplicationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSimulationApplicationResponse]
$creadListPrec :: ReadPrec [DeleteSimulationApplicationResponse]
readPrec :: ReadPrec DeleteSimulationApplicationResponse
$creadPrec :: ReadPrec DeleteSimulationApplicationResponse
readList :: ReadS [DeleteSimulationApplicationResponse]
$creadList :: ReadS [DeleteSimulationApplicationResponse]
readsPrec :: Int -> ReadS DeleteSimulationApplicationResponse
$creadsPrec :: Int -> ReadS DeleteSimulationApplicationResponse
Prelude.Read, Int -> DeleteSimulationApplicationResponse -> ShowS
[DeleteSimulationApplicationResponse] -> ShowS
DeleteSimulationApplicationResponse -> String
(Int -> DeleteSimulationApplicationResponse -> ShowS)
-> (DeleteSimulationApplicationResponse -> String)
-> ([DeleteSimulationApplicationResponse] -> ShowS)
-> Show DeleteSimulationApplicationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSimulationApplicationResponse] -> ShowS
$cshowList :: [DeleteSimulationApplicationResponse] -> ShowS
show :: DeleteSimulationApplicationResponse -> String
$cshow :: DeleteSimulationApplicationResponse -> String
showsPrec :: Int -> DeleteSimulationApplicationResponse -> ShowS
$cshowsPrec :: Int -> DeleteSimulationApplicationResponse -> ShowS
Prelude.Show, (forall x.
DeleteSimulationApplicationResponse
-> Rep DeleteSimulationApplicationResponse x)
-> (forall x.
Rep DeleteSimulationApplicationResponse x
-> DeleteSimulationApplicationResponse)
-> Generic DeleteSimulationApplicationResponse
forall x.
Rep DeleteSimulationApplicationResponse x
-> DeleteSimulationApplicationResponse
forall x.
DeleteSimulationApplicationResponse
-> Rep DeleteSimulationApplicationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteSimulationApplicationResponse x
-> DeleteSimulationApplicationResponse
$cfrom :: forall x.
DeleteSimulationApplicationResponse
-> Rep DeleteSimulationApplicationResponse x
Prelude.Generic)
newDeleteSimulationApplicationResponse ::
Prelude.Int ->
DeleteSimulationApplicationResponse
newDeleteSimulationApplicationResponse :: Int -> DeleteSimulationApplicationResponse
newDeleteSimulationApplicationResponse Int
pHttpStatus_ =
DeleteSimulationApplicationResponse' :: Int -> DeleteSimulationApplicationResponse
DeleteSimulationApplicationResponse'
{ $sel:httpStatus:DeleteSimulationApplicationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteSimulationApplicationResponse_httpStatus :: Lens.Lens' DeleteSimulationApplicationResponse Prelude.Int
deleteSimulationApplicationResponse_httpStatus :: (Int -> f Int)
-> DeleteSimulationApplicationResponse
-> f DeleteSimulationApplicationResponse
deleteSimulationApplicationResponse_httpStatus = (DeleteSimulationApplicationResponse -> Int)
-> (DeleteSimulationApplicationResponse
-> Int -> DeleteSimulationApplicationResponse)
-> Lens
DeleteSimulationApplicationResponse
DeleteSimulationApplicationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSimulationApplicationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteSimulationApplicationResponse' :: DeleteSimulationApplicationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteSimulationApplicationResponse
s@DeleteSimulationApplicationResponse' {} Int
a -> DeleteSimulationApplicationResponse
s {$sel:httpStatus:DeleteSimulationApplicationResponse' :: Int
httpStatus = Int
a} :: DeleteSimulationApplicationResponse)
instance
Prelude.NFData
DeleteSimulationApplicationResponse