Class FailoverPolicies
java.lang.Object
com.azure.resourcemanager.cosmos.models.FailoverPolicies
- All Implemented Interfaces:
com.azure.json.JsonSerializable<FailoverPolicies>
public final class FailoverPolicies
extends Object
implements com.azure.json.JsonSerializable<FailoverPolicies>
The list of new failover policies for the failover priority change.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the failoverPolicies property: List of failover policies.static FailoverPolicies
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of FailoverPolicies from the JsonReader.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withFailoverPolicies
(List<FailoverPolicy> failoverPolicies) Set the failoverPolicies property: List of failover policies.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
-
FailoverPolicies
public FailoverPolicies()Creates an instance of FailoverPolicies class.
-
-
Method Details
-
failoverPolicies
Get the failoverPolicies property: List of failover policies.- Returns:
- the failoverPolicies value.
-
withFailoverPolicies
Set the failoverPolicies property: List of failover policies.- Parameters:
failoverPolicies
- the failoverPolicies value to set.- Returns:
- the FailoverPolicies 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<FailoverPolicies>
- Throws:
IOException
-
fromJson
Reads an instance of FailoverPolicies from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of FailoverPolicies if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the FailoverPolicies.
-