{-# 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.KinesisAnalyticsV2.Types.OutputDescription where
import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types.DestinationSchema
import Amazonka.KinesisAnalyticsV2.Types.KinesisFirehoseOutputDescription
import Amazonka.KinesisAnalyticsV2.Types.KinesisStreamsOutputDescription
import Amazonka.KinesisAnalyticsV2.Types.LambdaOutputDescription
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data OutputDescription = OutputDescription'
{
OutputDescription -> Maybe Text
outputId :: Prelude.Maybe Prelude.Text,
OutputDescription -> Maybe DestinationSchema
destinationSchema :: Prelude.Maybe DestinationSchema,
OutputDescription -> Maybe KinesisFirehoseOutputDescription
kinesisFirehoseOutputDescription :: Prelude.Maybe KinesisFirehoseOutputDescription,
OutputDescription -> Maybe KinesisStreamsOutputDescription
kinesisStreamsOutputDescription :: Prelude.Maybe KinesisStreamsOutputDescription,
OutputDescription -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
OutputDescription -> Maybe LambdaOutputDescription
lambdaOutputDescription :: Prelude.Maybe LambdaOutputDescription
}
deriving (OutputDescription -> OutputDescription -> Bool
(OutputDescription -> OutputDescription -> Bool)
-> (OutputDescription -> OutputDescription -> Bool)
-> Eq OutputDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OutputDescription -> OutputDescription -> Bool
$c/= :: OutputDescription -> OutputDescription -> Bool
== :: OutputDescription -> OutputDescription -> Bool
$c== :: OutputDescription -> OutputDescription -> Bool
Prelude.Eq, ReadPrec [OutputDescription]
ReadPrec OutputDescription
Int -> ReadS OutputDescription
ReadS [OutputDescription]
(Int -> ReadS OutputDescription)
-> ReadS [OutputDescription]
-> ReadPrec OutputDescription
-> ReadPrec [OutputDescription]
-> Read OutputDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OutputDescription]
$creadListPrec :: ReadPrec [OutputDescription]
readPrec :: ReadPrec OutputDescription
$creadPrec :: ReadPrec OutputDescription
readList :: ReadS [OutputDescription]
$creadList :: ReadS [OutputDescription]
readsPrec :: Int -> ReadS OutputDescription
$creadsPrec :: Int -> ReadS OutputDescription
Prelude.Read, Int -> OutputDescription -> ShowS
[OutputDescription] -> ShowS
OutputDescription -> String
(Int -> OutputDescription -> ShowS)
-> (OutputDescription -> String)
-> ([OutputDescription] -> ShowS)
-> Show OutputDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OutputDescription] -> ShowS
$cshowList :: [OutputDescription] -> ShowS
show :: OutputDescription -> String
$cshow :: OutputDescription -> String
showsPrec :: Int -> OutputDescription -> ShowS
$cshowsPrec :: Int -> OutputDescription -> ShowS
Prelude.Show, (forall x. OutputDescription -> Rep OutputDescription x)
-> (forall x. Rep OutputDescription x -> OutputDescription)
-> Generic OutputDescription
forall x. Rep OutputDescription x -> OutputDescription
forall x. OutputDescription -> Rep OutputDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OutputDescription x -> OutputDescription
$cfrom :: forall x. OutputDescription -> Rep OutputDescription x
Prelude.Generic)
newOutputDescription ::
OutputDescription
newOutputDescription :: OutputDescription
newOutputDescription =
OutputDescription' :: Maybe Text
-> Maybe DestinationSchema
-> Maybe KinesisFirehoseOutputDescription
-> Maybe KinesisStreamsOutputDescription
-> Maybe Text
-> Maybe LambdaOutputDescription
-> OutputDescription
OutputDescription'
{ $sel:outputId:OutputDescription' :: Maybe Text
outputId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:destinationSchema:OutputDescription' :: Maybe DestinationSchema
destinationSchema = Maybe DestinationSchema
forall a. Maybe a
Prelude.Nothing,
$sel:kinesisFirehoseOutputDescription:OutputDescription' :: Maybe KinesisFirehoseOutputDescription
kinesisFirehoseOutputDescription = Maybe KinesisFirehoseOutputDescription
forall a. Maybe a
Prelude.Nothing,
$sel:kinesisStreamsOutputDescription:OutputDescription' :: Maybe KinesisStreamsOutputDescription
kinesisStreamsOutputDescription = Maybe KinesisStreamsOutputDescription
forall a. Maybe a
Prelude.Nothing,
$sel:name:OutputDescription' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lambdaOutputDescription:OutputDescription' :: Maybe LambdaOutputDescription
lambdaOutputDescription = Maybe LambdaOutputDescription
forall a. Maybe a
Prelude.Nothing
}
outputDescription_outputId :: Lens.Lens' OutputDescription (Prelude.Maybe Prelude.Text)
outputDescription_outputId :: (Maybe Text -> f (Maybe Text))
-> OutputDescription -> f OutputDescription
outputDescription_outputId = (OutputDescription -> Maybe Text)
-> (OutputDescription -> Maybe Text -> OutputDescription)
-> Lens
OutputDescription OutputDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputDescription' {Maybe Text
outputId :: Maybe Text
$sel:outputId:OutputDescription' :: OutputDescription -> Maybe Text
outputId} -> Maybe Text
outputId) (\s :: OutputDescription
s@OutputDescription' {} Maybe Text
a -> OutputDescription
s {$sel:outputId:OutputDescription' :: Maybe Text
outputId = Maybe Text
a} :: OutputDescription)
outputDescription_destinationSchema :: Lens.Lens' OutputDescription (Prelude.Maybe DestinationSchema)
outputDescription_destinationSchema :: (Maybe DestinationSchema -> f (Maybe DestinationSchema))
-> OutputDescription -> f OutputDescription
outputDescription_destinationSchema = (OutputDescription -> Maybe DestinationSchema)
-> (OutputDescription
-> Maybe DestinationSchema -> OutputDescription)
-> Lens
OutputDescription
OutputDescription
(Maybe DestinationSchema)
(Maybe DestinationSchema)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputDescription' {Maybe DestinationSchema
destinationSchema :: Maybe DestinationSchema
$sel:destinationSchema:OutputDescription' :: OutputDescription -> Maybe DestinationSchema
destinationSchema} -> Maybe DestinationSchema
destinationSchema) (\s :: OutputDescription
s@OutputDescription' {} Maybe DestinationSchema
a -> OutputDescription
s {$sel:destinationSchema:OutputDescription' :: Maybe DestinationSchema
destinationSchema = Maybe DestinationSchema
a} :: OutputDescription)
outputDescription_kinesisFirehoseOutputDescription :: Lens.Lens' OutputDescription (Prelude.Maybe KinesisFirehoseOutputDescription)
outputDescription_kinesisFirehoseOutputDescription :: (Maybe KinesisFirehoseOutputDescription
-> f (Maybe KinesisFirehoseOutputDescription))
-> OutputDescription -> f OutputDescription
outputDescription_kinesisFirehoseOutputDescription = (OutputDescription -> Maybe KinesisFirehoseOutputDescription)
-> (OutputDescription
-> Maybe KinesisFirehoseOutputDescription -> OutputDescription)
-> Lens
OutputDescription
OutputDescription
(Maybe KinesisFirehoseOutputDescription)
(Maybe KinesisFirehoseOutputDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputDescription' {Maybe KinesisFirehoseOutputDescription
kinesisFirehoseOutputDescription :: Maybe KinesisFirehoseOutputDescription
$sel:kinesisFirehoseOutputDescription:OutputDescription' :: OutputDescription -> Maybe KinesisFirehoseOutputDescription
kinesisFirehoseOutputDescription} -> Maybe KinesisFirehoseOutputDescription
kinesisFirehoseOutputDescription) (\s :: OutputDescription
s@OutputDescription' {} Maybe KinesisFirehoseOutputDescription
a -> OutputDescription
s {$sel:kinesisFirehoseOutputDescription:OutputDescription' :: Maybe KinesisFirehoseOutputDescription
kinesisFirehoseOutputDescription = Maybe KinesisFirehoseOutputDescription
a} :: OutputDescription)
outputDescription_kinesisStreamsOutputDescription :: Lens.Lens' OutputDescription (Prelude.Maybe KinesisStreamsOutputDescription)
outputDescription_kinesisStreamsOutputDescription :: (Maybe KinesisStreamsOutputDescription
-> f (Maybe KinesisStreamsOutputDescription))
-> OutputDescription -> f OutputDescription
outputDescription_kinesisStreamsOutputDescription = (OutputDescription -> Maybe KinesisStreamsOutputDescription)
-> (OutputDescription
-> Maybe KinesisStreamsOutputDescription -> OutputDescription)
-> Lens
OutputDescription
OutputDescription
(Maybe KinesisStreamsOutputDescription)
(Maybe KinesisStreamsOutputDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputDescription' {Maybe KinesisStreamsOutputDescription
kinesisStreamsOutputDescription :: Maybe KinesisStreamsOutputDescription
$sel:kinesisStreamsOutputDescription:OutputDescription' :: OutputDescription -> Maybe KinesisStreamsOutputDescription
kinesisStreamsOutputDescription} -> Maybe KinesisStreamsOutputDescription
kinesisStreamsOutputDescription) (\s :: OutputDescription
s@OutputDescription' {} Maybe KinesisStreamsOutputDescription
a -> OutputDescription
s {$sel:kinesisStreamsOutputDescription:OutputDescription' :: Maybe KinesisStreamsOutputDescription
kinesisStreamsOutputDescription = Maybe KinesisStreamsOutputDescription
a} :: OutputDescription)
outputDescription_name :: Lens.Lens' OutputDescription (Prelude.Maybe Prelude.Text)
outputDescription_name :: (Maybe Text -> f (Maybe Text))
-> OutputDescription -> f OutputDescription
outputDescription_name = (OutputDescription -> Maybe Text)
-> (OutputDescription -> Maybe Text -> OutputDescription)
-> Lens
OutputDescription OutputDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputDescription' {Maybe Text
name :: Maybe Text
$sel:name:OutputDescription' :: OutputDescription -> Maybe Text
name} -> Maybe Text
name) (\s :: OutputDescription
s@OutputDescription' {} Maybe Text
a -> OutputDescription
s {$sel:name:OutputDescription' :: Maybe Text
name = Maybe Text
a} :: OutputDescription)
outputDescription_lambdaOutputDescription :: Lens.Lens' OutputDescription (Prelude.Maybe LambdaOutputDescription)
outputDescription_lambdaOutputDescription :: (Maybe LambdaOutputDescription
-> f (Maybe LambdaOutputDescription))
-> OutputDescription -> f OutputDescription
outputDescription_lambdaOutputDescription = (OutputDescription -> Maybe LambdaOutputDescription)
-> (OutputDescription
-> Maybe LambdaOutputDescription -> OutputDescription)
-> Lens
OutputDescription
OutputDescription
(Maybe LambdaOutputDescription)
(Maybe LambdaOutputDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputDescription' {Maybe LambdaOutputDescription
lambdaOutputDescription :: Maybe LambdaOutputDescription
$sel:lambdaOutputDescription:OutputDescription' :: OutputDescription -> Maybe LambdaOutputDescription
lambdaOutputDescription} -> Maybe LambdaOutputDescription
lambdaOutputDescription) (\s :: OutputDescription
s@OutputDescription' {} Maybe LambdaOutputDescription
a -> OutputDescription
s {$sel:lambdaOutputDescription:OutputDescription' :: Maybe LambdaOutputDescription
lambdaOutputDescription = Maybe LambdaOutputDescription
a} :: OutputDescription)
instance Core.FromJSON OutputDescription where
parseJSON :: Value -> Parser OutputDescription
parseJSON =
String
-> (Object -> Parser OutputDescription)
-> Value
-> Parser OutputDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"OutputDescription"
( \Object
x ->
Maybe Text
-> Maybe DestinationSchema
-> Maybe KinesisFirehoseOutputDescription
-> Maybe KinesisStreamsOutputDescription
-> Maybe Text
-> Maybe LambdaOutputDescription
-> OutputDescription
OutputDescription'
(Maybe Text
-> Maybe DestinationSchema
-> Maybe KinesisFirehoseOutputDescription
-> Maybe KinesisStreamsOutputDescription
-> Maybe Text
-> Maybe LambdaOutputDescription
-> OutputDescription)
-> Parser (Maybe Text)
-> Parser
(Maybe DestinationSchema
-> Maybe KinesisFirehoseOutputDescription
-> Maybe KinesisStreamsOutputDescription
-> Maybe Text
-> Maybe LambdaOutputDescription
-> OutputDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutputId")
Parser
(Maybe DestinationSchema
-> Maybe KinesisFirehoseOutputDescription
-> Maybe KinesisStreamsOutputDescription
-> Maybe Text
-> Maybe LambdaOutputDescription
-> OutputDescription)
-> Parser (Maybe DestinationSchema)
-> Parser
(Maybe KinesisFirehoseOutputDescription
-> Maybe KinesisStreamsOutputDescription
-> Maybe Text
-> Maybe LambdaOutputDescription
-> OutputDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DestinationSchema)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DestinationSchema")
Parser
(Maybe KinesisFirehoseOutputDescription
-> Maybe KinesisStreamsOutputDescription
-> Maybe Text
-> Maybe LambdaOutputDescription
-> OutputDescription)
-> Parser (Maybe KinesisFirehoseOutputDescription)
-> Parser
(Maybe KinesisStreamsOutputDescription
-> Maybe Text
-> Maybe LambdaOutputDescription
-> OutputDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe KinesisFirehoseOutputDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KinesisFirehoseOutputDescription")
Parser
(Maybe KinesisStreamsOutputDescription
-> Maybe Text
-> Maybe LambdaOutputDescription
-> OutputDescription)
-> Parser (Maybe KinesisStreamsOutputDescription)
-> Parser
(Maybe Text -> Maybe LambdaOutputDescription -> OutputDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe KinesisStreamsOutputDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KinesisStreamsOutputDescription")
Parser
(Maybe Text -> Maybe LambdaOutputDescription -> OutputDescription)
-> Parser (Maybe Text)
-> Parser (Maybe LambdaOutputDescription -> OutputDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
Parser (Maybe LambdaOutputDescription -> OutputDescription)
-> Parser (Maybe LambdaOutputDescription)
-> Parser OutputDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LambdaOutputDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LambdaOutputDescription")
)
instance Prelude.Hashable OutputDescription
instance Prelude.NFData OutputDescription