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

package com.azure.resourcemanager.paloaltonetworks.ngfw.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.paloaltonetworks.ngfw.models.ApplicationInsights;
import com.azure.resourcemanager.paloaltonetworks.ngfw.models.LogDestination;
import com.azure.resourcemanager.paloaltonetworks.ngfw.models.LogOption;
import com.azure.resourcemanager.paloaltonetworks.ngfw.models.LogType;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Log Settings for Firewall. */
@Fluent
public final class LogSettingsInner {
    /*
     * One of possible log type
     */
    @JsonProperty(value = "logType")
    private LogType logType;

    /*
     * Log option SAME/INDIVIDUAL
     */
    @JsonProperty(value = "logOption")
    private LogOption logOption;

    /*
     * Application Insight details
     */
    @JsonProperty(value = "applicationInsights")
    private ApplicationInsights applicationInsights;

    /*
     * Common destination configurations
     */
    @JsonProperty(value = "commonDestination")
    private LogDestination commonDestination;

    /*
     * Traffic destination configurations
     */
    @JsonProperty(value = "trafficLogDestination")
    private LogDestination trafficLogDestination;

    /*
     * Threat destination configurations
     */
    @JsonProperty(value = "threatLogDestination")
    private LogDestination threatLogDestination;

    /*
     * Decrypt destination configurations
     */
    @JsonProperty(value = "decryptLogDestination")
    private LogDestination decryptLogDestination;

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

    /**
     * Get the logType property: One of possible log type.
     *
     * @return the logType value.
     */
    public LogType logType() {
        return this.logType;
    }

    /**
     * Set the logType property: One of possible log type.
     *
     * @param logType the logType value to set.
     * @return the LogSettingsInner object itself.
     */
    public LogSettingsInner withLogType(LogType logType) {
        this.logType = logType;
        return this;
    }

    /**
     * Get the logOption property: Log option SAME/INDIVIDUAL.
     *
     * @return the logOption value.
     */
    public LogOption logOption() {
        return this.logOption;
    }

    /**
     * Set the logOption property: Log option SAME/INDIVIDUAL.
     *
     * @param logOption the logOption value to set.
     * @return the LogSettingsInner object itself.
     */
    public LogSettingsInner withLogOption(LogOption logOption) {
        this.logOption = logOption;
        return this;
    }

    /**
     * Get the applicationInsights property: Application Insight details.
     *
     * @return the applicationInsights value.
     */
    public ApplicationInsights applicationInsights() {
        return this.applicationInsights;
    }

    /**
     * Set the applicationInsights property: Application Insight details.
     *
     * @param applicationInsights the applicationInsights value to set.
     * @return the LogSettingsInner object itself.
     */
    public LogSettingsInner withApplicationInsights(ApplicationInsights applicationInsights) {
        this.applicationInsights = applicationInsights;
        return this;
    }

    /**
     * Get the commonDestination property: Common destination configurations.
     *
     * @return the commonDestination value.
     */
    public LogDestination commonDestination() {
        return this.commonDestination;
    }

    /**
     * Set the commonDestination property: Common destination configurations.
     *
     * @param commonDestination the commonDestination value to set.
     * @return the LogSettingsInner object itself.
     */
    public LogSettingsInner withCommonDestination(LogDestination commonDestination) {
        this.commonDestination = commonDestination;
        return this;
    }

    /**
     * Get the trafficLogDestination property: Traffic destination configurations.
     *
     * @return the trafficLogDestination value.
     */
    public LogDestination trafficLogDestination() {
        return this.trafficLogDestination;
    }

    /**
     * Set the trafficLogDestination property: Traffic destination configurations.
     *
     * @param trafficLogDestination the trafficLogDestination value to set.
     * @return the LogSettingsInner object itself.
     */
    public LogSettingsInner withTrafficLogDestination(LogDestination trafficLogDestination) {
        this.trafficLogDestination = trafficLogDestination;
        return this;
    }

    /**
     * Get the threatLogDestination property: Threat destination configurations.
     *
     * @return the threatLogDestination value.
     */
    public LogDestination threatLogDestination() {
        return this.threatLogDestination;
    }

    /**
     * Set the threatLogDestination property: Threat destination configurations.
     *
     * @param threatLogDestination the threatLogDestination value to set.
     * @return the LogSettingsInner object itself.
     */
    public LogSettingsInner withThreatLogDestination(LogDestination threatLogDestination) {
        this.threatLogDestination = threatLogDestination;
        return this;
    }

    /**
     * Get the decryptLogDestination property: Decrypt destination configurations.
     *
     * @return the decryptLogDestination value.
     */
    public LogDestination decryptLogDestination() {
        return this.decryptLogDestination;
    }

    /**
     * Set the decryptLogDestination property: Decrypt destination configurations.
     *
     * @param decryptLogDestination the decryptLogDestination value to set.
     * @return the LogSettingsInner object itself.
     */
    public LogSettingsInner withDecryptLogDestination(LogDestination decryptLogDestination) {
        this.decryptLogDestination = decryptLogDestination;
        return this;
    }

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