// 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.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Server version capabilities. */
@Immutable
public final class ServerVersionCapability {
    /*
     * server version
     */
    @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
    private String name;

    /*
     * A list of supported Skus
     */
    @JsonProperty(value = "supportedSkus", access = JsonProperty.Access.WRITE_ONLY)
    private List<SkuCapability> supportedSkus;

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

    /**
     * Get the name property: server version.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Get the supportedSkus property: A list of supported Skus.
     *
     * @return the supportedSkus value.
     */
    public List<SkuCapability> supportedSkus() {
        return this.supportedSkus;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (supportedSkus() != null) {
            supportedSkus().forEach(e -> e.validate());
        }
    }
}
