// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.networkcloud.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.networkcloud.fluent.models.CloudServicesNetworkInner;
import com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkPatchParameters;

/** An instance of this class provides access to all the operations defined in CloudServicesNetworksClient. */
public interface CloudServicesNetworksClient {
    /**
     * List cloud services networks in the subscription.
     *
     * <p>Get a list of cloud services networks in the provided subscription.
     *
     * @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 list of cloud services networks in the provided subscription as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<CloudServicesNetworkInner> list();

    /**
     * List cloud services networks in the subscription.
     *
     * <p>Get a list of cloud services networks in the provided subscription.
     *
     * @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 list of cloud services networks in the provided subscription as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<CloudServicesNetworkInner> list(Context context);

    /**
     * List cloud services networks in the resource group.
     *
     * <p>Get a list of cloud services networks in the provided resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @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 list of cloud services networks in the provided resource group as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<CloudServicesNetworkInner> listByResourceGroup(String resourceGroupName);

    /**
     * List cloud services networks in the resource group.
     *
     * <p>Get a list of cloud services networks in the provided resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @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 list of cloud services networks in the provided resource group as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<CloudServicesNetworkInner> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * Retrieve the cloud services network.
     *
     * <p>Get properties of the provided cloud services network.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param cloudServicesNetworkName The name of the cloud services network.
     * @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 properties of the provided cloud services network along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<CloudServicesNetworkInner> getByResourceGroupWithResponse(
        String resourceGroupName, String cloudServicesNetworkName, Context context);

    /**
     * Retrieve the cloud services network.
     *
     * <p>Get properties of the provided cloud services network.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param cloudServicesNetworkName The name of the cloud services network.
     * @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 properties of the provided cloud services network.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    CloudServicesNetworkInner getByResourceGroup(String resourceGroupName, String cloudServicesNetworkName);

    /**
     * Create or update the cloud services network.
     *
     * <p>Create a new cloud services network or update the properties of the existing cloud services network.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param cloudServicesNetworkName The name of the cloud services network.
     * @param cloudServicesNetworkParameters The request body.
     * @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 cloudServicesNetwork represents additional egress information that
     *     will be used by associated virtual machines or hybrid AKS clusters.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<CloudServicesNetworkInner>, CloudServicesNetworkInner> beginCreateOrUpdate(
        String resourceGroupName,
        String cloudServicesNetworkName,
        CloudServicesNetworkInner cloudServicesNetworkParameters);

    /**
     * Create or update the cloud services network.
     *
     * <p>Create a new cloud services network or update the properties of the existing cloud services network.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param cloudServicesNetworkName The name of the cloud services network.
     * @param cloudServicesNetworkParameters The request body.
     * @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 cloudServicesNetwork represents additional egress information that
     *     will be used by associated virtual machines or hybrid AKS clusters.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<CloudServicesNetworkInner>, CloudServicesNetworkInner> beginCreateOrUpdate(
        String resourceGroupName,
        String cloudServicesNetworkName,
        CloudServicesNetworkInner cloudServicesNetworkParameters,
        Context context);

    /**
     * Create or update the cloud services network.
     *
     * <p>Create a new cloud services network or update the properties of the existing cloud services network.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param cloudServicesNetworkName The name of the cloud services network.
     * @param cloudServicesNetworkParameters The request body.
     * @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 cloudServicesNetwork represents additional egress information that will be used by associated virtual
     *     machines or hybrid AKS clusters.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    CloudServicesNetworkInner createOrUpdate(
        String resourceGroupName,
        String cloudServicesNetworkName,
        CloudServicesNetworkInner cloudServicesNetworkParameters);

    /**
     * Create or update the cloud services network.
     *
     * <p>Create a new cloud services network or update the properties of the existing cloud services network.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param cloudServicesNetworkName The name of the cloud services network.
     * @param cloudServicesNetworkParameters The request body.
     * @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 cloudServicesNetwork represents additional egress information that will be used by associated virtual
     *     machines or hybrid AKS clusters.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    CloudServicesNetworkInner createOrUpdate(
        String resourceGroupName,
        String cloudServicesNetworkName,
        CloudServicesNetworkInner cloudServicesNetworkParameters,
        Context context);

    /**
     * Delete the cloud services network.
     *
     * <p>Delete the provided cloud services network.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param cloudServicesNetworkName The name of the cloud services network.
     * @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 cloudServicesNetworkName);

    /**
     * Delete the cloud services network.
     *
     * <p>Delete the provided cloud services network.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param cloudServicesNetworkName The name of the cloud services network.
     * @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 cloudServicesNetworkName, Context context);

    /**
     * Delete the cloud services network.
     *
     * <p>Delete the provided cloud services network.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param cloudServicesNetworkName The name of the cloud services network.
     * @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 cloudServicesNetworkName);

    /**
     * Delete the cloud services network.
     *
     * <p>Delete the provided cloud services network.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param cloudServicesNetworkName The name of the cloud services network.
     * @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 cloudServicesNetworkName, Context context);

    /**
     * Patch the cloud services network.
     *
     * <p>Update properties of the provided cloud services network, or update the tags associated with it. Properties
     * and tag updates can be done independently.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param cloudServicesNetworkName The name of the cloud services network.
     * @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 cloudServicesNetwork represents additional egress information that
     *     will be used by associated virtual machines or hybrid AKS clusters.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<CloudServicesNetworkInner>, CloudServicesNetworkInner> beginUpdate(
        String resourceGroupName, String cloudServicesNetworkName);

    /**
     * Patch the cloud services network.
     *
     * <p>Update properties of the provided cloud services network, or update the tags associated with it. Properties
     * and tag updates can be done independently.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param cloudServicesNetworkName The name of the cloud services network.
     * @param cloudServicesNetworkUpdateParameters The request body.
     * @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 cloudServicesNetwork represents additional egress information that
     *     will be used by associated virtual machines or hybrid AKS clusters.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<CloudServicesNetworkInner>, CloudServicesNetworkInner> beginUpdate(
        String resourceGroupName,
        String cloudServicesNetworkName,
        CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters,
        Context context);

    /**
     * Patch the cloud services network.
     *
     * <p>Update properties of the provided cloud services network, or update the tags associated with it. Properties
     * and tag updates can be done independently.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param cloudServicesNetworkName The name of the cloud services network.
     * @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 cloudServicesNetwork represents additional egress information that will be used by associated virtual
     *     machines or hybrid AKS clusters.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    CloudServicesNetworkInner update(String resourceGroupName, String cloudServicesNetworkName);

    /**
     * Patch the cloud services network.
     *
     * <p>Update properties of the provided cloud services network, or update the tags associated with it. Properties
     * and tag updates can be done independently.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param cloudServicesNetworkName The name of the cloud services network.
     * @param cloudServicesNetworkUpdateParameters The request body.
     * @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 cloudServicesNetwork represents additional egress information that will be used by associated virtual
     *     machines or hybrid AKS clusters.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    CloudServicesNetworkInner update(
        String resourceGroupName,
        String cloudServicesNetworkName,
        CloudServicesNetworkPatchParameters cloudServicesNetworkUpdateParameters,
        Context context);
}
