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

package com.azure.resourcemanager.signalr.models;

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

/** Resource log configuration of a Microsoft.SignalRService resource. */
@Fluent
public final class ResourceLogConfiguration {
    /*
     * Gets or sets the list of category configurations.
     */
    @JsonProperty(value = "categories")
    private List<ResourceLogCategory> categories;

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

    /**
     * Get the categories property: Gets or sets the list of category configurations.
     *
     * @return the categories value.
     */
    public List<ResourceLogCategory> categories() {
        return this.categories;
    }

    /**
     * Set the categories property: Gets or sets the list of category configurations.
     *
     * @param categories the categories value to set.
     * @return the ResourceLogConfiguration object itself.
     */
    public ResourceLogConfiguration withCategories(List<ResourceLogCategory> categories) {
        this.categories = categories;
        return this;
    }

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