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

package com.azure.resourcemanager.containerservicefleet.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner;

/** An instance of this class provides access to all the operations defined in UpdateRunsClient. */
public interface UpdateRunsClient {
    /**
     * List UpdateRun resources by Fleet.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet 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 the response of a UpdateRun list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<UpdateRunInner> listByFleet(String resourceGroupName, String fleetName);

    /**
     * List UpdateRun resources by Fleet.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet 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 the response of a UpdateRun list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<UpdateRunInner> listByFleet(String resourceGroupName, String fleetName, Context context);

    /**
     * Get a UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun 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 a UpdateRun along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<UpdateRunInner> getWithResponse(
        String resourceGroupName, String fleetName, String updateRunName, Context context);

    /**
     * Get a UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun 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 a UpdateRun.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    UpdateRunInner get(String resourceGroupName, String fleetName, String updateRunName);

    /**
     * Create a UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun resource.
     * @param resource Resource create parameters.
     * @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 {@link SyncPoller} for polling of an UpdateRun is a multi-stage process to perform update operations
     *     across members of a Fleet.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<UpdateRunInner>, UpdateRunInner> beginCreateOrUpdate(
        String resourceGroupName, String fleetName, String updateRunName, UpdateRunInner resource);

    /**
     * Create a UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun resource.
     * @param resource Resource create parameters.
     * @param ifMatch The request should only proceed if an entity matches this string.
     * @param ifNoneMatch The request should only proceed if no entity matches this string.
     * @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 {@link SyncPoller} for polling of an UpdateRun is a multi-stage process to perform update operations
     *     across members of a Fleet.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<UpdateRunInner>, UpdateRunInner> beginCreateOrUpdate(
        String resourceGroupName,
        String fleetName,
        String updateRunName,
        UpdateRunInner resource,
        String ifMatch,
        String ifNoneMatch,
        Context context);

    /**
     * Create a UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun resource.
     * @param resource Resource create parameters.
     * @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    UpdateRunInner createOrUpdate(
        String resourceGroupName, String fleetName, String updateRunName, UpdateRunInner resource);

    /**
     * Create a UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun resource.
     * @param resource Resource create parameters.
     * @param ifMatch The request should only proceed if an entity matches this string.
     * @param ifNoneMatch The request should only proceed if no entity matches this string.
     * @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    UpdateRunInner createOrUpdate(
        String resourceGroupName,
        String fleetName,
        String updateRunName,
        UpdateRunInner resource,
        String ifMatch,
        String ifNoneMatch,
        Context context);

    /**
     * Delete a UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun 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 the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String fleetName, String updateRunName);

    /**
     * Delete a UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun resource.
     * @param ifMatch The request should only proceed if an entity matches this string.
     * @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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(
        String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context);

    /**
     * Delete a UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String fleetName, String updateRunName);

    /**
     * Delete a UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun resource.
     * @param ifMatch The request should only proceed if an entity matches this string.
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context);

    /**
     * Starts an UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun 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 the {@link SyncPoller} for polling of an UpdateRun is a multi-stage process to perform update operations
     *     across members of a Fleet.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<UpdateRunInner>, UpdateRunInner> beginStart(
        String resourceGroupName, String fleetName, String updateRunName);

    /**
     * Starts an UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun resource.
     * @param ifMatch The request should only proceed if an entity matches this string.
     * @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 {@link SyncPoller} for polling of an UpdateRun is a multi-stage process to perform update operations
     *     across members of a Fleet.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<UpdateRunInner>, UpdateRunInner> beginStart(
        String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context);

    /**
     * Starts an UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun 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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    UpdateRunInner start(String resourceGroupName, String fleetName, String updateRunName);

    /**
     * Starts an UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun resource.
     * @param ifMatch The request should only proceed if an entity matches this string.
     * @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    UpdateRunInner start(
        String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context);

    /**
     * Stops an UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun 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 the {@link SyncPoller} for polling of an UpdateRun is a multi-stage process to perform update operations
     *     across members of a Fleet.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<UpdateRunInner>, UpdateRunInner> beginStop(
        String resourceGroupName, String fleetName, String updateRunName);

    /**
     * Stops an UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun resource.
     * @param ifMatch The request should only proceed if an entity matches this string.
     * @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 {@link SyncPoller} for polling of an UpdateRun is a multi-stage process to perform update operations
     *     across members of a Fleet.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<UpdateRunInner>, UpdateRunInner> beginStop(
        String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context);

    /**
     * Stops an UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun 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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    UpdateRunInner stop(String resourceGroupName, String fleetName, String updateRunName);

    /**
     * Stops an UpdateRun.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param fleetName The name of the Fleet resource.
     * @param updateRunName The name of the UpdateRun resource.
     * @param ifMatch The request should only proceed if an entity matches this string.
     * @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 an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    UpdateRunInner stop(
        String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context);
}
