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

package com.azure.resourcemanager.automation.models;

import com.azure.core.util.Context;
import com.azure.resourcemanager.automation.fluent.models.DscNodeConfigurationInner;
import java.time.OffsetDateTime;
import java.util.Map;

/** An immutable client-side representation of DscNodeConfiguration. */
public interface DscNodeConfiguration {
    /**
     * 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 lastModifiedTime property: Gets or sets the last modified time.
     *
     * @return the lastModifiedTime value.
     */
    OffsetDateTime lastModifiedTime();

    /**
     * Gets the creationTime property: Gets or sets creation time.
     *
     * @return the creationTime value.
     */
    OffsetDateTime creationTime();

    /**
     * Gets the configuration property: Gets or sets the configuration of the node.
     *
     * @return the configuration value.
     */
    DscConfigurationAssociationProperty configuration();

    /**
     * Gets the source property: Source of node configuration.
     *
     * @return the source value.
     */
    String source();

    /**
     * Gets the nodeCount property: Number of nodes with this node configuration assigned.
     *
     * @return the nodeCount value.
     */
    Long nodeCount();

    /**
     * Gets the incrementNodeConfigurationBuild property: If a new build version of NodeConfiguration is required.
     *
     * @return the incrementNodeConfigurationBuild value.
     */
    Boolean incrementNodeConfigurationBuild();

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

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

    /** The entirety of the DscNodeConfiguration definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }
    /** The DscNodeConfiguration definition stages. */
    interface DefinitionStages {
        /** The first stage of the DscNodeConfiguration definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the DscNodeConfiguration definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, automationAccountName.
             *
             * @param resourceGroupName Name of an Azure Resource group.
             * @param automationAccountName The name of the automation account.
             * @return the next definition stage.
             */
            WithCreate withExistingAutomationAccount(String resourceGroupName, String automationAccountName);
        }
        /**
         * The stage of the DscNodeConfiguration 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.WithTags,
                DefinitionStages.WithName,
                DefinitionStages.WithSource,
                DefinitionStages.WithConfiguration,
                DefinitionStages.WithIncrementNodeConfigurationBuild {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            DscNodeConfiguration create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            DscNodeConfiguration create(Context context);
        }
        /** The stage of the DscNodeConfiguration definition allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: Gets or sets the tags attached to the resource..
             *
             * @param tags Gets or sets the tags attached to the resource.
             * @return the next definition stage.
             */
            WithCreate withTags(Map<String, String> tags);
        }
        /** The stage of the DscNodeConfiguration definition allowing to specify name. */
        interface WithName {
            /**
             * Specifies the name property: Name of the node configuration..
             *
             * @param name Name of the node configuration.
             * @return the next definition stage.
             */
            WithCreate withName(String name);
        }
        /** The stage of the DscNodeConfiguration definition allowing to specify source. */
        interface WithSource {
            /**
             * Specifies the source property: Gets or sets the source..
             *
             * @param source Gets or sets the source.
             * @return the next definition stage.
             */
            WithCreate withSource(ContentSource source);
        }
        /** The stage of the DscNodeConfiguration definition allowing to specify configuration. */
        interface WithConfiguration {
            /**
             * Specifies the configuration property: Gets or sets the configuration of the node..
             *
             * @param configuration Gets or sets the configuration of the node.
             * @return the next definition stage.
             */
            WithCreate withConfiguration(DscConfigurationAssociationProperty configuration);
        }
        /** The stage of the DscNodeConfiguration definition allowing to specify incrementNodeConfigurationBuild. */
        interface WithIncrementNodeConfigurationBuild {
            /**
             * Specifies the incrementNodeConfigurationBuild property: If a new build version of NodeConfiguration is
             * required..
             *
             * @param incrementNodeConfigurationBuild If a new build version of NodeConfiguration is required.
             * @return the next definition stage.
             */
            WithCreate withIncrementNodeConfigurationBuild(Boolean incrementNodeConfigurationBuild);
        }
    }
    /**
     * Begins update for the DscNodeConfiguration resource.
     *
     * @return the stage of resource update.
     */
    DscNodeConfiguration.Update update();

    /** The template for DscNodeConfiguration update. */
    interface Update
        extends UpdateStages.WithTags,
            UpdateStages.WithName,
            UpdateStages.WithSource,
            UpdateStages.WithConfiguration,
            UpdateStages.WithIncrementNodeConfigurationBuild {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        DscNodeConfiguration apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        DscNodeConfiguration apply(Context context);
    }
    /** The DscNodeConfiguration update stages. */
    interface UpdateStages {
        /** The stage of the DscNodeConfiguration update allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: Gets or sets the tags attached to the resource..
             *
             * @param tags Gets or sets the tags attached to the resource.
             * @return the next definition stage.
             */
            Update withTags(Map<String, String> tags);
        }
        /** The stage of the DscNodeConfiguration update allowing to specify name. */
        interface WithName {
            /**
             * Specifies the name property: Name of the node configuration..
             *
             * @param name Name of the node configuration.
             * @return the next definition stage.
             */
            Update withName(String name);
        }
        /** The stage of the DscNodeConfiguration update allowing to specify source. */
        interface WithSource {
            /**
             * Specifies the source property: Gets or sets the source..
             *
             * @param source Gets or sets the source.
             * @return the next definition stage.
             */
            Update withSource(ContentSource source);
        }
        /** The stage of the DscNodeConfiguration update allowing to specify configuration. */
        interface WithConfiguration {
            /**
             * Specifies the configuration property: Gets or sets the configuration of the node..
             *
             * @param configuration Gets or sets the configuration of the node.
             * @return the next definition stage.
             */
            Update withConfiguration(DscConfigurationAssociationProperty configuration);
        }
        /** The stage of the DscNodeConfiguration update allowing to specify incrementNodeConfigurationBuild. */
        interface WithIncrementNodeConfigurationBuild {
            /**
             * Specifies the incrementNodeConfigurationBuild property: If a new build version of NodeConfiguration is
             * required..
             *
             * @param incrementNodeConfigurationBuild If a new build version of NodeConfiguration is required.
             * @return the next definition stage.
             */
            Update withIncrementNodeConfigurationBuild(Boolean incrementNodeConfigurationBuild);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    DscNodeConfiguration refresh();

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