{-# 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.DeleteApplicationReferenceDataSource
(
DeleteApplicationReferenceDataSource (..),
newDeleteApplicationReferenceDataSource,
deleteApplicationReferenceDataSource_applicationName,
deleteApplicationReferenceDataSource_currentApplicationVersionId,
deleteApplicationReferenceDataSource_referenceId,
DeleteApplicationReferenceDataSourceResponse (..),
newDeleteApplicationReferenceDataSourceResponse,
deleteApplicationReferenceDataSourceResponse_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 DeleteApplicationReferenceDataSource = DeleteApplicationReferenceDataSource'
{
DeleteApplicationReferenceDataSource -> Text
applicationName :: Prelude.Text,
DeleteApplicationReferenceDataSource -> Natural
currentApplicationVersionId :: Prelude.Natural,
DeleteApplicationReferenceDataSource -> Text
referenceId :: Prelude.Text
}
deriving (DeleteApplicationReferenceDataSource
-> DeleteApplicationReferenceDataSource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteApplicationReferenceDataSource
-> DeleteApplicationReferenceDataSource -> Bool
$c/= :: DeleteApplicationReferenceDataSource
-> DeleteApplicationReferenceDataSource -> Bool
== :: DeleteApplicationReferenceDataSource
-> DeleteApplicationReferenceDataSource -> Bool
$c== :: DeleteApplicationReferenceDataSource
-> DeleteApplicationReferenceDataSource -> Bool
Prelude.Eq, ReadPrec [DeleteApplicationReferenceDataSource]
ReadPrec DeleteApplicationReferenceDataSource
Int -> ReadS DeleteApplicationReferenceDataSource
ReadS [DeleteApplicationReferenceDataSource]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteApplicationReferenceDataSource]
$creadListPrec :: ReadPrec [DeleteApplicationReferenceDataSource]
readPrec :: ReadPrec DeleteApplicationReferenceDataSource
$creadPrec :: ReadPrec DeleteApplicationReferenceDataSource
readList :: ReadS [DeleteApplicationReferenceDataSource]
$creadList :: ReadS [DeleteApplicationReferenceDataSource]
readsPrec :: Int -> ReadS DeleteApplicationReferenceDataSource
$creadsPrec :: Int -> ReadS DeleteApplicationReferenceDataSource
Prelude.Read, Int -> DeleteApplicationReferenceDataSource -> ShowS
[DeleteApplicationReferenceDataSource] -> ShowS
DeleteApplicationReferenceDataSource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteApplicationReferenceDataSource] -> ShowS
$cshowList :: [DeleteApplicationReferenceDataSource] -> ShowS
show :: DeleteApplicationReferenceDataSource -> String
$cshow :: DeleteApplicationReferenceDataSource -> String
showsPrec :: Int -> DeleteApplicationReferenceDataSource -> ShowS
$cshowsPrec :: Int -> DeleteApplicationReferenceDataSource -> ShowS
Prelude.Show, forall x.
Rep DeleteApplicationReferenceDataSource x
-> DeleteApplicationReferenceDataSource
forall x.
DeleteApplicationReferenceDataSource
-> Rep DeleteApplicationReferenceDataSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteApplicationReferenceDataSource x
-> DeleteApplicationReferenceDataSource
$cfrom :: forall x.
DeleteApplicationReferenceDataSource
-> Rep DeleteApplicationReferenceDataSource x
Prelude.Generic)
newDeleteApplicationReferenceDataSource ::
Prelude.Text ->
Prelude.Natural ->
Prelude.Text ->
DeleteApplicationReferenceDataSource
newDeleteApplicationReferenceDataSource :: Text -> Natural -> Text -> DeleteApplicationReferenceDataSource
newDeleteApplicationReferenceDataSource
Text
pApplicationName_
Natural
pCurrentApplicationVersionId_
Text
pReferenceId_ =
DeleteApplicationReferenceDataSource'
{ $sel:applicationName:DeleteApplicationReferenceDataSource' :: Text
applicationName =
Text
pApplicationName_,
$sel:currentApplicationVersionId:DeleteApplicationReferenceDataSource' :: Natural
currentApplicationVersionId =
Natural
pCurrentApplicationVersionId_,
$sel:referenceId:DeleteApplicationReferenceDataSource' :: Text
referenceId = Text
pReferenceId_
}
deleteApplicationReferenceDataSource_applicationName :: Lens.Lens' DeleteApplicationReferenceDataSource Prelude.Text
deleteApplicationReferenceDataSource_applicationName :: Lens' DeleteApplicationReferenceDataSource Text
deleteApplicationReferenceDataSource_applicationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApplicationReferenceDataSource' {Text
applicationName :: Text
$sel:applicationName:DeleteApplicationReferenceDataSource' :: DeleteApplicationReferenceDataSource -> Text
applicationName} -> Text
applicationName) (\s :: DeleteApplicationReferenceDataSource
s@DeleteApplicationReferenceDataSource' {} Text
a -> DeleteApplicationReferenceDataSource
s {$sel:applicationName:DeleteApplicationReferenceDataSource' :: Text
applicationName = Text
a} :: DeleteApplicationReferenceDataSource)
deleteApplicationReferenceDataSource_currentApplicationVersionId :: Lens.Lens' DeleteApplicationReferenceDataSource Prelude.Natural
deleteApplicationReferenceDataSource_currentApplicationVersionId :: Lens' DeleteApplicationReferenceDataSource Natural
deleteApplicationReferenceDataSource_currentApplicationVersionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApplicationReferenceDataSource' {Natural
currentApplicationVersionId :: Natural
$sel:currentApplicationVersionId:DeleteApplicationReferenceDataSource' :: DeleteApplicationReferenceDataSource -> Natural
currentApplicationVersionId} -> Natural
currentApplicationVersionId) (\s :: DeleteApplicationReferenceDataSource
s@DeleteApplicationReferenceDataSource' {} Natural
a -> DeleteApplicationReferenceDataSource
s {$sel:currentApplicationVersionId:DeleteApplicationReferenceDataSource' :: Natural
currentApplicationVersionId = Natural
a} :: DeleteApplicationReferenceDataSource)
deleteApplicationReferenceDataSource_referenceId :: Lens.Lens' DeleteApplicationReferenceDataSource Prelude.Text
deleteApplicationReferenceDataSource_referenceId :: Lens' DeleteApplicationReferenceDataSource Text
deleteApplicationReferenceDataSource_referenceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApplicationReferenceDataSource' {Text
referenceId :: Text
$sel:referenceId:DeleteApplicationReferenceDataSource' :: DeleteApplicationReferenceDataSource -> Text
referenceId} -> Text
referenceId) (\s :: DeleteApplicationReferenceDataSource
s@DeleteApplicationReferenceDataSource' {} Text
a -> DeleteApplicationReferenceDataSource
s {$sel:referenceId:DeleteApplicationReferenceDataSource' :: Text
referenceId = Text
a} :: DeleteApplicationReferenceDataSource)
instance
Core.AWSRequest
DeleteApplicationReferenceDataSource
where
type
AWSResponse DeleteApplicationReferenceDataSource =
DeleteApplicationReferenceDataSourceResponse
request :: (Service -> Service)
-> DeleteApplicationReferenceDataSource
-> Request DeleteApplicationReferenceDataSource
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 DeleteApplicationReferenceDataSource
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DeleteApplicationReferenceDataSource)))
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 -> DeleteApplicationReferenceDataSourceResponse
DeleteApplicationReferenceDataSourceResponse'
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
DeleteApplicationReferenceDataSource
where
hashWithSalt :: Int -> DeleteApplicationReferenceDataSource -> Int
hashWithSalt
Int
_salt
DeleteApplicationReferenceDataSource' {Natural
Text
referenceId :: Text
currentApplicationVersionId :: Natural
applicationName :: Text
$sel:referenceId:DeleteApplicationReferenceDataSource' :: DeleteApplicationReferenceDataSource -> Text
$sel:currentApplicationVersionId:DeleteApplicationReferenceDataSource' :: DeleteApplicationReferenceDataSource -> Natural
$sel:applicationName:DeleteApplicationReferenceDataSource' :: DeleteApplicationReferenceDataSource -> 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
referenceId
instance
Prelude.NFData
DeleteApplicationReferenceDataSource
where
rnf :: DeleteApplicationReferenceDataSource -> ()
rnf DeleteApplicationReferenceDataSource' {Natural
Text
referenceId :: Text
currentApplicationVersionId :: Natural
applicationName :: Text
$sel:referenceId:DeleteApplicationReferenceDataSource' :: DeleteApplicationReferenceDataSource -> Text
$sel:currentApplicationVersionId:DeleteApplicationReferenceDataSource' :: DeleteApplicationReferenceDataSource -> Natural
$sel:applicationName:DeleteApplicationReferenceDataSource' :: DeleteApplicationReferenceDataSource -> 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
referenceId
instance
Data.ToHeaders
DeleteApplicationReferenceDataSource
where
toHeaders :: DeleteApplicationReferenceDataSource -> 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.DeleteApplicationReferenceDataSource" ::
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
DeleteApplicationReferenceDataSource
where
toJSON :: DeleteApplicationReferenceDataSource -> Value
toJSON DeleteApplicationReferenceDataSource' {Natural
Text
referenceId :: Text
currentApplicationVersionId :: Natural
applicationName :: Text
$sel:referenceId:DeleteApplicationReferenceDataSource' :: DeleteApplicationReferenceDataSource -> Text
$sel:currentApplicationVersionId:DeleteApplicationReferenceDataSource' :: DeleteApplicationReferenceDataSource -> Natural
$sel:applicationName:DeleteApplicationReferenceDataSource' :: DeleteApplicationReferenceDataSource -> 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
"ReferenceId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
referenceId)
]
)
instance
Data.ToPath
DeleteApplicationReferenceDataSource
where
toPath :: DeleteApplicationReferenceDataSource -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
DeleteApplicationReferenceDataSource
where
toQuery :: DeleteApplicationReferenceDataSource -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteApplicationReferenceDataSourceResponse = DeleteApplicationReferenceDataSourceResponse'
{
DeleteApplicationReferenceDataSourceResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteApplicationReferenceDataSourceResponse
-> DeleteApplicationReferenceDataSourceResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteApplicationReferenceDataSourceResponse
-> DeleteApplicationReferenceDataSourceResponse -> Bool
$c/= :: DeleteApplicationReferenceDataSourceResponse
-> DeleteApplicationReferenceDataSourceResponse -> Bool
== :: DeleteApplicationReferenceDataSourceResponse
-> DeleteApplicationReferenceDataSourceResponse -> Bool
$c== :: DeleteApplicationReferenceDataSourceResponse
-> DeleteApplicationReferenceDataSourceResponse -> Bool
Prelude.Eq, ReadPrec [DeleteApplicationReferenceDataSourceResponse]
ReadPrec DeleteApplicationReferenceDataSourceResponse
Int -> ReadS DeleteApplicationReferenceDataSourceResponse
ReadS [DeleteApplicationReferenceDataSourceResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteApplicationReferenceDataSourceResponse]
$creadListPrec :: ReadPrec [DeleteApplicationReferenceDataSourceResponse]
readPrec :: ReadPrec DeleteApplicationReferenceDataSourceResponse
$creadPrec :: ReadPrec DeleteApplicationReferenceDataSourceResponse
readList :: ReadS [DeleteApplicationReferenceDataSourceResponse]
$creadList :: ReadS [DeleteApplicationReferenceDataSourceResponse]
readsPrec :: Int -> ReadS DeleteApplicationReferenceDataSourceResponse
$creadsPrec :: Int -> ReadS DeleteApplicationReferenceDataSourceResponse
Prelude.Read, Int -> DeleteApplicationReferenceDataSourceResponse -> ShowS
[DeleteApplicationReferenceDataSourceResponse] -> ShowS
DeleteApplicationReferenceDataSourceResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteApplicationReferenceDataSourceResponse] -> ShowS
$cshowList :: [DeleteApplicationReferenceDataSourceResponse] -> ShowS
show :: DeleteApplicationReferenceDataSourceResponse -> String
$cshow :: DeleteApplicationReferenceDataSourceResponse -> String
showsPrec :: Int -> DeleteApplicationReferenceDataSourceResponse -> ShowS
$cshowsPrec :: Int -> DeleteApplicationReferenceDataSourceResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteApplicationReferenceDataSourceResponse x
-> DeleteApplicationReferenceDataSourceResponse
forall x.
DeleteApplicationReferenceDataSourceResponse
-> Rep DeleteApplicationReferenceDataSourceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteApplicationReferenceDataSourceResponse x
-> DeleteApplicationReferenceDataSourceResponse
$cfrom :: forall x.
DeleteApplicationReferenceDataSourceResponse
-> Rep DeleteApplicationReferenceDataSourceResponse x
Prelude.Generic)
newDeleteApplicationReferenceDataSourceResponse ::
Prelude.Int ->
DeleteApplicationReferenceDataSourceResponse
newDeleteApplicationReferenceDataSourceResponse :: Int -> DeleteApplicationReferenceDataSourceResponse
newDeleteApplicationReferenceDataSourceResponse
Int
pHttpStatus_ =
DeleteApplicationReferenceDataSourceResponse'
{ $sel:httpStatus:DeleteApplicationReferenceDataSourceResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteApplicationReferenceDataSourceResponse_httpStatus :: Lens.Lens' DeleteApplicationReferenceDataSourceResponse Prelude.Int
deleteApplicationReferenceDataSourceResponse_httpStatus :: Lens' DeleteApplicationReferenceDataSourceResponse Int
deleteApplicationReferenceDataSourceResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApplicationReferenceDataSourceResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteApplicationReferenceDataSourceResponse' :: DeleteApplicationReferenceDataSourceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteApplicationReferenceDataSourceResponse
s@DeleteApplicationReferenceDataSourceResponse' {} Int
a -> DeleteApplicationReferenceDataSourceResponse
s {$sel:httpStatus:DeleteApplicationReferenceDataSourceResponse' :: Int
httpStatus = Int
a} :: DeleteApplicationReferenceDataSourceResponse)
instance
Prelude.NFData
DeleteApplicationReferenceDataSourceResponse
where
rnf :: DeleteApplicationReferenceDataSourceResponse -> ()
rnf DeleteApplicationReferenceDataSourceResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteApplicationReferenceDataSourceResponse' :: DeleteApplicationReferenceDataSourceResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus