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

package com.azure.resourcemanager.synapse.models;

import com.azure.core.util.Context;
import com.azure.resourcemanager.synapse.fluent.models.KeyInner;

/** An immutable client-side representation of Key. */
public interface Key {
    /**
     * Gets the id property: Fully qualified resource Id for the resource.
     *
     * @return the id value.
     */
    String id();

    /**
     * Gets the name property: The name of the resource.
     *
     * @return the name value.
     */
    String name();

    /**
     * Gets the type property: The type of the resource.
     *
     * @return the type value.
     */
    String type();

    /**
     * Gets the isActiveCmk property: Used to activate the workspace after a customer managed key is provided.
     *
     * @return the isActiveCmk value.
     */
    Boolean isActiveCmk();

    /**
     * Gets the keyVaultUrl property: The Key Vault Url of the workspace key.
     *
     * @return the keyVaultUrl value.
     */
    String keyVaultUrl();

    /**
     * Gets the name of the resource group.
     *
     * @return the name of the resource group.
     */
    String resourceGroupName();

    /**
     * Gets the inner com.azure.resourcemanager.synapse.fluent.models.KeyInner object.
     *
     * @return the inner object.
     */
    KeyInner innerModel();

    /** The entirety of the Key definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }
    /** The Key definition stages. */
    interface DefinitionStages {
        /** The first stage of the Key definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the Key definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, workspaceName.
             *
             * @param resourceGroupName The name of the resource group. The name is case insensitive.
             * @param workspaceName The name of the workspace.
             * @return the next definition stage.
             */
            WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName);
        }
        /**
         * The stage of the Key definition which contains all the minimum required properties for the resource to be
         * created, but also allows for any other optional properties to be specified.
         */
        interface WithCreate extends DefinitionStages.WithIsActiveCmk, DefinitionStages.WithKeyVaultUrl {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            Key create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            Key create(Context context);
        }
        /** The stage of the Key definition allowing to specify isActiveCmk. */
        interface WithIsActiveCmk {
            /**
             * Specifies the isActiveCmk property: Used to activate the workspace after a customer managed key is
             * provided..
             *
             * @param isActiveCmk Used to activate the workspace after a customer managed key is provided.
             * @return the next definition stage.
             */
            WithCreate withIsActiveCmk(Boolean isActiveCmk);
        }
        /** The stage of the Key definition allowing to specify keyVaultUrl. */
        interface WithKeyVaultUrl {
            /**
             * Specifies the keyVaultUrl property: The Key Vault Url of the workspace key..
             *
             * @param keyVaultUrl The Key Vault Url of the workspace key.
             * @return the next definition stage.
             */
            WithCreate withKeyVaultUrl(String keyVaultUrl);
        }
    }
    /**
     * Begins update for the Key resource.
     *
     * @return the stage of resource update.
     */
    Key.Update update();

    /** The template for Key update. */
    interface Update extends UpdateStages.WithIsActiveCmk {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        Key apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        Key apply(Context context);
    }
    /** The Key update stages. */
    interface UpdateStages {
        /** The stage of the Key update allowing to specify isActiveCmk. */
        interface WithIsActiveCmk {
            /**
             * Specifies the isActiveCmk property: Used to activate the workspace after a customer managed key is
             * provided..
             *
             * @param isActiveCmk Used to activate the workspace after a customer managed key is provided.
             * @return the next definition stage.
             */
            Update withIsActiveCmk(Boolean isActiveCmk);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    Key refresh();

    /**
     * Refreshes the resource to sync with Azure.
     *
     * @param context The context to associate with this operation.
     * @return the refreshed resource.
     */
    Key refresh(Context context);
}
