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

package com.azure.resourcemanager.hybridnetwork.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.hybridnetwork.fluent.models.RoleInstanceInner;

/** An instance of this class provides access to all the operations defined in RoleInstancesClient. */
public interface RoleInstancesClient {
    /**
     * Starts a role instance of a vendor network function.
     *
     * @param locationName The Azure region where the network function resource was created by customer.
     * @param vendorName The name of the vendor.
     * @param serviceKey The GUID for the vendor network function.
     * @param roleInstanceName The name of the role instance of the vendor network function.
     * @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> beginStart(
        String locationName, String vendorName, String serviceKey, String roleInstanceName);

    /**
     * Starts a role instance of a vendor network function.
     *
     * @param locationName The Azure region where the network function resource was created by customer.
     * @param vendorName The name of the vendor.
     * @param serviceKey The GUID for the vendor network function.
     * @param roleInstanceName The name of the role instance of the vendor network function.
     * @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> beginStart(
        String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context);

    /**
     * Starts a role instance of a vendor network function.
     *
     * @param locationName The Azure region where the network function resource was created by customer.
     * @param vendorName The name of the vendor.
     * @param serviceKey The GUID for the vendor network function.
     * @param roleInstanceName The name of the role instance of the vendor network function.
     * @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 start(String locationName, String vendorName, String serviceKey, String roleInstanceName);

    /**
     * Starts a role instance of a vendor network function.
     *
     * @param locationName The Azure region where the network function resource was created by customer.
     * @param vendorName The name of the vendor.
     * @param serviceKey The GUID for the vendor network function.
     * @param roleInstanceName The name of the role instance of the vendor network function.
     * @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 start(String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context);

    /**
     * Powers off (stop) a role instance of a vendor network function.
     *
     * @param locationName The Azure region where the network function resource was created by customer.
     * @param vendorName The name of the vendor.
     * @param serviceKey The GUID for the vendor network function.
     * @param roleInstanceName The name of the role instance of the vendor network function.
     * @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> beginStop(
        String locationName, String vendorName, String serviceKey, String roleInstanceName);

    /**
     * Powers off (stop) a role instance of a vendor network function.
     *
     * @param locationName The Azure region where the network function resource was created by customer.
     * @param vendorName The name of the vendor.
     * @param serviceKey The GUID for the vendor network function.
     * @param roleInstanceName The name of the role instance of the vendor network function.
     * @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> beginStop(
        String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context);

    /**
     * Powers off (stop) a role instance of a vendor network function.
     *
     * @param locationName The Azure region where the network function resource was created by customer.
     * @param vendorName The name of the vendor.
     * @param serviceKey The GUID for the vendor network function.
     * @param roleInstanceName The name of the role instance of the vendor network function.
     * @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 stop(String locationName, String vendorName, String serviceKey, String roleInstanceName);

    /**
     * Powers off (stop) a role instance of a vendor network function.
     *
     * @param locationName The Azure region where the network function resource was created by customer.
     * @param vendorName The name of the vendor.
     * @param serviceKey The GUID for the vendor network function.
     * @param roleInstanceName The name of the role instance of the vendor network function.
     * @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 stop(String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context);

    /**
     * Restarts a role instance of a vendor network function.
     *
     * @param locationName The Azure region where the network function resource was created by customer.
     * @param vendorName The name of the vendor.
     * @param serviceKey The GUID for the vendor network function.
     * @param roleInstanceName The name of the role instance of the vendor network function.
     * @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> beginRestart(
        String locationName, String vendorName, String serviceKey, String roleInstanceName);

    /**
     * Restarts a role instance of a vendor network function.
     *
     * @param locationName The Azure region where the network function resource was created by customer.
     * @param vendorName The name of the vendor.
     * @param serviceKey The GUID for the vendor network function.
     * @param roleInstanceName The name of the role instance of the vendor network function.
     * @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> beginRestart(
        String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context);

    /**
     * Restarts a role instance of a vendor network function.
     *
     * @param locationName The Azure region where the network function resource was created by customer.
     * @param vendorName The name of the vendor.
     * @param serviceKey The GUID for the vendor network function.
     * @param roleInstanceName The name of the role instance of the vendor network function.
     * @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 restart(String locationName, String vendorName, String serviceKey, String roleInstanceName);

    /**
     * Restarts a role instance of a vendor network function.
     *
     * @param locationName The Azure region where the network function resource was created by customer.
     * @param vendorName The name of the vendor.
     * @param serviceKey The GUID for the vendor network function.
     * @param roleInstanceName The name of the role instance of the vendor network function.
     * @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 restart(String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context);

    /**
     * Gets the information of role instance of vendor network function.
     *
     * @param locationName The Azure region where the network function resource was created by customer.
     * @param vendorName The name of the vendor.
     * @param serviceKey The GUID for the vendor network function.
     * @param roleInstanceName The name of the role instance of the vendor network function.
     * @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 information of role instance of vendor network function along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<RoleInstanceInner> getWithResponse(
        String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context);

    /**
     * Gets the information of role instance of vendor network function.
     *
     * @param locationName The Azure region where the network function resource was created by customer.
     * @param vendorName The name of the vendor.
     * @param serviceKey The GUID for the vendor network function.
     * @param roleInstanceName The name of the role instance of the vendor network function.
     * @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 information of role instance of vendor network function.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    RoleInstanceInner get(String locationName, String vendorName, String serviceKey, String roleInstanceName);

    /**
     * Lists the information of role instances of vendor network function.
     *
     * @param locationName The Azure region where the network function resource was created by customer.
     * @param vendorName The name of the vendor.
     * @param serviceKey The GUID for the vendor network function.
     * @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 list of role instances of vendor network function as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<RoleInstanceInner> list(String locationName, String vendorName, String serviceKey);

    /**
     * Lists the information of role instances of vendor network function.
     *
     * @param locationName The Azure region where the network function resource was created by customer.
     * @param vendorName The name of the vendor.
     * @param serviceKey The GUID for the vendor network function.
     * @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 list of role instances of vendor network function as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<RoleInstanceInner> list(String locationName, String vendorName, String serviceKey, Context context);
}
