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

package com.azure.resourcemanager.security.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 ApiCollections. */
public interface ApiCollections {
    /**
     * Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs
     *
     * <p>Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs. If an Azure API
     * Management API is onboarded to Defender for APIs, the system will monitor the operations within the Azure API
     * Management API for intrusive behaviors and provide alerts for attacks that have been detected.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param serviceName The name of the API Management service.
     * @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 Azure API Management APIs that have been onboarded to Defender for APIs as paginated response
     *     with {@link PagedIterable}.
     */
    PagedIterable<ApiCollectionResponse> list(String resourceGroupName, String serviceName);

    /**
     * Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs
     *
     * <p>Gets a list of Azure API Management APIs that have been onboarded to Defender for APIs. If an Azure API
     * Management API is onboarded to Defender for APIs, the system will monitor the operations within the Azure API
     * Management API for intrusive behaviors and provide alerts for attacks that have been detected.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param serviceName The name of the API Management service.
     * @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 Azure API Management APIs that have been onboarded to Defender for APIs as paginated response
     *     with {@link PagedIterable}.
     */
    PagedIterable<ApiCollectionResponse> list(String resourceGroupName, String serviceName, Context context);

    /**
     * Gets an Azure API Management API if it has been onboarded to Defender for APIs
     *
     * <p>Gets an Azure API Management API if it has been onboarded to Defender for APIs. If an Azure API Management API
     * is onboarded to Defender for APIs, the system will monitor the operations within the Azure API Management API for
     * intrusive behaviors and provide alerts for attacks that have been detected.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param serviceName The name of the API Management service.
     * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider
     *     namespace. This string matches the Azure API Management API 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 an Azure API Management API if it has been onboarded to Defender for APIs along with {@link Response}.
     */
    Response<ApiCollectionResponse> getWithResponse(
        String resourceGroupName, String serviceName, String apiCollectionId, Context context);

    /**
     * Gets an Azure API Management API if it has been onboarded to Defender for APIs
     *
     * <p>Gets an Azure API Management API if it has been onboarded to Defender for APIs. If an Azure API Management API
     * is onboarded to Defender for APIs, the system will monitor the operations within the Azure API Management API for
     * intrusive behaviors and provide alerts for attacks that have been detected.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param serviceName The name of the API Management service.
     * @param apiCollectionId A string representing the apiCollections resource within the Microsoft.Security provider
     *     namespace. This string matches the Azure API Management API 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 an Azure API Management API if it has been onboarded to Defender for APIs.
     */
    ApiCollectionResponse get(String resourceGroupName, String serviceName, String apiCollectionId);
}
