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

/** An instance of this class provides access to all the operations defined in PrefixListLocalRulestacksClient. */
public interface PrefixListLocalRulestacksClient {
    /**
     * List PrefixListResource resources by LocalRulestacks.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param localRulestackName LocalRulestack 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 PrefixListResource list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<PrefixListResourceInner> listByLocalRulestacks(String resourceGroupName, String localRulestackName);

    /**
     * List PrefixListResource resources by LocalRulestacks.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param localRulestackName LocalRulestack 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 PrefixListResource list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<PrefixListResourceInner> listByLocalRulestacks(
        String resourceGroupName, String localRulestackName, Context context);

    /**
     * Get a PrefixListResource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param localRulestackName LocalRulestack resource name.
     * @param name Local 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 PrefixListResource along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<PrefixListResourceInner> getWithResponse(
        String resourceGroupName, String localRulestackName, String name, Context context);

    /**
     * Get a PrefixListResource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param localRulestackName LocalRulestack resource name.
     * @param name Local 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 PrefixListResource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PrefixListResourceInner get(String resourceGroupName, String localRulestackName, String name);

    /**
     * Create a PrefixListResource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param localRulestackName LocalRulestack resource name.
     * @param name Local 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 localRulestack prefixList.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<PrefixListResourceInner>, PrefixListResourceInner> beginCreateOrUpdate(
        String resourceGroupName, String localRulestackName, String name, PrefixListResourceInner resource);

    /**
     * Create a PrefixListResource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param localRulestackName LocalRulestack resource name.
     * @param name Local 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 localRulestack prefixList.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<PrefixListResourceInner>, PrefixListResourceInner> beginCreateOrUpdate(
        String resourceGroupName,
        String localRulestackName,
        String name,
        PrefixListResourceInner resource,
        Context context);

    /**
     * Create a PrefixListResource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param localRulestackName LocalRulestack resource name.
     * @param name Local 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 localRulestack prefixList.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PrefixListResourceInner createOrUpdate(
        String resourceGroupName, String localRulestackName, String name, PrefixListResourceInner resource);

    /**
     * Create a PrefixListResource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param localRulestackName LocalRulestack resource name.
     * @param name Local 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 localRulestack prefixList.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PrefixListResourceInner createOrUpdate(
        String resourceGroupName,
        String localRulestackName,
        String name,
        PrefixListResourceInner resource,
        Context context);

    /**
     * Delete a PrefixListResource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param localRulestackName LocalRulestack resource name.
     * @param name Local 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 resourceGroupName, String localRulestackName, String name);

    /**
     * Delete a PrefixListResource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param localRulestackName LocalRulestack resource name.
     * @param name Local 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 resourceGroupName, String localRulestackName, String name, Context context);

    /**
     * Delete a PrefixListResource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param localRulestackName LocalRulestack resource name.
     * @param name Local 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 resourceGroupName, String localRulestackName, String name);

    /**
     * Delete a PrefixListResource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param localRulestackName LocalRulestack resource name.
     * @param name Local 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 resourceGroupName, String localRulestackName, String name, Context context);
}
