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

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceInformationInner;
import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAppendTags;
import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceFilteringCriteria;
import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel;

/** An instance of this class provides access to all the operations defined in ThreatIntelligenceIndicatorsClient. */
public interface ThreatIntelligenceIndicatorsClient {
    /**
     * Create a new threat intelligence indicator.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return threat intelligence information object.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ThreatIntelligenceInformationInner createIndicator(
        String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties);

    /**
     * Create a new threat intelligence indicator.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return threat intelligence information object along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ThreatIntelligenceInformationInner> createIndicatorWithResponse(
        String resourceGroupName,
        String workspaceName,
        ThreatIntelligenceIndicatorModel threatIntelligenceProperties,
        Context context);

    /**
     * View a threat intelligence indicator by name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param name Threat intelligence indicator name field.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return threat intelligence information object.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ThreatIntelligenceInformationInner get(String resourceGroupName, String workspaceName, String name);

    /**
     * View a threat intelligence indicator by name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param name Threat intelligence indicator name field.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return threat intelligence information object along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ThreatIntelligenceInformationInner> getWithResponse(
        String resourceGroupName, String workspaceName, String name, Context context);

    /**
     * Update a threat Intelligence indicator.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param name Threat intelligence indicator name field.
     * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return threat intelligence information object.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ThreatIntelligenceInformationInner create(
        String resourceGroupName,
        String workspaceName,
        String name,
        ThreatIntelligenceIndicatorModel threatIntelligenceProperties);

    /**
     * Update a threat Intelligence indicator.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param name Threat intelligence indicator name field.
     * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return threat intelligence information object along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ThreatIntelligenceInformationInner> createWithResponse(
        String resourceGroupName,
        String workspaceName,
        String name,
        ThreatIntelligenceIndicatorModel threatIntelligenceProperties,
        Context context);

    /**
     * Delete a threat intelligence indicator.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param name Threat intelligence indicator name field.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String workspaceName, String name);

    /**
     * Delete a threat intelligence indicator.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param name Threat intelligence indicator name field.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<Void> deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context);

    /**
     * Query threat intelligence indicators as per filtering criteria.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param threatIntelligenceFilteringCriteria Filtering criteria for querying threat intelligence indicators.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of all the threat intelligence information objects as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ThreatIntelligenceInformationInner> queryIndicators(
        String resourceGroupName,
        String workspaceName,
        ThreatIntelligenceFilteringCriteria threatIntelligenceFilteringCriteria);

    /**
     * Query threat intelligence indicators as per filtering criteria.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param threatIntelligenceFilteringCriteria Filtering criteria for querying threat intelligence indicators.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of all the threat intelligence information objects as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ThreatIntelligenceInformationInner> queryIndicators(
        String resourceGroupName,
        String workspaceName,
        ThreatIntelligenceFilteringCriteria threatIntelligenceFilteringCriteria,
        Context context);

    /**
     * Append tags to a threat intelligence indicator.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param name Threat intelligence indicator name field.
     * @param threatIntelligenceAppendTags The threat intelligence append tags request body.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void appendTags(
        String resourceGroupName,
        String workspaceName,
        String name,
        ThreatIntelligenceAppendTags threatIntelligenceAppendTags);

    /**
     * Append tags to a threat intelligence indicator.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param name Threat intelligence indicator name field.
     * @param threatIntelligenceAppendTags The threat intelligence append tags request body.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<Void> appendTagsWithResponse(
        String resourceGroupName,
        String workspaceName,
        String name,
        ThreatIntelligenceAppendTags threatIntelligenceAppendTags,
        Context context);

    /**
     * Replace tags added to a threat intelligence indicator.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param name Threat intelligence indicator name field.
     * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return threat intelligence information object.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ThreatIntelligenceInformationInner replaceTags(
        String resourceGroupName,
        String workspaceName,
        String name,
        ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags);

    /**
     * Replace tags added to a threat intelligence indicator.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workspaceName The name of the workspace.
     * @param name Threat intelligence indicator name field.
     * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return threat intelligence information object along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ThreatIntelligenceInformationInner> replaceTagsWithResponse(
        String resourceGroupName,
        String workspaceName,
        String name,
        ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags,
        Context context);
}
