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 Details

    • RestartParameter

      public RestartParameter()
      Creates an instance of RestartParameter class.
  • Method Details

    • restartWithFailover

      public Boolean 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

      public RestartParameter withRestartWithFailover(Boolean restartWithFailover)
      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

      public FailoverMode failoverMode()
      Get the failoverMode property: Failover mode.
      Returns:
      the failoverMode value.
    • withFailoverMode

      public RestartParameter withFailoverMode(FailoverMode failoverMode)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<RestartParameter>
      Throws:
      IOException
    • fromJson

      public static RestartParameter fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.