{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.KinesisAnalytics.Types.OutputUpdate 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.DestinationSchema
import Amazonka.KinesisAnalytics.Types.KinesisFirehoseOutputUpdate
import Amazonka.KinesisAnalytics.Types.KinesisStreamsOutputUpdate
import Amazonka.KinesisAnalytics.Types.LambdaOutputUpdate
import qualified Amazonka.Prelude as Prelude
data OutputUpdate = OutputUpdate'
{
OutputUpdate -> Maybe DestinationSchema
destinationSchemaUpdate :: Prelude.Maybe DestinationSchema,
OutputUpdate -> Maybe KinesisFirehoseOutputUpdate
kinesisFirehoseOutputUpdate :: Prelude.Maybe KinesisFirehoseOutputUpdate,
OutputUpdate -> Maybe KinesisStreamsOutputUpdate
kinesisStreamsOutputUpdate :: Prelude.Maybe KinesisStreamsOutputUpdate,
OutputUpdate -> Maybe LambdaOutputUpdate
lambdaOutputUpdate :: Prelude.Maybe LambdaOutputUpdate,
OutputUpdate -> Maybe Text
nameUpdate :: Prelude.Maybe Prelude.Text,
OutputUpdate -> Text
outputId :: Prelude.Text
}
deriving (OutputUpdate -> OutputUpdate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OutputUpdate -> OutputUpdate -> Bool
$c/= :: OutputUpdate -> OutputUpdate -> Bool
== :: OutputUpdate -> OutputUpdate -> Bool
$c== :: OutputUpdate -> OutputUpdate -> Bool
Prelude.Eq, ReadPrec [OutputUpdate]
ReadPrec OutputUpdate
Int -> ReadS OutputUpdate
ReadS [OutputUpdate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OutputUpdate]
$creadListPrec :: ReadPrec [OutputUpdate]
readPrec :: ReadPrec OutputUpdate
$creadPrec :: ReadPrec OutputUpdate
readList :: ReadS [OutputUpdate]
$creadList :: ReadS [OutputUpdate]
readsPrec :: Int -> ReadS OutputUpdate
$creadsPrec :: Int -> ReadS OutputUpdate
Prelude.Read, Int -> OutputUpdate -> ShowS
[OutputUpdate] -> ShowS
OutputUpdate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OutputUpdate] -> ShowS
$cshowList :: [OutputUpdate] -> ShowS
show :: OutputUpdate -> String
$cshow :: OutputUpdate -> String
showsPrec :: Int -> OutputUpdate -> ShowS
$cshowsPrec :: Int -> OutputUpdate -> ShowS
Prelude.Show, forall x. Rep OutputUpdate x -> OutputUpdate
forall x. OutputUpdate -> Rep OutputUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OutputUpdate x -> OutputUpdate
$cfrom :: forall x. OutputUpdate -> Rep OutputUpdate x
Prelude.Generic)
newOutputUpdate ::
Prelude.Text ->
OutputUpdate
newOutputUpdate :: Text -> OutputUpdate
newOutputUpdate Text
pOutputId_ =
OutputUpdate'
{ $sel:destinationSchemaUpdate:OutputUpdate' :: Maybe DestinationSchema
destinationSchemaUpdate =
forall a. Maybe a
Prelude.Nothing,
$sel:kinesisFirehoseOutputUpdate:OutputUpdate' :: Maybe KinesisFirehoseOutputUpdate
kinesisFirehoseOutputUpdate = forall a. Maybe a
Prelude.Nothing,
$sel:kinesisStreamsOutputUpdate:OutputUpdate' :: Maybe KinesisStreamsOutputUpdate
kinesisStreamsOutputUpdate = forall a. Maybe a
Prelude.Nothing,
$sel:lambdaOutputUpdate:OutputUpdate' :: Maybe LambdaOutputUpdate
lambdaOutputUpdate = forall a. Maybe a
Prelude.Nothing,
$sel:nameUpdate:OutputUpdate' :: Maybe Text
nameUpdate = forall a. Maybe a
Prelude.Nothing,
$sel:outputId:OutputUpdate' :: Text
outputId = Text
pOutputId_
}
outputUpdate_destinationSchemaUpdate :: Lens.Lens' OutputUpdate (Prelude.Maybe DestinationSchema)
outputUpdate_destinationSchemaUpdate :: Lens' OutputUpdate (Maybe DestinationSchema)
outputUpdate_destinationSchemaUpdate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputUpdate' {Maybe DestinationSchema
destinationSchemaUpdate :: Maybe DestinationSchema
$sel:destinationSchemaUpdate:OutputUpdate' :: OutputUpdate -> Maybe DestinationSchema
destinationSchemaUpdate} -> Maybe DestinationSchema
destinationSchemaUpdate) (\s :: OutputUpdate
s@OutputUpdate' {} Maybe DestinationSchema
a -> OutputUpdate
s {$sel:destinationSchemaUpdate:OutputUpdate' :: Maybe DestinationSchema
destinationSchemaUpdate = Maybe DestinationSchema
a} :: OutputUpdate)
outputUpdate_kinesisFirehoseOutputUpdate :: Lens.Lens' OutputUpdate (Prelude.Maybe KinesisFirehoseOutputUpdate)
outputUpdate_kinesisFirehoseOutputUpdate :: Lens' OutputUpdate (Maybe KinesisFirehoseOutputUpdate)
outputUpdate_kinesisFirehoseOutputUpdate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputUpdate' {Maybe KinesisFirehoseOutputUpdate
kinesisFirehoseOutputUpdate :: Maybe KinesisFirehoseOutputUpdate
$sel:kinesisFirehoseOutputUpdate:OutputUpdate' :: OutputUpdate -> Maybe KinesisFirehoseOutputUpdate
kinesisFirehoseOutputUpdate} -> Maybe KinesisFirehoseOutputUpdate
kinesisFirehoseOutputUpdate) (\s :: OutputUpdate
s@OutputUpdate' {} Maybe KinesisFirehoseOutputUpdate
a -> OutputUpdate
s {$sel:kinesisFirehoseOutputUpdate:OutputUpdate' :: Maybe KinesisFirehoseOutputUpdate
kinesisFirehoseOutputUpdate = Maybe KinesisFirehoseOutputUpdate
a} :: OutputUpdate)
outputUpdate_kinesisStreamsOutputUpdate :: Lens.Lens' OutputUpdate (Prelude.Maybe KinesisStreamsOutputUpdate)
outputUpdate_kinesisStreamsOutputUpdate :: Lens' OutputUpdate (Maybe KinesisStreamsOutputUpdate)
outputUpdate_kinesisStreamsOutputUpdate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputUpdate' {Maybe KinesisStreamsOutputUpdate
kinesisStreamsOutputUpdate :: Maybe KinesisStreamsOutputUpdate
$sel:kinesisStreamsOutputUpdate:OutputUpdate' :: OutputUpdate -> Maybe KinesisStreamsOutputUpdate
kinesisStreamsOutputUpdate} -> Maybe KinesisStreamsOutputUpdate
kinesisStreamsOutputUpdate) (\s :: OutputUpdate
s@OutputUpdate' {} Maybe KinesisStreamsOutputUpdate
a -> OutputUpdate
s {$sel:kinesisStreamsOutputUpdate:OutputUpdate' :: Maybe KinesisStreamsOutputUpdate
kinesisStreamsOutputUpdate = Maybe KinesisStreamsOutputUpdate
a} :: OutputUpdate)
outputUpdate_lambdaOutputUpdate :: Lens.Lens' OutputUpdate (Prelude.Maybe LambdaOutputUpdate)
outputUpdate_lambdaOutputUpdate :: Lens' OutputUpdate (Maybe LambdaOutputUpdate)
outputUpdate_lambdaOutputUpdate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputUpdate' {Maybe LambdaOutputUpdate
lambdaOutputUpdate :: Maybe LambdaOutputUpdate
$sel:lambdaOutputUpdate:OutputUpdate' :: OutputUpdate -> Maybe LambdaOutputUpdate
lambdaOutputUpdate} -> Maybe LambdaOutputUpdate
lambdaOutputUpdate) (\s :: OutputUpdate
s@OutputUpdate' {} Maybe LambdaOutputUpdate
a -> OutputUpdate
s {$sel:lambdaOutputUpdate:OutputUpdate' :: Maybe LambdaOutputUpdate
lambdaOutputUpdate = Maybe LambdaOutputUpdate
a} :: OutputUpdate)
outputUpdate_nameUpdate :: Lens.Lens' OutputUpdate (Prelude.Maybe Prelude.Text)
outputUpdate_nameUpdate :: Lens' OutputUpdate (Maybe Text)
outputUpdate_nameUpdate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputUpdate' {Maybe Text
nameUpdate :: Maybe Text
$sel:nameUpdate:OutputUpdate' :: OutputUpdate -> Maybe Text
nameUpdate} -> Maybe Text
nameUpdate) (\s :: OutputUpdate
s@OutputUpdate' {} Maybe Text
a -> OutputUpdate
s {$sel:nameUpdate:OutputUpdate' :: Maybe Text
nameUpdate = Maybe Text
a} :: OutputUpdate)
outputUpdate_outputId :: Lens.Lens' OutputUpdate Prelude.Text
outputUpdate_outputId :: Lens' OutputUpdate Text
outputUpdate_outputId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputUpdate' {Text
outputId :: Text
$sel:outputId:OutputUpdate' :: OutputUpdate -> Text
outputId} -> Text
outputId) (\s :: OutputUpdate
s@OutputUpdate' {} Text
a -> OutputUpdate
s {$sel:outputId:OutputUpdate' :: Text
outputId = Text
a} :: OutputUpdate)
instance Prelude.Hashable OutputUpdate where
hashWithSalt :: Int -> OutputUpdate -> Int
hashWithSalt Int
_salt OutputUpdate' {Maybe Text
Maybe KinesisFirehoseOutputUpdate
Maybe KinesisStreamsOutputUpdate
Maybe LambdaOutputUpdate
Maybe DestinationSchema
Text
outputId :: Text
nameUpdate :: Maybe Text
lambdaOutputUpdate :: Maybe LambdaOutputUpdate
kinesisStreamsOutputUpdate :: Maybe KinesisStreamsOutputUpdate
kinesisFirehoseOutputUpdate :: Maybe KinesisFirehoseOutputUpdate
destinationSchemaUpdate :: Maybe DestinationSchema
$sel:outputId:OutputUpdate' :: OutputUpdate -> Text
$sel:nameUpdate:OutputUpdate' :: OutputUpdate -> Maybe Text
$sel:lambdaOutputUpdate:OutputUpdate' :: OutputUpdate -> Maybe LambdaOutputUpdate
$sel:kinesisStreamsOutputUpdate:OutputUpdate' :: OutputUpdate -> Maybe KinesisStreamsOutputUpdate
$sel:kinesisFirehoseOutputUpdate:OutputUpdate' :: OutputUpdate -> Maybe KinesisFirehoseOutputUpdate
$sel:destinationSchemaUpdate:OutputUpdate' :: OutputUpdate -> Maybe DestinationSchema
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DestinationSchema
destinationSchemaUpdate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe KinesisFirehoseOutputUpdate
kinesisFirehoseOutputUpdate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe KinesisStreamsOutputUpdate
kinesisStreamsOutputUpdate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LambdaOutputUpdate
lambdaOutputUpdate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nameUpdate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
outputId
instance Prelude.NFData OutputUpdate where
rnf :: OutputUpdate -> ()
rnf OutputUpdate' {Maybe Text
Maybe KinesisFirehoseOutputUpdate
Maybe KinesisStreamsOutputUpdate
Maybe LambdaOutputUpdate
Maybe DestinationSchema
Text
outputId :: Text
nameUpdate :: Maybe Text
lambdaOutputUpdate :: Maybe LambdaOutputUpdate
kinesisStreamsOutputUpdate :: Maybe KinesisStreamsOutputUpdate
kinesisFirehoseOutputUpdate :: Maybe KinesisFirehoseOutputUpdate
destinationSchemaUpdate :: Maybe DestinationSchema
$sel:outputId:OutputUpdate' :: OutputUpdate -> Text
$sel:nameUpdate:OutputUpdate' :: OutputUpdate -> Maybe Text
$sel:lambdaOutputUpdate:OutputUpdate' :: OutputUpdate -> Maybe LambdaOutputUpdate
$sel:kinesisStreamsOutputUpdate:OutputUpdate' :: OutputUpdate -> Maybe KinesisStreamsOutputUpdate
$sel:kinesisFirehoseOutputUpdate:OutputUpdate' :: OutputUpdate -> Maybe KinesisFirehoseOutputUpdate
$sel:destinationSchemaUpdate:OutputUpdate' :: OutputUpdate -> Maybe DestinationSchema
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe DestinationSchema
destinationSchemaUpdate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe KinesisFirehoseOutputUpdate
kinesisFirehoseOutputUpdate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe KinesisStreamsOutputUpdate
kinesisStreamsOutputUpdate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LambdaOutputUpdate
lambdaOutputUpdate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nameUpdate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
outputId
instance Data.ToJSON OutputUpdate where
toJSON :: OutputUpdate -> Value
toJSON OutputUpdate' {Maybe Text
Maybe KinesisFirehoseOutputUpdate
Maybe KinesisStreamsOutputUpdate
Maybe LambdaOutputUpdate
Maybe DestinationSchema
Text
outputId :: Text
nameUpdate :: Maybe Text
lambdaOutputUpdate :: Maybe LambdaOutputUpdate
kinesisStreamsOutputUpdate :: Maybe KinesisStreamsOutputUpdate
kinesisFirehoseOutputUpdate :: Maybe KinesisFirehoseOutputUpdate
destinationSchemaUpdate :: Maybe DestinationSchema
$sel:outputId:OutputUpdate' :: OutputUpdate -> Text
$sel:nameUpdate:OutputUpdate' :: OutputUpdate -> Maybe Text
$sel:lambdaOutputUpdate:OutputUpdate' :: OutputUpdate -> Maybe LambdaOutputUpdate
$sel:kinesisStreamsOutputUpdate:OutputUpdate' :: OutputUpdate -> Maybe KinesisStreamsOutputUpdate
$sel:kinesisFirehoseOutputUpdate:OutputUpdate' :: OutputUpdate -> Maybe KinesisFirehoseOutputUpdate
$sel:destinationSchemaUpdate:OutputUpdate' :: OutputUpdate -> Maybe DestinationSchema
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"DestinationSchemaUpdate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DestinationSchema
destinationSchemaUpdate,
(Key
"KinesisFirehoseOutputUpdate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KinesisFirehoseOutputUpdate
kinesisFirehoseOutputUpdate,
(Key
"KinesisStreamsOutputUpdate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KinesisStreamsOutputUpdate
kinesisStreamsOutputUpdate,
(Key
"LambdaOutputUpdate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LambdaOutputUpdate
lambdaOutputUpdate,
(Key
"NameUpdate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nameUpdate,
forall a. a -> Maybe a
Prelude.Just (Key
"OutputId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
outputId)
]
)