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

package com.azure.resourcemanager.cosmosdbforpostgresql.models;

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

/** The properties of a server. */
@Fluent
public class ServerProperties {
    /*
     * The edition of a server.
     */
    @JsonProperty(value = "serverEdition")
    private String serverEdition;

    /*
     * The storage of a server in MB.
     */
    @JsonProperty(value = "storageQuotaInMb")
    private Integer storageQuotaInMb;

    /*
     * The vCores count of a server.
     */
    @JsonProperty(value = "vCores")
    private Integer vCores;

    /*
     * If high availability (HA) is enabled or not for the server.
     */
    @JsonProperty(value = "enableHa")
    private Boolean enableHa;

    /*
     * If public access is enabled on server.
     */
    @JsonProperty(value = "enablePublicIpAccess", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean enablePublicIpAccess;

    /*
     * If server database is set to read-only by system maintenance depending on high disk space usage.
     */
    @JsonProperty(value = "isReadOnly", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean isReadOnly;

    /*
     * The administrator's login name of the servers in the cluster.
     */
    @JsonProperty(value = "administratorLogin", access = JsonProperty.Access.WRITE_ONLY)
    private String administratorLogin;

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

    /**
     * Get the serverEdition property: The edition of a server.
     *
     * @return the serverEdition value.
     */
    public String serverEdition() {
        return this.serverEdition;
    }

    /**
     * Set the serverEdition property: The edition of a server.
     *
     * @param serverEdition the serverEdition value to set.
     * @return the ServerProperties object itself.
     */
    public ServerProperties withServerEdition(String serverEdition) {
        this.serverEdition = serverEdition;
        return this;
    }

    /**
     * Get the storageQuotaInMb property: The storage of a server in MB.
     *
     * @return the storageQuotaInMb value.
     */
    public Integer storageQuotaInMb() {
        return this.storageQuotaInMb;
    }

    /**
     * Set the storageQuotaInMb property: The storage of a server in MB.
     *
     * @param storageQuotaInMb the storageQuotaInMb value to set.
     * @return the ServerProperties object itself.
     */
    public ServerProperties withStorageQuotaInMb(Integer storageQuotaInMb) {
        this.storageQuotaInMb = storageQuotaInMb;
        return this;
    }

    /**
     * Get the vCores property: The vCores count of a server.
     *
     * @return the vCores value.
     */
    public Integer vCores() {
        return this.vCores;
    }

    /**
     * Set the vCores property: The vCores count of a server.
     *
     * @param vCores the vCores value to set.
     * @return the ServerProperties object itself.
     */
    public ServerProperties withVCores(Integer vCores) {
        this.vCores = vCores;
        return this;
    }

    /**
     * Get the enableHa property: If high availability (HA) is enabled or not for the server.
     *
     * @return the enableHa value.
     */
    public Boolean enableHa() {
        return this.enableHa;
    }

    /**
     * Set the enableHa property: If high availability (HA) is enabled or not for the server.
     *
     * @param enableHa the enableHa value to set.
     * @return the ServerProperties object itself.
     */
    public ServerProperties withEnableHa(Boolean enableHa) {
        this.enableHa = enableHa;
        return this;
    }

    /**
     * Get the enablePublicIpAccess property: If public access is enabled on server.
     *
     * @return the enablePublicIpAccess value.
     */
    public Boolean enablePublicIpAccess() {
        return this.enablePublicIpAccess;
    }

    /**
     * Get the isReadOnly property: If server database is set to read-only by system maintenance depending on high disk
     * space usage.
     *
     * @return the isReadOnly value.
     */
    public Boolean isReadOnly() {
        return this.isReadOnly;
    }

    /**
     * Get the administratorLogin property: The administrator's login name of the servers in the cluster.
     *
     * @return the administratorLogin value.
     */
    public String administratorLogin() {
        return this.administratorLogin;
    }

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