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

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.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.paloaltonetworks.ngfw.fluent.models.PostRulesResourceInner;
import com.azure.resourcemanager.paloaltonetworks.ngfw.fluent.models.RuleCounterInner;
import com.azure.resourcemanager.paloaltonetworks.ngfw.fluent.models.RuleCounterResetInner;

/** An instance of this class provides access to all the operations defined in PostRulesClient. */
public interface PostRulesClient {
    /**
     * List PostRulesResource resources by Tenant.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @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 response of a PostRulesResource list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<PostRulesResourceInner> list(String globalRulestackName);

    /**
     * List PostRulesResource resources by Tenant.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @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 response of a PostRulesResource list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<PostRulesResourceInner> list(String globalRulestackName, Context context);

    /**
     * Get a PostRulesResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param priority Post Rule priority.
     * @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 a PostRulesResource along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<PostRulesResourceInner> getWithResponse(String globalRulestackName, String priority, Context context);

    /**
     * Get a PostRulesResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param priority Post Rule priority.
     * @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 a PostRulesResource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PostRulesResourceInner get(String globalRulestackName, String priority);

    /**
     * Create a PostRulesResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param priority Post Rule priority.
     * @param resource Resource create parameters.
     * @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 SyncPoller} for polling of postRulestack rule list.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<PostRulesResourceInner>, PostRulesResourceInner> beginCreateOrUpdate(
        String globalRulestackName, String priority, PostRulesResourceInner resource);

    /**
     * Create a PostRulesResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param priority Post Rule priority.
     * @param resource Resource create parameters.
     * @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 SyncPoller} for polling of postRulestack rule list.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<PostRulesResourceInner>, PostRulesResourceInner> beginCreateOrUpdate(
        String globalRulestackName, String priority, PostRulesResourceInner resource, Context context);

    /**
     * Create a PostRulesResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param priority Post Rule priority.
     * @param resource Resource create parameters.
     * @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 postRulestack rule list.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PostRulesResourceInner createOrUpdate(String globalRulestackName, String priority, PostRulesResourceInner resource);

    /**
     * Create a PostRulesResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param priority Post Rule priority.
     * @param resource Resource create parameters.
     * @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 postRulestack rule list.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PostRulesResourceInner createOrUpdate(
        String globalRulestackName, String priority, PostRulesResourceInner resource, Context context);

    /**
     * Delete a PostRulesResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param priority Post Rule priority.
     * @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 SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(String globalRulestackName, String priority);

    /**
     * Delete a PostRulesResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param priority Post Rule priority.
     * @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 SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(String globalRulestackName, String priority, Context context);

    /**
     * Delete a PostRulesResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param priority Post Rule priority.
     * @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 globalRulestackName, String priority);

    /**
     * Delete a PostRulesResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param priority Post Rule priority.
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String globalRulestackName, String priority, Context context);

    /**
     * Get counters.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param priority Post Rule priority.
     * @param firewallName The firewallName parameter.
     * @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 counters along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<RuleCounterInner> getCountersWithResponse(
        String globalRulestackName, String priority, String firewallName, Context context);

    /**
     * Get counters.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param priority Post Rule priority.
     * @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 counters.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    RuleCounterInner getCounters(String globalRulestackName, String priority);

    /**
     * Refresh counters.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param priority Post Rule priority.
     * @param firewallName The firewallName parameter.
     * @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> refreshCountersWithResponse(
        String globalRulestackName, String priority, String firewallName, Context context);

    /**
     * Refresh counters.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param priority Post Rule priority.
     * @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 refreshCounters(String globalRulestackName, String priority);

    /**
     * Reset counters.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param priority Post Rule priority.
     * @param firewallName The firewallName parameter.
     * @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 rule counter reset along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<RuleCounterResetInner> resetCountersWithResponse(
        String globalRulestackName, String priority, String firewallName, Context context);

    /**
     * Reset counters.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param priority Post Rule priority.
     * @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 rule counter reset.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    RuleCounterResetInner resetCounters(String globalRulestackName, String priority);
}
