// 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;

/** Network related properties of a server. */
@Fluent
public final class HighAvailability {
    /*
     * High availability mode for a server.
     */
    @JsonProperty(value = "mode")
    private HighAvailabilityMode mode;

    /*
     * The state of server high availability.
     */
    @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY)
    private HighAvailabilityState state;

    /*
     * Availability zone of the standby server.
     */
    @JsonProperty(value = "standbyAvailabilityZone")
    private String standbyAvailabilityZone;

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

    /**
     * Get the mode property: High availability mode for a server.
     *
     * @return the mode value.
     */
    public HighAvailabilityMode mode() {
        return this.mode;
    }

    /**
     * Set the mode property: High availability mode for a server.
     *
     * @param mode the mode value to set.
     * @return the HighAvailability object itself.
     */
    public HighAvailability withMode(HighAvailabilityMode mode) {
        this.mode = mode;
        return this;
    }

    /**
     * Get the state property: The state of server high availability.
     *
     * @return the state value.
     */
    public HighAvailabilityState state() {
        return this.state;
    }

    /**
     * Get the standbyAvailabilityZone property: Availability zone of the standby server.
     *
     * @return the standbyAvailabilityZone value.
     */
    public String standbyAvailabilityZone() {
        return this.standbyAvailabilityZone;
    }

    /**
     * Set the standbyAvailabilityZone property: Availability zone of the standby server.
     *
     * @param standbyAvailabilityZone the standbyAvailabilityZone value to set.
     * @return the HighAvailability object itself.
     */
    public HighAvailability withStandbyAvailabilityZone(String standbyAvailabilityZone) {
        this.standbyAvailabilityZone = standbyAvailabilityZone;
        return this;
    }

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