// 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 ClusterVersions. */
public interface ClusterVersions {
    /**
     * Gets information about a Service Fabric cluster code version available in the specified location.
     *
     * <p>Gets information about an available Service Fabric cluster code version.
     *
     * @param location The location for the cluster code versions. This is different from cluster location.
     * @param clusterVersion The cluster code version.
     * @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 information about an available Service Fabric cluster code version along with {@link Response}.
     */
    Response<ClusterCodeVersionsListResult> getWithResponse(String location, String clusterVersion, Context context);

    /**
     * Gets information about a Service Fabric cluster code version available in the specified location.
     *
     * <p>Gets information about an available Service Fabric cluster code version.
     *
     * @param location The location for the cluster code versions. This is different from cluster location.
     * @param clusterVersion The cluster code version.
     * @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 information about an available Service Fabric cluster code version.
     */
    ClusterCodeVersionsListResult get(String location, String clusterVersion);

    /**
     * Gets information about a Service Fabric cluster code version available for the specified environment.
     *
     * <p>Gets information about an available Service Fabric cluster code version by environment.
     *
     * @param location The location for the cluster code versions. This is different from cluster location.
     * @param environment The operating system of the cluster. The default means all.
     * @param clusterVersion The cluster code version.
     * @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 information about an available Service Fabric cluster code version by environment along with {@link
     *     Response}.
     */
    Response<ClusterCodeVersionsListResult> getByEnvironmentWithResponse(
        String location, ClusterVersionsEnvironment environment, String clusterVersion, Context context);

    /**
     * Gets information about a Service Fabric cluster code version available for the specified environment.
     *
     * <p>Gets information about an available Service Fabric cluster code version by environment.
     *
     * @param location The location for the cluster code versions. This is different from cluster location.
     * @param environment The operating system of the cluster. The default means all.
     * @param clusterVersion The cluster code version.
     * @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 information about an available Service Fabric cluster code version by environment.
     */
    ClusterCodeVersionsListResult getByEnvironment(
        String location, ClusterVersionsEnvironment environment, String clusterVersion);

    /**
     * Gets the list of Service Fabric cluster code versions available for the specified location.
     *
     * <p>Gets all available code versions for Service Fabric cluster resources by location.
     *
     * @param location The location for the cluster code versions. This is different from cluster location.
     * @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 available code versions for Service Fabric cluster resources by location along with {@link Response}.
     */
    Response<ClusterCodeVersionsListResult> listWithResponse(String location, Context context);

    /**
     * Gets the list of Service Fabric cluster code versions available for the specified location.
     *
     * <p>Gets all available code versions for Service Fabric cluster resources by location.
     *
     * @param location The location for the cluster code versions. This is different from cluster location.
     * @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 available code versions for Service Fabric cluster resources by location.
     */
    ClusterCodeVersionsListResult list(String location);

    /**
     * Gets the list of Service Fabric cluster code versions available for the specified environment.
     *
     * <p>Gets all available code versions for Service Fabric cluster resources by environment.
     *
     * @param location The location for the cluster code versions. This is different from cluster location.
     * @param environment The operating system of the cluster. The default means all.
     * @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 available code versions for Service Fabric cluster resources by environment along with {@link
     *     Response}.
     */
    Response<ClusterCodeVersionsListResult> listByEnvironmentWithResponse(
        String location, ClusterVersionsEnvironment environment, Context context);

    /**
     * Gets the list of Service Fabric cluster code versions available for the specified environment.
     *
     * <p>Gets all available code versions for Service Fabric cluster resources by environment.
     *
     * @param location The location for the cluster code versions. This is different from cluster location.
     * @param environment The operating system of the cluster. The default means all.
     * @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 available code versions for Service Fabric cluster resources by environment.
     */
    ClusterCodeVersionsListResult listByEnvironment(String location, ClusterVersionsEnvironment environment);
}
