{-# 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.AppSync.Types.DataSource where
import Amazonka.AppSync.Types.DataSourceType
import Amazonka.AppSync.Types.DynamodbDataSourceConfig
import Amazonka.AppSync.Types.ElasticsearchDataSourceConfig
import Amazonka.AppSync.Types.HttpDataSourceConfig
import Amazonka.AppSync.Types.LambdaDataSourceConfig
import Amazonka.AppSync.Types.OpenSearchServiceDataSourceConfig
import Amazonka.AppSync.Types.RelationalDatabaseDataSourceConfig
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DataSource = DataSource'
{
DataSource -> Maybe Text
serviceRoleArn :: Prelude.Maybe Prelude.Text,
DataSource -> Maybe RelationalDatabaseDataSourceConfig
relationalDatabaseConfig :: Prelude.Maybe RelationalDatabaseDataSourceConfig,
DataSource -> Maybe Text
dataSourceArn :: Prelude.Maybe Prelude.Text,
DataSource -> Maybe DynamodbDataSourceConfig
dynamodbConfig :: Prelude.Maybe DynamodbDataSourceConfig,
DataSource -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
DataSource -> Maybe HttpDataSourceConfig
httpConfig :: Prelude.Maybe HttpDataSourceConfig,
DataSource -> Maybe OpenSearchServiceDataSourceConfig
openSearchServiceConfig :: Prelude.Maybe OpenSearchServiceDataSourceConfig,
DataSource -> Maybe LambdaDataSourceConfig
lambdaConfig :: Prelude.Maybe LambdaDataSourceConfig,
DataSource -> Maybe DataSourceType
type' :: Prelude.Maybe DataSourceType,
DataSource -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
DataSource -> Maybe ElasticsearchDataSourceConfig
elasticsearchConfig :: Prelude.Maybe ElasticsearchDataSourceConfig
}
deriving (DataSource -> DataSource -> Bool
(DataSource -> DataSource -> Bool)
-> (DataSource -> DataSource -> Bool) -> Eq DataSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataSource -> DataSource -> Bool
$c/= :: DataSource -> DataSource -> Bool
== :: DataSource -> DataSource -> Bool
$c== :: DataSource -> DataSource -> Bool
Prelude.Eq, ReadPrec [DataSource]
ReadPrec DataSource
Int -> ReadS DataSource
ReadS [DataSource]
(Int -> ReadS DataSource)
-> ReadS [DataSource]
-> ReadPrec DataSource
-> ReadPrec [DataSource]
-> Read DataSource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DataSource]
$creadListPrec :: ReadPrec [DataSource]
readPrec :: ReadPrec DataSource
$creadPrec :: ReadPrec DataSource
readList :: ReadS [DataSource]
$creadList :: ReadS [DataSource]
readsPrec :: Int -> ReadS DataSource
$creadsPrec :: Int -> ReadS DataSource
Prelude.Read, Int -> DataSource -> ShowS
[DataSource] -> ShowS
DataSource -> String
(Int -> DataSource -> ShowS)
-> (DataSource -> String)
-> ([DataSource] -> ShowS)
-> Show DataSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataSource] -> ShowS
$cshowList :: [DataSource] -> ShowS
show :: DataSource -> String
$cshow :: DataSource -> String
showsPrec :: Int -> DataSource -> ShowS
$cshowsPrec :: Int -> DataSource -> ShowS
Prelude.Show, (forall x. DataSource -> Rep DataSource x)
-> (forall x. Rep DataSource x -> DataSource) -> Generic DataSource
forall x. Rep DataSource x -> DataSource
forall x. DataSource -> Rep DataSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DataSource x -> DataSource
$cfrom :: forall x. DataSource -> Rep DataSource x
Prelude.Generic)
newDataSource ::
DataSource
newDataSource :: DataSource
newDataSource =
DataSource' :: Maybe Text
-> Maybe RelationalDatabaseDataSourceConfig
-> Maybe Text
-> Maybe DynamodbDataSourceConfig
-> Maybe Text
-> Maybe HttpDataSourceConfig
-> Maybe OpenSearchServiceDataSourceConfig
-> Maybe LambdaDataSourceConfig
-> Maybe DataSourceType
-> Maybe Text
-> Maybe ElasticsearchDataSourceConfig
-> DataSource
DataSource'
{ $sel:serviceRoleArn:DataSource' :: Maybe Text
serviceRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:relationalDatabaseConfig:DataSource' :: Maybe RelationalDatabaseDataSourceConfig
relationalDatabaseConfig = Maybe RelationalDatabaseDataSourceConfig
forall a. Maybe a
Prelude.Nothing,
$sel:dataSourceArn:DataSource' :: Maybe Text
dataSourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dynamodbConfig:DataSource' :: Maybe DynamodbDataSourceConfig
dynamodbConfig = Maybe DynamodbDataSourceConfig
forall a. Maybe a
Prelude.Nothing,
$sel:name:DataSource' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpConfig:DataSource' :: Maybe HttpDataSourceConfig
httpConfig = Maybe HttpDataSourceConfig
forall a. Maybe a
Prelude.Nothing,
$sel:openSearchServiceConfig:DataSource' :: Maybe OpenSearchServiceDataSourceConfig
openSearchServiceConfig = Maybe OpenSearchServiceDataSourceConfig
forall a. Maybe a
Prelude.Nothing,
$sel:lambdaConfig:DataSource' :: Maybe LambdaDataSourceConfig
lambdaConfig = Maybe LambdaDataSourceConfig
forall a. Maybe a
Prelude.Nothing,
$sel:type':DataSource' :: Maybe DataSourceType
type' = Maybe DataSourceType
forall a. Maybe a
Prelude.Nothing,
$sel:description:DataSource' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:elasticsearchConfig:DataSource' :: Maybe ElasticsearchDataSourceConfig
elasticsearchConfig = Maybe ElasticsearchDataSourceConfig
forall a. Maybe a
Prelude.Nothing
}
dataSource_serviceRoleArn :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Text)
dataSource_serviceRoleArn :: (Maybe Text -> f (Maybe Text)) -> DataSource -> f DataSource
dataSource_serviceRoleArn = (DataSource -> Maybe Text)
-> (DataSource -> Maybe Text -> DataSource)
-> Lens DataSource DataSource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Text
serviceRoleArn :: Maybe Text
$sel:serviceRoleArn:DataSource' :: DataSource -> Maybe Text
serviceRoleArn} -> Maybe Text
serviceRoleArn) (\s :: DataSource
s@DataSource' {} Maybe Text
a -> DataSource
s {$sel:serviceRoleArn:DataSource' :: Maybe Text
serviceRoleArn = Maybe Text
a} :: DataSource)
dataSource_relationalDatabaseConfig :: Lens.Lens' DataSource (Prelude.Maybe RelationalDatabaseDataSourceConfig)
dataSource_relationalDatabaseConfig :: (Maybe RelationalDatabaseDataSourceConfig
-> f (Maybe RelationalDatabaseDataSourceConfig))
-> DataSource -> f DataSource
dataSource_relationalDatabaseConfig = (DataSource -> Maybe RelationalDatabaseDataSourceConfig)
-> (DataSource
-> Maybe RelationalDatabaseDataSourceConfig -> DataSource)
-> Lens
DataSource
DataSource
(Maybe RelationalDatabaseDataSourceConfig)
(Maybe RelationalDatabaseDataSourceConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe RelationalDatabaseDataSourceConfig
relationalDatabaseConfig :: Maybe RelationalDatabaseDataSourceConfig
$sel:relationalDatabaseConfig:DataSource' :: DataSource -> Maybe RelationalDatabaseDataSourceConfig
relationalDatabaseConfig} -> Maybe RelationalDatabaseDataSourceConfig
relationalDatabaseConfig) (\s :: DataSource
s@DataSource' {} Maybe RelationalDatabaseDataSourceConfig
a -> DataSource
s {$sel:relationalDatabaseConfig:DataSource' :: Maybe RelationalDatabaseDataSourceConfig
relationalDatabaseConfig = Maybe RelationalDatabaseDataSourceConfig
a} :: DataSource)
dataSource_dataSourceArn :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Text)
dataSource_dataSourceArn :: (Maybe Text -> f (Maybe Text)) -> DataSource -> f DataSource
dataSource_dataSourceArn = (DataSource -> Maybe Text)
-> (DataSource -> Maybe Text -> DataSource)
-> Lens DataSource DataSource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Text
dataSourceArn :: Maybe Text
$sel:dataSourceArn:DataSource' :: DataSource -> Maybe Text
dataSourceArn} -> Maybe Text
dataSourceArn) (\s :: DataSource
s@DataSource' {} Maybe Text
a -> DataSource
s {$sel:dataSourceArn:DataSource' :: Maybe Text
dataSourceArn = Maybe Text
a} :: DataSource)
dataSource_dynamodbConfig :: Lens.Lens' DataSource (Prelude.Maybe DynamodbDataSourceConfig)
dataSource_dynamodbConfig :: (Maybe DynamodbDataSourceConfig
-> f (Maybe DynamodbDataSourceConfig))
-> DataSource -> f DataSource
dataSource_dynamodbConfig = (DataSource -> Maybe DynamodbDataSourceConfig)
-> (DataSource -> Maybe DynamodbDataSourceConfig -> DataSource)
-> Lens
DataSource
DataSource
(Maybe DynamodbDataSourceConfig)
(Maybe DynamodbDataSourceConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe DynamodbDataSourceConfig
dynamodbConfig :: Maybe DynamodbDataSourceConfig
$sel:dynamodbConfig:DataSource' :: DataSource -> Maybe DynamodbDataSourceConfig
dynamodbConfig} -> Maybe DynamodbDataSourceConfig
dynamodbConfig) (\s :: DataSource
s@DataSource' {} Maybe DynamodbDataSourceConfig
a -> DataSource
s {$sel:dynamodbConfig:DataSource' :: Maybe DynamodbDataSourceConfig
dynamodbConfig = Maybe DynamodbDataSourceConfig
a} :: DataSource)
dataSource_name :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Text)
dataSource_name :: (Maybe Text -> f (Maybe Text)) -> DataSource -> f DataSource
dataSource_name = (DataSource -> Maybe Text)
-> (DataSource -> Maybe Text -> DataSource)
-> Lens DataSource DataSource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Text
name :: Maybe Text
$sel:name:DataSource' :: DataSource -> Maybe Text
name} -> Maybe Text
name) (\s :: DataSource
s@DataSource' {} Maybe Text
a -> DataSource
s {$sel:name:DataSource' :: Maybe Text
name = Maybe Text
a} :: DataSource)
dataSource_httpConfig :: Lens.Lens' DataSource (Prelude.Maybe HttpDataSourceConfig)
dataSource_httpConfig :: (Maybe HttpDataSourceConfig -> f (Maybe HttpDataSourceConfig))
-> DataSource -> f DataSource
dataSource_httpConfig = (DataSource -> Maybe HttpDataSourceConfig)
-> (DataSource -> Maybe HttpDataSourceConfig -> DataSource)
-> Lens
DataSource
DataSource
(Maybe HttpDataSourceConfig)
(Maybe HttpDataSourceConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe HttpDataSourceConfig
httpConfig :: Maybe HttpDataSourceConfig
$sel:httpConfig:DataSource' :: DataSource -> Maybe HttpDataSourceConfig
httpConfig} -> Maybe HttpDataSourceConfig
httpConfig) (\s :: DataSource
s@DataSource' {} Maybe HttpDataSourceConfig
a -> DataSource
s {$sel:httpConfig:DataSource' :: Maybe HttpDataSourceConfig
httpConfig = Maybe HttpDataSourceConfig
a} :: DataSource)
dataSource_openSearchServiceConfig :: Lens.Lens' DataSource (Prelude.Maybe OpenSearchServiceDataSourceConfig)
dataSource_openSearchServiceConfig :: (Maybe OpenSearchServiceDataSourceConfig
-> f (Maybe OpenSearchServiceDataSourceConfig))
-> DataSource -> f DataSource
dataSource_openSearchServiceConfig = (DataSource -> Maybe OpenSearchServiceDataSourceConfig)
-> (DataSource
-> Maybe OpenSearchServiceDataSourceConfig -> DataSource)
-> Lens
DataSource
DataSource
(Maybe OpenSearchServiceDataSourceConfig)
(Maybe OpenSearchServiceDataSourceConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe OpenSearchServiceDataSourceConfig
openSearchServiceConfig :: Maybe OpenSearchServiceDataSourceConfig
$sel:openSearchServiceConfig:DataSource' :: DataSource -> Maybe OpenSearchServiceDataSourceConfig
openSearchServiceConfig} -> Maybe OpenSearchServiceDataSourceConfig
openSearchServiceConfig) (\s :: DataSource
s@DataSource' {} Maybe OpenSearchServiceDataSourceConfig
a -> DataSource
s {$sel:openSearchServiceConfig:DataSource' :: Maybe OpenSearchServiceDataSourceConfig
openSearchServiceConfig = Maybe OpenSearchServiceDataSourceConfig
a} :: DataSource)
dataSource_lambdaConfig :: Lens.Lens' DataSource (Prelude.Maybe LambdaDataSourceConfig)
dataSource_lambdaConfig :: (Maybe LambdaDataSourceConfig -> f (Maybe LambdaDataSourceConfig))
-> DataSource -> f DataSource
dataSource_lambdaConfig = (DataSource -> Maybe LambdaDataSourceConfig)
-> (DataSource -> Maybe LambdaDataSourceConfig -> DataSource)
-> Lens
DataSource
DataSource
(Maybe LambdaDataSourceConfig)
(Maybe LambdaDataSourceConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe LambdaDataSourceConfig
lambdaConfig :: Maybe LambdaDataSourceConfig
$sel:lambdaConfig:DataSource' :: DataSource -> Maybe LambdaDataSourceConfig
lambdaConfig} -> Maybe LambdaDataSourceConfig
lambdaConfig) (\s :: DataSource
s@DataSource' {} Maybe LambdaDataSourceConfig
a -> DataSource
s {$sel:lambdaConfig:DataSource' :: Maybe LambdaDataSourceConfig
lambdaConfig = Maybe LambdaDataSourceConfig
a} :: DataSource)
dataSource_type :: Lens.Lens' DataSource (Prelude.Maybe DataSourceType)
dataSource_type :: (Maybe DataSourceType -> f (Maybe DataSourceType))
-> DataSource -> f DataSource
dataSource_type = (DataSource -> Maybe DataSourceType)
-> (DataSource -> Maybe DataSourceType -> DataSource)
-> Lens
DataSource DataSource (Maybe DataSourceType) (Maybe DataSourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe DataSourceType
type' :: Maybe DataSourceType
$sel:type':DataSource' :: DataSource -> Maybe DataSourceType
type'} -> Maybe DataSourceType
type') (\s :: DataSource
s@DataSource' {} Maybe DataSourceType
a -> DataSource
s {$sel:type':DataSource' :: Maybe DataSourceType
type' = Maybe DataSourceType
a} :: DataSource)
dataSource_description :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Text)
dataSource_description :: (Maybe Text -> f (Maybe Text)) -> DataSource -> f DataSource
dataSource_description = (DataSource -> Maybe Text)
-> (DataSource -> Maybe Text -> DataSource)
-> Lens DataSource DataSource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Text
description :: Maybe Text
$sel:description:DataSource' :: DataSource -> Maybe Text
description} -> Maybe Text
description) (\s :: DataSource
s@DataSource' {} Maybe Text
a -> DataSource
s {$sel:description:DataSource' :: Maybe Text
description = Maybe Text
a} :: DataSource)
dataSource_elasticsearchConfig :: Lens.Lens' DataSource (Prelude.Maybe ElasticsearchDataSourceConfig)
dataSource_elasticsearchConfig :: (Maybe ElasticsearchDataSourceConfig
-> f (Maybe ElasticsearchDataSourceConfig))
-> DataSource -> f DataSource
dataSource_elasticsearchConfig = (DataSource -> Maybe ElasticsearchDataSourceConfig)
-> (DataSource
-> Maybe ElasticsearchDataSourceConfig -> DataSource)
-> Lens
DataSource
DataSource
(Maybe ElasticsearchDataSourceConfig)
(Maybe ElasticsearchDataSourceConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe ElasticsearchDataSourceConfig
elasticsearchConfig :: Maybe ElasticsearchDataSourceConfig
$sel:elasticsearchConfig:DataSource' :: DataSource -> Maybe ElasticsearchDataSourceConfig
elasticsearchConfig} -> Maybe ElasticsearchDataSourceConfig
elasticsearchConfig) (\s :: DataSource
s@DataSource' {} Maybe ElasticsearchDataSourceConfig
a -> DataSource
s {$sel:elasticsearchConfig:DataSource' :: Maybe ElasticsearchDataSourceConfig
elasticsearchConfig = Maybe ElasticsearchDataSourceConfig
a} :: DataSource)
instance Core.FromJSON DataSource where
parseJSON :: Value -> Parser DataSource
parseJSON =
String
-> (Object -> Parser DataSource) -> Value -> Parser DataSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DataSource"
( \Object
x ->
Maybe Text
-> Maybe RelationalDatabaseDataSourceConfig
-> Maybe Text
-> Maybe DynamodbDataSourceConfig
-> Maybe Text
-> Maybe HttpDataSourceConfig
-> Maybe OpenSearchServiceDataSourceConfig
-> Maybe LambdaDataSourceConfig
-> Maybe DataSourceType
-> Maybe Text
-> Maybe ElasticsearchDataSourceConfig
-> DataSource
DataSource'
(Maybe Text
-> Maybe RelationalDatabaseDataSourceConfig
-> Maybe Text
-> Maybe DynamodbDataSourceConfig
-> Maybe Text
-> Maybe HttpDataSourceConfig
-> Maybe OpenSearchServiceDataSourceConfig
-> Maybe LambdaDataSourceConfig
-> Maybe DataSourceType
-> Maybe Text
-> Maybe ElasticsearchDataSourceConfig
-> DataSource)
-> Parser (Maybe Text)
-> Parser
(Maybe RelationalDatabaseDataSourceConfig
-> Maybe Text
-> Maybe DynamodbDataSourceConfig
-> Maybe Text
-> Maybe HttpDataSourceConfig
-> Maybe OpenSearchServiceDataSourceConfig
-> Maybe LambdaDataSourceConfig
-> Maybe DataSourceType
-> Maybe Text
-> Maybe ElasticsearchDataSourceConfig
-> DataSource)
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
"serviceRoleArn")
Parser
(Maybe RelationalDatabaseDataSourceConfig
-> Maybe Text
-> Maybe DynamodbDataSourceConfig
-> Maybe Text
-> Maybe HttpDataSourceConfig
-> Maybe OpenSearchServiceDataSourceConfig
-> Maybe LambdaDataSourceConfig
-> Maybe DataSourceType
-> Maybe Text
-> Maybe ElasticsearchDataSourceConfig
-> DataSource)
-> Parser (Maybe RelationalDatabaseDataSourceConfig)
-> Parser
(Maybe Text
-> Maybe DynamodbDataSourceConfig
-> Maybe Text
-> Maybe HttpDataSourceConfig
-> Maybe OpenSearchServiceDataSourceConfig
-> Maybe LambdaDataSourceConfig
-> Maybe DataSourceType
-> Maybe Text
-> Maybe ElasticsearchDataSourceConfig
-> DataSource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RelationalDatabaseDataSourceConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"relationalDatabaseConfig")
Parser
(Maybe Text
-> Maybe DynamodbDataSourceConfig
-> Maybe Text
-> Maybe HttpDataSourceConfig
-> Maybe OpenSearchServiceDataSourceConfig
-> Maybe LambdaDataSourceConfig
-> Maybe DataSourceType
-> Maybe Text
-> Maybe ElasticsearchDataSourceConfig
-> DataSource)
-> Parser (Maybe Text)
-> Parser
(Maybe DynamodbDataSourceConfig
-> Maybe Text
-> Maybe HttpDataSourceConfig
-> Maybe OpenSearchServiceDataSourceConfig
-> Maybe LambdaDataSourceConfig
-> Maybe DataSourceType
-> Maybe Text
-> Maybe ElasticsearchDataSourceConfig
-> DataSource)
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
"dataSourceArn")
Parser
(Maybe DynamodbDataSourceConfig
-> Maybe Text
-> Maybe HttpDataSourceConfig
-> Maybe OpenSearchServiceDataSourceConfig
-> Maybe LambdaDataSourceConfig
-> Maybe DataSourceType
-> Maybe Text
-> Maybe ElasticsearchDataSourceConfig
-> DataSource)
-> Parser (Maybe DynamodbDataSourceConfig)
-> Parser
(Maybe Text
-> Maybe HttpDataSourceConfig
-> Maybe OpenSearchServiceDataSourceConfig
-> Maybe LambdaDataSourceConfig
-> Maybe DataSourceType
-> Maybe Text
-> Maybe ElasticsearchDataSourceConfig
-> DataSource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DynamodbDataSourceConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dynamodbConfig")
Parser
(Maybe Text
-> Maybe HttpDataSourceConfig
-> Maybe OpenSearchServiceDataSourceConfig
-> Maybe LambdaDataSourceConfig
-> Maybe DataSourceType
-> Maybe Text
-> Maybe ElasticsearchDataSourceConfig
-> DataSource)
-> Parser (Maybe Text)
-> Parser
(Maybe HttpDataSourceConfig
-> Maybe OpenSearchServiceDataSourceConfig
-> Maybe LambdaDataSourceConfig
-> Maybe DataSourceType
-> Maybe Text
-> Maybe ElasticsearchDataSourceConfig
-> DataSource)
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 HttpDataSourceConfig
-> Maybe OpenSearchServiceDataSourceConfig
-> Maybe LambdaDataSourceConfig
-> Maybe DataSourceType
-> Maybe Text
-> Maybe ElasticsearchDataSourceConfig
-> DataSource)
-> Parser (Maybe HttpDataSourceConfig)
-> Parser
(Maybe OpenSearchServiceDataSourceConfig
-> Maybe LambdaDataSourceConfig
-> Maybe DataSourceType
-> Maybe Text
-> Maybe ElasticsearchDataSourceConfig
-> DataSource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HttpDataSourceConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"httpConfig")
Parser
(Maybe OpenSearchServiceDataSourceConfig
-> Maybe LambdaDataSourceConfig
-> Maybe DataSourceType
-> Maybe Text
-> Maybe ElasticsearchDataSourceConfig
-> DataSource)
-> Parser (Maybe OpenSearchServiceDataSourceConfig)
-> Parser
(Maybe LambdaDataSourceConfig
-> Maybe DataSourceType
-> Maybe Text
-> Maybe ElasticsearchDataSourceConfig
-> DataSource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OpenSearchServiceDataSourceConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"openSearchServiceConfig")
Parser
(Maybe LambdaDataSourceConfig
-> Maybe DataSourceType
-> Maybe Text
-> Maybe ElasticsearchDataSourceConfig
-> DataSource)
-> Parser (Maybe LambdaDataSourceConfig)
-> Parser
(Maybe DataSourceType
-> Maybe Text -> Maybe ElasticsearchDataSourceConfig -> DataSource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LambdaDataSourceConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lambdaConfig")
Parser
(Maybe DataSourceType
-> Maybe Text -> Maybe ElasticsearchDataSourceConfig -> DataSource)
-> Parser (Maybe DataSourceType)
-> Parser
(Maybe Text -> Maybe ElasticsearchDataSourceConfig -> DataSource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DataSourceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
Parser
(Maybe Text -> Maybe ElasticsearchDataSourceConfig -> DataSource)
-> Parser (Maybe Text)
-> Parser (Maybe ElasticsearchDataSourceConfig -> DataSource)
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
"description")
Parser (Maybe ElasticsearchDataSourceConfig -> DataSource)
-> Parser (Maybe ElasticsearchDataSourceConfig)
-> Parser DataSource
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ElasticsearchDataSourceConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"elasticsearchConfig")
)
instance Prelude.Hashable DataSource
instance Prelude.NFData DataSource