{-# 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.SqlApplicationConfigurationDescription where
import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types.InputDescription
import Amazonka.KinesisAnalyticsV2.Types.OutputDescription
import Amazonka.KinesisAnalyticsV2.Types.ReferenceDataSourceDescription
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SqlApplicationConfigurationDescription = SqlApplicationConfigurationDescription'
{
SqlApplicationConfigurationDescription -> Maybe [OutputDescription]
outputDescriptions :: Prelude.Maybe [OutputDescription],
SqlApplicationConfigurationDescription
-> Maybe [ReferenceDataSourceDescription]
referenceDataSourceDescriptions :: Prelude.Maybe [ReferenceDataSourceDescription],
SqlApplicationConfigurationDescription -> Maybe [InputDescription]
inputDescriptions :: Prelude.Maybe [InputDescription]
}
deriving (SqlApplicationConfigurationDescription
-> SqlApplicationConfigurationDescription -> Bool
(SqlApplicationConfigurationDescription
-> SqlApplicationConfigurationDescription -> Bool)
-> (SqlApplicationConfigurationDescription
-> SqlApplicationConfigurationDescription -> Bool)
-> Eq SqlApplicationConfigurationDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SqlApplicationConfigurationDescription
-> SqlApplicationConfigurationDescription -> Bool
$c/= :: SqlApplicationConfigurationDescription
-> SqlApplicationConfigurationDescription -> Bool
== :: SqlApplicationConfigurationDescription
-> SqlApplicationConfigurationDescription -> Bool
$c== :: SqlApplicationConfigurationDescription
-> SqlApplicationConfigurationDescription -> Bool
Prelude.Eq, ReadPrec [SqlApplicationConfigurationDescription]
ReadPrec SqlApplicationConfigurationDescription
Int -> ReadS SqlApplicationConfigurationDescription
ReadS [SqlApplicationConfigurationDescription]
(Int -> ReadS SqlApplicationConfigurationDescription)
-> ReadS [SqlApplicationConfigurationDescription]
-> ReadPrec SqlApplicationConfigurationDescription
-> ReadPrec [SqlApplicationConfigurationDescription]
-> Read SqlApplicationConfigurationDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SqlApplicationConfigurationDescription]
$creadListPrec :: ReadPrec [SqlApplicationConfigurationDescription]
readPrec :: ReadPrec SqlApplicationConfigurationDescription
$creadPrec :: ReadPrec SqlApplicationConfigurationDescription
readList :: ReadS [SqlApplicationConfigurationDescription]
$creadList :: ReadS [SqlApplicationConfigurationDescription]
readsPrec :: Int -> ReadS SqlApplicationConfigurationDescription
$creadsPrec :: Int -> ReadS SqlApplicationConfigurationDescription
Prelude.Read, Int -> SqlApplicationConfigurationDescription -> ShowS
[SqlApplicationConfigurationDescription] -> ShowS
SqlApplicationConfigurationDescription -> String
(Int -> SqlApplicationConfigurationDescription -> ShowS)
-> (SqlApplicationConfigurationDescription -> String)
-> ([SqlApplicationConfigurationDescription] -> ShowS)
-> Show SqlApplicationConfigurationDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SqlApplicationConfigurationDescription] -> ShowS
$cshowList :: [SqlApplicationConfigurationDescription] -> ShowS
show :: SqlApplicationConfigurationDescription -> String
$cshow :: SqlApplicationConfigurationDescription -> String
showsPrec :: Int -> SqlApplicationConfigurationDescription -> ShowS
$cshowsPrec :: Int -> SqlApplicationConfigurationDescription -> ShowS
Prelude.Show, (forall x.
SqlApplicationConfigurationDescription
-> Rep SqlApplicationConfigurationDescription x)
-> (forall x.
Rep SqlApplicationConfigurationDescription x
-> SqlApplicationConfigurationDescription)
-> Generic SqlApplicationConfigurationDescription
forall x.
Rep SqlApplicationConfigurationDescription x
-> SqlApplicationConfigurationDescription
forall x.
SqlApplicationConfigurationDescription
-> Rep SqlApplicationConfigurationDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SqlApplicationConfigurationDescription x
-> SqlApplicationConfigurationDescription
$cfrom :: forall x.
SqlApplicationConfigurationDescription
-> Rep SqlApplicationConfigurationDescription x
Prelude.Generic)
newSqlApplicationConfigurationDescription ::
SqlApplicationConfigurationDescription
newSqlApplicationConfigurationDescription :: SqlApplicationConfigurationDescription
newSqlApplicationConfigurationDescription =
SqlApplicationConfigurationDescription' :: Maybe [OutputDescription]
-> Maybe [ReferenceDataSourceDescription]
-> Maybe [InputDescription]
-> SqlApplicationConfigurationDescription
SqlApplicationConfigurationDescription'
{ $sel:outputDescriptions:SqlApplicationConfigurationDescription' :: Maybe [OutputDescription]
outputDescriptions =
Maybe [OutputDescription]
forall a. Maybe a
Prelude.Nothing,
$sel:referenceDataSourceDescriptions:SqlApplicationConfigurationDescription' :: Maybe [ReferenceDataSourceDescription]
referenceDataSourceDescriptions =
Maybe [ReferenceDataSourceDescription]
forall a. Maybe a
Prelude.Nothing,
$sel:inputDescriptions:SqlApplicationConfigurationDescription' :: Maybe [InputDescription]
inputDescriptions = Maybe [InputDescription]
forall a. Maybe a
Prelude.Nothing
}
sqlApplicationConfigurationDescription_outputDescriptions :: Lens.Lens' SqlApplicationConfigurationDescription (Prelude.Maybe [OutputDescription])
sqlApplicationConfigurationDescription_outputDescriptions :: (Maybe [OutputDescription] -> f (Maybe [OutputDescription]))
-> SqlApplicationConfigurationDescription
-> f SqlApplicationConfigurationDescription
sqlApplicationConfigurationDescription_outputDescriptions = (SqlApplicationConfigurationDescription
-> Maybe [OutputDescription])
-> (SqlApplicationConfigurationDescription
-> Maybe [OutputDescription]
-> SqlApplicationConfigurationDescription)
-> Lens
SqlApplicationConfigurationDescription
SqlApplicationConfigurationDescription
(Maybe [OutputDescription])
(Maybe [OutputDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SqlApplicationConfigurationDescription' {Maybe [OutputDescription]
outputDescriptions :: Maybe [OutputDescription]
$sel:outputDescriptions:SqlApplicationConfigurationDescription' :: SqlApplicationConfigurationDescription -> Maybe [OutputDescription]
outputDescriptions} -> Maybe [OutputDescription]
outputDescriptions) (\s :: SqlApplicationConfigurationDescription
s@SqlApplicationConfigurationDescription' {} Maybe [OutputDescription]
a -> SqlApplicationConfigurationDescription
s {$sel:outputDescriptions:SqlApplicationConfigurationDescription' :: Maybe [OutputDescription]
outputDescriptions = Maybe [OutputDescription]
a} :: SqlApplicationConfigurationDescription) ((Maybe [OutputDescription] -> f (Maybe [OutputDescription]))
-> SqlApplicationConfigurationDescription
-> f SqlApplicationConfigurationDescription)
-> ((Maybe [OutputDescription] -> f (Maybe [OutputDescription]))
-> Maybe [OutputDescription] -> f (Maybe [OutputDescription]))
-> (Maybe [OutputDescription] -> f (Maybe [OutputDescription]))
-> SqlApplicationConfigurationDescription
-> f SqlApplicationConfigurationDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[OutputDescription]
[OutputDescription]
[OutputDescription]
[OutputDescription]
-> Iso
(Maybe [OutputDescription])
(Maybe [OutputDescription])
(Maybe [OutputDescription])
(Maybe [OutputDescription])
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
[OutputDescription]
[OutputDescription]
[OutputDescription]
[OutputDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
sqlApplicationConfigurationDescription_referenceDataSourceDescriptions :: Lens.Lens' SqlApplicationConfigurationDescription (Prelude.Maybe [ReferenceDataSourceDescription])
sqlApplicationConfigurationDescription_referenceDataSourceDescriptions :: (Maybe [ReferenceDataSourceDescription]
-> f (Maybe [ReferenceDataSourceDescription]))
-> SqlApplicationConfigurationDescription
-> f SqlApplicationConfigurationDescription
sqlApplicationConfigurationDescription_referenceDataSourceDescriptions = (SqlApplicationConfigurationDescription
-> Maybe [ReferenceDataSourceDescription])
-> (SqlApplicationConfigurationDescription
-> Maybe [ReferenceDataSourceDescription]
-> SqlApplicationConfigurationDescription)
-> Lens
SqlApplicationConfigurationDescription
SqlApplicationConfigurationDescription
(Maybe [ReferenceDataSourceDescription])
(Maybe [ReferenceDataSourceDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SqlApplicationConfigurationDescription' {Maybe [ReferenceDataSourceDescription]
referenceDataSourceDescriptions :: Maybe [ReferenceDataSourceDescription]
$sel:referenceDataSourceDescriptions:SqlApplicationConfigurationDescription' :: SqlApplicationConfigurationDescription
-> Maybe [ReferenceDataSourceDescription]
referenceDataSourceDescriptions} -> Maybe [ReferenceDataSourceDescription]
referenceDataSourceDescriptions) (\s :: SqlApplicationConfigurationDescription
s@SqlApplicationConfigurationDescription' {} Maybe [ReferenceDataSourceDescription]
a -> SqlApplicationConfigurationDescription
s {$sel:referenceDataSourceDescriptions:SqlApplicationConfigurationDescription' :: Maybe [ReferenceDataSourceDescription]
referenceDataSourceDescriptions = Maybe [ReferenceDataSourceDescription]
a} :: SqlApplicationConfigurationDescription) ((Maybe [ReferenceDataSourceDescription]
-> f (Maybe [ReferenceDataSourceDescription]))
-> SqlApplicationConfigurationDescription
-> f SqlApplicationConfigurationDescription)
-> ((Maybe [ReferenceDataSourceDescription]
-> f (Maybe [ReferenceDataSourceDescription]))
-> Maybe [ReferenceDataSourceDescription]
-> f (Maybe [ReferenceDataSourceDescription]))
-> (Maybe [ReferenceDataSourceDescription]
-> f (Maybe [ReferenceDataSourceDescription]))
-> SqlApplicationConfigurationDescription
-> f SqlApplicationConfigurationDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ReferenceDataSourceDescription]
[ReferenceDataSourceDescription]
[ReferenceDataSourceDescription]
[ReferenceDataSourceDescription]
-> Iso
(Maybe [ReferenceDataSourceDescription])
(Maybe [ReferenceDataSourceDescription])
(Maybe [ReferenceDataSourceDescription])
(Maybe [ReferenceDataSourceDescription])
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
[ReferenceDataSourceDescription]
[ReferenceDataSourceDescription]
[ReferenceDataSourceDescription]
[ReferenceDataSourceDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
sqlApplicationConfigurationDescription_inputDescriptions :: Lens.Lens' SqlApplicationConfigurationDescription (Prelude.Maybe [InputDescription])
sqlApplicationConfigurationDescription_inputDescriptions :: (Maybe [InputDescription] -> f (Maybe [InputDescription]))
-> SqlApplicationConfigurationDescription
-> f SqlApplicationConfigurationDescription
sqlApplicationConfigurationDescription_inputDescriptions = (SqlApplicationConfigurationDescription
-> Maybe [InputDescription])
-> (SqlApplicationConfigurationDescription
-> Maybe [InputDescription]
-> SqlApplicationConfigurationDescription)
-> Lens
SqlApplicationConfigurationDescription
SqlApplicationConfigurationDescription
(Maybe [InputDescription])
(Maybe [InputDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SqlApplicationConfigurationDescription' {Maybe [InputDescription]
inputDescriptions :: Maybe [InputDescription]
$sel:inputDescriptions:SqlApplicationConfigurationDescription' :: SqlApplicationConfigurationDescription -> Maybe [InputDescription]
inputDescriptions} -> Maybe [InputDescription]
inputDescriptions) (\s :: SqlApplicationConfigurationDescription
s@SqlApplicationConfigurationDescription' {} Maybe [InputDescription]
a -> SqlApplicationConfigurationDescription
s {$sel:inputDescriptions:SqlApplicationConfigurationDescription' :: Maybe [InputDescription]
inputDescriptions = Maybe [InputDescription]
a} :: SqlApplicationConfigurationDescription) ((Maybe [InputDescription] -> f (Maybe [InputDescription]))
-> SqlApplicationConfigurationDescription
-> f SqlApplicationConfigurationDescription)
-> ((Maybe [InputDescription] -> f (Maybe [InputDescription]))
-> Maybe [InputDescription] -> f (Maybe [InputDescription]))
-> (Maybe [InputDescription] -> f (Maybe [InputDescription]))
-> SqlApplicationConfigurationDescription
-> f SqlApplicationConfigurationDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[InputDescription]
[InputDescription]
[InputDescription]
[InputDescription]
-> Iso
(Maybe [InputDescription])
(Maybe [InputDescription])
(Maybe [InputDescription])
(Maybe [InputDescription])
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
[InputDescription]
[InputDescription]
[InputDescription]
[InputDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.FromJSON
SqlApplicationConfigurationDescription
where
parseJSON :: Value -> Parser SqlApplicationConfigurationDescription
parseJSON =
String
-> (Object -> Parser SqlApplicationConfigurationDescription)
-> Value
-> Parser SqlApplicationConfigurationDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SqlApplicationConfigurationDescription"
( \Object
x ->
Maybe [OutputDescription]
-> Maybe [ReferenceDataSourceDescription]
-> Maybe [InputDescription]
-> SqlApplicationConfigurationDescription
SqlApplicationConfigurationDescription'
(Maybe [OutputDescription]
-> Maybe [ReferenceDataSourceDescription]
-> Maybe [InputDescription]
-> SqlApplicationConfigurationDescription)
-> Parser (Maybe [OutputDescription])
-> Parser
(Maybe [ReferenceDataSourceDescription]
-> Maybe [InputDescription]
-> SqlApplicationConfigurationDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [OutputDescription]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutputDescriptions"
Parser (Maybe (Maybe [OutputDescription]))
-> Maybe [OutputDescription] -> Parser (Maybe [OutputDescription])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [OutputDescription]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe [ReferenceDataSourceDescription]
-> Maybe [InputDescription]
-> SqlApplicationConfigurationDescription)
-> Parser (Maybe [ReferenceDataSourceDescription])
-> Parser
(Maybe [InputDescription]
-> SqlApplicationConfigurationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [ReferenceDataSourceDescription]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReferenceDataSourceDescriptions"
Parser (Maybe (Maybe [ReferenceDataSourceDescription]))
-> Maybe [ReferenceDataSourceDescription]
-> Parser (Maybe [ReferenceDataSourceDescription])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ReferenceDataSourceDescription]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe [InputDescription]
-> SqlApplicationConfigurationDescription)
-> Parser (Maybe [InputDescription])
-> Parser SqlApplicationConfigurationDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [InputDescription]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InputDescriptions"
Parser (Maybe (Maybe [InputDescription]))
-> Maybe [InputDescription] -> Parser (Maybe [InputDescription])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [InputDescription]
forall a. Monoid a => a
Prelude.mempty
)
)
instance
Prelude.Hashable
SqlApplicationConfigurationDescription
instance
Prelude.NFData
SqlApplicationConfigurationDescription