Class ConflictResolutionPolicy
java.lang.Object
com.azure.resourcemanager.cosmos.models.ConflictResolutionPolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ConflictResolutionPolicy>
public final class ConflictResolutionPolicy
extends Object
implements com.azure.json.JsonSerializable<ConflictResolutionPolicy>
The conflict resolution policy for the container.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ConflictResolutionPolicy class. -
Method Summary
Modifier and TypeMethodDescriptionGet the conflictResolutionPath property: The conflict resolution path in the case of LastWriterWins mode.Get the conflictResolutionProcedure property: The procedure to resolve conflicts in the case of custom mode.static ConflictResolutionPolicy
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ConflictResolutionPolicy from the JsonReader.mode()
Get the mode property: Indicates the conflict resolution mode.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withConflictResolutionPath
(String conflictResolutionPath) Set the conflictResolutionPath property: The conflict resolution path in the case of LastWriterWins mode.withConflictResolutionProcedure
(String conflictResolutionProcedure) Set the conflictResolutionProcedure property: The procedure to resolve conflicts in the case of custom mode.Set the mode property: Indicates the conflict resolution mode.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ConflictResolutionPolicy
public ConflictResolutionPolicy()Creates an instance of ConflictResolutionPolicy class.
-
-
Method Details
-
mode
Get the mode property: Indicates the conflict resolution mode.- Returns:
- the mode value.
-
withMode
Set the mode property: Indicates the conflict resolution mode.- Parameters:
mode
- the mode value to set.- Returns:
- the ConflictResolutionPolicy object itself.
-
conflictResolutionPath
Get the conflictResolutionPath property: The conflict resolution path in the case of LastWriterWins mode.- Returns:
- the conflictResolutionPath value.
-
withConflictResolutionPath
Set the conflictResolutionPath property: The conflict resolution path in the case of LastWriterWins mode.- Parameters:
conflictResolutionPath
- the conflictResolutionPath value to set.- Returns:
- the ConflictResolutionPolicy object itself.
-
conflictResolutionProcedure
Get the conflictResolutionProcedure property: The procedure to resolve conflicts in the case of custom mode.- Returns:
- the conflictResolutionProcedure value.
-
withConflictResolutionProcedure
Set the conflictResolutionProcedure property: The procedure to resolve conflicts in the case of custom mode.- Parameters:
conflictResolutionProcedure
- the conflictResolutionProcedure value to set.- Returns:
- the ConflictResolutionPolicy object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<ConflictResolutionPolicy>
- Throws:
IOException
-
fromJson
public static ConflictResolutionPolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ConflictResolutionPolicy from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ConflictResolutionPolicy if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException
- If an error occurs while reading the ConflictResolutionPolicy.
-