Class RestartParameter
java.lang.Object
com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter
- All Implemented Interfaces:
com.azure.json.JsonSerializable<RestartParameter>
public final class RestartParameter
extends Object
implements com.azure.json.JsonSerializable<RestartParameter>
PostgreSQL database engine restart parameters.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the failoverMode property: Failover mode.static RestartParameterfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of RestartParameter from the JsonReader.Get the restartWithFailover property: Indicates if restart the PostgreSQL database engine should failover or switch over from primary to standby.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withFailoverMode(FailoverMode failoverMode) Set the failoverMode property: Failover mode.withRestartWithFailover(Boolean restartWithFailover) Set the restartWithFailover property: Indicates if restart the PostgreSQL database engine should failover or switch over from primary to standby.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
-
RestartParameter
public RestartParameter()Creates an instance of RestartParameter class.
-
-
Method Details
-
restartWithFailover
Get the restartWithFailover property: Indicates if restart the PostgreSQL database engine should failover or switch over from primary to standby. This only works if server has high availability enabled.- Returns:
- the restartWithFailover value.
-
withRestartWithFailover
Set the restartWithFailover property: Indicates if restart the PostgreSQL database engine should failover or switch over from primary to standby. This only works if server has high availability enabled.- Parameters:
restartWithFailover- the restartWithFailover value to set.- Returns:
- the RestartParameter object itself.
-
failoverMode
Get the failoverMode property: Failover mode.- Returns:
- the failoverMode value.
-
withFailoverMode
Set the failoverMode property: Failover mode.- Parameters:
failoverMode- the failoverMode value to set.- Returns:
- the RestartParameter 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<RestartParameter>- Throws:
IOException
-
fromJson
Reads an instance of RestartParameter from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of RestartParameter 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 RestartParameter.
-