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

package com.azure.resourcemanager.synapse.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.synapse.fluent.models.RestorableDroppedSqlPoolInner;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The response to a list restorable dropped Sql pools request. */
@Fluent
public final class RestorableDroppedSqlPoolListResult {
    /*
     * A list of restorable dropped Sql pools
     */
    @JsonProperty(value = "value", required = true)
    private List<RestorableDroppedSqlPoolInner> value;

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

    /**
     * Get the value property: A list of restorable dropped Sql pools.
     *
     * @return the value value.
     */
    public List<RestorableDroppedSqlPoolInner> value() {
        return this.value;
    }

    /**
     * Set the value property: A list of restorable dropped Sql pools.
     *
     * @param value the value value to set.
     * @return the RestorableDroppedSqlPoolListResult object itself.
     */
    public RestorableDroppedSqlPoolListResult withValue(List<RestorableDroppedSqlPoolInner> value) {
        this.value = value;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (value() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property value in model RestorableDroppedSqlPoolListResult"));
        } else {
            value().forEach(e -> e.validate());
        }
    }

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