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

package com.azure.resourcemanager.cognitiveservices.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Check SKU availability parameter. */
@Fluent
public final class CheckSkuAvailabilityParameter {
    /*
     * The SKU of the resource.
     */
    @JsonProperty(value = "skus", required = true)
    private List<String> skus;

    /*
     * The Kind of the resource.
     */
    @JsonProperty(value = "kind", required = true)
    private String kind;

    /*
     * The Type of the resource.
     */
    @JsonProperty(value = "type", required = true)
    private String type;

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

    /**
     * Get the skus property: The SKU of the resource.
     *
     * @return the skus value.
     */
    public List<String> skus() {
        return this.skus;
    }

    /**
     * Set the skus property: The SKU of the resource.
     *
     * @param skus the skus value to set.
     * @return the CheckSkuAvailabilityParameter object itself.
     */
    public CheckSkuAvailabilityParameter withSkus(List<String> skus) {
        this.skus = skus;
        return this;
    }

    /**
     * Get the kind property: The Kind of the resource.
     *
     * @return the kind value.
     */
    public String kind() {
        return this.kind;
    }

    /**
     * Set the kind property: The Kind of the resource.
     *
     * @param kind the kind value to set.
     * @return the CheckSkuAvailabilityParameter object itself.
     */
    public CheckSkuAvailabilityParameter withKind(String kind) {
        this.kind = kind;
        return this;
    }

    /**
     * Get the type property: The Type of the resource.
     *
     * @return the type value.
     */
    public String type() {
        return this.type;
    }

    /**
     * Set the type property: The Type of the resource.
     *
     * @param type the type value to set.
     * @return the CheckSkuAvailabilityParameter object itself.
     */
    public CheckSkuAvailabilityParameter withType(String type) {
        this.type = type;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (skus() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property skus in model CheckSkuAvailabilityParameter"));
        }
        if (kind() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property kind in model CheckSkuAvailabilityParameter"));
        }
        if (type() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property type in model CheckSkuAvailabilityParameter"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(CheckSkuAvailabilityParameter.class);
}
