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

package com.azure.resourcemanager.mixedreality.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.util.Context;
import com.azure.resourcemanager.mixedreality.fluent.models.AccountKeysInner;
import com.azure.resourcemanager.mixedreality.fluent.models.SpatialAnchorsAccountInner;
import com.azure.resourcemanager.mixedreality.models.AccountKeyRegenerateRequest;

/** An instance of this class provides access to all the operations defined in SpatialAnchorsAccountsClient. */
public interface SpatialAnchorsAccountsClient {
    /**
     * List Spatial Anchors Accounts by Subscription.
     *
     * @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 result of the request to get resource collection as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<SpatialAnchorsAccountInner> list();

    /**
     * List Spatial Anchors Accounts by Subscription.
     *
     * @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 result of the request to get resource collection as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<SpatialAnchorsAccountInner> list(Context context);

    /**
     * List Resources by Resource Group.
     *
     * @param resourceGroupName Name of an Azure resource 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 result of the request to get resource collection as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<SpatialAnchorsAccountInner> listByResourceGroup(String resourceGroupName);

    /**
     * List Resources by Resource Group.
     *
     * @param resourceGroupName Name of an Azure resource 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 result of the request to get resource collection as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<SpatialAnchorsAccountInner> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * Delete a Spatial Anchors Account.
     *
     * @param resourceGroupName Name of an Azure resource group.
     * @param accountName Name of an Mixed Reality Account.
     * @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 Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<Void> deleteWithResponse(String resourceGroupName, String accountName, Context context);

    /**
     * Delete a Spatial Anchors Account.
     *
     * @param resourceGroupName Name of an Azure resource group.
     * @param accountName Name of an Mixed Reality Account.
     * @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 accountName);

    /**
     * Retrieve a Spatial Anchors Account.
     *
     * @param resourceGroupName Name of an Azure resource group.
     * @param accountName Name of an Mixed Reality Account.
     * @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 spatialAnchorsAccount Response along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<SpatialAnchorsAccountInner> getByResourceGroupWithResponse(
        String resourceGroupName, String accountName, Context context);

    /**
     * Retrieve a Spatial Anchors Account.
     *
     * @param resourceGroupName Name of an Azure resource group.
     * @param accountName Name of an Mixed Reality Account.
     * @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 spatialAnchorsAccount Response.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SpatialAnchorsAccountInner getByResourceGroup(String resourceGroupName, String accountName);

    /**
     * Updating a Spatial Anchors Account.
     *
     * @param resourceGroupName Name of an Azure resource group.
     * @param accountName Name of an Mixed Reality Account.
     * @param spatialAnchorsAccount Spatial Anchors Account parameter.
     * @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 spatialAnchorsAccount Response along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<SpatialAnchorsAccountInner> updateWithResponse(
        String resourceGroupName,
        String accountName,
        SpatialAnchorsAccountInner spatialAnchorsAccount,
        Context context);

    /**
     * Updating a Spatial Anchors Account.
     *
     * @param resourceGroupName Name of an Azure resource group.
     * @param accountName Name of an Mixed Reality Account.
     * @param spatialAnchorsAccount Spatial Anchors Account parameter.
     * @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 spatialAnchorsAccount Response.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SpatialAnchorsAccountInner update(
        String resourceGroupName, String accountName, SpatialAnchorsAccountInner spatialAnchorsAccount);

    /**
     * Creating or Updating a Spatial Anchors Account.
     *
     * @param resourceGroupName Name of an Azure resource group.
     * @param accountName Name of an Mixed Reality Account.
     * @param spatialAnchorsAccount Spatial Anchors Account parameter.
     * @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 spatialAnchorsAccount Response along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<SpatialAnchorsAccountInner> createWithResponse(
        String resourceGroupName,
        String accountName,
        SpatialAnchorsAccountInner spatialAnchorsAccount,
        Context context);

    /**
     * Creating or Updating a Spatial Anchors Account.
     *
     * @param resourceGroupName Name of an Azure resource group.
     * @param accountName Name of an Mixed Reality Account.
     * @param spatialAnchorsAccount Spatial Anchors Account parameter.
     * @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 spatialAnchorsAccount Response.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SpatialAnchorsAccountInner create(
        String resourceGroupName, String accountName, SpatialAnchorsAccountInner spatialAnchorsAccount);

    /**
     * List Both of the 2 Keys of a Spatial Anchors Account.
     *
     * @param resourceGroupName Name of an Azure resource group.
     * @param accountName Name of an Mixed Reality Account.
     * @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 developer Keys of account along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<AccountKeysInner> listKeysWithResponse(String resourceGroupName, String accountName, Context context);

    /**
     * List Both of the 2 Keys of a Spatial Anchors Account.
     *
     * @param resourceGroupName Name of an Azure resource group.
     * @param accountName Name of an Mixed Reality Account.
     * @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 developer Keys of account.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    AccountKeysInner listKeys(String resourceGroupName, String accountName);

    /**
     * Regenerate specified Key of a Spatial Anchors Account.
     *
     * @param resourceGroupName Name of an Azure resource group.
     * @param accountName Name of an Mixed Reality Account.
     * @param regenerate Required information for key regeneration.
     * @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 developer Keys of account along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<AccountKeysInner> regenerateKeysWithResponse(
        String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate, Context context);

    /**
     * Regenerate specified Key of a Spatial Anchors Account.
     *
     * @param resourceGroupName Name of an Azure resource group.
     * @param accountName Name of an Mixed Reality Account.
     * @param regenerate Required information for key regeneration.
     * @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 developer Keys of account.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    AccountKeysInner regenerateKeys(
        String resourceGroupName, String accountName, AccountKeyRegenerateRequest regenerate);
}
