// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.mysqlflexibleserver.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Server restart parameters. */
@Fluent
public final class ServerRestartParameter {
    /*
     * Whether or not failover to standby server when restarting a server with high availability enabled.
     */
    @JsonProperty(value = "restartWithFailover")
    private EnableStatusEnum restartWithFailover;

    /*
     * The maximum allowed failover time in seconds.
     */
    @JsonProperty(value = "maxFailoverSeconds")
    private Integer maxFailoverSeconds;

    /** Creates an instance of ServerRestartParameter class. */
    public ServerRestartParameter() {
    }

    /**
     * Get the restartWithFailover property: Whether or not failover to standby server when restarting a server with
     * high availability enabled.
     *
     * @return the restartWithFailover value.
     */
    public EnableStatusEnum restartWithFailover() {
        return this.restartWithFailover;
    }

    /**
     * Set the restartWithFailover property: Whether or not failover to standby server when restarting a server with
     * high availability enabled.
     *
     * @param restartWithFailover the restartWithFailover value to set.
     * @return the ServerRestartParameter object itself.
     */
    public ServerRestartParameter withRestartWithFailover(EnableStatusEnum restartWithFailover) {
        this.restartWithFailover = restartWithFailover;
        return this;
    }

    /**
     * Get the maxFailoverSeconds property: The maximum allowed failover time in seconds.
     *
     * @return the maxFailoverSeconds value.
     */
    public Integer maxFailoverSeconds() {
        return this.maxFailoverSeconds;
    }

    /**
     * Set the maxFailoverSeconds property: The maximum allowed failover time in seconds.
     *
     * @param maxFailoverSeconds the maxFailoverSeconds value to set.
     * @return the ServerRestartParameter object itself.
     */
    public ServerRestartParameter withMaxFailoverSeconds(Integer maxFailoverSeconds) {
        this.maxFailoverSeconds = maxFailoverSeconds;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
