{-# 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.SSMSAP.DeregisterApplication
(
DeregisterApplication (..),
newDeregisterApplication,
deregisterApplication_applicationId,
DeregisterApplicationResponse (..),
newDeregisterApplicationResponse,
deregisterApplicationResponse_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.SSMSAP.Types
data DeregisterApplication = DeregisterApplication'
{ DeregisterApplication -> Text
applicationId :: Prelude.Text
}
deriving (DeregisterApplication -> DeregisterApplication -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeregisterApplication -> DeregisterApplication -> Bool
$c/= :: DeregisterApplication -> DeregisterApplication -> Bool
== :: DeregisterApplication -> DeregisterApplication -> Bool
$c== :: DeregisterApplication -> DeregisterApplication -> Bool
Prelude.Eq, ReadPrec [DeregisterApplication]
ReadPrec DeregisterApplication
Int -> ReadS DeregisterApplication
ReadS [DeregisterApplication]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeregisterApplication]
$creadListPrec :: ReadPrec [DeregisterApplication]
readPrec :: ReadPrec DeregisterApplication
$creadPrec :: ReadPrec DeregisterApplication
readList :: ReadS [DeregisterApplication]
$creadList :: ReadS [DeregisterApplication]
readsPrec :: Int -> ReadS DeregisterApplication
$creadsPrec :: Int -> ReadS DeregisterApplication
Prelude.Read, Int -> DeregisterApplication -> ShowS
[DeregisterApplication] -> ShowS
DeregisterApplication -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeregisterApplication] -> ShowS
$cshowList :: [DeregisterApplication] -> ShowS
show :: DeregisterApplication -> String
$cshow :: DeregisterApplication -> String
showsPrec :: Int -> DeregisterApplication -> ShowS
$cshowsPrec :: Int -> DeregisterApplication -> ShowS
Prelude.Show, forall x. Rep DeregisterApplication x -> DeregisterApplication
forall x. DeregisterApplication -> Rep DeregisterApplication x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeregisterApplication x -> DeregisterApplication
$cfrom :: forall x. DeregisterApplication -> Rep DeregisterApplication x
Prelude.Generic)
newDeregisterApplication ::
Prelude.Text ->
DeregisterApplication
newDeregisterApplication :: Text -> DeregisterApplication
newDeregisterApplication Text
pApplicationId_ =
DeregisterApplication'
{ $sel:applicationId:DeregisterApplication' :: Text
applicationId =
Text
pApplicationId_
}
deregisterApplication_applicationId :: Lens.Lens' DeregisterApplication Prelude.Text
deregisterApplication_applicationId :: Lens' DeregisterApplication Text
deregisterApplication_applicationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeregisterApplication' {Text
applicationId :: Text
$sel:applicationId:DeregisterApplication' :: DeregisterApplication -> Text
applicationId} -> Text
applicationId) (\s :: DeregisterApplication
s@DeregisterApplication' {} Text
a -> DeregisterApplication
s {$sel:applicationId:DeregisterApplication' :: Text
applicationId = Text
a} :: DeregisterApplication)
instance Core.AWSRequest DeregisterApplication where
type
AWSResponse DeregisterApplication =
DeregisterApplicationResponse
request :: (Service -> Service)
-> DeregisterApplication -> Request DeregisterApplication
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 DeregisterApplication
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeregisterApplication)))
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 -> DeregisterApplicationResponse
DeregisterApplicationResponse'
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 DeregisterApplication where
hashWithSalt :: Int -> DeregisterApplication -> Int
hashWithSalt Int
_salt DeregisterApplication' {Text
applicationId :: Text
$sel:applicationId:DeregisterApplication' :: DeregisterApplication -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
applicationId
instance Prelude.NFData DeregisterApplication where
rnf :: DeregisterApplication -> ()
rnf DeregisterApplication' {Text
applicationId :: Text
$sel:applicationId:DeregisterApplication' :: DeregisterApplication -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
applicationId
instance Data.ToHeaders DeregisterApplication where
toHeaders :: DeregisterApplication -> 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 DeregisterApplication where
toJSON :: DeregisterApplication -> Value
toJSON DeregisterApplication' {Text
applicationId :: Text
$sel:applicationId:DeregisterApplication' :: DeregisterApplication -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"ApplicationId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
applicationId)
]
)
instance Data.ToPath DeregisterApplication where
toPath :: DeregisterApplication -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/deregister-application"
instance Data.ToQuery DeregisterApplication where
toQuery :: DeregisterApplication -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeregisterApplicationResponse = DeregisterApplicationResponse'
{
DeregisterApplicationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeregisterApplicationResponse
-> DeregisterApplicationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeregisterApplicationResponse
-> DeregisterApplicationResponse -> Bool
$c/= :: DeregisterApplicationResponse
-> DeregisterApplicationResponse -> Bool
== :: DeregisterApplicationResponse
-> DeregisterApplicationResponse -> Bool
$c== :: DeregisterApplicationResponse
-> DeregisterApplicationResponse -> Bool
Prelude.Eq, ReadPrec [DeregisterApplicationResponse]
ReadPrec DeregisterApplicationResponse
Int -> ReadS DeregisterApplicationResponse
ReadS [DeregisterApplicationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeregisterApplicationResponse]
$creadListPrec :: ReadPrec [DeregisterApplicationResponse]
readPrec :: ReadPrec DeregisterApplicationResponse
$creadPrec :: ReadPrec DeregisterApplicationResponse
readList :: ReadS [DeregisterApplicationResponse]
$creadList :: ReadS [DeregisterApplicationResponse]
readsPrec :: Int -> ReadS DeregisterApplicationResponse
$creadsPrec :: Int -> ReadS DeregisterApplicationResponse
Prelude.Read, Int -> DeregisterApplicationResponse -> ShowS
[DeregisterApplicationResponse] -> ShowS
DeregisterApplicationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeregisterApplicationResponse] -> ShowS
$cshowList :: [DeregisterApplicationResponse] -> ShowS
show :: DeregisterApplicationResponse -> String
$cshow :: DeregisterApplicationResponse -> String
showsPrec :: Int -> DeregisterApplicationResponse -> ShowS
$cshowsPrec :: Int -> DeregisterApplicationResponse -> ShowS
Prelude.Show, forall x.
Rep DeregisterApplicationResponse x
-> DeregisterApplicationResponse
forall x.
DeregisterApplicationResponse
-> Rep DeregisterApplicationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeregisterApplicationResponse x
-> DeregisterApplicationResponse
$cfrom :: forall x.
DeregisterApplicationResponse
-> Rep DeregisterApplicationResponse x
Prelude.Generic)
newDeregisterApplicationResponse ::
Prelude.Int ->
DeregisterApplicationResponse
newDeregisterApplicationResponse :: Int -> DeregisterApplicationResponse
newDeregisterApplicationResponse Int
pHttpStatus_ =
DeregisterApplicationResponse'
{ $sel:httpStatus:DeregisterApplicationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deregisterApplicationResponse_httpStatus :: Lens.Lens' DeregisterApplicationResponse Prelude.Int
deregisterApplicationResponse_httpStatus :: Lens' DeregisterApplicationResponse Int
deregisterApplicationResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeregisterApplicationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeregisterApplicationResponse' :: DeregisterApplicationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeregisterApplicationResponse
s@DeregisterApplicationResponse' {} Int
a -> DeregisterApplicationResponse
s {$sel:httpStatus:DeregisterApplicationResponse' :: Int
httpStatus = Int
a} :: DeregisterApplicationResponse)
instance Prelude.NFData DeregisterApplicationResponse where
rnf :: DeregisterApplicationResponse -> ()
rnf DeregisterApplicationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeregisterApplicationResponse' :: DeregisterApplicationResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus