module Stratosphere.AppSync.Resolver.SyncConfigProperty (
module Exports, SyncConfigProperty(..), mkSyncConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppSync.Resolver.LambdaConflictHandlerConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SyncConfigProperty
=
SyncConfigProperty {SyncConfigProperty -> ()
haddock_workaround_ :: (),
SyncConfigProperty -> Value Text
conflictDetection :: (Value Prelude.Text),
SyncConfigProperty -> Maybe (Value Text)
conflictHandler :: (Prelude.Maybe (Value Prelude.Text)),
SyncConfigProperty -> Maybe LambdaConflictHandlerConfigProperty
lambdaConflictHandlerConfig :: (Prelude.Maybe LambdaConflictHandlerConfigProperty)}
deriving stock (SyncConfigProperty -> SyncConfigProperty -> Bool
(SyncConfigProperty -> SyncConfigProperty -> Bool)
-> (SyncConfigProperty -> SyncConfigProperty -> Bool)
-> Eq SyncConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SyncConfigProperty -> SyncConfigProperty -> Bool
== :: SyncConfigProperty -> SyncConfigProperty -> Bool
$c/= :: SyncConfigProperty -> SyncConfigProperty -> Bool
/= :: SyncConfigProperty -> SyncConfigProperty -> Bool
Prelude.Eq, Int -> SyncConfigProperty -> ShowS
[SyncConfigProperty] -> ShowS
SyncConfigProperty -> String
(Int -> SyncConfigProperty -> ShowS)
-> (SyncConfigProperty -> String)
-> ([SyncConfigProperty] -> ShowS)
-> Show SyncConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SyncConfigProperty -> ShowS
showsPrec :: Int -> SyncConfigProperty -> ShowS
$cshow :: SyncConfigProperty -> String
show :: SyncConfigProperty -> String
$cshowList :: [SyncConfigProperty] -> ShowS
showList :: [SyncConfigProperty] -> ShowS
Prelude.Show)
mkSyncConfigProperty :: Value Prelude.Text -> SyncConfigProperty
mkSyncConfigProperty :: Value Text -> SyncConfigProperty
mkSyncConfigProperty Value Text
conflictDetection
= SyncConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), conflictDetection :: Value Text
conflictDetection = Value Text
conflictDetection,
conflictHandler :: Maybe (Value Text)
conflictHandler = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
lambdaConflictHandlerConfig :: Maybe LambdaConflictHandlerConfigProperty
lambdaConflictHandlerConfig = Maybe LambdaConflictHandlerConfigProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SyncConfigProperty where
toResourceProperties :: SyncConfigProperty -> ResourceProperties
toResourceProperties SyncConfigProperty {Maybe (Value Text)
Maybe LambdaConflictHandlerConfigProperty
()
Value Text
haddock_workaround_ :: SyncConfigProperty -> ()
conflictDetection :: SyncConfigProperty -> Value Text
conflictHandler :: SyncConfigProperty -> Maybe (Value Text)
lambdaConflictHandlerConfig :: SyncConfigProperty -> Maybe LambdaConflictHandlerConfigProperty
haddock_workaround_ :: ()
conflictDetection :: Value Text
conflictHandler :: Maybe (Value Text)
lambdaConflictHandlerConfig :: Maybe LambdaConflictHandlerConfigProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AppSync::Resolver.SyncConfig",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ConflictDetection" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
conflictDetection]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ConflictHandler" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
conflictHandler,
Key -> LambdaConflictHandlerConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LambdaConflictHandlerConfig"
(LambdaConflictHandlerConfigProperty -> (Key, Value))
-> Maybe LambdaConflictHandlerConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LambdaConflictHandlerConfigProperty
lambdaConflictHandlerConfig]))}
instance JSON.ToJSON SyncConfigProperty where
toJSON :: SyncConfigProperty -> Value
toJSON SyncConfigProperty {Maybe (Value Text)
Maybe LambdaConflictHandlerConfigProperty
()
Value Text
haddock_workaround_ :: SyncConfigProperty -> ()
conflictDetection :: SyncConfigProperty -> Value Text
conflictHandler :: SyncConfigProperty -> Maybe (Value Text)
lambdaConflictHandlerConfig :: SyncConfigProperty -> Maybe LambdaConflictHandlerConfigProperty
haddock_workaround_ :: ()
conflictDetection :: Value Text
conflictHandler :: Maybe (Value Text)
lambdaConflictHandlerConfig :: Maybe LambdaConflictHandlerConfigProperty
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ConflictDetection" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
conflictDetection]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ConflictHandler" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
conflictHandler,
Key -> LambdaConflictHandlerConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LambdaConflictHandlerConfig"
(LambdaConflictHandlerConfigProperty -> (Key, Value))
-> Maybe LambdaConflictHandlerConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LambdaConflictHandlerConfigProperty
lambdaConflictHandlerConfig])))
instance Property "ConflictDetection" SyncConfigProperty where
type PropertyType "ConflictDetection" SyncConfigProperty = Value Prelude.Text
set :: PropertyType "ConflictDetection" SyncConfigProperty
-> SyncConfigProperty -> SyncConfigProperty
set PropertyType "ConflictDetection" SyncConfigProperty
newValue SyncConfigProperty {Maybe (Value Text)
Maybe LambdaConflictHandlerConfigProperty
()
Value Text
haddock_workaround_ :: SyncConfigProperty -> ()
conflictDetection :: SyncConfigProperty -> Value Text
conflictHandler :: SyncConfigProperty -> Maybe (Value Text)
lambdaConflictHandlerConfig :: SyncConfigProperty -> Maybe LambdaConflictHandlerConfigProperty
haddock_workaround_ :: ()
conflictDetection :: Value Text
conflictHandler :: Maybe (Value Text)
lambdaConflictHandlerConfig :: Maybe LambdaConflictHandlerConfigProperty
..}
= SyncConfigProperty {conflictDetection :: Value Text
conflictDetection = PropertyType "ConflictDetection" SyncConfigProperty
Value Text
newValue, Maybe (Value Text)
Maybe LambdaConflictHandlerConfigProperty
()
haddock_workaround_ :: ()
conflictHandler :: Maybe (Value Text)
lambdaConflictHandlerConfig :: Maybe LambdaConflictHandlerConfigProperty
haddock_workaround_ :: ()
conflictHandler :: Maybe (Value Text)
lambdaConflictHandlerConfig :: Maybe LambdaConflictHandlerConfigProperty
..}
instance Property "ConflictHandler" SyncConfigProperty where
type PropertyType "ConflictHandler" SyncConfigProperty = Value Prelude.Text
set :: PropertyType "ConflictHandler" SyncConfigProperty
-> SyncConfigProperty -> SyncConfigProperty
set PropertyType "ConflictHandler" SyncConfigProperty
newValue SyncConfigProperty {Maybe (Value Text)
Maybe LambdaConflictHandlerConfigProperty
()
Value Text
haddock_workaround_ :: SyncConfigProperty -> ()
conflictDetection :: SyncConfigProperty -> Value Text
conflictHandler :: SyncConfigProperty -> Maybe (Value Text)
lambdaConflictHandlerConfig :: SyncConfigProperty -> Maybe LambdaConflictHandlerConfigProperty
haddock_workaround_ :: ()
conflictDetection :: Value Text
conflictHandler :: Maybe (Value Text)
lambdaConflictHandlerConfig :: Maybe LambdaConflictHandlerConfigProperty
..}
= SyncConfigProperty {conflictHandler :: Maybe (Value Text)
conflictHandler = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ConflictHandler" SyncConfigProperty
Value Text
newValue, Maybe LambdaConflictHandlerConfigProperty
()
Value Text
haddock_workaround_ :: ()
conflictDetection :: Value Text
lambdaConflictHandlerConfig :: Maybe LambdaConflictHandlerConfigProperty
haddock_workaround_ :: ()
conflictDetection :: Value Text
lambdaConflictHandlerConfig :: Maybe LambdaConflictHandlerConfigProperty
..}
instance Property "LambdaConflictHandlerConfig" SyncConfigProperty where
type PropertyType "LambdaConflictHandlerConfig" SyncConfigProperty = LambdaConflictHandlerConfigProperty
set :: PropertyType "LambdaConflictHandlerConfig" SyncConfigProperty
-> SyncConfigProperty -> SyncConfigProperty
set PropertyType "LambdaConflictHandlerConfig" SyncConfigProperty
newValue SyncConfigProperty {Maybe (Value Text)
Maybe LambdaConflictHandlerConfigProperty
()
Value Text
haddock_workaround_ :: SyncConfigProperty -> ()
conflictDetection :: SyncConfigProperty -> Value Text
conflictHandler :: SyncConfigProperty -> Maybe (Value Text)
lambdaConflictHandlerConfig :: SyncConfigProperty -> Maybe LambdaConflictHandlerConfigProperty
haddock_workaround_ :: ()
conflictDetection :: Value Text
conflictHandler :: Maybe (Value Text)
lambdaConflictHandlerConfig :: Maybe LambdaConflictHandlerConfigProperty
..}
= SyncConfigProperty
{lambdaConflictHandlerConfig :: Maybe LambdaConflictHandlerConfigProperty
lambdaConflictHandlerConfig = LambdaConflictHandlerConfigProperty
-> Maybe LambdaConflictHandlerConfigProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LambdaConflictHandlerConfig" SyncConfigProperty
LambdaConflictHandlerConfigProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
conflictDetection :: Value Text
conflictHandler :: Maybe (Value Text)
haddock_workaround_ :: ()
conflictDetection :: Value Text
conflictHandler :: Maybe (Value Text)
..}