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

package com.azure.resourcemanager.appconfiguration.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
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.appconfiguration.fluent.models.KeyValueInner;

/** An instance of this class provides access to all the operations defined in KeyValuesClient. */
public interface KeyValuesClient {
    /**
     * Gets the properties of the specified key-value.
     *
     * @param resourceGroupName The name of the resource group to which the container registry belongs.
     * @param configStoreName The name of the configuration store.
     * @param keyValueName Identifier of key and label combination. Key and label are joined by $ character. Label is
     *     optional.
     * @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 properties of the specified key-value along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<KeyValueInner> getWithResponse(
        String resourceGroupName, String configStoreName, String keyValueName, Context context);

    /**
     * Gets the properties of the specified key-value.
     *
     * @param resourceGroupName The name of the resource group to which the container registry belongs.
     * @param configStoreName The name of the configuration store.
     * @param keyValueName Identifier of key and label combination. Key and label are joined by $ character. Label is
     *     optional.
     * @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 properties of the specified key-value.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    KeyValueInner get(String resourceGroupName, String configStoreName, String keyValueName);

    /**
     * Creates a key-value.
     *
     * @param resourceGroupName The name of the resource group to which the container registry belongs.
     * @param configStoreName The name of the configuration store.
     * @param keyValueName Identifier of key and label combination. Key and label are joined by $ character. Label is
     *     optional.
     * @param keyValueParameters The parameters for creating a key-value.
     * @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 key-value resource along with all resource properties along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<KeyValueInner> createOrUpdateWithResponse(
        String resourceGroupName,
        String configStoreName,
        String keyValueName,
        KeyValueInner keyValueParameters,
        Context context);

    /**
     * Creates a key-value.
     *
     * @param resourceGroupName The name of the resource group to which the container registry belongs.
     * @param configStoreName The name of the configuration store.
     * @param keyValueName Identifier of key and label combination. Key and label are joined by $ character. Label is
     *     optional.
     * @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 key-value resource along with all resource properties.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    KeyValueInner createOrUpdate(String resourceGroupName, String configStoreName, String keyValueName);

    /**
     * Deletes a key-value.
     *
     * @param resourceGroupName The name of the resource group to which the container registry belongs.
     * @param configStoreName The name of the configuration store.
     * @param keyValueName Identifier of key and label combination. Key and label are joined by $ character. Label is
     *     optional.
     * @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 configStoreName, String keyValueName);

    /**
     * Deletes a key-value.
     *
     * @param resourceGroupName The name of the resource group to which the container registry belongs.
     * @param configStoreName The name of the configuration store.
     * @param keyValueName Identifier of key and label combination. Key and label are joined by $ character. Label is
     *     optional.
     * @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 configStoreName, String keyValueName, Context context);

    /**
     * Deletes a key-value.
     *
     * @param resourceGroupName The name of the resource group to which the container registry belongs.
     * @param configStoreName The name of the configuration store.
     * @param keyValueName Identifier of key and label combination. Key and label are joined by $ character. Label is
     *     optional.
     * @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 configStoreName, String keyValueName);

    /**
     * Deletes a key-value.
     *
     * @param resourceGroupName The name of the resource group to which the container registry belongs.
     * @param configStoreName The name of the configuration store.
     * @param keyValueName Identifier of key and label combination. Key and label are joined by $ character. Label is
     *     optional.
     * @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 configStoreName, String keyValueName, Context context);
}
