// 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.AdvSecurityObjectListResponseInner;
import com.azure.resourcemanager.paloaltonetworks.ngfw.fluent.models.ChangelogInner;
import com.azure.resourcemanager.paloaltonetworks.ngfw.fluent.models.CountriesResponseInner;
import com.azure.resourcemanager.paloaltonetworks.ngfw.fluent.models.GlobalRulestackResourceInner;
import com.azure.resourcemanager.paloaltonetworks.ngfw.fluent.models.ListAppIdResponseInner;
import com.azure.resourcemanager.paloaltonetworks.ngfw.fluent.models.ListFirewallsResponseInner;
import com.azure.resourcemanager.paloaltonetworks.ngfw.fluent.models.PredefinedUrlCategoriesResponseInner;
import com.azure.resourcemanager.paloaltonetworks.ngfw.fluent.models.SecurityServicesResponseInner;
import com.azure.resourcemanager.paloaltonetworks.ngfw.models.AdvSecurityObjectTypeEnum;
import com.azure.resourcemanager.paloaltonetworks.ngfw.models.GlobalRulestackResourceUpdate;
import com.azure.resourcemanager.paloaltonetworks.ngfw.models.SecurityServicesTypeEnum;

/** An instance of this class provides access to all the operations defined in GlobalRulestacksClient. */
public interface GlobalRulestacksClient {
    /**
     * List GlobalRulestackResource resources by Tenant.
     *
     * @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 GlobalRulestackResource list operation as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<GlobalRulestackResourceInner> list();

    /**
     * List GlobalRulestackResource resources by Tenant.
     *
     * @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 GlobalRulestackResource list operation as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<GlobalRulestackResourceInner> list(Context context);

    /**
     * Get a GlobalRulestackResource.
     *
     * @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 a GlobalRulestackResource along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<GlobalRulestackResourceInner> getWithResponse(String globalRulestackName, Context context);

    /**
     * Get a GlobalRulestackResource.
     *
     * @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 a GlobalRulestackResource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    GlobalRulestackResourceInner get(String globalRulestackName);

    /**
     * Create a GlobalRulestackResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @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 paloAltoNetworks GlobalRulestack.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<GlobalRulestackResourceInner>, GlobalRulestackResourceInner> beginCreateOrUpdate(
        String globalRulestackName, GlobalRulestackResourceInner resource);

    /**
     * Create a GlobalRulestackResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @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 paloAltoNetworks GlobalRulestack.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<GlobalRulestackResourceInner>, GlobalRulestackResourceInner> beginCreateOrUpdate(
        String globalRulestackName, GlobalRulestackResourceInner resource, Context context);

    /**
     * Create a GlobalRulestackResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @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 paloAltoNetworks GlobalRulestack.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    GlobalRulestackResourceInner createOrUpdate(String globalRulestackName, GlobalRulestackResourceInner resource);

    /**
     * Create a GlobalRulestackResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @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 paloAltoNetworks GlobalRulestack.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    GlobalRulestackResourceInner createOrUpdate(
        String globalRulestackName, GlobalRulestackResourceInner resource, Context context);

    /**
     * Update a GlobalRulestackResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param properties The resource properties to be updated.
     * @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 paloAltoNetworks GlobalRulestack along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<GlobalRulestackResourceInner> updateWithResponse(
        String globalRulestackName, GlobalRulestackResourceUpdate properties, Context context);

    /**
     * Update a GlobalRulestackResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param properties The resource properties to be updated.
     * @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 paloAltoNetworks GlobalRulestack.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    GlobalRulestackResourceInner update(String globalRulestackName, GlobalRulestackResourceUpdate properties);

    /**
     * Delete a GlobalRulestackResource.
     *
     * @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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(String globalRulestackName);

    /**
     * Delete a GlobalRulestackResource.
     *
     * @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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(String globalRulestackName, Context context);

    /**
     * Delete a GlobalRulestackResource.
     *
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String globalRulestackName);

    /**
     * Delete a GlobalRulestackResource.
     *
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String globalRulestackName, Context context);

    /**
     * Commit rulestack configuration.
     *
     * @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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginCommit(String globalRulestackName);

    /**
     * Commit rulestack configuration.
     *
     * @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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginCommit(String globalRulestackName, Context context);

    /**
     * Commit rulestack configuration.
     *
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void commit(String globalRulestackName);

    /**
     * Commit rulestack configuration.
     *
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void commit(String globalRulestackName, Context context);

    /**
     * Get changelog.
     *
     * @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 changelog along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ChangelogInner> getChangeLogWithResponse(String globalRulestackName, Context context);

    /**
     * Get changelog.
     *
     * @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 changelog.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ChangelogInner getChangeLog(String globalRulestackName);

    /**
     * Get the list of advanced security objects.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param type The type parameter.
     * @param skip The skip parameter.
     * @param top The top 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 list of advanced security objects along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<AdvSecurityObjectListResponseInner> listAdvancedSecurityObjectsWithResponse(
        String globalRulestackName, AdvSecurityObjectTypeEnum type, String skip, Integer top, Context context);

    /**
     * Get the list of advanced security objects.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param type The type parameter.
     * @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 list of advanced security objects.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    AdvSecurityObjectListResponseInner listAdvancedSecurityObjects(
        String globalRulestackName, AdvSecurityObjectTypeEnum type);

    /**
     * List of AppIds for GlobalRulestack ApiVersion.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param appIdVersion The appIdVersion parameter.
     * @param appPrefix The appPrefix parameter.
     * @param skip The skip parameter.
     * @param top The top 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 response body along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ListAppIdResponseInner> listAppIdsWithResponse(
        String globalRulestackName, String appIdVersion, String appPrefix, String skip, Integer top, Context context);

    /**
     * List of AppIds for GlobalRulestack ApiVersion.
     *
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ListAppIdResponseInner listAppIds(String globalRulestackName);

    /**
     * List of countries for Rulestack.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param skip The skip parameter.
     * @param top The top 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 countries Response Object along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<CountriesResponseInner> listCountriesWithResponse(
        String globalRulestackName, String skip, Integer top, Context context);

    /**
     * List of countries for Rulestack.
     *
     * @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 countries Response Object.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    CountriesResponseInner listCountries(String globalRulestackName);

    /**
     * List of Firewalls associated with Rulestack.
     *
     * @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 list firewalls response along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ListFirewallsResponseInner> listFirewallsWithResponse(String globalRulestackName, Context context);

    /**
     * List of Firewalls associated with Rulestack.
     *
     * @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 list firewalls response.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ListFirewallsResponseInner listFirewalls(String globalRulestackName);

    /**
     * List predefined URL categories for rulestack.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param skip The skip parameter.
     * @param top The top 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 predefined url categories response along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<PredefinedUrlCategoriesResponseInner> listPredefinedUrlCategoriesWithResponse(
        String globalRulestackName, String skip, Integer top, Context context);

    /**
     * List predefined URL categories for rulestack.
     *
     * @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 predefined url categories response.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PredefinedUrlCategoriesResponseInner listPredefinedUrlCategories(String globalRulestackName);

    /**
     * List the security services for rulestack.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param type The type parameter.
     * @param skip The skip parameter.
     * @param top The top 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 security services list response along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<SecurityServicesResponseInner> listSecurityServicesWithResponse(
        String globalRulestackName, SecurityServicesTypeEnum type, String skip, Integer top, Context context);

    /**
     * List the security services for rulestack.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param type The type parameter.
     * @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 security services list response.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SecurityServicesResponseInner listSecurityServices(String globalRulestackName, SecurityServicesTypeEnum type);

    /**
     * Revert rulestack configuration.
     *
     * @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 {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<Void> revertWithResponse(String globalRulestackName, Context context);

    /**
     * Revert rulestack configuration.
     *
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void revert(String globalRulestackName);
}
