// 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 Deployments. */
public interface Deployments {
    /**
     * List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be
     * used for product or device group 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 deviceGroupName Name of device group.
     * @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> listByDeviceGroup(
        String resourceGroupName, String catalogName, String productName, String deviceGroupName);

    /**
     * List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be
     * used for product or device group 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 deviceGroupName Name of device group.
     * @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> listByDeviceGroup(
        String resourceGroupName,
        String catalogName,
        String productName,
        String deviceGroupName,
        String filter,
        Integer top,
        Integer skip,
        Integer maxpagesize,
        Context context);

    /**
     * Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device
     * group 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 deviceGroupName Name of device group.
     * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
     *     the associated device group.
     * @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 Deployment along with {@link Response}.
     */
    Response<Deployment> getWithResponse(
        String resourceGroupName,
        String catalogName,
        String productName,
        String deviceGroupName,
        String deploymentName,
        Context context);

    /**
     * Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device
     * group 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 deviceGroupName Name of device group.
     * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
     *     the associated device group.
     * @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 Deployment.
     */
    Deployment get(
        String resourceGroupName,
        String catalogName,
        String productName,
        String deviceGroupName,
        String deploymentName);

    /**
     * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
     * device group 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 deviceGroupName Name of device group.
     * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
     *     the associated device group.
     * @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,
        String deviceGroupName,
        String deploymentName);

    /**
     * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
     * device group 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 deviceGroupName Name of device group.
     * @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
     *     the associated device group.
     * @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,
        String deviceGroupName,
        String deploymentName,
        Context context);

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

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

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