// 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.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Describes parsed pattern entity. */
@Fluent
public final class ThreatIntelligenceParsedPattern {
    /*
     * Pattern type key
     */
    @JsonProperty(value = "patternTypeKey")
    private String patternTypeKey;

    /*
     * Pattern type keys
     */
    @JsonProperty(value = "patternTypeValues")
    private List<ThreatIntelligenceParsedPatternTypeValue> patternTypeValues;

    /**
     * Get the patternTypeKey property: Pattern type key.
     *
     * @return the patternTypeKey value.
     */
    public String patternTypeKey() {
        return this.patternTypeKey;
    }

    /**
     * Set the patternTypeKey property: Pattern type key.
     *
     * @param patternTypeKey the patternTypeKey value to set.
     * @return the ThreatIntelligenceParsedPattern object itself.
     */
    public ThreatIntelligenceParsedPattern withPatternTypeKey(String patternTypeKey) {
        this.patternTypeKey = patternTypeKey;
        return this;
    }

    /**
     * Get the patternTypeValues property: Pattern type keys.
     *
     * @return the patternTypeValues value.
     */
    public List<ThreatIntelligenceParsedPatternTypeValue> patternTypeValues() {
        return this.patternTypeValues;
    }

    /**
     * Set the patternTypeValues property: Pattern type keys.
     *
     * @param patternTypeValues the patternTypeValues value to set.
     * @return the ThreatIntelligenceParsedPattern object itself.
     */
    public ThreatIntelligenceParsedPattern withPatternTypeValues(
        List<ThreatIntelligenceParsedPatternTypeValue> patternTypeValues) {
        this.patternTypeValues = patternTypeValues;
        return this;
    }

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