// 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;

/** Filtering criteria for querying threat intelligence indicators. */
@Fluent
public final class ThreatIntelligenceFilteringCriteria {
    /*
     * Page size
     */
    @JsonProperty(value = "pageSize")
    private Integer pageSize;

    /*
     * Minimum confidence.
     */
    @JsonProperty(value = "minConfidence")
    private Integer minConfidence;

    /*
     * Maximum confidence.
     */
    @JsonProperty(value = "maxConfidence")
    private Integer maxConfidence;

    /*
     * Start time for ValidUntil filter.
     */
    @JsonProperty(value = "minValidUntil")
    private String minValidUntil;

    /*
     * End time for ValidUntil filter.
     */
    @JsonProperty(value = "maxValidUntil")
    private String maxValidUntil;

    /*
     * Parameter to include/exclude disabled indicators.
     */
    @JsonProperty(value = "includeDisabled")
    private Boolean includeDisabled;

    /*
     * Columns to sort by and sorting order
     */
    @JsonProperty(value = "sortBy")
    private List<ThreatIntelligenceSortingCriteria> sortBy;

    /*
     * Sources of threat intelligence indicators
     */
    @JsonProperty(value = "sources")
    private List<String> sources;

    /*
     * Pattern types
     */
    @JsonProperty(value = "patternTypes")
    private List<String> patternTypes;

    /*
     * Threat types of threat intelligence indicators
     */
    @JsonProperty(value = "threatTypes")
    private List<String> threatTypes;

    /*
     * Ids of threat intelligence indicators
     */
    @JsonProperty(value = "ids")
    private List<String> ids;

    /*
     * Keywords for searching threat intelligence indicators
     */
    @JsonProperty(value = "keywords")
    private List<String> keywords;

    /*
     * Skip token.
     */
    @JsonProperty(value = "skipToken")
    private String skipToken;

    /**
     * Get the pageSize property: Page size.
     *
     * @return the pageSize value.
     */
    public Integer pageSize() {
        return this.pageSize;
    }

    /**
     * Set the pageSize property: Page size.
     *
     * @param pageSize the pageSize value to set.
     * @return the ThreatIntelligenceFilteringCriteria object itself.
     */
    public ThreatIntelligenceFilteringCriteria withPageSize(Integer pageSize) {
        this.pageSize = pageSize;
        return this;
    }

    /**
     * Get the minConfidence property: Minimum confidence.
     *
     * @return the minConfidence value.
     */
    public Integer minConfidence() {
        return this.minConfidence;
    }

    /**
     * Set the minConfidence property: Minimum confidence.
     *
     * @param minConfidence the minConfidence value to set.
     * @return the ThreatIntelligenceFilteringCriteria object itself.
     */
    public ThreatIntelligenceFilteringCriteria withMinConfidence(Integer minConfidence) {
        this.minConfidence = minConfidence;
        return this;
    }

    /**
     * Get the maxConfidence property: Maximum confidence.
     *
     * @return the maxConfidence value.
     */
    public Integer maxConfidence() {
        return this.maxConfidence;
    }

    /**
     * Set the maxConfidence property: Maximum confidence.
     *
     * @param maxConfidence the maxConfidence value to set.
     * @return the ThreatIntelligenceFilteringCriteria object itself.
     */
    public ThreatIntelligenceFilteringCriteria withMaxConfidence(Integer maxConfidence) {
        this.maxConfidence = maxConfidence;
        return this;
    }

    /**
     * Get the minValidUntil property: Start time for ValidUntil filter.
     *
     * @return the minValidUntil value.
     */
    public String minValidUntil() {
        return this.minValidUntil;
    }

    /**
     * Set the minValidUntil property: Start time for ValidUntil filter.
     *
     * @param minValidUntil the minValidUntil value to set.
     * @return the ThreatIntelligenceFilteringCriteria object itself.
     */
    public ThreatIntelligenceFilteringCriteria withMinValidUntil(String minValidUntil) {
        this.minValidUntil = minValidUntil;
        return this;
    }

    /**
     * Get the maxValidUntil property: End time for ValidUntil filter.
     *
     * @return the maxValidUntil value.
     */
    public String maxValidUntil() {
        return this.maxValidUntil;
    }

    /**
     * Set the maxValidUntil property: End time for ValidUntil filter.
     *
     * @param maxValidUntil the maxValidUntil value to set.
     * @return the ThreatIntelligenceFilteringCriteria object itself.
     */
    public ThreatIntelligenceFilteringCriteria withMaxValidUntil(String maxValidUntil) {
        this.maxValidUntil = maxValidUntil;
        return this;
    }

    /**
     * Get the includeDisabled property: Parameter to include/exclude disabled indicators.
     *
     * @return the includeDisabled value.
     */
    public Boolean includeDisabled() {
        return this.includeDisabled;
    }

    /**
     * Set the includeDisabled property: Parameter to include/exclude disabled indicators.
     *
     * @param includeDisabled the includeDisabled value to set.
     * @return the ThreatIntelligenceFilteringCriteria object itself.
     */
    public ThreatIntelligenceFilteringCriteria withIncludeDisabled(Boolean includeDisabled) {
        this.includeDisabled = includeDisabled;
        return this;
    }

    /**
     * Get the sortBy property: Columns to sort by and sorting order.
     *
     * @return the sortBy value.
     */
    public List<ThreatIntelligenceSortingCriteria> sortBy() {
        return this.sortBy;
    }

    /**
     * Set the sortBy property: Columns to sort by and sorting order.
     *
     * @param sortBy the sortBy value to set.
     * @return the ThreatIntelligenceFilteringCriteria object itself.
     */
    public ThreatIntelligenceFilteringCriteria withSortBy(List<ThreatIntelligenceSortingCriteria> sortBy) {
        this.sortBy = sortBy;
        return this;
    }

    /**
     * Get the sources property: Sources of threat intelligence indicators.
     *
     * @return the sources value.
     */
    public List<String> sources() {
        return this.sources;
    }

    /**
     * Set the sources property: Sources of threat intelligence indicators.
     *
     * @param sources the sources value to set.
     * @return the ThreatIntelligenceFilteringCriteria object itself.
     */
    public ThreatIntelligenceFilteringCriteria withSources(List<String> sources) {
        this.sources = sources;
        return this;
    }

    /**
     * Get the patternTypes property: Pattern types.
     *
     * @return the patternTypes value.
     */
    public List<String> patternTypes() {
        return this.patternTypes;
    }

    /**
     * Set the patternTypes property: Pattern types.
     *
     * @param patternTypes the patternTypes value to set.
     * @return the ThreatIntelligenceFilteringCriteria object itself.
     */
    public ThreatIntelligenceFilteringCriteria withPatternTypes(List<String> patternTypes) {
        this.patternTypes = patternTypes;
        return this;
    }

    /**
     * Get the threatTypes property: Threat types of threat intelligence indicators.
     *
     * @return the threatTypes value.
     */
    public List<String> threatTypes() {
        return this.threatTypes;
    }

    /**
     * Set the threatTypes property: Threat types of threat intelligence indicators.
     *
     * @param threatTypes the threatTypes value to set.
     * @return the ThreatIntelligenceFilteringCriteria object itself.
     */
    public ThreatIntelligenceFilteringCriteria withThreatTypes(List<String> threatTypes) {
        this.threatTypes = threatTypes;
        return this;
    }

    /**
     * Get the ids property: Ids of threat intelligence indicators.
     *
     * @return the ids value.
     */
    public List<String> ids() {
        return this.ids;
    }

    /**
     * Set the ids property: Ids of threat intelligence indicators.
     *
     * @param ids the ids value to set.
     * @return the ThreatIntelligenceFilteringCriteria object itself.
     */
    public ThreatIntelligenceFilteringCriteria withIds(List<String> ids) {
        this.ids = ids;
        return this;
    }

    /**
     * Get the keywords property: Keywords for searching threat intelligence indicators.
     *
     * @return the keywords value.
     */
    public List<String> keywords() {
        return this.keywords;
    }

    /**
     * Set the keywords property: Keywords for searching threat intelligence indicators.
     *
     * @param keywords the keywords value to set.
     * @return the ThreatIntelligenceFilteringCriteria object itself.
     */
    public ThreatIntelligenceFilteringCriteria withKeywords(List<String> keywords) {
        this.keywords = keywords;
        return this;
    }

    /**
     * Get the skipToken property: Skip token.
     *
     * @return the skipToken value.
     */
    public String skipToken() {
        return this.skipToken;
    }

    /**
     * Set the skipToken property: Skip token.
     *
     * @param skipToken the skipToken value to set.
     * @return the ThreatIntelligenceFilteringCriteria object itself.
     */
    public ThreatIntelligenceFilteringCriteria withSkipToken(String skipToken) {
        this.skipToken = skipToken;
        return this;
    }

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