{-# 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.Panorama.RemoveApplicationInstance
(
RemoveApplicationInstance (..),
newRemoveApplicationInstance,
removeApplicationInstance_applicationInstanceId,
RemoveApplicationInstanceResponse (..),
newRemoveApplicationInstanceResponse,
removeApplicationInstanceResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Panorama.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data RemoveApplicationInstance = RemoveApplicationInstance'
{
RemoveApplicationInstance -> Text
applicationInstanceId :: Prelude.Text
}
deriving (RemoveApplicationInstance -> RemoveApplicationInstance -> Bool
(RemoveApplicationInstance -> RemoveApplicationInstance -> Bool)
-> (RemoveApplicationInstance -> RemoveApplicationInstance -> Bool)
-> Eq RemoveApplicationInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveApplicationInstance -> RemoveApplicationInstance -> Bool
$c/= :: RemoveApplicationInstance -> RemoveApplicationInstance -> Bool
== :: RemoveApplicationInstance -> RemoveApplicationInstance -> Bool
$c== :: RemoveApplicationInstance -> RemoveApplicationInstance -> Bool
Prelude.Eq, ReadPrec [RemoveApplicationInstance]
ReadPrec RemoveApplicationInstance
Int -> ReadS RemoveApplicationInstance
ReadS [RemoveApplicationInstance]
(Int -> ReadS RemoveApplicationInstance)
-> ReadS [RemoveApplicationInstance]
-> ReadPrec RemoveApplicationInstance
-> ReadPrec [RemoveApplicationInstance]
-> Read RemoveApplicationInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveApplicationInstance]
$creadListPrec :: ReadPrec [RemoveApplicationInstance]
readPrec :: ReadPrec RemoveApplicationInstance
$creadPrec :: ReadPrec RemoveApplicationInstance
readList :: ReadS [RemoveApplicationInstance]
$creadList :: ReadS [RemoveApplicationInstance]
readsPrec :: Int -> ReadS RemoveApplicationInstance
$creadsPrec :: Int -> ReadS RemoveApplicationInstance
Prelude.Read, Int -> RemoveApplicationInstance -> ShowS
[RemoveApplicationInstance] -> ShowS
RemoveApplicationInstance -> String
(Int -> RemoveApplicationInstance -> ShowS)
-> (RemoveApplicationInstance -> String)
-> ([RemoveApplicationInstance] -> ShowS)
-> Show RemoveApplicationInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveApplicationInstance] -> ShowS
$cshowList :: [RemoveApplicationInstance] -> ShowS
show :: RemoveApplicationInstance -> String
$cshow :: RemoveApplicationInstance -> String
showsPrec :: Int -> RemoveApplicationInstance -> ShowS
$cshowsPrec :: Int -> RemoveApplicationInstance -> ShowS
Prelude.Show, (forall x.
RemoveApplicationInstance -> Rep RemoveApplicationInstance x)
-> (forall x.
Rep RemoveApplicationInstance x -> RemoveApplicationInstance)
-> Generic RemoveApplicationInstance
forall x.
Rep RemoveApplicationInstance x -> RemoveApplicationInstance
forall x.
RemoveApplicationInstance -> Rep RemoveApplicationInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveApplicationInstance x -> RemoveApplicationInstance
$cfrom :: forall x.
RemoveApplicationInstance -> Rep RemoveApplicationInstance x
Prelude.Generic)
newRemoveApplicationInstance ::
Prelude.Text ->
RemoveApplicationInstance
newRemoveApplicationInstance :: Text -> RemoveApplicationInstance
newRemoveApplicationInstance Text
pApplicationInstanceId_ =
RemoveApplicationInstance' :: Text -> RemoveApplicationInstance
RemoveApplicationInstance'
{ $sel:applicationInstanceId:RemoveApplicationInstance' :: Text
applicationInstanceId =
Text
pApplicationInstanceId_
}
removeApplicationInstance_applicationInstanceId :: Lens.Lens' RemoveApplicationInstance Prelude.Text
removeApplicationInstance_applicationInstanceId :: (Text -> f Text)
-> RemoveApplicationInstance -> f RemoveApplicationInstance
removeApplicationInstance_applicationInstanceId = (RemoveApplicationInstance -> Text)
-> (RemoveApplicationInstance -> Text -> RemoveApplicationInstance)
-> Lens
RemoveApplicationInstance RemoveApplicationInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveApplicationInstance' {Text
applicationInstanceId :: Text
$sel:applicationInstanceId:RemoveApplicationInstance' :: RemoveApplicationInstance -> Text
applicationInstanceId} -> Text
applicationInstanceId) (\s :: RemoveApplicationInstance
s@RemoveApplicationInstance' {} Text
a -> RemoveApplicationInstance
s {$sel:applicationInstanceId:RemoveApplicationInstance' :: Text
applicationInstanceId = Text
a} :: RemoveApplicationInstance)
instance Core.AWSRequest RemoveApplicationInstance where
type
AWSResponse RemoveApplicationInstance =
RemoveApplicationInstanceResponse
request :: RemoveApplicationInstance -> Request RemoveApplicationInstance
request = Service
-> RemoveApplicationInstance -> Request RemoveApplicationInstance
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy RemoveApplicationInstance
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RemoveApplicationInstance)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse RemoveApplicationInstance))
-> Logger
-> Service
-> Proxy RemoveApplicationInstance
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RemoveApplicationInstance)))
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 -> RemoveApplicationInstanceResponse
RemoveApplicationInstanceResponse'
(Int -> RemoveApplicationInstanceResponse)
-> Either String Int
-> Either String RemoveApplicationInstanceResponse
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 RemoveApplicationInstance
instance Prelude.NFData RemoveApplicationInstance
instance Core.ToHeaders RemoveApplicationInstance where
toHeaders :: RemoveApplicationInstance -> ResponseHeaders
toHeaders =
ResponseHeaders -> RemoveApplicationInstance -> 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.ToPath RemoveApplicationInstance where
toPath :: RemoveApplicationInstance -> ByteString
toPath RemoveApplicationInstance' {Text
applicationInstanceId :: Text
$sel:applicationInstanceId:RemoveApplicationInstance' :: RemoveApplicationInstance -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/application-instances/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
applicationInstanceId
]
instance Core.ToQuery RemoveApplicationInstance where
toQuery :: RemoveApplicationInstance -> QueryString
toQuery = QueryString -> RemoveApplicationInstance -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data RemoveApplicationInstanceResponse = RemoveApplicationInstanceResponse'
{
RemoveApplicationInstanceResponse -> Int
httpStatus :: Prelude.Int
}
deriving (RemoveApplicationInstanceResponse
-> RemoveApplicationInstanceResponse -> Bool
(RemoveApplicationInstanceResponse
-> RemoveApplicationInstanceResponse -> Bool)
-> (RemoveApplicationInstanceResponse
-> RemoveApplicationInstanceResponse -> Bool)
-> Eq RemoveApplicationInstanceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveApplicationInstanceResponse
-> RemoveApplicationInstanceResponse -> Bool
$c/= :: RemoveApplicationInstanceResponse
-> RemoveApplicationInstanceResponse -> Bool
== :: RemoveApplicationInstanceResponse
-> RemoveApplicationInstanceResponse -> Bool
$c== :: RemoveApplicationInstanceResponse
-> RemoveApplicationInstanceResponse -> Bool
Prelude.Eq, ReadPrec [RemoveApplicationInstanceResponse]
ReadPrec RemoveApplicationInstanceResponse
Int -> ReadS RemoveApplicationInstanceResponse
ReadS [RemoveApplicationInstanceResponse]
(Int -> ReadS RemoveApplicationInstanceResponse)
-> ReadS [RemoveApplicationInstanceResponse]
-> ReadPrec RemoveApplicationInstanceResponse
-> ReadPrec [RemoveApplicationInstanceResponse]
-> Read RemoveApplicationInstanceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveApplicationInstanceResponse]
$creadListPrec :: ReadPrec [RemoveApplicationInstanceResponse]
readPrec :: ReadPrec RemoveApplicationInstanceResponse
$creadPrec :: ReadPrec RemoveApplicationInstanceResponse
readList :: ReadS [RemoveApplicationInstanceResponse]
$creadList :: ReadS [RemoveApplicationInstanceResponse]
readsPrec :: Int -> ReadS RemoveApplicationInstanceResponse
$creadsPrec :: Int -> ReadS RemoveApplicationInstanceResponse
Prelude.Read, Int -> RemoveApplicationInstanceResponse -> ShowS
[RemoveApplicationInstanceResponse] -> ShowS
RemoveApplicationInstanceResponse -> String
(Int -> RemoveApplicationInstanceResponse -> ShowS)
-> (RemoveApplicationInstanceResponse -> String)
-> ([RemoveApplicationInstanceResponse] -> ShowS)
-> Show RemoveApplicationInstanceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveApplicationInstanceResponse] -> ShowS
$cshowList :: [RemoveApplicationInstanceResponse] -> ShowS
show :: RemoveApplicationInstanceResponse -> String
$cshow :: RemoveApplicationInstanceResponse -> String
showsPrec :: Int -> RemoveApplicationInstanceResponse -> ShowS
$cshowsPrec :: Int -> RemoveApplicationInstanceResponse -> ShowS
Prelude.Show, (forall x.
RemoveApplicationInstanceResponse
-> Rep RemoveApplicationInstanceResponse x)
-> (forall x.
Rep RemoveApplicationInstanceResponse x
-> RemoveApplicationInstanceResponse)
-> Generic RemoveApplicationInstanceResponse
forall x.
Rep RemoveApplicationInstanceResponse x
-> RemoveApplicationInstanceResponse
forall x.
RemoveApplicationInstanceResponse
-> Rep RemoveApplicationInstanceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveApplicationInstanceResponse x
-> RemoveApplicationInstanceResponse
$cfrom :: forall x.
RemoveApplicationInstanceResponse
-> Rep RemoveApplicationInstanceResponse x
Prelude.Generic)
newRemoveApplicationInstanceResponse ::
Prelude.Int ->
RemoveApplicationInstanceResponse
newRemoveApplicationInstanceResponse :: Int -> RemoveApplicationInstanceResponse
newRemoveApplicationInstanceResponse Int
pHttpStatus_ =
RemoveApplicationInstanceResponse' :: Int -> RemoveApplicationInstanceResponse
RemoveApplicationInstanceResponse'
{ $sel:httpStatus:RemoveApplicationInstanceResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
removeApplicationInstanceResponse_httpStatus :: Lens.Lens' RemoveApplicationInstanceResponse Prelude.Int
removeApplicationInstanceResponse_httpStatus :: (Int -> f Int)
-> RemoveApplicationInstanceResponse
-> f RemoveApplicationInstanceResponse
removeApplicationInstanceResponse_httpStatus = (RemoveApplicationInstanceResponse -> Int)
-> (RemoveApplicationInstanceResponse
-> Int -> RemoveApplicationInstanceResponse)
-> Lens
RemoveApplicationInstanceResponse
RemoveApplicationInstanceResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveApplicationInstanceResponse' {Int
httpStatus :: Int
$sel:httpStatus:RemoveApplicationInstanceResponse' :: RemoveApplicationInstanceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RemoveApplicationInstanceResponse
s@RemoveApplicationInstanceResponse' {} Int
a -> RemoveApplicationInstanceResponse
s {$sel:httpStatus:RemoveApplicationInstanceResponse' :: Int
httpStatus = Int
a} :: RemoveApplicationInstanceResponse)
instance
Prelude.NFData
RemoveApplicationInstanceResponse