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

package com.azure.resourcemanager.servicefabric.models;

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

/** Resource collection API of Services. */
public interface Services {
    /**
     * Gets a Service Fabric service resource.
     *
     * <p>Get a Service Fabric service resource created or in the process of being created in the Service Fabric
     * application resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationName The name of the application resource.
     * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}.
     * @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 Service Fabric service resource created or in the process of being created in the Service Fabric
     *     application resource along with {@link Response}.
     */
    Response<ServiceResource> getWithResponse(
        String resourceGroupName, String clusterName, String applicationName, String serviceName, Context context);

    /**
     * Gets a Service Fabric service resource.
     *
     * <p>Get a Service Fabric service resource created or in the process of being created in the Service Fabric
     * application resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationName The name of the application resource.
     * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}.
     * @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 Service Fabric service resource created or in the process of being created in the Service Fabric
     *     application resource.
     */
    ServiceResource get(String resourceGroupName, String clusterName, String applicationName, String serviceName);

    /**
     * Deletes a Service Fabric service resource.
     *
     * <p>Delete a Service Fabric service resource with the specified name.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationName The name of the application resource.
     * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}.
     * @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 clusterName, String applicationName, String serviceName);

    /**
     * Deletes a Service Fabric service resource.
     *
     * <p>Delete a Service Fabric service resource with the specified name.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationName The name of the application resource.
     * @param serviceName The name of the service resource in the format of {applicationName}~{serviceName}.
     * @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 clusterName, String applicationName, String serviceName, Context context);

    /**
     * Gets the list of service resources created in the specified Service Fabric application resource.
     *
     * <p>Gets all service resources created or in the process of being created in the Service Fabric application
     * resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationName The name of the application resource.
     * @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 all service resources created or in the process of being created in the Service Fabric application
     *     resource along with {@link Response}.
     */
    Response<ServiceResourceList> listWithResponse(
        String resourceGroupName, String clusterName, String applicationName, Context context);

    /**
     * Gets the list of service resources created in the specified Service Fabric application resource.
     *
     * <p>Gets all service resources created or in the process of being created in the Service Fabric application
     * resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param clusterName The name of the cluster resource.
     * @param applicationName The name of the application resource.
     * @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 all service resources created or in the process of being created in the Service Fabric application
     *     resource.
     */
    ServiceResourceList list(String resourceGroupName, String clusterName, String applicationName);

    /**
     * Gets a Service Fabric service resource.
     *
     * <p>Get a Service Fabric service resource created or in the process of being created in the Service Fabric
     * application 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.
     * @return a Service Fabric service resource created or in the process of being created in the Service Fabric
     *     application resource along with {@link Response}.
     */
    ServiceResource getById(String id);

    /**
     * Gets a Service Fabric service resource.
     *
     * <p>Get a Service Fabric service resource created or in the process of being created in the Service Fabric
     * application 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.
     * @return a Service Fabric service resource created or in the process of being created in the Service Fabric
     *     application resource along with {@link Response}.
     */
    Response<ServiceResource> getByIdWithResponse(String id, Context context);

    /**
     * Deletes a Service Fabric service resource.
     *
     * <p>Delete a Service Fabric service resource with the specified 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);

    /**
     * Deletes a Service Fabric service resource.
     *
     * <p>Delete a Service Fabric service resource with the specified 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 ServiceResource resource.
     *
     * @param name resource name.
     * @return the first stage of the new ServiceResource definition.
     */
    ServiceResource.DefinitionStages.Blank define(String name);
}
