{-# 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 Amazonka.KinesisAnalytics.Types
import qualified Amazonka.Lens as Lens
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
(DeleteApplicationOutput -> DeleteApplicationOutput -> Bool)
-> (DeleteApplicationOutput -> DeleteApplicationOutput -> Bool)
-> Eq DeleteApplicationOutput
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]
(Int -> ReadS DeleteApplicationOutput)
-> ReadS [DeleteApplicationOutput]
-> ReadPrec DeleteApplicationOutput
-> ReadPrec [DeleteApplicationOutput]
-> Read 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
(Int -> DeleteApplicationOutput -> ShowS)
-> (DeleteApplicationOutput -> String)
-> ([DeleteApplicationOutput] -> ShowS)
-> Show DeleteApplicationOutput
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.
DeleteApplicationOutput -> Rep DeleteApplicationOutput x)
-> (forall x.
Rep DeleteApplicationOutput x -> DeleteApplicationOutput)
-> Generic DeleteApplicationOutput
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' :: Text -> Natural -> Text -> DeleteApplicationOutput
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 :: (Text -> f Text)
-> DeleteApplicationOutput -> f DeleteApplicationOutput
deleteApplicationOutput_applicationName = (DeleteApplicationOutput -> Text)
-> (DeleteApplicationOutput -> Text -> DeleteApplicationOutput)
-> Lens DeleteApplicationOutput DeleteApplicationOutput Text Text
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 :: (Natural -> f Natural)
-> DeleteApplicationOutput -> f DeleteApplicationOutput
deleteApplicationOutput_currentApplicationVersionId = (DeleteApplicationOutput -> Natural)
-> (DeleteApplicationOutput -> Natural -> DeleteApplicationOutput)
-> Lens
DeleteApplicationOutput DeleteApplicationOutput Natural Natural
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 :: (Text -> f Text)
-> DeleteApplicationOutput -> f DeleteApplicationOutput
deleteApplicationOutput_outputId = (DeleteApplicationOutput -> Text)
-> (DeleteApplicationOutput -> Text -> DeleteApplicationOutput)
-> Lens DeleteApplicationOutput DeleteApplicationOutput Text Text
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 :: DeleteApplicationOutput -> Request DeleteApplicationOutput
request = Service
-> DeleteApplicationOutput -> Request DeleteApplicationOutput
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteApplicationOutput
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteApplicationOutput)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteApplicationOutput))
-> Logger
-> Service
-> Proxy DeleteApplicationOutput
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteApplicationOutput)))
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 -> DeleteApplicationOutputResponse
DeleteApplicationOutputResponse'
(Int -> DeleteApplicationOutputResponse)
-> Either String Int
-> Either String DeleteApplicationOutputResponse
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 DeleteApplicationOutput
instance Prelude.NFData DeleteApplicationOutput
instance Core.ToHeaders DeleteApplicationOutput where
toHeaders :: DeleteApplicationOutput -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteApplicationOutput -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"KinesisAnalytics_20150814.DeleteApplicationOutput" ::
Prelude.ByteString
),
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 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
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ApplicationName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
applicationName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"CurrentApplicationVersionId"
Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
currentApplicationVersionId
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"OutputId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
outputId)
]
)
instance Core.ToPath DeleteApplicationOutput where
toPath :: DeleteApplicationOutput -> ByteString
toPath = ByteString -> DeleteApplicationOutput -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteApplicationOutput where
toQuery :: DeleteApplicationOutput -> QueryString
toQuery = QueryString -> DeleteApplicationOutput -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteApplicationOutputResponse = DeleteApplicationOutputResponse'
{
DeleteApplicationOutputResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteApplicationOutputResponse
-> DeleteApplicationOutputResponse -> Bool
(DeleteApplicationOutputResponse
-> DeleteApplicationOutputResponse -> Bool)
-> (DeleteApplicationOutputResponse
-> DeleteApplicationOutputResponse -> Bool)
-> Eq DeleteApplicationOutputResponse
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]
(Int -> ReadS DeleteApplicationOutputResponse)
-> ReadS [DeleteApplicationOutputResponse]
-> ReadPrec DeleteApplicationOutputResponse
-> ReadPrec [DeleteApplicationOutputResponse]
-> Read 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
(Int -> DeleteApplicationOutputResponse -> ShowS)
-> (DeleteApplicationOutputResponse -> String)
-> ([DeleteApplicationOutputResponse] -> ShowS)
-> Show DeleteApplicationOutputResponse
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.
DeleteApplicationOutputResponse
-> Rep DeleteApplicationOutputResponse x)
-> (forall x.
Rep DeleteApplicationOutputResponse x
-> DeleteApplicationOutputResponse)
-> Generic DeleteApplicationOutputResponse
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' :: Int -> DeleteApplicationOutputResponse
DeleteApplicationOutputResponse'
{ $sel:httpStatus:DeleteApplicationOutputResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteApplicationOutputResponse_httpStatus :: Lens.Lens' DeleteApplicationOutputResponse Prelude.Int
deleteApplicationOutputResponse_httpStatus :: (Int -> f Int)
-> DeleteApplicationOutputResponse
-> f DeleteApplicationOutputResponse
deleteApplicationOutputResponse_httpStatus = (DeleteApplicationOutputResponse -> Int)
-> (DeleteApplicationOutputResponse
-> Int -> DeleteApplicationOutputResponse)
-> Lens
DeleteApplicationOutputResponse
DeleteApplicationOutputResponse
Int
Int
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