{-# 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.LambdaConflictHandlerConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LambdaConflictHandlerConfig = LambdaConflictHandlerConfig'
{
LambdaConflictHandlerConfig -> Maybe Text
lambdaConflictHandlerArn :: Prelude.Maybe Prelude.Text
}
deriving (LambdaConflictHandlerConfig -> LambdaConflictHandlerConfig -> Bool
(LambdaConflictHandlerConfig
-> LambdaConflictHandlerConfig -> Bool)
-> (LambdaConflictHandlerConfig
-> LambdaConflictHandlerConfig -> Bool)
-> Eq LambdaConflictHandlerConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LambdaConflictHandlerConfig -> LambdaConflictHandlerConfig -> Bool
$c/= :: LambdaConflictHandlerConfig -> LambdaConflictHandlerConfig -> Bool
== :: LambdaConflictHandlerConfig -> LambdaConflictHandlerConfig -> Bool
$c== :: LambdaConflictHandlerConfig -> LambdaConflictHandlerConfig -> Bool
Prelude.Eq, ReadPrec [LambdaConflictHandlerConfig]
ReadPrec LambdaConflictHandlerConfig
Int -> ReadS LambdaConflictHandlerConfig
ReadS [LambdaConflictHandlerConfig]
(Int -> ReadS LambdaConflictHandlerConfig)
-> ReadS [LambdaConflictHandlerConfig]
-> ReadPrec LambdaConflictHandlerConfig
-> ReadPrec [LambdaConflictHandlerConfig]
-> Read LambdaConflictHandlerConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LambdaConflictHandlerConfig]
$creadListPrec :: ReadPrec [LambdaConflictHandlerConfig]
readPrec :: ReadPrec LambdaConflictHandlerConfig
$creadPrec :: ReadPrec LambdaConflictHandlerConfig
readList :: ReadS [LambdaConflictHandlerConfig]
$creadList :: ReadS [LambdaConflictHandlerConfig]
readsPrec :: Int -> ReadS LambdaConflictHandlerConfig
$creadsPrec :: Int -> ReadS LambdaConflictHandlerConfig
Prelude.Read, Int -> LambdaConflictHandlerConfig -> ShowS
[LambdaConflictHandlerConfig] -> ShowS
LambdaConflictHandlerConfig -> String
(Int -> LambdaConflictHandlerConfig -> ShowS)
-> (LambdaConflictHandlerConfig -> String)
-> ([LambdaConflictHandlerConfig] -> ShowS)
-> Show LambdaConflictHandlerConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LambdaConflictHandlerConfig] -> ShowS
$cshowList :: [LambdaConflictHandlerConfig] -> ShowS
show :: LambdaConflictHandlerConfig -> String
$cshow :: LambdaConflictHandlerConfig -> String
showsPrec :: Int -> LambdaConflictHandlerConfig -> ShowS
$cshowsPrec :: Int -> LambdaConflictHandlerConfig -> ShowS
Prelude.Show, (forall x.
LambdaConflictHandlerConfig -> Rep LambdaConflictHandlerConfig x)
-> (forall x.
Rep LambdaConflictHandlerConfig x -> LambdaConflictHandlerConfig)
-> Generic LambdaConflictHandlerConfig
forall x.
Rep LambdaConflictHandlerConfig x -> LambdaConflictHandlerConfig
forall x.
LambdaConflictHandlerConfig -> Rep LambdaConflictHandlerConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LambdaConflictHandlerConfig x -> LambdaConflictHandlerConfig
$cfrom :: forall x.
LambdaConflictHandlerConfig -> Rep LambdaConflictHandlerConfig x
Prelude.Generic)
newLambdaConflictHandlerConfig ::
LambdaConflictHandlerConfig
newLambdaConflictHandlerConfig :: LambdaConflictHandlerConfig
newLambdaConflictHandlerConfig =
LambdaConflictHandlerConfig' :: Maybe Text -> LambdaConflictHandlerConfig
LambdaConflictHandlerConfig'
{ $sel:lambdaConflictHandlerArn:LambdaConflictHandlerConfig' :: Maybe Text
lambdaConflictHandlerArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
lambdaConflictHandlerConfig_lambdaConflictHandlerArn :: Lens.Lens' LambdaConflictHandlerConfig (Prelude.Maybe Prelude.Text)
lambdaConflictHandlerConfig_lambdaConflictHandlerArn :: (Maybe Text -> f (Maybe Text))
-> LambdaConflictHandlerConfig -> f LambdaConflictHandlerConfig
lambdaConflictHandlerConfig_lambdaConflictHandlerArn = (LambdaConflictHandlerConfig -> Maybe Text)
-> (LambdaConflictHandlerConfig
-> Maybe Text -> LambdaConflictHandlerConfig)
-> Lens
LambdaConflictHandlerConfig
LambdaConflictHandlerConfig
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaConflictHandlerConfig' {Maybe Text
lambdaConflictHandlerArn :: Maybe Text
$sel:lambdaConflictHandlerArn:LambdaConflictHandlerConfig' :: LambdaConflictHandlerConfig -> Maybe Text
lambdaConflictHandlerArn} -> Maybe Text
lambdaConflictHandlerArn) (\s :: LambdaConflictHandlerConfig
s@LambdaConflictHandlerConfig' {} Maybe Text
a -> LambdaConflictHandlerConfig
s {$sel:lambdaConflictHandlerArn:LambdaConflictHandlerConfig' :: Maybe Text
lambdaConflictHandlerArn = Maybe Text
a} :: LambdaConflictHandlerConfig)
instance Core.FromJSON LambdaConflictHandlerConfig where
parseJSON :: Value -> Parser LambdaConflictHandlerConfig
parseJSON =
String
-> (Object -> Parser LambdaConflictHandlerConfig)
-> Value
-> Parser LambdaConflictHandlerConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LambdaConflictHandlerConfig"
( \Object
x ->
Maybe Text -> LambdaConflictHandlerConfig
LambdaConflictHandlerConfig'
(Maybe Text -> LambdaConflictHandlerConfig)
-> Parser (Maybe Text) -> Parser LambdaConflictHandlerConfig
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
"lambdaConflictHandlerArn")
)
instance Prelude.Hashable LambdaConflictHandlerConfig
instance Prelude.NFData LambdaConflictHandlerConfig
instance Core.ToJSON LambdaConflictHandlerConfig where
toJSON :: LambdaConflictHandlerConfig -> Value
toJSON LambdaConflictHandlerConfig' {Maybe Text
lambdaConflictHandlerArn :: Maybe Text
$sel:lambdaConflictHandlerArn:LambdaConflictHandlerConfig' :: LambdaConflictHandlerConfig -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"lambdaConflictHandlerArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
lambdaConflictHandlerArn
]
)