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

package com.azure.resourcemanager.networkfunction.models;

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;

/** Resource collection API of CollectorPolicies. */
public interface CollectorPolicies {
    /**
     * Return list of Collector policies in a Azure Traffic Collector.
     *
     * @param resourceGroupName The name of the resource group.
     * @param azureTrafficCollectorName Azure Traffic Collector 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 response for the ListCollectorPolicies API service call as paginated response with {@link PagedIterable}.
     */
    PagedIterable<CollectorPolicy> list(String resourceGroupName, String azureTrafficCollectorName);

    /**
     * Return list of Collector policies in a Azure Traffic Collector.
     *
     * @param resourceGroupName The name of the resource group.
     * @param azureTrafficCollectorName Azure Traffic Collector 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 response for the ListCollectorPolicies API service call as paginated response with {@link PagedIterable}.
     */
    PagedIterable<CollectorPolicy> list(String resourceGroupName, String azureTrafficCollectorName, Context context);

    /**
     * Gets the collector policy in a specified Traffic Collector.
     *
     * @param resourceGroupName The name of the resource group.
     * @param azureTrafficCollectorName Azure Traffic Collector name.
     * @param collectorPolicyName Collector Policy 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 collector policy in a specified Traffic Collector along with {@link Response}.
     */
    Response<CollectorPolicy> getWithResponse(
        String resourceGroupName, String azureTrafficCollectorName, String collectorPolicyName, Context context);

    /**
     * Gets the collector policy in a specified Traffic Collector.
     *
     * @param resourceGroupName The name of the resource group.
     * @param azureTrafficCollectorName Azure Traffic Collector name.
     * @param collectorPolicyName Collector Policy 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 collector policy in a specified Traffic Collector.
     */
    CollectorPolicy get(String resourceGroupName, String azureTrafficCollectorName, String collectorPolicyName);

    /**
     * Deletes a specified Collector Policy resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param azureTrafficCollectorName Azure Traffic Collector name.
     * @param collectorPolicyName Collector Policy 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 resourceGroupName, String azureTrafficCollectorName, String collectorPolicyName);

    /**
     * Deletes a specified Collector Policy resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param azureTrafficCollectorName Azure Traffic Collector name.
     * @param collectorPolicyName Collector Policy 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 resourceGroupName, String azureTrafficCollectorName, String collectorPolicyName, Context context);

    /**
     * Gets the collector policy in a specified Traffic Collector.
     *
     * @param id the resource ID.
     * @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 collector policy in a specified Traffic Collector along with {@link Response}.
     */
    CollectorPolicy getById(String id);

    /**
     * Gets the collector policy in a specified Traffic Collector.
     *
     * @param id the resource ID.
     * @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 collector policy in a specified Traffic Collector along with {@link Response}.
     */
    Response<CollectorPolicy> getByIdWithResponse(String id, Context context);

    /**
     * Deletes a specified Collector Policy resource.
     *
     * @param id the resource ID.
     * @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 deleteById(String id);

    /**
     * Deletes a specified Collector Policy resource.
     *
     * @param id the resource ID.
     * @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 deleteByIdWithResponse(String id, Context context);

    /**
     * Begins definition for a new CollectorPolicy resource.
     *
     * @param name resource name.
     * @return the first stage of the new CollectorPolicy definition.
     */
    CollectorPolicy.DefinitionStages.Blank define(String name);
}
