{-# 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.DynamoDB.DisableKinesisStreamingDestination
(
DisableKinesisStreamingDestination (..),
newDisableKinesisStreamingDestination,
disableKinesisStreamingDestination_tableName,
disableKinesisStreamingDestination_streamArn,
KinesisStreamingDestinationOutput (..),
newKinesisStreamingDestinationOutput,
kinesisStreamingDestinationOutput_destinationStatus,
kinesisStreamingDestinationOutput_streamArn,
kinesisStreamingDestinationOutput_tableName,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DynamoDB.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DisableKinesisStreamingDestination = DisableKinesisStreamingDestination'
{
DisableKinesisStreamingDestination -> Text
tableName :: Prelude.Text,
DisableKinesisStreamingDestination -> Text
streamArn :: Prelude.Text
}
deriving (DisableKinesisStreamingDestination
-> DisableKinesisStreamingDestination -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisableKinesisStreamingDestination
-> DisableKinesisStreamingDestination -> Bool
$c/= :: DisableKinesisStreamingDestination
-> DisableKinesisStreamingDestination -> Bool
== :: DisableKinesisStreamingDestination
-> DisableKinesisStreamingDestination -> Bool
$c== :: DisableKinesisStreamingDestination
-> DisableKinesisStreamingDestination -> Bool
Prelude.Eq, ReadPrec [DisableKinesisStreamingDestination]
ReadPrec DisableKinesisStreamingDestination
Int -> ReadS DisableKinesisStreamingDestination
ReadS [DisableKinesisStreamingDestination]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisableKinesisStreamingDestination]
$creadListPrec :: ReadPrec [DisableKinesisStreamingDestination]
readPrec :: ReadPrec DisableKinesisStreamingDestination
$creadPrec :: ReadPrec DisableKinesisStreamingDestination
readList :: ReadS [DisableKinesisStreamingDestination]
$creadList :: ReadS [DisableKinesisStreamingDestination]
readsPrec :: Int -> ReadS DisableKinesisStreamingDestination
$creadsPrec :: Int -> ReadS DisableKinesisStreamingDestination
Prelude.Read, Int -> DisableKinesisStreamingDestination -> ShowS
[DisableKinesisStreamingDestination] -> ShowS
DisableKinesisStreamingDestination -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisableKinesisStreamingDestination] -> ShowS
$cshowList :: [DisableKinesisStreamingDestination] -> ShowS
show :: DisableKinesisStreamingDestination -> String
$cshow :: DisableKinesisStreamingDestination -> String
showsPrec :: Int -> DisableKinesisStreamingDestination -> ShowS
$cshowsPrec :: Int -> DisableKinesisStreamingDestination -> ShowS
Prelude.Show, forall x.
Rep DisableKinesisStreamingDestination x
-> DisableKinesisStreamingDestination
forall x.
DisableKinesisStreamingDestination
-> Rep DisableKinesisStreamingDestination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisableKinesisStreamingDestination x
-> DisableKinesisStreamingDestination
$cfrom :: forall x.
DisableKinesisStreamingDestination
-> Rep DisableKinesisStreamingDestination x
Prelude.Generic)
newDisableKinesisStreamingDestination ::
Prelude.Text ->
Prelude.Text ->
DisableKinesisStreamingDestination
newDisableKinesisStreamingDestination :: Text -> Text -> DisableKinesisStreamingDestination
newDisableKinesisStreamingDestination
Text
pTableName_
Text
pStreamArn_ =
DisableKinesisStreamingDestination'
{ $sel:tableName:DisableKinesisStreamingDestination' :: Text
tableName =
Text
pTableName_,
$sel:streamArn:DisableKinesisStreamingDestination' :: Text
streamArn = Text
pStreamArn_
}
disableKinesisStreamingDestination_tableName :: Lens.Lens' DisableKinesisStreamingDestination Prelude.Text
disableKinesisStreamingDestination_tableName :: Lens' DisableKinesisStreamingDestination Text
disableKinesisStreamingDestination_tableName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableKinesisStreamingDestination' {Text
tableName :: Text
$sel:tableName:DisableKinesisStreamingDestination' :: DisableKinesisStreamingDestination -> Text
tableName} -> Text
tableName) (\s :: DisableKinesisStreamingDestination
s@DisableKinesisStreamingDestination' {} Text
a -> DisableKinesisStreamingDestination
s {$sel:tableName:DisableKinesisStreamingDestination' :: Text
tableName = Text
a} :: DisableKinesisStreamingDestination)
disableKinesisStreamingDestination_streamArn :: Lens.Lens' DisableKinesisStreamingDestination Prelude.Text
disableKinesisStreamingDestination_streamArn :: Lens' DisableKinesisStreamingDestination Text
disableKinesisStreamingDestination_streamArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableKinesisStreamingDestination' {Text
streamArn :: Text
$sel:streamArn:DisableKinesisStreamingDestination' :: DisableKinesisStreamingDestination -> Text
streamArn} -> Text
streamArn) (\s :: DisableKinesisStreamingDestination
s@DisableKinesisStreamingDestination' {} Text
a -> DisableKinesisStreamingDestination
s {$sel:streamArn:DisableKinesisStreamingDestination' :: Text
streamArn = Text
a} :: DisableKinesisStreamingDestination)
instance
Core.AWSRequest
DisableKinesisStreamingDestination
where
type
AWSResponse DisableKinesisStreamingDestination =
KinesisStreamingDestinationOutput
request :: (Service -> Service)
-> DisableKinesisStreamingDestination
-> Request DisableKinesisStreamingDestination
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 DisableKinesisStreamingDestination
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DisableKinesisStreamingDestination)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
(\Int
s ResponseHeaders
h Object
x -> forall a. FromJSON a => Object -> Either String a
Data.eitherParseJSON Object
x)
instance
Prelude.Hashable
DisableKinesisStreamingDestination
where
hashWithSalt :: Int -> DisableKinesisStreamingDestination -> Int
hashWithSalt
Int
_salt
DisableKinesisStreamingDestination' {Text
streamArn :: Text
tableName :: Text
$sel:streamArn:DisableKinesisStreamingDestination' :: DisableKinesisStreamingDestination -> Text
$sel:tableName:DisableKinesisStreamingDestination' :: DisableKinesisStreamingDestination -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
tableName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
streamArn
instance
Prelude.NFData
DisableKinesisStreamingDestination
where
rnf :: DisableKinesisStreamingDestination -> ()
rnf DisableKinesisStreamingDestination' {Text
streamArn :: Text
tableName :: Text
$sel:streamArn:DisableKinesisStreamingDestination' :: DisableKinesisStreamingDestination -> Text
$sel:tableName:DisableKinesisStreamingDestination' :: DisableKinesisStreamingDestination -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
tableName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
streamArn
instance
Data.ToHeaders
DisableKinesisStreamingDestination
where
toHeaders :: DisableKinesisStreamingDestination -> 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
"DynamoDB_20120810.DisableKinesisStreamingDestination" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance
Data.ToJSON
DisableKinesisStreamingDestination
where
toJSON :: DisableKinesisStreamingDestination -> Value
toJSON DisableKinesisStreamingDestination' {Text
streamArn :: Text
tableName :: Text
$sel:streamArn:DisableKinesisStreamingDestination' :: DisableKinesisStreamingDestination -> Text
$sel:tableName:DisableKinesisStreamingDestination' :: DisableKinesisStreamingDestination -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"TableName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
tableName),
forall a. a -> Maybe a
Prelude.Just (Key
"StreamArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
streamArn)
]
)
instance
Data.ToPath
DisableKinesisStreamingDestination
where
toPath :: DisableKinesisStreamingDestination -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
DisableKinesisStreamingDestination
where
toQuery :: DisableKinesisStreamingDestination -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty