{-# 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.QLDB.StreamJournalToKinesis
(
StreamJournalToKinesis (..),
newStreamJournalToKinesis,
streamJournalToKinesis_exclusiveEndTime,
streamJournalToKinesis_tags,
streamJournalToKinesis_ledgerName,
streamJournalToKinesis_roleArn,
streamJournalToKinesis_inclusiveStartTime,
streamJournalToKinesis_kinesisConfiguration,
streamJournalToKinesis_streamName,
StreamJournalToKinesisResponse (..),
newStreamJournalToKinesisResponse,
streamJournalToKinesisResponse_streamId,
streamJournalToKinesisResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QLDB.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data StreamJournalToKinesis = StreamJournalToKinesis'
{
StreamJournalToKinesis -> Maybe POSIX
exclusiveEndTime :: Prelude.Maybe Core.POSIX,
StreamJournalToKinesis -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
StreamJournalToKinesis -> Text
ledgerName :: Prelude.Text,
StreamJournalToKinesis -> Text
roleArn :: Prelude.Text,
StreamJournalToKinesis -> POSIX
inclusiveStartTime :: Core.POSIX,
StreamJournalToKinesis -> KinesisConfiguration
kinesisConfiguration :: KinesisConfiguration,
StreamJournalToKinesis -> Text
streamName :: Prelude.Text
}
deriving (StreamJournalToKinesis -> StreamJournalToKinesis -> Bool
(StreamJournalToKinesis -> StreamJournalToKinesis -> Bool)
-> (StreamJournalToKinesis -> StreamJournalToKinesis -> Bool)
-> Eq StreamJournalToKinesis
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StreamJournalToKinesis -> StreamJournalToKinesis -> Bool
$c/= :: StreamJournalToKinesis -> StreamJournalToKinesis -> Bool
== :: StreamJournalToKinesis -> StreamJournalToKinesis -> Bool
$c== :: StreamJournalToKinesis -> StreamJournalToKinesis -> Bool
Prelude.Eq, ReadPrec [StreamJournalToKinesis]
ReadPrec StreamJournalToKinesis
Int -> ReadS StreamJournalToKinesis
ReadS [StreamJournalToKinesis]
(Int -> ReadS StreamJournalToKinesis)
-> ReadS [StreamJournalToKinesis]
-> ReadPrec StreamJournalToKinesis
-> ReadPrec [StreamJournalToKinesis]
-> Read StreamJournalToKinesis
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StreamJournalToKinesis]
$creadListPrec :: ReadPrec [StreamJournalToKinesis]
readPrec :: ReadPrec StreamJournalToKinesis
$creadPrec :: ReadPrec StreamJournalToKinesis
readList :: ReadS [StreamJournalToKinesis]
$creadList :: ReadS [StreamJournalToKinesis]
readsPrec :: Int -> ReadS StreamJournalToKinesis
$creadsPrec :: Int -> ReadS StreamJournalToKinesis
Prelude.Read, Int -> StreamJournalToKinesis -> ShowS
[StreamJournalToKinesis] -> ShowS
StreamJournalToKinesis -> String
(Int -> StreamJournalToKinesis -> ShowS)
-> (StreamJournalToKinesis -> String)
-> ([StreamJournalToKinesis] -> ShowS)
-> Show StreamJournalToKinesis
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StreamJournalToKinesis] -> ShowS
$cshowList :: [StreamJournalToKinesis] -> ShowS
show :: StreamJournalToKinesis -> String
$cshow :: StreamJournalToKinesis -> String
showsPrec :: Int -> StreamJournalToKinesis -> ShowS
$cshowsPrec :: Int -> StreamJournalToKinesis -> ShowS
Prelude.Show, (forall x. StreamJournalToKinesis -> Rep StreamJournalToKinesis x)
-> (forall x.
Rep StreamJournalToKinesis x -> StreamJournalToKinesis)
-> Generic StreamJournalToKinesis
forall x. Rep StreamJournalToKinesis x -> StreamJournalToKinesis
forall x. StreamJournalToKinesis -> Rep StreamJournalToKinesis x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StreamJournalToKinesis x -> StreamJournalToKinesis
$cfrom :: forall x. StreamJournalToKinesis -> Rep StreamJournalToKinesis x
Prelude.Generic)
newStreamJournalToKinesis ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
KinesisConfiguration ->
Prelude.Text ->
StreamJournalToKinesis
newStreamJournalToKinesis :: Text
-> Text
-> UTCTime
-> KinesisConfiguration
-> Text
-> StreamJournalToKinesis
newStreamJournalToKinesis
Text
pLedgerName_
Text
pRoleArn_
UTCTime
pInclusiveStartTime_
KinesisConfiguration
pKinesisConfiguration_
Text
pStreamName_ =
StreamJournalToKinesis' :: Maybe POSIX
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> POSIX
-> KinesisConfiguration
-> Text
-> StreamJournalToKinesis
StreamJournalToKinesis'
{ $sel:exclusiveEndTime:StreamJournalToKinesis' :: Maybe POSIX
exclusiveEndTime =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:tags:StreamJournalToKinesis' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:ledgerName:StreamJournalToKinesis' :: Text
ledgerName = Text
pLedgerName_,
$sel:roleArn:StreamJournalToKinesis' :: Text
roleArn = Text
pRoleArn_,
$sel:inclusiveStartTime:StreamJournalToKinesis' :: POSIX
inclusiveStartTime =
Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pInclusiveStartTime_,
$sel:kinesisConfiguration:StreamJournalToKinesis' :: KinesisConfiguration
kinesisConfiguration = KinesisConfiguration
pKinesisConfiguration_,
$sel:streamName:StreamJournalToKinesis' :: Text
streamName = Text
pStreamName_
}
streamJournalToKinesis_exclusiveEndTime :: Lens.Lens' StreamJournalToKinesis (Prelude.Maybe Prelude.UTCTime)
streamJournalToKinesis_exclusiveEndTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StreamJournalToKinesis -> f StreamJournalToKinesis
streamJournalToKinesis_exclusiveEndTime = (StreamJournalToKinesis -> Maybe POSIX)
-> (StreamJournalToKinesis
-> Maybe POSIX -> StreamJournalToKinesis)
-> Lens
StreamJournalToKinesis
StreamJournalToKinesis
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamJournalToKinesis' {Maybe POSIX
exclusiveEndTime :: Maybe POSIX
$sel:exclusiveEndTime:StreamJournalToKinesis' :: StreamJournalToKinesis -> Maybe POSIX
exclusiveEndTime} -> Maybe POSIX
exclusiveEndTime) (\s :: StreamJournalToKinesis
s@StreamJournalToKinesis' {} Maybe POSIX
a -> StreamJournalToKinesis
s {$sel:exclusiveEndTime:StreamJournalToKinesis' :: Maybe POSIX
exclusiveEndTime = Maybe POSIX
a} :: StreamJournalToKinesis) ((Maybe POSIX -> f (Maybe POSIX))
-> StreamJournalToKinesis -> f StreamJournalToKinesis)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StreamJournalToKinesis
-> f StreamJournalToKinesis
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
streamJournalToKinesis_tags :: Lens.Lens' StreamJournalToKinesis (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
streamJournalToKinesis_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StreamJournalToKinesis -> f StreamJournalToKinesis
streamJournalToKinesis_tags = (StreamJournalToKinesis -> Maybe (HashMap Text Text))
-> (StreamJournalToKinesis
-> Maybe (HashMap Text Text) -> StreamJournalToKinesis)
-> Lens
StreamJournalToKinesis
StreamJournalToKinesis
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamJournalToKinesis' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:StreamJournalToKinesis' :: StreamJournalToKinesis -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: StreamJournalToKinesis
s@StreamJournalToKinesis' {} Maybe (HashMap Text Text)
a -> StreamJournalToKinesis
s {$sel:tags:StreamJournalToKinesis' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: StreamJournalToKinesis) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StreamJournalToKinesis -> f StreamJournalToKinesis)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StreamJournalToKinesis
-> f StreamJournalToKinesis
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
streamJournalToKinesis_ledgerName :: Lens.Lens' StreamJournalToKinesis Prelude.Text
streamJournalToKinesis_ledgerName :: (Text -> f Text)
-> StreamJournalToKinesis -> f StreamJournalToKinesis
streamJournalToKinesis_ledgerName = (StreamJournalToKinesis -> Text)
-> (StreamJournalToKinesis -> Text -> StreamJournalToKinesis)
-> Lens StreamJournalToKinesis StreamJournalToKinesis Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamJournalToKinesis' {Text
ledgerName :: Text
$sel:ledgerName:StreamJournalToKinesis' :: StreamJournalToKinesis -> Text
ledgerName} -> Text
ledgerName) (\s :: StreamJournalToKinesis
s@StreamJournalToKinesis' {} Text
a -> StreamJournalToKinesis
s {$sel:ledgerName:StreamJournalToKinesis' :: Text
ledgerName = Text
a} :: StreamJournalToKinesis)
streamJournalToKinesis_roleArn :: Lens.Lens' StreamJournalToKinesis Prelude.Text
streamJournalToKinesis_roleArn :: (Text -> f Text)
-> StreamJournalToKinesis -> f StreamJournalToKinesis
streamJournalToKinesis_roleArn = (StreamJournalToKinesis -> Text)
-> (StreamJournalToKinesis -> Text -> StreamJournalToKinesis)
-> Lens StreamJournalToKinesis StreamJournalToKinesis Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamJournalToKinesis' {Text
roleArn :: Text
$sel:roleArn:StreamJournalToKinesis' :: StreamJournalToKinesis -> Text
roleArn} -> Text
roleArn) (\s :: StreamJournalToKinesis
s@StreamJournalToKinesis' {} Text
a -> StreamJournalToKinesis
s {$sel:roleArn:StreamJournalToKinesis' :: Text
roleArn = Text
a} :: StreamJournalToKinesis)
streamJournalToKinesis_inclusiveStartTime :: Lens.Lens' StreamJournalToKinesis Prelude.UTCTime
streamJournalToKinesis_inclusiveStartTime :: (UTCTime -> f UTCTime)
-> StreamJournalToKinesis -> f StreamJournalToKinesis
streamJournalToKinesis_inclusiveStartTime = (StreamJournalToKinesis -> POSIX)
-> (StreamJournalToKinesis -> POSIX -> StreamJournalToKinesis)
-> Lens StreamJournalToKinesis StreamJournalToKinesis POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamJournalToKinesis' {POSIX
inclusiveStartTime :: POSIX
$sel:inclusiveStartTime:StreamJournalToKinesis' :: StreamJournalToKinesis -> POSIX
inclusiveStartTime} -> POSIX
inclusiveStartTime) (\s :: StreamJournalToKinesis
s@StreamJournalToKinesis' {} POSIX
a -> StreamJournalToKinesis
s {$sel:inclusiveStartTime:StreamJournalToKinesis' :: POSIX
inclusiveStartTime = POSIX
a} :: StreamJournalToKinesis) ((POSIX -> f POSIX)
-> StreamJournalToKinesis -> f StreamJournalToKinesis)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> StreamJournalToKinesis
-> f StreamJournalToKinesis
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
streamJournalToKinesis_kinesisConfiguration :: Lens.Lens' StreamJournalToKinesis KinesisConfiguration
streamJournalToKinesis_kinesisConfiguration :: (KinesisConfiguration -> f KinesisConfiguration)
-> StreamJournalToKinesis -> f StreamJournalToKinesis
streamJournalToKinesis_kinesisConfiguration = (StreamJournalToKinesis -> KinesisConfiguration)
-> (StreamJournalToKinesis
-> KinesisConfiguration -> StreamJournalToKinesis)
-> Lens
StreamJournalToKinesis
StreamJournalToKinesis
KinesisConfiguration
KinesisConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamJournalToKinesis' {KinesisConfiguration
kinesisConfiguration :: KinesisConfiguration
$sel:kinesisConfiguration:StreamJournalToKinesis' :: StreamJournalToKinesis -> KinesisConfiguration
kinesisConfiguration} -> KinesisConfiguration
kinesisConfiguration) (\s :: StreamJournalToKinesis
s@StreamJournalToKinesis' {} KinesisConfiguration
a -> StreamJournalToKinesis
s {$sel:kinesisConfiguration:StreamJournalToKinesis' :: KinesisConfiguration
kinesisConfiguration = KinesisConfiguration
a} :: StreamJournalToKinesis)
streamJournalToKinesis_streamName :: Lens.Lens' StreamJournalToKinesis Prelude.Text
streamJournalToKinesis_streamName :: (Text -> f Text)
-> StreamJournalToKinesis -> f StreamJournalToKinesis
streamJournalToKinesis_streamName = (StreamJournalToKinesis -> Text)
-> (StreamJournalToKinesis -> Text -> StreamJournalToKinesis)
-> Lens StreamJournalToKinesis StreamJournalToKinesis Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamJournalToKinesis' {Text
streamName :: Text
$sel:streamName:StreamJournalToKinesis' :: StreamJournalToKinesis -> Text
streamName} -> Text
streamName) (\s :: StreamJournalToKinesis
s@StreamJournalToKinesis' {} Text
a -> StreamJournalToKinesis
s {$sel:streamName:StreamJournalToKinesis' :: Text
streamName = Text
a} :: StreamJournalToKinesis)
instance Core.AWSRequest StreamJournalToKinesis where
type
AWSResponse StreamJournalToKinesis =
StreamJournalToKinesisResponse
request :: StreamJournalToKinesis -> Request StreamJournalToKinesis
request = Service -> StreamJournalToKinesis -> Request StreamJournalToKinesis
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StreamJournalToKinesis
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StreamJournalToKinesis)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse StreamJournalToKinesis))
-> Logger
-> Service
-> Proxy StreamJournalToKinesis
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StreamJournalToKinesis)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Int -> StreamJournalToKinesisResponse
StreamJournalToKinesisResponse'
(Maybe Text -> Int -> StreamJournalToKinesisResponse)
-> Either String (Maybe Text)
-> Either String (Int -> StreamJournalToKinesisResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"StreamId")
Either String (Int -> StreamJournalToKinesisResponse)
-> Either String Int
-> Either String StreamJournalToKinesisResponse
forall (f :: * -> *) a b. Applicative f => 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 StreamJournalToKinesis
instance Prelude.NFData StreamJournalToKinesis
instance Core.ToHeaders StreamJournalToKinesis where
toHeaders :: StreamJournalToKinesis -> ResponseHeaders
toHeaders =
ResponseHeaders -> StreamJournalToKinesis -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON StreamJournalToKinesis where
toJSON :: StreamJournalToKinesis -> Value
toJSON StreamJournalToKinesis' {Maybe (HashMap Text Text)
Maybe POSIX
Text
POSIX
KinesisConfiguration
streamName :: Text
kinesisConfiguration :: KinesisConfiguration
inclusiveStartTime :: POSIX
roleArn :: Text
ledgerName :: Text
tags :: Maybe (HashMap Text Text)
exclusiveEndTime :: Maybe POSIX
$sel:streamName:StreamJournalToKinesis' :: StreamJournalToKinesis -> Text
$sel:kinesisConfiguration:StreamJournalToKinesis' :: StreamJournalToKinesis -> KinesisConfiguration
$sel:inclusiveStartTime:StreamJournalToKinesis' :: StreamJournalToKinesis -> POSIX
$sel:roleArn:StreamJournalToKinesis' :: StreamJournalToKinesis -> Text
$sel:ledgerName:StreamJournalToKinesis' :: StreamJournalToKinesis -> Text
$sel:tags:StreamJournalToKinesis' :: StreamJournalToKinesis -> Maybe (HashMap Text Text)
$sel:exclusiveEndTime:StreamJournalToKinesis' :: StreamJournalToKinesis -> Maybe POSIX
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ExclusiveEndTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
exclusiveEndTime,
(Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"InclusiveStartTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= POSIX
inclusiveStartTime),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"KinesisConfiguration"
Text -> KinesisConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= KinesisConfiguration
kinesisConfiguration
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"StreamName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
streamName)
]
)
instance Core.ToPath StreamJournalToKinesis where
toPath :: StreamJournalToKinesis -> ByteString
toPath StreamJournalToKinesis' {Maybe (HashMap Text Text)
Maybe POSIX
Text
POSIX
KinesisConfiguration
streamName :: Text
kinesisConfiguration :: KinesisConfiguration
inclusiveStartTime :: POSIX
roleArn :: Text
ledgerName :: Text
tags :: Maybe (HashMap Text Text)
exclusiveEndTime :: Maybe POSIX
$sel:streamName:StreamJournalToKinesis' :: StreamJournalToKinesis -> Text
$sel:kinesisConfiguration:StreamJournalToKinesis' :: StreamJournalToKinesis -> KinesisConfiguration
$sel:inclusiveStartTime:StreamJournalToKinesis' :: StreamJournalToKinesis -> POSIX
$sel:roleArn:StreamJournalToKinesis' :: StreamJournalToKinesis -> Text
$sel:ledgerName:StreamJournalToKinesis' :: StreamJournalToKinesis -> Text
$sel:tags:StreamJournalToKinesis' :: StreamJournalToKinesis -> Maybe (HashMap Text Text)
$sel:exclusiveEndTime:StreamJournalToKinesis' :: StreamJournalToKinesis -> Maybe POSIX
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/ledgers/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
ledgerName,
ByteString
"/journal-kinesis-streams"
]
instance Core.ToQuery StreamJournalToKinesis where
toQuery :: StreamJournalToKinesis -> QueryString
toQuery = QueryString -> StreamJournalToKinesis -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StreamJournalToKinesisResponse = StreamJournalToKinesisResponse'
{
StreamJournalToKinesisResponse -> Maybe Text
streamId :: Prelude.Maybe Prelude.Text,
StreamJournalToKinesisResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StreamJournalToKinesisResponse
-> StreamJournalToKinesisResponse -> Bool
(StreamJournalToKinesisResponse
-> StreamJournalToKinesisResponse -> Bool)
-> (StreamJournalToKinesisResponse
-> StreamJournalToKinesisResponse -> Bool)
-> Eq StreamJournalToKinesisResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StreamJournalToKinesisResponse
-> StreamJournalToKinesisResponse -> Bool
$c/= :: StreamJournalToKinesisResponse
-> StreamJournalToKinesisResponse -> Bool
== :: StreamJournalToKinesisResponse
-> StreamJournalToKinesisResponse -> Bool
$c== :: StreamJournalToKinesisResponse
-> StreamJournalToKinesisResponse -> Bool
Prelude.Eq, ReadPrec [StreamJournalToKinesisResponse]
ReadPrec StreamJournalToKinesisResponse
Int -> ReadS StreamJournalToKinesisResponse
ReadS [StreamJournalToKinesisResponse]
(Int -> ReadS StreamJournalToKinesisResponse)
-> ReadS [StreamJournalToKinesisResponse]
-> ReadPrec StreamJournalToKinesisResponse
-> ReadPrec [StreamJournalToKinesisResponse]
-> Read StreamJournalToKinesisResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StreamJournalToKinesisResponse]
$creadListPrec :: ReadPrec [StreamJournalToKinesisResponse]
readPrec :: ReadPrec StreamJournalToKinesisResponse
$creadPrec :: ReadPrec StreamJournalToKinesisResponse
readList :: ReadS [StreamJournalToKinesisResponse]
$creadList :: ReadS [StreamJournalToKinesisResponse]
readsPrec :: Int -> ReadS StreamJournalToKinesisResponse
$creadsPrec :: Int -> ReadS StreamJournalToKinesisResponse
Prelude.Read, Int -> StreamJournalToKinesisResponse -> ShowS
[StreamJournalToKinesisResponse] -> ShowS
StreamJournalToKinesisResponse -> String
(Int -> StreamJournalToKinesisResponse -> ShowS)
-> (StreamJournalToKinesisResponse -> String)
-> ([StreamJournalToKinesisResponse] -> ShowS)
-> Show StreamJournalToKinesisResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StreamJournalToKinesisResponse] -> ShowS
$cshowList :: [StreamJournalToKinesisResponse] -> ShowS
show :: StreamJournalToKinesisResponse -> String
$cshow :: StreamJournalToKinesisResponse -> String
showsPrec :: Int -> StreamJournalToKinesisResponse -> ShowS
$cshowsPrec :: Int -> StreamJournalToKinesisResponse -> ShowS
Prelude.Show, (forall x.
StreamJournalToKinesisResponse
-> Rep StreamJournalToKinesisResponse x)
-> (forall x.
Rep StreamJournalToKinesisResponse x
-> StreamJournalToKinesisResponse)
-> Generic StreamJournalToKinesisResponse
forall x.
Rep StreamJournalToKinesisResponse x
-> StreamJournalToKinesisResponse
forall x.
StreamJournalToKinesisResponse
-> Rep StreamJournalToKinesisResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StreamJournalToKinesisResponse x
-> StreamJournalToKinesisResponse
$cfrom :: forall x.
StreamJournalToKinesisResponse
-> Rep StreamJournalToKinesisResponse x
Prelude.Generic)
newStreamJournalToKinesisResponse ::
Prelude.Int ->
StreamJournalToKinesisResponse
newStreamJournalToKinesisResponse :: Int -> StreamJournalToKinesisResponse
newStreamJournalToKinesisResponse Int
pHttpStatus_ =
StreamJournalToKinesisResponse' :: Maybe Text -> Int -> StreamJournalToKinesisResponse
StreamJournalToKinesisResponse'
{ $sel:streamId:StreamJournalToKinesisResponse' :: Maybe Text
streamId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StreamJournalToKinesisResponse' :: Int
httpStatus = Int
pHttpStatus_
}
streamJournalToKinesisResponse_streamId :: Lens.Lens' StreamJournalToKinesisResponse (Prelude.Maybe Prelude.Text)
streamJournalToKinesisResponse_streamId :: (Maybe Text -> f (Maybe Text))
-> StreamJournalToKinesisResponse
-> f StreamJournalToKinesisResponse
streamJournalToKinesisResponse_streamId = (StreamJournalToKinesisResponse -> Maybe Text)
-> (StreamJournalToKinesisResponse
-> Maybe Text -> StreamJournalToKinesisResponse)
-> Lens
StreamJournalToKinesisResponse
StreamJournalToKinesisResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamJournalToKinesisResponse' {Maybe Text
streamId :: Maybe Text
$sel:streamId:StreamJournalToKinesisResponse' :: StreamJournalToKinesisResponse -> Maybe Text
streamId} -> Maybe Text
streamId) (\s :: StreamJournalToKinesisResponse
s@StreamJournalToKinesisResponse' {} Maybe Text
a -> StreamJournalToKinesisResponse
s {$sel:streamId:StreamJournalToKinesisResponse' :: Maybe Text
streamId = Maybe Text
a} :: StreamJournalToKinesisResponse)
streamJournalToKinesisResponse_httpStatus :: Lens.Lens' StreamJournalToKinesisResponse Prelude.Int
streamJournalToKinesisResponse_httpStatus :: (Int -> f Int)
-> StreamJournalToKinesisResponse
-> f StreamJournalToKinesisResponse
streamJournalToKinesisResponse_httpStatus = (StreamJournalToKinesisResponse -> Int)
-> (StreamJournalToKinesisResponse
-> Int -> StreamJournalToKinesisResponse)
-> Lens
StreamJournalToKinesisResponse
StreamJournalToKinesisResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StreamJournalToKinesisResponse' {Int
httpStatus :: Int
$sel:httpStatus:StreamJournalToKinesisResponse' :: StreamJournalToKinesisResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StreamJournalToKinesisResponse
s@StreamJournalToKinesisResponse' {} Int
a -> StreamJournalToKinesisResponse
s {$sel:httpStatus:StreamJournalToKinesisResponse' :: Int
httpStatus = Int
a} :: StreamJournalToKinesisResponse)
instance
Prelude.NFData
StreamJournalToKinesisResponse