// 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 Products. */
public interface Products {
    /**
     * List Product resources by 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 Product list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Product> listByCatalog(String resourceGroupName, String catalogName);

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

    /**
     * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param productName Name of product.
     * @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 Product along with {@link Response}.
     */
    Response<Product> getWithResponse(
        String resourceGroupName, String catalogName, String productName, Context context);

    /**
     * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param productName Name of product.
     * @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 Product.
     */
    Product get(String resourceGroupName, String catalogName, String productName);

    /**
     * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param productName Name of product.
     * @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, String productName);

    /**
     * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param productName Name of product.
     * @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, String productName, Context context);

    /**
     * Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product
     * name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param productName Name of product.
     * @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, String productName, Context context);

    /**
     * Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product
     * name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param productName Name of product.
     * @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, String productName);

    /**
     * Generates default device groups for the product. '.default' and '.unassigned' are system defined values and
     * cannot be used for product name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param productName Name of product.
     * @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> generateDefaultDeviceGroups(
        String resourceGroupName, String catalogName, String productName);

    /**
     * Generates default device groups for the product. '.default' and '.unassigned' are system defined values and
     * cannot be used for product name.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param productName Name of product.
     * @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> generateDefaultDeviceGroups(
        String resourceGroupName, String catalogName, String productName, Context context);

    /**
     * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
     *
     * @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 Product along with {@link Response}.
     */
    Product getById(String id);

    /**
     * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
     *
     * @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 Product along with {@link Response}.
     */
    Response<Product> getByIdWithResponse(String id, Context context);

    /**
     * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'.
     *
     * @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 Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'.
     *
     * @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 Product resource.
     *
     * @param name resource name.
     * @return the first stage of the new Product definition.
     */
    Product.DefinitionStages.Blank define(String name);
}
