Class HighAvailability
java.lang.Object
com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability
- All Implemented Interfaces:
com.azure.json.JsonSerializable<HighAvailability>
public final class HighAvailability
extends Object
implements com.azure.json.JsonSerializable<HighAvailability>
High availability properties of a server.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HighAvailabilityfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of HighAvailability 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
-
HighAvailability
public HighAvailability()Creates an instance of HighAvailability 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 HighAvailability 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 HighAvailability 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<HighAvailability>- Throws:
IOException
-
fromJson
Reads an instance of HighAvailability from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of HighAvailability 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 HighAvailability.
-