// 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.management.exception.ManagementError;
import com.azure.core.util.Context;
import com.azure.resourcemanager.automation.fluent.models.SoftwareUpdateConfigurationInner;
import java.time.OffsetDateTime;

/** An immutable client-side representation of SoftwareUpdateConfiguration. */
public interface SoftwareUpdateConfiguration {
    /**
     * 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 updateConfiguration property: update specific properties for the Software update configuration.
     *
     * @return the updateConfiguration value.
     */
    UpdateConfiguration updateConfiguration();

    /**
     * Gets the scheduleInfo property: Schedule information for the Software update configuration.
     *
     * @return the scheduleInfo value.
     */
    SucScheduleProperties scheduleInfo();

    /**
     * Gets the provisioningState property: Provisioning state for the software update configuration, which only appears
     * in the response.
     *
     * @return the provisioningState value.
     */
    String provisioningState();

    /**
     * Gets the error property: Details of provisioning error.
     *
     * @return the error value.
     */
    ManagementError error();

    /**
     * Gets the creationTime property: Creation time of the resource, which only appears in the response.
     *
     * @return the creationTime value.
     */
    OffsetDateTime creationTime();

    /**
     * Gets the createdBy property: CreatedBy property, which only appears in the response.
     *
     * @return the createdBy value.
     */
    String createdBy();

    /**
     * Gets the lastModifiedTime property: Last time resource was modified, which only appears in the response.
     *
     * @return the lastModifiedTime value.
     */
    OffsetDateTime lastModifiedTime();

    /**
     * Gets the lastModifiedBy property: LastModifiedBy property, which only appears in the response.
     *
     * @return the lastModifiedBy value.
     */
    String lastModifiedBy();

    /**
     * Gets the tasks property: Tasks information for the Software update configuration.
     *
     * @return the tasks value.
     */
    SoftwareUpdateConfigurationTasks tasks();

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

    /** The entirety of the SoftwareUpdateConfiguration definition. */
    interface Definition
        extends DefinitionStages.Blank,
            DefinitionStages.WithParentResource,
            DefinitionStages.WithUpdateConfiguration,
            DefinitionStages.WithScheduleInfo,
            DefinitionStages.WithCreate {
    }
    /** The SoftwareUpdateConfiguration definition stages. */
    interface DefinitionStages {
        /** The first stage of the SoftwareUpdateConfiguration definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the SoftwareUpdateConfiguration 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.
             */
            WithUpdateConfiguration withExistingAutomationAccount(
                String resourceGroupName, String automationAccountName);
        }
        /** The stage of the SoftwareUpdateConfiguration definition allowing to specify updateConfiguration. */
        interface WithUpdateConfiguration {
            /**
             * Specifies the updateConfiguration property: update specific properties for the Software update
             * configuration.
             *
             * @param updateConfiguration update specific properties for the Software update configuration.
             * @return the next definition stage.
             */
            WithScheduleInfo withUpdateConfiguration(UpdateConfiguration updateConfiguration);
        }
        /** The stage of the SoftwareUpdateConfiguration definition allowing to specify scheduleInfo. */
        interface WithScheduleInfo {
            /**
             * Specifies the scheduleInfo property: Schedule information for the Software update configuration.
             *
             * @param scheduleInfo Schedule information for the Software update configuration.
             * @return the next definition stage.
             */
            WithCreate withScheduleInfo(SucScheduleProperties scheduleInfo);
        }
        /**
         * The stage of the SoftwareUpdateConfiguration 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.WithError, DefinitionStages.WithTasks, DefinitionStages.WithClientRequestId {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            SoftwareUpdateConfiguration create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            SoftwareUpdateConfiguration create(Context context);
        }
        /** The stage of the SoftwareUpdateConfiguration definition allowing to specify error. */
        interface WithError {
            /**
             * Specifies the error property: Details of provisioning error.
             *
             * @param error Details of provisioning error.
             * @return the next definition stage.
             */
            WithCreate withError(ManagementError error);
        }
        /** The stage of the SoftwareUpdateConfiguration definition allowing to specify tasks. */
        interface WithTasks {
            /**
             * Specifies the tasks property: Tasks information for the Software update configuration..
             *
             * @param tasks Tasks information for the Software update configuration.
             * @return the next definition stage.
             */
            WithCreate withTasks(SoftwareUpdateConfigurationTasks tasks);
        }
        /** The stage of the SoftwareUpdateConfiguration definition allowing to specify clientRequestId. */
        interface WithClientRequestId {
            /**
             * Specifies the clientRequestId property: Identifies this specific client request..
             *
             * @param clientRequestId Identifies this specific client request.
             * @return the next definition stage.
             */
            WithCreate withClientRequestId(String clientRequestId);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    SoftwareUpdateConfiguration refresh();

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