{-# 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.KinesisAnalytics.DeleteApplicationOutput
(
DeleteApplicationOutput (..),
newDeleteApplicationOutput,
deleteApplicationOutput_applicationName,
deleteApplicationOutput_currentApplicationVersionId,
deleteApplicationOutput_outputId,
DeleteApplicationOutputResponse (..),
newDeleteApplicationOutputResponse,
deleteApplicationOutputResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.KinesisAnalytics.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteApplicationOutput = DeleteApplicationOutput'
{
DeleteApplicationOutput -> Text
applicationName :: Prelude.Text,
DeleteApplicationOutput -> Natural
currentApplicationVersionId :: Prelude.Natural,
DeleteApplicationOutput -> Text
outputId :: Prelude.Text
}
deriving (DeleteApplicationOutput -> DeleteApplicationOutput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteApplicationOutput -> DeleteApplicationOutput -> Bool
$c/= :: DeleteApplicationOutput -> DeleteApplicationOutput -> Bool
== :: DeleteApplicationOutput -> DeleteApplicationOutput -> Bool
$c== :: DeleteApplicationOutput -> DeleteApplicationOutput -> Bool
Prelude.Eq, ReadPrec [DeleteApplicationOutput]
ReadPrec DeleteApplicationOutput
Int -> ReadS DeleteApplicationOutput
ReadS [DeleteApplicationOutput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteApplicationOutput]
$creadListPrec :: ReadPrec [DeleteApplicationOutput]
readPrec :: ReadPrec DeleteApplicationOutput
$creadPrec :: ReadPrec DeleteApplicationOutput
readList :: ReadS [DeleteApplicationOutput]
$creadList :: ReadS [DeleteApplicationOutput]
readsPrec :: Int -> ReadS DeleteApplicationOutput
$creadsPrec :: Int -> ReadS DeleteApplicationOutput
Prelude.Read, Int -> DeleteApplicationOutput -> ShowS
[DeleteApplicationOutput] -> ShowS
DeleteApplicationOutput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteApplicationOutput] -> ShowS
$cshowList :: [DeleteApplicationOutput] -> ShowS
show :: DeleteApplicationOutput -> String
$cshow :: DeleteApplicationOutput -> String
showsPrec :: Int -> DeleteApplicationOutput -> ShowS
$cshowsPrec :: Int -> DeleteApplicationOutput -> ShowS
Prelude.Show, forall x. Rep DeleteApplicationOutput x -> DeleteApplicationOutput
forall x. DeleteApplicationOutput -> Rep DeleteApplicationOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteApplicationOutput x -> DeleteApplicationOutput
$cfrom :: forall x. DeleteApplicationOutput -> Rep DeleteApplicationOutput x
Prelude.Generic)
newDeleteApplicationOutput ::
Prelude.Text ->
Prelude.Natural ->
Prelude.Text ->
DeleteApplicationOutput
newDeleteApplicationOutput :: Text -> Natural -> Text -> DeleteApplicationOutput
newDeleteApplicationOutput
Text
pApplicationName_
Natural
pCurrentApplicationVersionId_
Text
pOutputId_ =
DeleteApplicationOutput'
{ $sel:applicationName:DeleteApplicationOutput' :: Text
applicationName =
Text
pApplicationName_,
$sel:currentApplicationVersionId:DeleteApplicationOutput' :: Natural
currentApplicationVersionId =
Natural
pCurrentApplicationVersionId_,
$sel:outputId:DeleteApplicationOutput' :: Text
outputId = Text
pOutputId_
}
deleteApplicationOutput_applicationName :: Lens.Lens' DeleteApplicationOutput Prelude.Text
deleteApplicationOutput_applicationName :: Lens' DeleteApplicationOutput Text
deleteApplicationOutput_applicationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApplicationOutput' {Text
applicationName :: Text
$sel:applicationName:DeleteApplicationOutput' :: DeleteApplicationOutput -> Text
applicationName} -> Text
applicationName) (\s :: DeleteApplicationOutput
s@DeleteApplicationOutput' {} Text
a -> DeleteApplicationOutput
s {$sel:applicationName:DeleteApplicationOutput' :: Text
applicationName = Text
a} :: DeleteApplicationOutput)
deleteApplicationOutput_currentApplicationVersionId :: Lens.Lens' DeleteApplicationOutput Prelude.Natural
deleteApplicationOutput_currentApplicationVersionId :: Lens' DeleteApplicationOutput Natural
deleteApplicationOutput_currentApplicationVersionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApplicationOutput' {Natural
currentApplicationVersionId :: Natural
$sel:currentApplicationVersionId:DeleteApplicationOutput' :: DeleteApplicationOutput -> Natural
currentApplicationVersionId} -> Natural
currentApplicationVersionId) (\s :: DeleteApplicationOutput
s@DeleteApplicationOutput' {} Natural
a -> DeleteApplicationOutput
s {$sel:currentApplicationVersionId:DeleteApplicationOutput' :: Natural
currentApplicationVersionId = Natural
a} :: DeleteApplicationOutput)
deleteApplicationOutput_outputId :: Lens.Lens' DeleteApplicationOutput Prelude.Text
deleteApplicationOutput_outputId :: Lens' DeleteApplicationOutput Text
deleteApplicationOutput_outputId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApplicationOutput' {Text
outputId :: Text
$sel:outputId:DeleteApplicationOutput' :: DeleteApplicationOutput -> Text
outputId} -> Text
outputId) (\s :: DeleteApplicationOutput
s@DeleteApplicationOutput' {} Text
a -> DeleteApplicationOutput
s {$sel:outputId:DeleteApplicationOutput' :: Text
outputId = Text
a} :: DeleteApplicationOutput)
instance Core.AWSRequest DeleteApplicationOutput where
type
AWSResponse DeleteApplicationOutput =
DeleteApplicationOutputResponse
request :: (Service -> Service)
-> DeleteApplicationOutput -> Request DeleteApplicationOutput
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 DeleteApplicationOutput
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteApplicationOutput)))
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 -> DeleteApplicationOutputResponse
DeleteApplicationOutputResponse'
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 DeleteApplicationOutput where
hashWithSalt :: Int -> DeleteApplicationOutput -> Int
hashWithSalt Int
_salt DeleteApplicationOutput' {Natural
Text
outputId :: Text
currentApplicationVersionId :: Natural
applicationName :: Text
$sel:outputId:DeleteApplicationOutput' :: DeleteApplicationOutput -> Text
$sel:currentApplicationVersionId:DeleteApplicationOutput' :: DeleteApplicationOutput -> Natural
$sel:applicationName:DeleteApplicationOutput' :: DeleteApplicationOutput -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
applicationName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
currentApplicationVersionId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
outputId
instance Prelude.NFData DeleteApplicationOutput where
rnf :: DeleteApplicationOutput -> ()
rnf DeleteApplicationOutput' {Natural
Text
outputId :: Text
currentApplicationVersionId :: Natural
applicationName :: Text
$sel:outputId:DeleteApplicationOutput' :: DeleteApplicationOutput -> Text
$sel:currentApplicationVersionId:DeleteApplicationOutput' :: DeleteApplicationOutput -> Natural
$sel:applicationName:DeleteApplicationOutput' :: DeleteApplicationOutput -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
applicationName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
currentApplicationVersionId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
outputId
instance Data.ToHeaders DeleteApplicationOutput where
toHeaders :: DeleteApplicationOutput -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"KinesisAnalytics_20150814.DeleteApplicationOutput" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeleteApplicationOutput where
toJSON :: DeleteApplicationOutput -> Value
toJSON DeleteApplicationOutput' {Natural
Text
outputId :: Text
currentApplicationVersionId :: Natural
applicationName :: Text
$sel:outputId:DeleteApplicationOutput' :: DeleteApplicationOutput -> Text
$sel:currentApplicationVersionId:DeleteApplicationOutput' :: DeleteApplicationOutput -> Natural
$sel:applicationName:DeleteApplicationOutput' :: DeleteApplicationOutput -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"ApplicationName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
applicationName),
forall a. a -> Maybe a
Prelude.Just
( Key
"CurrentApplicationVersionId"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
currentApplicationVersionId
),
forall a. a -> Maybe a
Prelude.Just (Key
"OutputId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
outputId)
]
)
instance Data.ToPath DeleteApplicationOutput where
toPath :: DeleteApplicationOutput -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteApplicationOutput where
toQuery :: DeleteApplicationOutput -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteApplicationOutputResponse = DeleteApplicationOutputResponse'
{
DeleteApplicationOutputResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteApplicationOutputResponse
-> DeleteApplicationOutputResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteApplicationOutputResponse
-> DeleteApplicationOutputResponse -> Bool
$c/= :: DeleteApplicationOutputResponse
-> DeleteApplicationOutputResponse -> Bool
== :: DeleteApplicationOutputResponse
-> DeleteApplicationOutputResponse -> Bool
$c== :: DeleteApplicationOutputResponse
-> DeleteApplicationOutputResponse -> Bool
Prelude.Eq, ReadPrec [DeleteApplicationOutputResponse]
ReadPrec DeleteApplicationOutputResponse
Int -> ReadS DeleteApplicationOutputResponse
ReadS [DeleteApplicationOutputResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteApplicationOutputResponse]
$creadListPrec :: ReadPrec [DeleteApplicationOutputResponse]
readPrec :: ReadPrec DeleteApplicationOutputResponse
$creadPrec :: ReadPrec DeleteApplicationOutputResponse
readList :: ReadS [DeleteApplicationOutputResponse]
$creadList :: ReadS [DeleteApplicationOutputResponse]
readsPrec :: Int -> ReadS DeleteApplicationOutputResponse
$creadsPrec :: Int -> ReadS DeleteApplicationOutputResponse
Prelude.Read, Int -> DeleteApplicationOutputResponse -> ShowS
[DeleteApplicationOutputResponse] -> ShowS
DeleteApplicationOutputResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteApplicationOutputResponse] -> ShowS
$cshowList :: [DeleteApplicationOutputResponse] -> ShowS
show :: DeleteApplicationOutputResponse -> String
$cshow :: DeleteApplicationOutputResponse -> String
showsPrec :: Int -> DeleteApplicationOutputResponse -> ShowS
$cshowsPrec :: Int -> DeleteApplicationOutputResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteApplicationOutputResponse x
-> DeleteApplicationOutputResponse
forall x.
DeleteApplicationOutputResponse
-> Rep DeleteApplicationOutputResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteApplicationOutputResponse x
-> DeleteApplicationOutputResponse
$cfrom :: forall x.
DeleteApplicationOutputResponse
-> Rep DeleteApplicationOutputResponse x
Prelude.Generic)
newDeleteApplicationOutputResponse ::
Prelude.Int ->
DeleteApplicationOutputResponse
newDeleteApplicationOutputResponse :: Int -> DeleteApplicationOutputResponse
newDeleteApplicationOutputResponse Int
pHttpStatus_ =
DeleteApplicationOutputResponse'
{ $sel:httpStatus:DeleteApplicationOutputResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteApplicationOutputResponse_httpStatus :: Lens.Lens' DeleteApplicationOutputResponse Prelude.Int
deleteApplicationOutputResponse_httpStatus :: Lens' DeleteApplicationOutputResponse Int
deleteApplicationOutputResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApplicationOutputResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteApplicationOutputResponse' :: DeleteApplicationOutputResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteApplicationOutputResponse
s@DeleteApplicationOutputResponse' {} Int
a -> DeleteApplicationOutputResponse
s {$sel:httpStatus:DeleteApplicationOutputResponse' :: Int
httpStatus = Int
a} :: DeleteApplicationOutputResponse)
instance
Prelude.NFData
DeleteApplicationOutputResponse
where
rnf :: DeleteApplicationOutputResponse -> ()
rnf DeleteApplicationOutputResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteApplicationOutputResponse' :: DeleteApplicationOutputResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus