{-# 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.SimSpaceWeaver.DeleteApp
(
DeleteApp (..),
newDeleteApp,
deleteApp_app,
deleteApp_domain,
deleteApp_simulation,
DeleteAppResponse (..),
newDeleteAppResponse,
deleteAppResponse_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.SimSpaceWeaver.Types
data DeleteApp = DeleteApp'
{
DeleteApp -> Text
app :: Prelude.Text,
DeleteApp -> Text
domain :: Prelude.Text,
DeleteApp -> Text
simulation :: Prelude.Text
}
deriving (DeleteApp -> DeleteApp -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteApp -> DeleteApp -> Bool
$c/= :: DeleteApp -> DeleteApp -> Bool
== :: DeleteApp -> DeleteApp -> Bool
$c== :: DeleteApp -> DeleteApp -> Bool
Prelude.Eq, ReadPrec [DeleteApp]
ReadPrec DeleteApp
Int -> ReadS DeleteApp
ReadS [DeleteApp]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteApp]
$creadListPrec :: ReadPrec [DeleteApp]
readPrec :: ReadPrec DeleteApp
$creadPrec :: ReadPrec DeleteApp
readList :: ReadS [DeleteApp]
$creadList :: ReadS [DeleteApp]
readsPrec :: Int -> ReadS DeleteApp
$creadsPrec :: Int -> ReadS DeleteApp
Prelude.Read, Int -> DeleteApp -> ShowS
[DeleteApp] -> ShowS
DeleteApp -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteApp] -> ShowS
$cshowList :: [DeleteApp] -> ShowS
show :: DeleteApp -> String
$cshow :: DeleteApp -> String
showsPrec :: Int -> DeleteApp -> ShowS
$cshowsPrec :: Int -> DeleteApp -> ShowS
Prelude.Show, forall x. Rep DeleteApp x -> DeleteApp
forall x. DeleteApp -> Rep DeleteApp x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteApp x -> DeleteApp
$cfrom :: forall x. DeleteApp -> Rep DeleteApp x
Prelude.Generic)
newDeleteApp ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DeleteApp
newDeleteApp :: Text -> Text -> Text -> DeleteApp
newDeleteApp Text
pApp_ Text
pDomain_ Text
pSimulation_ =
DeleteApp'
{ $sel:app:DeleteApp' :: Text
app = Text
pApp_,
$sel:domain:DeleteApp' :: Text
domain = Text
pDomain_,
$sel:simulation:DeleteApp' :: Text
simulation = Text
pSimulation_
}
deleteApp_app :: Lens.Lens' DeleteApp Prelude.Text
deleteApp_app :: Lens' DeleteApp Text
deleteApp_app = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApp' {Text
app :: Text
$sel:app:DeleteApp' :: DeleteApp -> Text
app} -> Text
app) (\s :: DeleteApp
s@DeleteApp' {} Text
a -> DeleteApp
s {$sel:app:DeleteApp' :: Text
app = Text
a} :: DeleteApp)
deleteApp_domain :: Lens.Lens' DeleteApp Prelude.Text
deleteApp_domain :: Lens' DeleteApp Text
deleteApp_domain = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApp' {Text
domain :: Text
$sel:domain:DeleteApp' :: DeleteApp -> Text
domain} -> Text
domain) (\s :: DeleteApp
s@DeleteApp' {} Text
a -> DeleteApp
s {$sel:domain:DeleteApp' :: Text
domain = Text
a} :: DeleteApp)
deleteApp_simulation :: Lens.Lens' DeleteApp Prelude.Text
deleteApp_simulation :: Lens' DeleteApp Text
deleteApp_simulation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApp' {Text
simulation :: Text
$sel:simulation:DeleteApp' :: DeleteApp -> Text
simulation} -> Text
simulation) (\s :: DeleteApp
s@DeleteApp' {} Text
a -> DeleteApp
s {$sel:simulation:DeleteApp' :: Text
simulation = Text
a} :: DeleteApp)
instance Core.AWSRequest DeleteApp where
type AWSResponse DeleteApp = DeleteAppResponse
request :: (Service -> Service) -> DeleteApp -> Request DeleteApp
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteApp
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteApp)))
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 -> DeleteAppResponse
DeleteAppResponse'
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 DeleteApp where
hashWithSalt :: Int -> DeleteApp -> Int
hashWithSalt Int
_salt DeleteApp' {Text
simulation :: Text
domain :: Text
app :: Text
$sel:simulation:DeleteApp' :: DeleteApp -> Text
$sel:domain:DeleteApp' :: DeleteApp -> Text
$sel:app:DeleteApp' :: DeleteApp -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
app
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
domain
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
simulation
instance Prelude.NFData DeleteApp where
rnf :: DeleteApp -> ()
rnf DeleteApp' {Text
simulation :: Text
domain :: Text
app :: Text
$sel:simulation:DeleteApp' :: DeleteApp -> Text
$sel:domain:DeleteApp' :: DeleteApp -> Text
$sel:app:DeleteApp' :: DeleteApp -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
app
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
domain
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
simulation
instance Data.ToHeaders DeleteApp where
toHeaders :: DeleteApp -> 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.ToPath DeleteApp where
toPath :: DeleteApp -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/deleteapp"
instance Data.ToQuery DeleteApp where
toQuery :: DeleteApp -> QueryString
toQuery DeleteApp' {Text
simulation :: Text
domain :: Text
app :: Text
$sel:simulation:DeleteApp' :: DeleteApp -> Text
$sel:domain:DeleteApp' :: DeleteApp -> Text
$sel:app:DeleteApp' :: DeleteApp -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"app" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
app,
ByteString
"domain" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
domain,
ByteString
"simulation" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
simulation
]
data DeleteAppResponse = DeleteAppResponse'
{
DeleteAppResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteAppResponse -> DeleteAppResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAppResponse -> DeleteAppResponse -> Bool
$c/= :: DeleteAppResponse -> DeleteAppResponse -> Bool
== :: DeleteAppResponse -> DeleteAppResponse -> Bool
$c== :: DeleteAppResponse -> DeleteAppResponse -> Bool
Prelude.Eq, ReadPrec [DeleteAppResponse]
ReadPrec DeleteAppResponse
Int -> ReadS DeleteAppResponse
ReadS [DeleteAppResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAppResponse]
$creadListPrec :: ReadPrec [DeleteAppResponse]
readPrec :: ReadPrec DeleteAppResponse
$creadPrec :: ReadPrec DeleteAppResponse
readList :: ReadS [DeleteAppResponse]
$creadList :: ReadS [DeleteAppResponse]
readsPrec :: Int -> ReadS DeleteAppResponse
$creadsPrec :: Int -> ReadS DeleteAppResponse
Prelude.Read, Int -> DeleteAppResponse -> ShowS
[DeleteAppResponse] -> ShowS
DeleteAppResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAppResponse] -> ShowS
$cshowList :: [DeleteAppResponse] -> ShowS
show :: DeleteAppResponse -> String
$cshow :: DeleteAppResponse -> String
showsPrec :: Int -> DeleteAppResponse -> ShowS
$cshowsPrec :: Int -> DeleteAppResponse -> ShowS
Prelude.Show, forall x. Rep DeleteAppResponse x -> DeleteAppResponse
forall x. DeleteAppResponse -> Rep DeleteAppResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteAppResponse x -> DeleteAppResponse
$cfrom :: forall x. DeleteAppResponse -> Rep DeleteAppResponse x
Prelude.Generic)
newDeleteAppResponse ::
Prelude.Int ->
DeleteAppResponse
newDeleteAppResponse :: Int -> DeleteAppResponse
newDeleteAppResponse Int
pHttpStatus_ =
DeleteAppResponse' {$sel:httpStatus:DeleteAppResponse' :: Int
httpStatus = Int
pHttpStatus_}
deleteAppResponse_httpStatus :: Lens.Lens' DeleteAppResponse Prelude.Int
deleteAppResponse_httpStatus :: Lens' DeleteAppResponse Int
deleteAppResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAppResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteAppResponse' :: DeleteAppResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteAppResponse
s@DeleteAppResponse' {} Int
a -> DeleteAppResponse
s {$sel:httpStatus:DeleteAppResponse' :: Int
httpStatus = Int
a} :: DeleteAppResponse)
instance Prelude.NFData DeleteAppResponse where
rnf :: DeleteAppResponse -> ()
rnf DeleteAppResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteAppResponse' :: DeleteAppResponse -> Int
..} = forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus