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

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

    /**
     * List FqdnListGlobalRulestackResource 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 FqdnListGlobalRulestackResource list operation as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<FqdnListGlobalRulestackResourceInner> list(String globalRulestackName, Context context);

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

    /**
     * Get a FqdnListGlobalRulestackResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param name fqdn list 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 FqdnListGlobalRulestackResource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    FqdnListGlobalRulestackResourceInner get(String globalRulestackName, String name);

    /**
     * Create a FqdnListGlobalRulestackResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param name fqdn list 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 globalRulestack fqdnList.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<FqdnListGlobalRulestackResourceInner>, FqdnListGlobalRulestackResourceInner>
        beginCreateOrUpdate(String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource);

    /**
     * Create a FqdnListGlobalRulestackResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param name fqdn list 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 globalRulestack fqdnList.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<FqdnListGlobalRulestackResourceInner>, FqdnListGlobalRulestackResourceInner>
        beginCreateOrUpdate(
            String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource, Context context);

    /**
     * Create a FqdnListGlobalRulestackResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param name fqdn list 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 globalRulestack fqdnList.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    FqdnListGlobalRulestackResourceInner createOrUpdate(
        String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource);

    /**
     * Create a FqdnListGlobalRulestackResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param name fqdn list 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 globalRulestack fqdnList.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    FqdnListGlobalRulestackResourceInner createOrUpdate(
        String globalRulestackName, String name, FqdnListGlobalRulestackResourceInner resource, Context context);

    /**
     * Delete a FqdnListGlobalRulestackResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param name fqdn list 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, String name);

    /**
     * Delete a FqdnListGlobalRulestackResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param name fqdn list 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, String name, Context context);

    /**
     * Delete a FqdnListGlobalRulestackResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param name fqdn list 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, String name);

    /**
     * Delete a FqdnListGlobalRulestackResource.
     *
     * @param globalRulestackName GlobalRulestack resource name.
     * @param name fqdn list 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, String name, Context context);
}
