{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AppSync.Types.FunctionConfiguration
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.AppSync.Types.FunctionConfiguration where

import Amazonka.AppSync.Types.SyncConfig
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A function is a reusable entity. Multiple functions can be used to
-- compose the resolver logic.
--
-- /See:/ 'newFunctionConfiguration' smart constructor.
data FunctionConfiguration = FunctionConfiguration'
  { -- | The ARN of the @Function@ object.
    FunctionConfiguration -> Maybe Text
functionArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the @DataSource@.
    FunctionConfiguration -> Maybe Text
dataSourceName :: Prelude.Maybe Prelude.Text,
    -- | The @Function@ request mapping template. Functions support only the
    -- 2018-05-29 version of the request mapping template.
    FunctionConfiguration -> Maybe Text
requestMappingTemplate :: Prelude.Maybe Prelude.Text,
    -- | The name of the @Function@ object.
    FunctionConfiguration -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | A unique ID representing the @Function@ object.
    FunctionConfiguration -> Maybe Text
functionId :: Prelude.Maybe Prelude.Text,
    -- | The @Function@ response mapping template.
    FunctionConfiguration -> Maybe Text
responseMappingTemplate :: Prelude.Maybe Prelude.Text,
    FunctionConfiguration -> Maybe SyncConfig
syncConfig :: Prelude.Maybe SyncConfig,
    -- | The version of the request mapping template. Currently only the
    -- 2018-05-29 version of the template is supported.
    FunctionConfiguration -> Maybe Text
functionVersion :: Prelude.Maybe Prelude.Text,
    -- | The @Function@ description.
    FunctionConfiguration -> Maybe Text
description :: Prelude.Maybe Prelude.Text
  }
  deriving (FunctionConfiguration -> FunctionConfiguration -> Bool
(FunctionConfiguration -> FunctionConfiguration -> Bool)
-> (FunctionConfiguration -> FunctionConfiguration -> Bool)
-> Eq FunctionConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FunctionConfiguration -> FunctionConfiguration -> Bool
$c/= :: FunctionConfiguration -> FunctionConfiguration -> Bool
== :: FunctionConfiguration -> FunctionConfiguration -> Bool
$c== :: FunctionConfiguration -> FunctionConfiguration -> Bool
Prelude.Eq, ReadPrec [FunctionConfiguration]
ReadPrec FunctionConfiguration
Int -> ReadS FunctionConfiguration
ReadS [FunctionConfiguration]
(Int -> ReadS FunctionConfiguration)
-> ReadS [FunctionConfiguration]
-> ReadPrec FunctionConfiguration
-> ReadPrec [FunctionConfiguration]
-> Read FunctionConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FunctionConfiguration]
$creadListPrec :: ReadPrec [FunctionConfiguration]
readPrec :: ReadPrec FunctionConfiguration
$creadPrec :: ReadPrec FunctionConfiguration
readList :: ReadS [FunctionConfiguration]
$creadList :: ReadS [FunctionConfiguration]
readsPrec :: Int -> ReadS FunctionConfiguration
$creadsPrec :: Int -> ReadS FunctionConfiguration
Prelude.Read, Int -> FunctionConfiguration -> ShowS
[FunctionConfiguration] -> ShowS
FunctionConfiguration -> String
(Int -> FunctionConfiguration -> ShowS)
-> (FunctionConfiguration -> String)
-> ([FunctionConfiguration] -> ShowS)
-> Show FunctionConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FunctionConfiguration] -> ShowS
$cshowList :: [FunctionConfiguration] -> ShowS
show :: FunctionConfiguration -> String
$cshow :: FunctionConfiguration -> String
showsPrec :: Int -> FunctionConfiguration -> ShowS
$cshowsPrec :: Int -> FunctionConfiguration -> ShowS
Prelude.Show, (forall x. FunctionConfiguration -> Rep FunctionConfiguration x)
-> (forall x. Rep FunctionConfiguration x -> FunctionConfiguration)
-> Generic FunctionConfiguration
forall x. Rep FunctionConfiguration x -> FunctionConfiguration
forall x. FunctionConfiguration -> Rep FunctionConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FunctionConfiguration x -> FunctionConfiguration
$cfrom :: forall x. FunctionConfiguration -> Rep FunctionConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'FunctionConfiguration' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'functionArn', 'functionConfiguration_functionArn' - The ARN of the @Function@ object.
--
-- 'dataSourceName', 'functionConfiguration_dataSourceName' - The name of the @DataSource@.
--
-- 'requestMappingTemplate', 'functionConfiguration_requestMappingTemplate' - The @Function@ request mapping template. Functions support only the
-- 2018-05-29 version of the request mapping template.
--
-- 'name', 'functionConfiguration_name' - The name of the @Function@ object.
--
-- 'functionId', 'functionConfiguration_functionId' - A unique ID representing the @Function@ object.
--
-- 'responseMappingTemplate', 'functionConfiguration_responseMappingTemplate' - The @Function@ response mapping template.
--
-- 'syncConfig', 'functionConfiguration_syncConfig' - Undocumented member.
--
-- 'functionVersion', 'functionConfiguration_functionVersion' - The version of the request mapping template. Currently only the
-- 2018-05-29 version of the template is supported.
--
-- 'description', 'functionConfiguration_description' - The @Function@ description.
newFunctionConfiguration ::
  FunctionConfiguration
newFunctionConfiguration :: FunctionConfiguration
newFunctionConfiguration =
  FunctionConfiguration' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SyncConfig
-> Maybe Text
-> Maybe Text
-> FunctionConfiguration
FunctionConfiguration'
    { $sel:functionArn:FunctionConfiguration' :: Maybe Text
functionArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dataSourceName:FunctionConfiguration' :: Maybe Text
dataSourceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requestMappingTemplate:FunctionConfiguration' :: Maybe Text
requestMappingTemplate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:FunctionConfiguration' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:functionId:FunctionConfiguration' :: Maybe Text
functionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:responseMappingTemplate:FunctionConfiguration' :: Maybe Text
responseMappingTemplate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:syncConfig:FunctionConfiguration' :: Maybe SyncConfig
syncConfig = Maybe SyncConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:functionVersion:FunctionConfiguration' :: Maybe Text
functionVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:FunctionConfiguration' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of the @Function@ object.
functionConfiguration_functionArn :: Lens.Lens' FunctionConfiguration (Prelude.Maybe Prelude.Text)
functionConfiguration_functionArn :: (Maybe Text -> f (Maybe Text))
-> FunctionConfiguration -> f FunctionConfiguration
functionConfiguration_functionArn = (FunctionConfiguration -> Maybe Text)
-> (FunctionConfiguration -> Maybe Text -> FunctionConfiguration)
-> Lens
     FunctionConfiguration
     FunctionConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionConfiguration' {Maybe Text
functionArn :: Maybe Text
$sel:functionArn:FunctionConfiguration' :: FunctionConfiguration -> Maybe Text
functionArn} -> Maybe Text
functionArn) (\s :: FunctionConfiguration
s@FunctionConfiguration' {} Maybe Text
a -> FunctionConfiguration
s {$sel:functionArn:FunctionConfiguration' :: Maybe Text
functionArn = Maybe Text
a} :: FunctionConfiguration)

-- | The name of the @DataSource@.
functionConfiguration_dataSourceName :: Lens.Lens' FunctionConfiguration (Prelude.Maybe Prelude.Text)
functionConfiguration_dataSourceName :: (Maybe Text -> f (Maybe Text))
-> FunctionConfiguration -> f FunctionConfiguration
functionConfiguration_dataSourceName = (FunctionConfiguration -> Maybe Text)
-> (FunctionConfiguration -> Maybe Text -> FunctionConfiguration)
-> Lens
     FunctionConfiguration
     FunctionConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionConfiguration' {Maybe Text
dataSourceName :: Maybe Text
$sel:dataSourceName:FunctionConfiguration' :: FunctionConfiguration -> Maybe Text
dataSourceName} -> Maybe Text
dataSourceName) (\s :: FunctionConfiguration
s@FunctionConfiguration' {} Maybe Text
a -> FunctionConfiguration
s {$sel:dataSourceName:FunctionConfiguration' :: Maybe Text
dataSourceName = Maybe Text
a} :: FunctionConfiguration)

-- | The @Function@ request mapping template. Functions support only the
-- 2018-05-29 version of the request mapping template.
functionConfiguration_requestMappingTemplate :: Lens.Lens' FunctionConfiguration (Prelude.Maybe Prelude.Text)
functionConfiguration_requestMappingTemplate :: (Maybe Text -> f (Maybe Text))
-> FunctionConfiguration -> f FunctionConfiguration
functionConfiguration_requestMappingTemplate = (FunctionConfiguration -> Maybe Text)
-> (FunctionConfiguration -> Maybe Text -> FunctionConfiguration)
-> Lens
     FunctionConfiguration
     FunctionConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionConfiguration' {Maybe Text
requestMappingTemplate :: Maybe Text
$sel:requestMappingTemplate:FunctionConfiguration' :: FunctionConfiguration -> Maybe Text
requestMappingTemplate} -> Maybe Text
requestMappingTemplate) (\s :: FunctionConfiguration
s@FunctionConfiguration' {} Maybe Text
a -> FunctionConfiguration
s {$sel:requestMappingTemplate:FunctionConfiguration' :: Maybe Text
requestMappingTemplate = Maybe Text
a} :: FunctionConfiguration)

-- | The name of the @Function@ object.
functionConfiguration_name :: Lens.Lens' FunctionConfiguration (Prelude.Maybe Prelude.Text)
functionConfiguration_name :: (Maybe Text -> f (Maybe Text))
-> FunctionConfiguration -> f FunctionConfiguration
functionConfiguration_name = (FunctionConfiguration -> Maybe Text)
-> (FunctionConfiguration -> Maybe Text -> FunctionConfiguration)
-> Lens
     FunctionConfiguration
     FunctionConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionConfiguration' {Maybe Text
name :: Maybe Text
$sel:name:FunctionConfiguration' :: FunctionConfiguration -> Maybe Text
name} -> Maybe Text
name) (\s :: FunctionConfiguration
s@FunctionConfiguration' {} Maybe Text
a -> FunctionConfiguration
s {$sel:name:FunctionConfiguration' :: Maybe Text
name = Maybe Text
a} :: FunctionConfiguration)

-- | A unique ID representing the @Function@ object.
functionConfiguration_functionId :: Lens.Lens' FunctionConfiguration (Prelude.Maybe Prelude.Text)
functionConfiguration_functionId :: (Maybe Text -> f (Maybe Text))
-> FunctionConfiguration -> f FunctionConfiguration
functionConfiguration_functionId = (FunctionConfiguration -> Maybe Text)
-> (FunctionConfiguration -> Maybe Text -> FunctionConfiguration)
-> Lens
     FunctionConfiguration
     FunctionConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionConfiguration' {Maybe Text
functionId :: Maybe Text
$sel:functionId:FunctionConfiguration' :: FunctionConfiguration -> Maybe Text
functionId} -> Maybe Text
functionId) (\s :: FunctionConfiguration
s@FunctionConfiguration' {} Maybe Text
a -> FunctionConfiguration
s {$sel:functionId:FunctionConfiguration' :: Maybe Text
functionId = Maybe Text
a} :: FunctionConfiguration)

-- | The @Function@ response mapping template.
functionConfiguration_responseMappingTemplate :: Lens.Lens' FunctionConfiguration (Prelude.Maybe Prelude.Text)
functionConfiguration_responseMappingTemplate :: (Maybe Text -> f (Maybe Text))
-> FunctionConfiguration -> f FunctionConfiguration
functionConfiguration_responseMappingTemplate = (FunctionConfiguration -> Maybe Text)
-> (FunctionConfiguration -> Maybe Text -> FunctionConfiguration)
-> Lens
     FunctionConfiguration
     FunctionConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionConfiguration' {Maybe Text
responseMappingTemplate :: Maybe Text
$sel:responseMappingTemplate:FunctionConfiguration' :: FunctionConfiguration -> Maybe Text
responseMappingTemplate} -> Maybe Text
responseMappingTemplate) (\s :: FunctionConfiguration
s@FunctionConfiguration' {} Maybe Text
a -> FunctionConfiguration
s {$sel:responseMappingTemplate:FunctionConfiguration' :: Maybe Text
responseMappingTemplate = Maybe Text
a} :: FunctionConfiguration)

-- | Undocumented member.
functionConfiguration_syncConfig :: Lens.Lens' FunctionConfiguration (Prelude.Maybe SyncConfig)
functionConfiguration_syncConfig :: (Maybe SyncConfig -> f (Maybe SyncConfig))
-> FunctionConfiguration -> f FunctionConfiguration
functionConfiguration_syncConfig = (FunctionConfiguration -> Maybe SyncConfig)
-> (FunctionConfiguration
    -> Maybe SyncConfig -> FunctionConfiguration)
-> Lens
     FunctionConfiguration
     FunctionConfiguration
     (Maybe SyncConfig)
     (Maybe SyncConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionConfiguration' {Maybe SyncConfig
syncConfig :: Maybe SyncConfig
$sel:syncConfig:FunctionConfiguration' :: FunctionConfiguration -> Maybe SyncConfig
syncConfig} -> Maybe SyncConfig
syncConfig) (\s :: FunctionConfiguration
s@FunctionConfiguration' {} Maybe SyncConfig
a -> FunctionConfiguration
s {$sel:syncConfig:FunctionConfiguration' :: Maybe SyncConfig
syncConfig = Maybe SyncConfig
a} :: FunctionConfiguration)

-- | The version of the request mapping template. Currently only the
-- 2018-05-29 version of the template is supported.
functionConfiguration_functionVersion :: Lens.Lens' FunctionConfiguration (Prelude.Maybe Prelude.Text)
functionConfiguration_functionVersion :: (Maybe Text -> f (Maybe Text))
-> FunctionConfiguration -> f FunctionConfiguration
functionConfiguration_functionVersion = (FunctionConfiguration -> Maybe Text)
-> (FunctionConfiguration -> Maybe Text -> FunctionConfiguration)
-> Lens
     FunctionConfiguration
     FunctionConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionConfiguration' {Maybe Text
functionVersion :: Maybe Text
$sel:functionVersion:FunctionConfiguration' :: FunctionConfiguration -> Maybe Text
functionVersion} -> Maybe Text
functionVersion) (\s :: FunctionConfiguration
s@FunctionConfiguration' {} Maybe Text
a -> FunctionConfiguration
s {$sel:functionVersion:FunctionConfiguration' :: Maybe Text
functionVersion = Maybe Text
a} :: FunctionConfiguration)

-- | The @Function@ description.
functionConfiguration_description :: Lens.Lens' FunctionConfiguration (Prelude.Maybe Prelude.Text)
functionConfiguration_description :: (Maybe Text -> f (Maybe Text))
-> FunctionConfiguration -> f FunctionConfiguration
functionConfiguration_description = (FunctionConfiguration -> Maybe Text)
-> (FunctionConfiguration -> Maybe Text -> FunctionConfiguration)
-> Lens
     FunctionConfiguration
     FunctionConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FunctionConfiguration' {Maybe Text
description :: Maybe Text
$sel:description:FunctionConfiguration' :: FunctionConfiguration -> Maybe Text
description} -> Maybe Text
description) (\s :: FunctionConfiguration
s@FunctionConfiguration' {} Maybe Text
a -> FunctionConfiguration
s {$sel:description:FunctionConfiguration' :: Maybe Text
description = Maybe Text
a} :: FunctionConfiguration)

instance Core.FromJSON FunctionConfiguration where
  parseJSON :: Value -> Parser FunctionConfiguration
parseJSON =
    String
-> (Object -> Parser FunctionConfiguration)
-> Value
-> Parser FunctionConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"FunctionConfiguration"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SyncConfig
-> Maybe Text
-> Maybe Text
-> FunctionConfiguration
FunctionConfiguration'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe SyncConfig
 -> Maybe Text
 -> Maybe Text
 -> FunctionConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SyncConfig
      -> Maybe Text
      -> Maybe Text
      -> FunctionConfiguration)
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
"functionArn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SyncConfig
   -> Maybe Text
   -> Maybe Text
   -> FunctionConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SyncConfig
      -> Maybe Text
      -> Maybe Text
      -> FunctionConfiguration)
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
"dataSourceName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SyncConfig
   -> Maybe Text
   -> Maybe Text
   -> FunctionConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SyncConfig
      -> Maybe Text
      -> Maybe Text
      -> FunctionConfiguration)
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
"requestMappingTemplate")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SyncConfig
   -> Maybe Text
   -> Maybe Text
   -> FunctionConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe SyncConfig
      -> Maybe Text
      -> Maybe Text
      -> FunctionConfiguration)
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 Text
   -> Maybe Text
   -> Maybe SyncConfig
   -> Maybe Text
   -> Maybe Text
   -> FunctionConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe SyncConfig
      -> Maybe Text
      -> Maybe Text
      -> FunctionConfiguration)
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
"functionId")
            Parser
  (Maybe Text
   -> Maybe SyncConfig
   -> Maybe Text
   -> Maybe Text
   -> FunctionConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe SyncConfig
      -> Maybe Text -> Maybe Text -> FunctionConfiguration)
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
"responseMappingTemplate")
            Parser
  (Maybe SyncConfig
   -> Maybe Text -> Maybe Text -> FunctionConfiguration)
-> Parser (Maybe SyncConfig)
-> Parser (Maybe Text -> Maybe Text -> FunctionConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SyncConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"syncConfig")
            Parser (Maybe Text -> Maybe Text -> FunctionConfiguration)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> FunctionConfiguration)
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
"functionVersion")
            Parser (Maybe Text -> FunctionConfiguration)
-> Parser (Maybe Text) -> Parser FunctionConfiguration
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")
      )

instance Prelude.Hashable FunctionConfiguration

instance Prelude.NFData FunctionConfiguration