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

package com.azure.resourcemanager.azurestackhci.models;

import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner;
import java.util.List;

/** An immutable client-side representation of Extension. */
public interface Extension {
    /**
     * 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 systemData property: System data of Extension resource.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the provisioningState property: Provisioning state of the Extension proxy resource.
     *
     * @return the provisioningState value.
     */
    ProvisioningState provisioningState();

    /**
     * Gets the aggregateState property: Aggregate state of Arc Extensions across the nodes in this HCI cluster.
     *
     * @return the aggregateState value.
     */
    ExtensionAggregateState aggregateState();

    /**
     * Gets the perNodeExtensionDetails property: State of Arc Extension in each of the nodes.
     *
     * @return the perNodeExtensionDetails value.
     */
    List<PerNodeExtensionState> perNodeExtensionDetails();

    /**
     * Gets the forceUpdateTag property: How the extension handler should be forced to update even if the extension
     * configuration has not changed.
     *
     * @return the forceUpdateTag value.
     */
    String forceUpdateTag();

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

    /**
     * Gets the typePropertiesType property: Specifies the type of the extension; an example is "CustomScriptExtension".
     *
     * @return the typePropertiesType value.
     */
    String typePropertiesType();

    /**
     * Gets the typeHandlerVersion property: Specifies the version of the script handler.
     *
     * @return the typeHandlerVersion value.
     */
    String typeHandlerVersion();

    /**
     * Gets the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if
     * one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless
     * redeployed, even with this property set to true.
     *
     * @return the autoUpgradeMinorVersion value.
     */
    Boolean autoUpgradeMinorVersion();

    /**
     * Gets the settings property: Json formatted public settings for the extension.
     *
     * @return the settings value.
     */
    Object settings();

    /**
     * Gets the protectedSettings property: Protected settings (may contain secrets).
     *
     * @return the protectedSettings value.
     */
    Object protectedSettings();

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

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

    /** The entirety of the Extension definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }
    /** The Extension definition stages. */
    interface DefinitionStages {
        /** The first stage of the Extension definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the Extension definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, clusterName, arcSettingName.
             *
             * @param resourceGroupName The name of the resource group. The name is case insensitive.
             * @param clusterName The name of the cluster.
             * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
             * @return the next definition stage.
             */
            WithCreate withExistingArcSetting(String resourceGroupName, String clusterName, String arcSettingName);
        }
        /**
         * The stage of the Extension 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.WithForceUpdateTag,
                DefinitionStages.WithPublisher,
                DefinitionStages.WithTypePropertiesType,
                DefinitionStages.WithTypeHandlerVersion,
                DefinitionStages.WithAutoUpgradeMinorVersion,
                DefinitionStages.WithSettings,
                DefinitionStages.WithProtectedSettings {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            Extension create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            Extension create(Context context);
        }
        /** The stage of the Extension definition allowing to specify forceUpdateTag. */
        interface WithForceUpdateTag {
            /**
             * Specifies the forceUpdateTag property: How the extension handler should be forced to update even if the
             * extension configuration has not changed..
             *
             * @param forceUpdateTag How the extension handler should be forced to update even if the extension
             *     configuration has not changed.
             * @return the next definition stage.
             */
            WithCreate withForceUpdateTag(String forceUpdateTag);
        }
        /** The stage of the Extension definition allowing to specify publisher. */
        interface WithPublisher {
            /**
             * Specifies the publisher property: The name of the extension handler publisher..
             *
             * @param publisher The name of the extension handler publisher.
             * @return the next definition stage.
             */
            WithCreate withPublisher(String publisher);
        }
        /** The stage of the Extension definition allowing to specify typePropertiesType. */
        interface WithTypePropertiesType {
            /**
             * Specifies the typePropertiesType property: Specifies the type of the extension; an example is
             * "CustomScriptExtension"..
             *
             * @param typePropertiesType Specifies the type of the extension; an example is "CustomScriptExtension".
             * @return the next definition stage.
             */
            WithCreate withTypePropertiesType(String typePropertiesType);
        }
        /** The stage of the Extension definition allowing to specify typeHandlerVersion. */
        interface WithTypeHandlerVersion {
            /**
             * Specifies the typeHandlerVersion property: Specifies the version of the script handler..
             *
             * @param typeHandlerVersion Specifies the version of the script handler.
             * @return the next definition stage.
             */
            WithCreate withTypeHandlerVersion(String typeHandlerVersion);
        }
        /** The stage of the Extension definition allowing to specify autoUpgradeMinorVersion. */
        interface WithAutoUpgradeMinorVersion {
            /**
             * Specifies the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor
             * version if one is available at deployment time. Once deployed, however, the extension will not upgrade
             * minor versions unless redeployed, even with this property set to true..
             *
             * @param autoUpgradeMinorVersion Indicates whether the extension should use a newer minor version if one is
             *     available at deployment time. Once deployed, however, the extension will not upgrade minor versions
             *     unless redeployed, even with this property set to true.
             * @return the next definition stage.
             */
            WithCreate withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion);
        }
        /** The stage of the Extension definition allowing to specify settings. */
        interface WithSettings {
            /**
             * Specifies the settings property: Json formatted public settings for the extension..
             *
             * @param settings Json formatted public settings for the extension.
             * @return the next definition stage.
             */
            WithCreate withSettings(Object settings);
        }
        /** The stage of the Extension definition allowing to specify protectedSettings. */
        interface WithProtectedSettings {
            /**
             * Specifies the protectedSettings property: Protected settings (may contain secrets)..
             *
             * @param protectedSettings Protected settings (may contain secrets).
             * @return the next definition stage.
             */
            WithCreate withProtectedSettings(Object protectedSettings);
        }
    }
    /**
     * Begins update for the Extension resource.
     *
     * @return the stage of resource update.
     */
    Extension.Update update();

    /** The template for Extension update. */
    interface Update
        extends UpdateStages.WithForceUpdateTag,
            UpdateStages.WithPublisher,
            UpdateStages.WithTypePropertiesType,
            UpdateStages.WithTypeHandlerVersion,
            UpdateStages.WithAutoUpgradeMinorVersion,
            UpdateStages.WithSettings,
            UpdateStages.WithProtectedSettings {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        Extension apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        Extension apply(Context context);
    }
    /** The Extension update stages. */
    interface UpdateStages {
        /** The stage of the Extension update allowing to specify forceUpdateTag. */
        interface WithForceUpdateTag {
            /**
             * Specifies the forceUpdateTag property: How the extension handler should be forced to update even if the
             * extension configuration has not changed..
             *
             * @param forceUpdateTag How the extension handler should be forced to update even if the extension
             *     configuration has not changed.
             * @return the next definition stage.
             */
            Update withForceUpdateTag(String forceUpdateTag);
        }
        /** The stage of the Extension update allowing to specify publisher. */
        interface WithPublisher {
            /**
             * Specifies the publisher property: The name of the extension handler publisher..
             *
             * @param publisher The name of the extension handler publisher.
             * @return the next definition stage.
             */
            Update withPublisher(String publisher);
        }
        /** The stage of the Extension update allowing to specify typePropertiesType. */
        interface WithTypePropertiesType {
            /**
             * Specifies the typePropertiesType property: Specifies the type of the extension; an example is
             * "CustomScriptExtension"..
             *
             * @param typePropertiesType Specifies the type of the extension; an example is "CustomScriptExtension".
             * @return the next definition stage.
             */
            Update withTypePropertiesType(String typePropertiesType);
        }
        /** The stage of the Extension update allowing to specify typeHandlerVersion. */
        interface WithTypeHandlerVersion {
            /**
             * Specifies the typeHandlerVersion property: Specifies the version of the script handler..
             *
             * @param typeHandlerVersion Specifies the version of the script handler.
             * @return the next definition stage.
             */
            Update withTypeHandlerVersion(String typeHandlerVersion);
        }
        /** The stage of the Extension update allowing to specify autoUpgradeMinorVersion. */
        interface WithAutoUpgradeMinorVersion {
            /**
             * Specifies the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor
             * version if one is available at deployment time. Once deployed, however, the extension will not upgrade
             * minor versions unless redeployed, even with this property set to true..
             *
             * @param autoUpgradeMinorVersion Indicates whether the extension should use a newer minor version if one is
             *     available at deployment time. Once deployed, however, the extension will not upgrade minor versions
             *     unless redeployed, even with this property set to true.
             * @return the next definition stage.
             */
            Update withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion);
        }
        /** The stage of the Extension update allowing to specify settings. */
        interface WithSettings {
            /**
             * Specifies the settings property: Json formatted public settings for the extension..
             *
             * @param settings Json formatted public settings for the extension.
             * @return the next definition stage.
             */
            Update withSettings(Object settings);
        }
        /** The stage of the Extension update allowing to specify protectedSettings. */
        interface WithProtectedSettings {
            /**
             * Specifies the protectedSettings property: Protected settings (may contain secrets)..
             *
             * @param protectedSettings Protected settings (may contain secrets).
             * @return the next definition stage.
             */
            Update withProtectedSettings(Object protectedSettings);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    Extension refresh();

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