/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace AppSync { namespace Model { /** *

Describes a Sync configuration for a resolver.

Specifies which * Conflict Detection strategy and Resolution strategy to use when the resolver is * invoked.

See Also:

AWS * API Reference

*/ class SyncConfig { public: AWS_APPSYNC_API SyncConfig(); AWS_APPSYNC_API SyncConfig(Aws::Utils::Json::JsonView jsonValue); AWS_APPSYNC_API SyncConfig& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_APPSYNC_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The Conflict Resolution strategy to perform in the event of a conflict.

*
  • OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting * mutations when versions don't match the latest version at the server.

  • *
  • AUTOMERGE: Resolve conflicts with the Automerge conflict * resolution strategy.

  • LAMBDA: Resolve conflicts with an * Lambda function supplied in the LambdaConflictHandlerConfig.

    *
*/ inline const ConflictHandlerType& GetConflictHandler() const{ return m_conflictHandler; } /** *

The Conflict Resolution strategy to perform in the event of a conflict.

*
  • OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting * mutations when versions don't match the latest version at the server.

  • *
  • AUTOMERGE: Resolve conflicts with the Automerge conflict * resolution strategy.

  • LAMBDA: Resolve conflicts with an * Lambda function supplied in the LambdaConflictHandlerConfig.

    *
*/ inline bool ConflictHandlerHasBeenSet() const { return m_conflictHandlerHasBeenSet; } /** *

The Conflict Resolution strategy to perform in the event of a conflict.

*
  • OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting * mutations when versions don't match the latest version at the server.

  • *
  • AUTOMERGE: Resolve conflicts with the Automerge conflict * resolution strategy.

  • LAMBDA: Resolve conflicts with an * Lambda function supplied in the LambdaConflictHandlerConfig.

    *
*/ inline void SetConflictHandler(const ConflictHandlerType& value) { m_conflictHandlerHasBeenSet = true; m_conflictHandler = value; } /** *

The Conflict Resolution strategy to perform in the event of a conflict.

*
  • OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting * mutations when versions don't match the latest version at the server.

  • *
  • AUTOMERGE: Resolve conflicts with the Automerge conflict * resolution strategy.

  • LAMBDA: Resolve conflicts with an * Lambda function supplied in the LambdaConflictHandlerConfig.

    *
*/ inline void SetConflictHandler(ConflictHandlerType&& value) { m_conflictHandlerHasBeenSet = true; m_conflictHandler = std::move(value); } /** *

The Conflict Resolution strategy to perform in the event of a conflict.

*
  • OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting * mutations when versions don't match the latest version at the server.

  • *
  • AUTOMERGE: Resolve conflicts with the Automerge conflict * resolution strategy.

  • LAMBDA: Resolve conflicts with an * Lambda function supplied in the LambdaConflictHandlerConfig.

    *
*/ inline SyncConfig& WithConflictHandler(const ConflictHandlerType& value) { SetConflictHandler(value); return *this;} /** *

The Conflict Resolution strategy to perform in the event of a conflict.

*
  • OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting * mutations when versions don't match the latest version at the server.

  • *
  • AUTOMERGE: Resolve conflicts with the Automerge conflict * resolution strategy.

  • LAMBDA: Resolve conflicts with an * Lambda function supplied in the LambdaConflictHandlerConfig.

    *
*/ inline SyncConfig& WithConflictHandler(ConflictHandlerType&& value) { SetConflictHandler(std::move(value)); return *this;} /** *

The Conflict Detection strategy to use.

  • VERSION: * Detect conflicts based on object versions for this resolver.

  • * NONE: Do not detect conflicts when invoking this resolver.

  • *
*/ inline const ConflictDetectionType& GetConflictDetection() const{ return m_conflictDetection; } /** *

The Conflict Detection strategy to use.

  • VERSION: * Detect conflicts based on object versions for this resolver.

  • * NONE: Do not detect conflicts when invoking this resolver.

  • *
*/ inline bool ConflictDetectionHasBeenSet() const { return m_conflictDetectionHasBeenSet; } /** *

The Conflict Detection strategy to use.

  • VERSION: * Detect conflicts based on object versions for this resolver.

  • * NONE: Do not detect conflicts when invoking this resolver.

  • *
*/ inline void SetConflictDetection(const ConflictDetectionType& value) { m_conflictDetectionHasBeenSet = true; m_conflictDetection = value; } /** *

The Conflict Detection strategy to use.

  • VERSION: * Detect conflicts based on object versions for this resolver.

  • * NONE: Do not detect conflicts when invoking this resolver.

  • *
*/ inline void SetConflictDetection(ConflictDetectionType&& value) { m_conflictDetectionHasBeenSet = true; m_conflictDetection = std::move(value); } /** *

The Conflict Detection strategy to use.

  • VERSION: * Detect conflicts based on object versions for this resolver.

  • * NONE: Do not detect conflicts when invoking this resolver.

  • *
*/ inline SyncConfig& WithConflictDetection(const ConflictDetectionType& value) { SetConflictDetection(value); return *this;} /** *

The Conflict Detection strategy to use.

  • VERSION: * Detect conflicts based on object versions for this resolver.

  • * NONE: Do not detect conflicts when invoking this resolver.

  • *
*/ inline SyncConfig& WithConflictDetection(ConflictDetectionType&& value) { SetConflictDetection(std::move(value)); return *this;} /** *

The LambdaConflictHandlerConfig when configuring * LAMBDA as the Conflict Handler.

*/ inline const LambdaConflictHandlerConfig& GetLambdaConflictHandlerConfig() const{ return m_lambdaConflictHandlerConfig; } /** *

The LambdaConflictHandlerConfig when configuring * LAMBDA as the Conflict Handler.

*/ inline bool LambdaConflictHandlerConfigHasBeenSet() const { return m_lambdaConflictHandlerConfigHasBeenSet; } /** *

The LambdaConflictHandlerConfig when configuring * LAMBDA as the Conflict Handler.

*/ inline void SetLambdaConflictHandlerConfig(const LambdaConflictHandlerConfig& value) { m_lambdaConflictHandlerConfigHasBeenSet = true; m_lambdaConflictHandlerConfig = value; } /** *

The LambdaConflictHandlerConfig when configuring * LAMBDA as the Conflict Handler.

*/ inline void SetLambdaConflictHandlerConfig(LambdaConflictHandlerConfig&& value) { m_lambdaConflictHandlerConfigHasBeenSet = true; m_lambdaConflictHandlerConfig = std::move(value); } /** *

The LambdaConflictHandlerConfig when configuring * LAMBDA as the Conflict Handler.

*/ inline SyncConfig& WithLambdaConflictHandlerConfig(const LambdaConflictHandlerConfig& value) { SetLambdaConflictHandlerConfig(value); return *this;} /** *

The LambdaConflictHandlerConfig when configuring * LAMBDA as the Conflict Handler.

*/ inline SyncConfig& WithLambdaConflictHandlerConfig(LambdaConflictHandlerConfig&& value) { SetLambdaConflictHandlerConfig(std::move(value)); return *this;} private: ConflictHandlerType m_conflictHandler; bool m_conflictHandlerHasBeenSet = false; ConflictDetectionType m_conflictDetection; bool m_conflictDetectionHasBeenSet = false; LambdaConflictHandlerConfig m_lambdaConflictHandlerConfig; bool m_lambdaConflictHandlerConfigHasBeenSet = false; }; } // namespace Model } // namespace AppSync } // namespace Aws