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

package com.azure.resourcemanager.sphere.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 Catalogs. */
public interface Catalogs {
    /**
     * List Catalog resources by subscription ID.
     *
     * @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 Catalog list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Catalog> list();

    /**
     * List Catalog resources by subscription 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 response of a Catalog list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Catalog> list(Context context);

    /**
     * List Catalog resources by 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 the response of a Catalog list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Catalog> listByResourceGroup(String resourceGroupName);

    /**
     * List Catalog resources by 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 the response of a Catalog list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Catalog> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * Get a Catalog.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @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 Catalog along with {@link Response}.
     */
    Response<Catalog> getByResourceGroupWithResponse(String resourceGroupName, String catalogName, Context context);

    /**
     * Get a Catalog.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @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 Catalog.
     */
    Catalog getByResourceGroup(String resourceGroupName, String catalogName);

    /**
     * Delete a Catalog.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @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 deleteByResourceGroup(String resourceGroupName, String catalogName);

    /**
     * Delete a Catalog.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @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 catalogName, Context context);

    /**
     * Counts devices in catalog.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @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 to the action call for count devices in a catalog along with {@link Response}.
     */
    Response<CountDeviceResponse> countDevicesWithResponse(
        String resourceGroupName, String catalogName, Context context);

    /**
     * Counts devices in catalog.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @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 to the action call for count devices in a catalog.
     */
    CountDeviceResponse countDevices(String resourceGroupName, String catalogName);

    /**
     * Lists deployments for catalog.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @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 Deployment list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Deployment> listDeployments(String resourceGroupName, String catalogName);

    /**
     * Lists deployments for catalog.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param filter Filter the result list using the given expression.
     * @param top The number of result items to return.
     * @param skip The number of result items to skip.
     * @param maxpagesize The maximum number of result items per page.
     * @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 Deployment list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Deployment> listDeployments(
        String resourceGroupName,
        String catalogName,
        String filter,
        Integer top,
        Integer skip,
        Integer maxpagesize,
        Context context);

    /**
     * List the device groups for the catalog.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param listDeviceGroupsRequest List device groups for catalog.
     * @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 DeviceGroup list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<DeviceGroup> listDeviceGroups(
        String resourceGroupName, String catalogName, ListDeviceGroupsRequest listDeviceGroupsRequest);

    /**
     * List the device groups for the catalog.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param listDeviceGroupsRequest List device groups for catalog.
     * @param filter Filter the result list using the given expression.
     * @param top The number of result items to return.
     * @param skip The number of result items to skip.
     * @param maxpagesize The maximum number of result items per page.
     * @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 DeviceGroup list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<DeviceGroup> listDeviceGroups(
        String resourceGroupName,
        String catalogName,
        ListDeviceGroupsRequest listDeviceGroupsRequest,
        String filter,
        Integer top,
        Integer skip,
        Integer maxpagesize,
        Context context);

    /**
     * Lists device insights for catalog.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @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 paged collection of DeviceInsight items as paginated response with {@link PagedIterable}.
     */
    PagedIterable<DeviceInsight> listDeviceInsights(String resourceGroupName, String catalogName);

    /**
     * Lists device insights for catalog.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param filter Filter the result list using the given expression.
     * @param top The number of result items to return.
     * @param skip The number of result items to skip.
     * @param maxpagesize The maximum number of result items per page.
     * @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 paged collection of DeviceInsight items as paginated response with {@link PagedIterable}.
     */
    PagedIterable<DeviceInsight> listDeviceInsights(
        String resourceGroupName,
        String catalogName,
        String filter,
        Integer top,
        Integer skip,
        Integer maxpagesize,
        Context context);

    /**
     * Lists devices for catalog.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @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 Device list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Device> listDevices(String resourceGroupName, String catalogName);

    /**
     * Lists devices for catalog.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param filter Filter the result list using the given expression.
     * @param top The number of result items to return.
     * @param skip The number of result items to skip.
     * @param maxpagesize The maximum number of result items per page.
     * @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 Device list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Device> listDevices(
        String resourceGroupName,
        String catalogName,
        String filter,
        Integer top,
        Integer skip,
        Integer maxpagesize,
        Context context);

    /**
     * Get a Catalog.
     *
     * @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 a Catalog along with {@link Response}.
     */
    Catalog getById(String id);

    /**
     * Get a Catalog.
     *
     * @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 a Catalog along with {@link Response}.
     */
    Response<Catalog> getByIdWithResponse(String id, Context context);

    /**
     * Delete a Catalog.
     *
     * @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);

    /**
     * Delete a Catalog.
     *
     * @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 Catalog resource.
     *
     * @param name resource name.
     * @return the first stage of the new Catalog definition.
     */
    Catalog.DefinitionStages.Blank define(String name);
}
