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

package com.azure.resourcemanager.appcontainers.models;

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

/** Configuration of application logs. */
@Fluent
public final class AppLogsConfiguration {
    /*
     * Logs destination
     */
    @JsonProperty(value = "destination")
    private String destination;

    /*
     * Log Analytics configuration
     */
    @JsonProperty(value = "logAnalyticsConfiguration")
    private LogAnalyticsConfiguration logAnalyticsConfiguration;

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

    /**
     * Get the destination property: Logs destination.
     *
     * @return the destination value.
     */
    public String destination() {
        return this.destination;
    }

    /**
     * Set the destination property: Logs destination.
     *
     * @param destination the destination value to set.
     * @return the AppLogsConfiguration object itself.
     */
    public AppLogsConfiguration withDestination(String destination) {
        this.destination = destination;
        return this;
    }

    /**
     * Get the logAnalyticsConfiguration property: Log Analytics configuration.
     *
     * @return the logAnalyticsConfiguration value.
     */
    public LogAnalyticsConfiguration logAnalyticsConfiguration() {
        return this.logAnalyticsConfiguration;
    }

    /**
     * Set the logAnalyticsConfiguration property: Log Analytics configuration.
     *
     * @param logAnalyticsConfiguration the logAnalyticsConfiguration value to set.
     * @return the AppLogsConfiguration object itself.
     */
    public AppLogsConfiguration withLogAnalyticsConfiguration(LogAnalyticsConfiguration logAnalyticsConfiguration) {
        this.logAnalyticsConfiguration = logAnalyticsConfiguration;
        return this;
    }

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