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

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.paloaltonetworks.ngfw.fluent.models.GlobalRulestackResourceInner;

/** Resource collection API of GlobalRulestacks. */
public interface GlobalRulestacks {
    /**
     * 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}.
     */
    PagedIterable<GlobalRulestackResource> 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}.
     */
    PagedIterable<GlobalRulestackResource> 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}.
     */
    Response<GlobalRulestackResource> 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.
     */
    GlobalRulestackResource 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 paloAltoNetworks GlobalRulestack.
     */
    GlobalRulestackResource 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.
     */
    GlobalRulestackResource 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}.
     */
    Response<GlobalRulestackResource> 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.
     */
    GlobalRulestackResource 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.
     */
    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.
     */
    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.
     */
    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.
     */
    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}.
     */
    Response<Changelog> 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.
     */
    Changelog 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}.
     */
    Response<AdvSecurityObjectListResponse> 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.
     */
    AdvSecurityObjectListResponse 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}.
     */
    Response<ListAppIdResponse> 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.
     */
    ListAppIdResponse 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}.
     */
    Response<CountriesResponse> 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.
     */
    CountriesResponse 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}.
     */
    Response<ListFirewallsResponse> 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.
     */
    ListFirewallsResponse 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}.
     */
    Response<PredefinedUrlCategoriesResponse> 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.
     */
    PredefinedUrlCategoriesResponse 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}.
     */
    Response<SecurityServicesResponse> 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.
     */
    SecurityServicesResponse 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}.
     */
    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.
     */
    void revert(String globalRulestackName);
}
