Class HighAvailabilityForPatch
java.lang.Object
com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityForPatch
- All Implemented Interfaces:
com.azure.json.JsonSerializable<HighAvailabilityForPatch>
public final class HighAvailabilityForPatch
extends Object
implements com.azure.json.JsonSerializable<HighAvailabilityForPatch>
High availability properties of a server.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of HighAvailabilityForPatch class. -
Method Summary
Modifier and TypeMethodDescriptionstatic HighAvailabilityForPatchfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of HighAvailabilityForPatch from the JsonReader.mode()Get the mode property: High availability mode for a server.Get the standbyAvailabilityZone property: Availability zone associated to the standby server created when high availability is set to SameZone or ZoneRedundant.state()Get the state property: Possible states of the standby server created when high availability is set to SameZone or ZoneRedundant.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withMode(HighAvailabilityMode mode) Set the mode property: High availability mode for a server.withStandbyAvailabilityZone(String standbyAvailabilityZone) Set the standbyAvailabilityZone property: Availability zone associated to the standby server created when high availability is set to SameZone or ZoneRedundant.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
HighAvailabilityForPatch
public HighAvailabilityForPatch()Creates an instance of HighAvailabilityForPatch class.
-
-
Method Details
-
mode
Get the mode property: High availability mode for a server.- Returns:
- the mode value.
-
withMode
Set the mode property: High availability mode for a server.- Parameters:
mode- the mode value to set.- Returns:
- the HighAvailabilityForPatch object itself.
-
state
Get the state property: Possible states of the standby server created when high availability is set to SameZone or ZoneRedundant.- Returns:
- the state value.
-
standbyAvailabilityZone
Get the standbyAvailabilityZone property: Availability zone associated to the standby server created when high availability is set to SameZone or ZoneRedundant.- Returns:
- the standbyAvailabilityZone value.
-
withStandbyAvailabilityZone
Set the standbyAvailabilityZone property: Availability zone associated to the standby server created when high availability is set to SameZone or ZoneRedundant.- Parameters:
standbyAvailabilityZone- the standbyAvailabilityZone value to set.- Returns:
- the HighAvailabilityForPatch object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<HighAvailabilityForPatch>- Throws:
IOException
-
fromJson
public static HighAvailabilityForPatch fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of HighAvailabilityForPatch from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of HighAvailabilityForPatch 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 HighAvailabilityForPatch.
-