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

package com.azure.resourcemanager.securityinsights.models;

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

/** Represents a Fusion scenario exclusion patterns in Fusion detection. */
@Fluent
public final class FusionScenarioExclusionPattern {
    /*
     * Scenario exclusion pattern.
     */
    @JsonProperty(value = "exclusionPattern", required = true)
    private String exclusionPattern;

    /*
     * DateTime when scenario exclusion pattern is added in UTC.
     */
    @JsonProperty(value = "dateAddedInUTC", required = true)
    private String dateAddedInUtc;

    /**
     * Get the exclusionPattern property: Scenario exclusion pattern.
     *
     * @return the exclusionPattern value.
     */
    public String exclusionPattern() {
        return this.exclusionPattern;
    }

    /**
     * Set the exclusionPattern property: Scenario exclusion pattern.
     *
     * @param exclusionPattern the exclusionPattern value to set.
     * @return the FusionScenarioExclusionPattern object itself.
     */
    public FusionScenarioExclusionPattern withExclusionPattern(String exclusionPattern) {
        this.exclusionPattern = exclusionPattern;
        return this;
    }

    /**
     * Get the dateAddedInUtc property: DateTime when scenario exclusion pattern is added in UTC.
     *
     * @return the dateAddedInUtc value.
     */
    public String dateAddedInUtc() {
        return this.dateAddedInUtc;
    }

    /**
     * Set the dateAddedInUtc property: DateTime when scenario exclusion pattern is added in UTC.
     *
     * @param dateAddedInUtc the dateAddedInUtc value to set.
     * @return the FusionScenarioExclusionPattern object itself.
     */
    public FusionScenarioExclusionPattern withDateAddedInUtc(String dateAddedInUtc) {
        this.dateAddedInUtc = dateAddedInUtc;
        return this;
    }

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

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