"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.deserializeIntoTask = exports.deserializeIntoRunSummary = exports.deserializeIntoRunCollectionResponse = exports.deserializeIntoRun = exports.deserializeIntoRuleBasedSubjectSet = exports.deserializeIntoParameter = exports.deserializeIntoOnDemandExecutionOnly = exports.deserializeIntoLifecycleWorkflowsContainer = exports.deserializeIntoLifecycleManagementSettings = exports.deserializeIntoCustomTaskExtensionCollectionResponse = exports.deserializeIntoCustomTaskExtensionCalloutData = exports.deserializeIntoCustomTaskExtensionCallbackData = exports.deserializeIntoCustomTaskExtensionCallbackConfiguration = exports.deserializeIntoCustomTaskExtension = exports.createWorkflowVersionFromDiscriminatorValue = exports.createWorkflowVersionCollectionResponseFromDiscriminatorValue = exports.createWorkflowTemplateFromDiscriminatorValue = exports.createWorkflowTemplateCollectionResponseFromDiscriminatorValue = exports.createWorkflowFromDiscriminatorValue = exports.createWorkflowExecutionTriggerFromDiscriminatorValue = exports.createWorkflowExecutionConditionsFromDiscriminatorValue = exports.createWorkflowCollectionResponseFromDiscriminatorValue = exports.createWorkflowBaseFromDiscriminatorValue = exports.createUserSummaryFromDiscriminatorValue = exports.createUserProcessingResultFromDiscriminatorValue = exports.createUserProcessingResultCollectionResponseFromDiscriminatorValue = exports.createTriggerAndScopeBasedConditionsFromDiscriminatorValue = exports.createTimeBasedAttributeTriggerFromDiscriminatorValue = exports.createTaskReportSummaryFromDiscriminatorValue = exports.createTaskReportFromDiscriminatorValue = exports.createTaskReportCollectionResponseFromDiscriminatorValue = exports.createTaskProcessingResultFromDiscriminatorValue = exports.createTaskProcessingResultCollectionResponseFromDiscriminatorValue = exports.createTaskFromDiscriminatorValue = exports.createTaskDefinitionFromDiscriminatorValue = exports.createTaskDefinitionCollectionResponseFromDiscriminatorValue = exports.createTaskCollectionResponseFromDiscriminatorValue = exports.createRunSummaryFromDiscriminatorValue = exports.createRunFromDiscriminatorValue = exports.createRunCollectionResponseFromDiscriminatorValue = exports.createRuleBasedSubjectSetFromDiscriminatorValue = exports.createParameterFromDiscriminatorValue = exports.createOnDemandExecutionOnlyFromDiscriminatorValue = exports.createLifecycleWorkflowsContainerFromDiscriminatorValue = exports.createLifecycleManagementSettingsFromDiscriminatorValue = exports.createCustomTaskExtensionFromDiscriminatorValue = exports.createCustomTaskExtensionCollectionResponseFromDiscriminatorValue = exports.createCustomTaskExtensionCalloutDataFromDiscriminatorValue = exports.createCustomTaskExtensionCallbackDataFromDiscriminatorValue = exports.createCustomTaskExtensionCallbackConfigurationFromDiscriminatorValue = void 0;
exports.serializeWorkflow = exports.serializeUserSummary = exports.serializeUserProcessingResultCollectionResponse = exports.serializeUserProcessingResult = exports.serializeTriggerAndScopeBasedConditions = exports.serializeTimeBasedAttributeTrigger = exports.serializeTaskReportSummary = exports.serializeTaskReportCollectionResponse = exports.serializeTaskReport = exports.serializeTaskProcessingResultCollectionResponse = exports.serializeTaskProcessingResult = exports.serializeTaskDefinitionCollectionResponse = exports.serializeTaskDefinition = exports.serializeTaskCollectionResponse = exports.serializeTask = exports.serializeRunSummary = exports.serializeRunCollectionResponse = exports.serializeRun = exports.serializeRuleBasedSubjectSet = exports.serializeParameter = exports.serializeOnDemandExecutionOnly = exports.serializeLifecycleWorkflowsContainer = exports.serializeLifecycleManagementSettings = exports.serializeCustomTaskExtensionCollectionResponse = exports.serializeCustomTaskExtensionCalloutData = exports.serializeCustomTaskExtensionCallbackData = exports.serializeCustomTaskExtensionCallbackConfiguration = exports.serializeCustomTaskExtension = exports.deserializeIntoWorkflowVersionCollectionResponse = exports.deserializeIntoWorkflowVersion = exports.deserializeIntoWorkflowTemplateCollectionResponse = exports.deserializeIntoWorkflowTemplate = exports.deserializeIntoWorkflowExecutionTrigger = exports.deserializeIntoWorkflowExecutionConditions = exports.deserializeIntoWorkflowCollectionResponse = exports.deserializeIntoWorkflowBase = exports.deserializeIntoWorkflow = exports.deserializeIntoUserSummary = exports.deserializeIntoUserProcessingResultCollectionResponse = exports.deserializeIntoUserProcessingResult = exports.deserializeIntoTriggerAndScopeBasedConditions = exports.deserializeIntoTimeBasedAttributeTrigger = exports.deserializeIntoTaskReportSummary = exports.deserializeIntoTaskReportCollectionResponse = exports.deserializeIntoTaskReport = exports.deserializeIntoTaskProcessingResultCollectionResponse = exports.deserializeIntoTaskProcessingResult = exports.deserializeIntoTaskDefinitionCollectionResponse = exports.deserializeIntoTaskDefinition = exports.deserializeIntoTaskCollectionResponse = void 0;
exports.WorkflowTriggerTimeBasedAttributeObject = exports.WorkflowExecutionTypeObject = exports.ValueTypeObject = exports.LifecycleWorkflowProcessingStatusObject = exports.LifecycleWorkflowCategoryObject = exports.LifecycleTaskCategoryObject = exports.CustomTaskExtensionOperationStatusObject = exports.serializeWorkflowVersionCollectionResponse = exports.serializeWorkflowVersion = exports.serializeWorkflowTemplateCollectionResponse = exports.serializeWorkflowTemplate = exports.serializeWorkflowExecutionTrigger = exports.serializeWorkflowExecutionConditions = exports.serializeWorkflowCollectionResponse = exports.serializeWorkflowBase = void 0;
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
const __1 = require("../");
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a customTaskExtensionCallbackConfiguration
 */
function createCustomTaskExtensionCallbackConfigurationFromDiscriminatorValue(parseNode) {
    return deserializeIntoCustomTaskExtensionCallbackConfiguration;
}
exports.createCustomTaskExtensionCallbackConfigurationFromDiscriminatorValue = createCustomTaskExtensionCallbackConfigurationFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a customTaskExtensionCallbackData
 */
function createCustomTaskExtensionCallbackDataFromDiscriminatorValue(parseNode) {
    return deserializeIntoCustomTaskExtensionCallbackData;
}
exports.createCustomTaskExtensionCallbackDataFromDiscriminatorValue = createCustomTaskExtensionCallbackDataFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a customTaskExtensionCalloutData
 */
function createCustomTaskExtensionCalloutDataFromDiscriminatorValue(parseNode) {
    return deserializeIntoCustomTaskExtensionCalloutData;
}
exports.createCustomTaskExtensionCalloutDataFromDiscriminatorValue = createCustomTaskExtensionCalloutDataFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a customTaskExtensionCollectionResponse
 */
function createCustomTaskExtensionCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoCustomTaskExtensionCollectionResponse;
}
exports.createCustomTaskExtensionCollectionResponseFromDiscriminatorValue = createCustomTaskExtensionCollectionResponseFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a customTaskExtension
 */
function createCustomTaskExtensionFromDiscriminatorValue(parseNode) {
    return deserializeIntoCustomTaskExtension;
}
exports.createCustomTaskExtensionFromDiscriminatorValue = createCustomTaskExtensionFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a lifecycleManagementSettings
 */
function createLifecycleManagementSettingsFromDiscriminatorValue(parseNode) {
    return deserializeIntoLifecycleManagementSettings;
}
exports.createLifecycleManagementSettingsFromDiscriminatorValue = createLifecycleManagementSettingsFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a lifecycleWorkflowsContainer
 */
function createLifecycleWorkflowsContainerFromDiscriminatorValue(parseNode) {
    return deserializeIntoLifecycleWorkflowsContainer;
}
exports.createLifecycleWorkflowsContainerFromDiscriminatorValue = createLifecycleWorkflowsContainerFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a onDemandExecutionOnly
 */
function createOnDemandExecutionOnlyFromDiscriminatorValue(parseNode) {
    return deserializeIntoOnDemandExecutionOnly;
}
exports.createOnDemandExecutionOnlyFromDiscriminatorValue = createOnDemandExecutionOnlyFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a parameter
 */
function createParameterFromDiscriminatorValue(parseNode) {
    return deserializeIntoParameter;
}
exports.createParameterFromDiscriminatorValue = createParameterFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a ruleBasedSubjectSet
 */
function createRuleBasedSubjectSetFromDiscriminatorValue(parseNode) {
    return deserializeIntoRuleBasedSubjectSet;
}
exports.createRuleBasedSubjectSetFromDiscriminatorValue = createRuleBasedSubjectSetFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a runCollectionResponse
 */
function createRunCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoRunCollectionResponse;
}
exports.createRunCollectionResponseFromDiscriminatorValue = createRunCollectionResponseFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a run
 */
function createRunFromDiscriminatorValue(parseNode) {
    return deserializeIntoRun;
}
exports.createRunFromDiscriminatorValue = createRunFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a runSummary
 */
function createRunSummaryFromDiscriminatorValue(parseNode) {
    return deserializeIntoRunSummary;
}
exports.createRunSummaryFromDiscriminatorValue = createRunSummaryFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a taskCollectionResponse
 */
function createTaskCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoTaskCollectionResponse;
}
exports.createTaskCollectionResponseFromDiscriminatorValue = createTaskCollectionResponseFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a taskDefinitionCollectionResponse
 */
function createTaskDefinitionCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoTaskDefinitionCollectionResponse;
}
exports.createTaskDefinitionCollectionResponseFromDiscriminatorValue = createTaskDefinitionCollectionResponseFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a taskDefinition
 */
function createTaskDefinitionFromDiscriminatorValue(parseNode) {
    return deserializeIntoTaskDefinition;
}
exports.createTaskDefinitionFromDiscriminatorValue = createTaskDefinitionFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a task
 */
function createTaskFromDiscriminatorValue(parseNode) {
    return deserializeIntoTask;
}
exports.createTaskFromDiscriminatorValue = createTaskFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a taskProcessingResultCollectionResponse
 */
function createTaskProcessingResultCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoTaskProcessingResultCollectionResponse;
}
exports.createTaskProcessingResultCollectionResponseFromDiscriminatorValue = createTaskProcessingResultCollectionResponseFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a taskProcessingResult
 */
function createTaskProcessingResultFromDiscriminatorValue(parseNode) {
    return deserializeIntoTaskProcessingResult;
}
exports.createTaskProcessingResultFromDiscriminatorValue = createTaskProcessingResultFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a taskReportCollectionResponse
 */
function createTaskReportCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoTaskReportCollectionResponse;
}
exports.createTaskReportCollectionResponseFromDiscriminatorValue = createTaskReportCollectionResponseFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a taskReport
 */
function createTaskReportFromDiscriminatorValue(parseNode) {
    return deserializeIntoTaskReport;
}
exports.createTaskReportFromDiscriminatorValue = createTaskReportFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a taskReportSummary
 */
function createTaskReportSummaryFromDiscriminatorValue(parseNode) {
    return deserializeIntoTaskReportSummary;
}
exports.createTaskReportSummaryFromDiscriminatorValue = createTaskReportSummaryFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a timeBasedAttributeTrigger
 */
function createTimeBasedAttributeTriggerFromDiscriminatorValue(parseNode) {
    return deserializeIntoTimeBasedAttributeTrigger;
}
exports.createTimeBasedAttributeTriggerFromDiscriminatorValue = createTimeBasedAttributeTriggerFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a triggerAndScopeBasedConditions
 */
function createTriggerAndScopeBasedConditionsFromDiscriminatorValue(parseNode) {
    return deserializeIntoTriggerAndScopeBasedConditions;
}
exports.createTriggerAndScopeBasedConditionsFromDiscriminatorValue = createTriggerAndScopeBasedConditionsFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a userProcessingResultCollectionResponse
 */
function createUserProcessingResultCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoUserProcessingResultCollectionResponse;
}
exports.createUserProcessingResultCollectionResponseFromDiscriminatorValue = createUserProcessingResultCollectionResponseFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a userProcessingResult
 */
function createUserProcessingResultFromDiscriminatorValue(parseNode) {
    return deserializeIntoUserProcessingResult;
}
exports.createUserProcessingResultFromDiscriminatorValue = createUserProcessingResultFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a userSummary
 */
function createUserSummaryFromDiscriminatorValue(parseNode) {
    return deserializeIntoUserSummary;
}
exports.createUserSummaryFromDiscriminatorValue = createUserSummaryFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a workflowBase
 */
function createWorkflowBaseFromDiscriminatorValue(parseNode) {
    if (!parseNode)
        throw new Error("parseNode cannot be undefined");
    const mappingValueNode = parseNode.getChildNode("@odata.type");
    if (mappingValueNode) {
        const mappingValue = mappingValueNode.getStringValue();
        if (mappingValue) {
            switch (mappingValue) {
                case "#microsoft.graph.identityGovernance.workflow":
                    return deserializeIntoWorkflow;
                case "#microsoft.graph.identityGovernance.workflowVersion":
                    return deserializeIntoWorkflowVersion;
            }
        }
    }
    return deserializeIntoWorkflowBase;
}
exports.createWorkflowBaseFromDiscriminatorValue = createWorkflowBaseFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a workflowCollectionResponse
 */
function createWorkflowCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoWorkflowCollectionResponse;
}
exports.createWorkflowCollectionResponseFromDiscriminatorValue = createWorkflowCollectionResponseFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a workflowExecutionConditions
 */
function createWorkflowExecutionConditionsFromDiscriminatorValue(parseNode) {
    if (!parseNode)
        throw new Error("parseNode cannot be undefined");
    const mappingValueNode = parseNode.getChildNode("@odata.type");
    if (mappingValueNode) {
        const mappingValue = mappingValueNode.getStringValue();
        if (mappingValue) {
            switch (mappingValue) {
                case "#microsoft.graph.identityGovernance.onDemandExecutionOnly":
                    return deserializeIntoOnDemandExecutionOnly;
                case "#microsoft.graph.identityGovernance.triggerAndScopeBasedConditions":
                    return deserializeIntoTriggerAndScopeBasedConditions;
            }
        }
    }
    return deserializeIntoWorkflowExecutionConditions;
}
exports.createWorkflowExecutionConditionsFromDiscriminatorValue = createWorkflowExecutionConditionsFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a workflowExecutionTrigger
 */
function createWorkflowExecutionTriggerFromDiscriminatorValue(parseNode) {
    if (!parseNode)
        throw new Error("parseNode cannot be undefined");
    const mappingValueNode = parseNode.getChildNode("@odata.type");
    if (mappingValueNode) {
        const mappingValue = mappingValueNode.getStringValue();
        if (mappingValue) {
            switch (mappingValue) {
                case "#microsoft.graph.identityGovernance.timeBasedAttributeTrigger":
                    return deserializeIntoTimeBasedAttributeTrigger;
            }
        }
    }
    return deserializeIntoWorkflowExecutionTrigger;
}
exports.createWorkflowExecutionTriggerFromDiscriminatorValue = createWorkflowExecutionTriggerFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a workflow
 */
function createWorkflowFromDiscriminatorValue(parseNode) {
    return deserializeIntoWorkflow;
}
exports.createWorkflowFromDiscriminatorValue = createWorkflowFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a workflowTemplateCollectionResponse
 */
function createWorkflowTemplateCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoWorkflowTemplateCollectionResponse;
}
exports.createWorkflowTemplateCollectionResponseFromDiscriminatorValue = createWorkflowTemplateCollectionResponseFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a workflowTemplate
 */
function createWorkflowTemplateFromDiscriminatorValue(parseNode) {
    return deserializeIntoWorkflowTemplate;
}
exports.createWorkflowTemplateFromDiscriminatorValue = createWorkflowTemplateFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a workflowVersionCollectionResponse
 */
function createWorkflowVersionCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoWorkflowVersionCollectionResponse;
}
exports.createWorkflowVersionCollectionResponseFromDiscriminatorValue = createWorkflowVersionCollectionResponseFromDiscriminatorValue;
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a workflowVersion
 */
function createWorkflowVersionFromDiscriminatorValue(parseNode) {
    return deserializeIntoWorkflowVersion;
}
exports.createWorkflowVersionFromDiscriminatorValue = createWorkflowVersionFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoCustomTaskExtension(customTaskExtension = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoCustomCalloutExtension)(customTaskExtension)), { "callbackConfiguration": n => { customTaskExtension.callbackConfiguration = n.getObjectValue(__1.createCustomExtensionCallbackConfigurationFromDiscriminatorValue); }, "createdBy": n => { customTaskExtension.createdBy = n.getObjectValue(__1.createUserFromDiscriminatorValue); }, "createdDateTime": n => { customTaskExtension.createdDateTime = n.getDateValue(); }, "lastModifiedBy": n => { customTaskExtension.lastModifiedBy = n.getObjectValue(__1.createUserFromDiscriminatorValue); }, "lastModifiedDateTime": n => { customTaskExtension.lastModifiedDateTime = n.getDateValue(); } });
}
exports.deserializeIntoCustomTaskExtension = deserializeIntoCustomTaskExtension;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoCustomTaskExtensionCallbackConfiguration(customTaskExtensionCallbackConfiguration = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoCustomExtensionCallbackConfiguration)(customTaskExtensionCallbackConfiguration)), { "authorizedApps": n => { customTaskExtensionCallbackConfiguration.authorizedApps = n.getCollectionOfObjectValues(__1.createApplicationFromDiscriminatorValue); } });
}
exports.deserializeIntoCustomTaskExtensionCallbackConfiguration = deserializeIntoCustomTaskExtensionCallbackConfiguration;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoCustomTaskExtensionCallbackData(customTaskExtensionCallbackData = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoCustomExtensionData)(customTaskExtensionCallbackData)), { "operationStatus": n => { customTaskExtensionCallbackData.operationStatus = n.getEnumValue(exports.CustomTaskExtensionOperationStatusObject); } });
}
exports.deserializeIntoCustomTaskExtensionCallbackData = deserializeIntoCustomTaskExtensionCallbackData;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoCustomTaskExtensionCalloutData(customTaskExtensionCalloutData = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoCustomExtensionData)(customTaskExtensionCalloutData)), { "subject": n => { customTaskExtensionCalloutData.subject = n.getObjectValue(__1.createUserFromDiscriminatorValue); }, "task": n => { customTaskExtensionCalloutData.task = n.getObjectValue(createTaskFromDiscriminatorValue); }, "taskProcessingresult": n => { customTaskExtensionCalloutData.taskProcessingresult = n.getObjectValue(createTaskProcessingResultFromDiscriminatorValue); }, "workflow": n => { customTaskExtensionCalloutData.workflow = n.getObjectValue(createWorkflowFromDiscriminatorValue); } });
}
exports.deserializeIntoCustomTaskExtensionCalloutData = deserializeIntoCustomTaskExtensionCalloutData;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoCustomTaskExtensionCollectionResponse(customTaskExtensionCollectionResponse = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoBaseCollectionPaginationCountResponse)(customTaskExtensionCollectionResponse)), { "value": n => { customTaskExtensionCollectionResponse.value = n.getCollectionOfObjectValues(createCustomTaskExtensionFromDiscriminatorValue); } });
}
exports.deserializeIntoCustomTaskExtensionCollectionResponse = deserializeIntoCustomTaskExtensionCollectionResponse;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoLifecycleManagementSettings(lifecycleManagementSettings = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoEntity)(lifecycleManagementSettings)), { "emailSettings": n => { lifecycleManagementSettings.emailSettings = n.getObjectValue(__1.createEmailSettingsFromDiscriminatorValue); }, "workflowScheduleIntervalInHours": n => { lifecycleManagementSettings.workflowScheduleIntervalInHours = n.getNumberValue(); } });
}
exports.deserializeIntoLifecycleManagementSettings = deserializeIntoLifecycleManagementSettings;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoLifecycleWorkflowsContainer(lifecycleWorkflowsContainer = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoEntity)(lifecycleWorkflowsContainer)), { "customTaskExtensions": n => { lifecycleWorkflowsContainer.customTaskExtensions = n.getCollectionOfObjectValues(createCustomTaskExtensionFromDiscriminatorValue); }, "deletedItems": n => { lifecycleWorkflowsContainer.deletedItems = n.getObjectValue(__1.createDeletedItemContainerFromDiscriminatorValue); }, "settings": n => { lifecycleWorkflowsContainer.settings = n.getObjectValue(createLifecycleManagementSettingsFromDiscriminatorValue); }, "taskDefinitions": n => { lifecycleWorkflowsContainer.taskDefinitions = n.getCollectionOfObjectValues(createTaskDefinitionFromDiscriminatorValue); }, "workflows": n => { lifecycleWorkflowsContainer.workflows = n.getCollectionOfObjectValues(createWorkflowFromDiscriminatorValue); }, "workflowTemplates": n => { lifecycleWorkflowsContainer.workflowTemplates = n.getCollectionOfObjectValues(createWorkflowTemplateFromDiscriminatorValue); } });
}
exports.deserializeIntoLifecycleWorkflowsContainer = deserializeIntoLifecycleWorkflowsContainer;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoOnDemandExecutionOnly(onDemandExecutionOnly = {}) {
    return Object.assign({}, deserializeIntoWorkflowExecutionConditions(onDemandExecutionOnly));
}
exports.deserializeIntoOnDemandExecutionOnly = deserializeIntoOnDemandExecutionOnly;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoParameter(parameter = {}) {
    return {
        "backingStoreEnabled": n => { parameter.backingStoreEnabled = true; },
        "name": n => { parameter.name = n.getStringValue(); },
        "@odata.type": n => { parameter.odataType = n.getStringValue(); },
        "values": n => { parameter.values = n.getCollectionOfPrimitiveValues(); },
        "valueType": n => { parameter.valueType = n.getEnumValue(exports.ValueTypeObject); },
    };
}
exports.deserializeIntoParameter = deserializeIntoParameter;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoRuleBasedSubjectSet(ruleBasedSubjectSet = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoSubjectSet)(ruleBasedSubjectSet)), { "rule": n => { ruleBasedSubjectSet.rule = n.getStringValue(); } });
}
exports.deserializeIntoRuleBasedSubjectSet = deserializeIntoRuleBasedSubjectSet;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoRun(run = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoEntity)(run)), { "completedDateTime": n => { run.completedDateTime = n.getDateValue(); }, "failedTasksCount": n => { run.failedTasksCount = n.getNumberValue(); }, "failedUsersCount": n => { run.failedUsersCount = n.getNumberValue(); }, "lastUpdatedDateTime": n => { run.lastUpdatedDateTime = n.getDateValue(); }, "processingStatus": n => { run.processingStatus = n.getEnumValue(exports.LifecycleWorkflowProcessingStatusObject); }, "scheduledDateTime": n => { run.scheduledDateTime = n.getDateValue(); }, "startedDateTime": n => { run.startedDateTime = n.getDateValue(); }, "successfulUsersCount": n => { run.successfulUsersCount = n.getNumberValue(); }, "taskProcessingResults": n => { run.taskProcessingResults = n.getCollectionOfObjectValues(createTaskProcessingResultFromDiscriminatorValue); }, "totalTasksCount": n => { run.totalTasksCount = n.getNumberValue(); }, "totalUnprocessedTasksCount": n => { run.totalUnprocessedTasksCount = n.getNumberValue(); }, "totalUsersCount": n => { run.totalUsersCount = n.getNumberValue(); }, "userProcessingResults": n => { run.userProcessingResults = n.getCollectionOfObjectValues(createUserProcessingResultFromDiscriminatorValue); }, "workflowExecutionType": n => { run.workflowExecutionType = n.getEnumValue(exports.WorkflowExecutionTypeObject); } });
}
exports.deserializeIntoRun = deserializeIntoRun;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoRunCollectionResponse(runCollectionResponse = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoBaseCollectionPaginationCountResponse)(runCollectionResponse)), { "value": n => { runCollectionResponse.value = n.getCollectionOfObjectValues(createRunFromDiscriminatorValue); } });
}
exports.deserializeIntoRunCollectionResponse = deserializeIntoRunCollectionResponse;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoRunSummary(runSummary = {}) {
    return {
        "backingStoreEnabled": n => { runSummary.backingStoreEnabled = true; },
        "failedRuns": n => { runSummary.failedRuns = n.getNumberValue(); },
        "failedTasks": n => { runSummary.failedTasks = n.getNumberValue(); },
        "@odata.type": n => { runSummary.odataType = n.getStringValue(); },
        "successfulRuns": n => { runSummary.successfulRuns = n.getNumberValue(); },
        "totalRuns": n => { runSummary.totalRuns = n.getNumberValue(); },
        "totalTasks": n => { runSummary.totalTasks = n.getNumberValue(); },
        "totalUsers": n => { runSummary.totalUsers = n.getNumberValue(); },
    };
}
exports.deserializeIntoRunSummary = deserializeIntoRunSummary;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoTask(task = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoEntity)(task)), { "arguments": n => { task.arguments = n.getCollectionOfObjectValues(__1.createKeyValuePairFromDiscriminatorValue); }, "category": n => { task.category = n.getCollectionOfEnumValues(exports.LifecycleTaskCategoryObject); }, "continueOnError": n => { task.continueOnError = n.getBooleanValue(); }, "description": n => { task.description = n.getStringValue(); }, "displayName": n => { task.displayName = n.getStringValue(); }, "executionSequence": n => { task.executionSequence = n.getNumberValue(); }, "isEnabled": n => { task.isEnabled = n.getBooleanValue(); }, "taskDefinitionId": n => { task.taskDefinitionId = n.getStringValue(); }, "taskProcessingResults": n => { task.taskProcessingResults = n.getCollectionOfObjectValues(createTaskProcessingResultFromDiscriminatorValue); } });
}
exports.deserializeIntoTask = deserializeIntoTask;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoTaskCollectionResponse(taskCollectionResponse = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoBaseCollectionPaginationCountResponse)(taskCollectionResponse)), { "value": n => { taskCollectionResponse.value = n.getCollectionOfObjectValues(createTaskFromDiscriminatorValue); } });
}
exports.deserializeIntoTaskCollectionResponse = deserializeIntoTaskCollectionResponse;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoTaskDefinition(taskDefinition = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoEntity)(taskDefinition)), { "category": n => { taskDefinition.category = n.getCollectionOfEnumValues(exports.LifecycleTaskCategoryObject); }, "continueOnError": n => { taskDefinition.continueOnError = n.getBooleanValue(); }, "description": n => { taskDefinition.description = n.getStringValue(); }, "displayName": n => { taskDefinition.displayName = n.getStringValue(); }, "parameters": n => { taskDefinition.parameters = n.getCollectionOfObjectValues(createParameterFromDiscriminatorValue); }, "version": n => { taskDefinition.version = n.getNumberValue(); } });
}
exports.deserializeIntoTaskDefinition = deserializeIntoTaskDefinition;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoTaskDefinitionCollectionResponse(taskDefinitionCollectionResponse = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoBaseCollectionPaginationCountResponse)(taskDefinitionCollectionResponse)), { "value": n => { taskDefinitionCollectionResponse.value = n.getCollectionOfObjectValues(createTaskDefinitionFromDiscriminatorValue); } });
}
exports.deserializeIntoTaskDefinitionCollectionResponse = deserializeIntoTaskDefinitionCollectionResponse;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoTaskProcessingResult(taskProcessingResult = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoEntity)(taskProcessingResult)), { "completedDateTime": n => { taskProcessingResult.completedDateTime = n.getDateValue(); }, "createdDateTime": n => { taskProcessingResult.createdDateTime = n.getDateValue(); }, "failureReason": n => { taskProcessingResult.failureReason = n.getStringValue(); }, "processingStatus": n => { taskProcessingResult.processingStatus = n.getEnumValue(exports.LifecycleWorkflowProcessingStatusObject); }, "startedDateTime": n => { taskProcessingResult.startedDateTime = n.getDateValue(); }, "subject": n => { taskProcessingResult.subject = n.getObjectValue(__1.createUserFromDiscriminatorValue); }, "task": n => { taskProcessingResult.task = n.getObjectValue(createTaskFromDiscriminatorValue); } });
}
exports.deserializeIntoTaskProcessingResult = deserializeIntoTaskProcessingResult;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoTaskProcessingResultCollectionResponse(taskProcessingResultCollectionResponse = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoBaseCollectionPaginationCountResponse)(taskProcessingResultCollectionResponse)), { "value": n => { taskProcessingResultCollectionResponse.value = n.getCollectionOfObjectValues(createTaskProcessingResultFromDiscriminatorValue); } });
}
exports.deserializeIntoTaskProcessingResultCollectionResponse = deserializeIntoTaskProcessingResultCollectionResponse;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoTaskReport(taskReport = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoEntity)(taskReport)), { "completedDateTime": n => { taskReport.completedDateTime = n.getDateValue(); }, "failedUsersCount": n => { taskReport.failedUsersCount = n.getNumberValue(); }, "lastUpdatedDateTime": n => { taskReport.lastUpdatedDateTime = n.getDateValue(); }, "processingStatus": n => { taskReport.processingStatus = n.getEnumValue(exports.LifecycleWorkflowProcessingStatusObject); }, "runId": n => { taskReport.runId = n.getStringValue(); }, "startedDateTime": n => { taskReport.startedDateTime = n.getDateValue(); }, "successfulUsersCount": n => { taskReport.successfulUsersCount = n.getNumberValue(); }, "task": n => { taskReport.task = n.getObjectValue(createTaskFromDiscriminatorValue); }, "taskDefinition": n => { taskReport.taskDefinition = n.getObjectValue(createTaskDefinitionFromDiscriminatorValue); }, "taskProcessingResults": n => { taskReport.taskProcessingResults = n.getCollectionOfObjectValues(createTaskProcessingResultFromDiscriminatorValue); }, "totalUsersCount": n => { taskReport.totalUsersCount = n.getNumberValue(); }, "unprocessedUsersCount": n => { taskReport.unprocessedUsersCount = n.getNumberValue(); } });
}
exports.deserializeIntoTaskReport = deserializeIntoTaskReport;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoTaskReportCollectionResponse(taskReportCollectionResponse = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoBaseCollectionPaginationCountResponse)(taskReportCollectionResponse)), { "value": n => { taskReportCollectionResponse.value = n.getCollectionOfObjectValues(createTaskReportFromDiscriminatorValue); } });
}
exports.deserializeIntoTaskReportCollectionResponse = deserializeIntoTaskReportCollectionResponse;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoTaskReportSummary(taskReportSummary = {}) {
    return {
        "backingStoreEnabled": n => { taskReportSummary.backingStoreEnabled = true; },
        "failedTasks": n => { taskReportSummary.failedTasks = n.getNumberValue(); },
        "@odata.type": n => { taskReportSummary.odataType = n.getStringValue(); },
        "successfulTasks": n => { taskReportSummary.successfulTasks = n.getNumberValue(); },
        "totalTasks": n => { taskReportSummary.totalTasks = n.getNumberValue(); },
        "unprocessedTasks": n => { taskReportSummary.unprocessedTasks = n.getNumberValue(); },
    };
}
exports.deserializeIntoTaskReportSummary = deserializeIntoTaskReportSummary;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoTimeBasedAttributeTrigger(timeBasedAttributeTrigger = {}) {
    return Object.assign(Object.assign({}, deserializeIntoWorkflowExecutionTrigger(timeBasedAttributeTrigger)), { "offsetInDays": n => { timeBasedAttributeTrigger.offsetInDays = n.getNumberValue(); }, "timeBasedAttribute": n => { timeBasedAttributeTrigger.timeBasedAttribute = n.getEnumValue(exports.WorkflowTriggerTimeBasedAttributeObject); } });
}
exports.deserializeIntoTimeBasedAttributeTrigger = deserializeIntoTimeBasedAttributeTrigger;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoTriggerAndScopeBasedConditions(triggerAndScopeBasedConditions = {}) {
    return Object.assign(Object.assign({}, deserializeIntoWorkflowExecutionConditions(triggerAndScopeBasedConditions)), { "scope": n => { triggerAndScopeBasedConditions.scope = n.getObjectValue(__1.createSubjectSetFromDiscriminatorValue); }, "trigger": n => { triggerAndScopeBasedConditions.trigger = n.getObjectValue(createWorkflowExecutionTriggerFromDiscriminatorValue); } });
}
exports.deserializeIntoTriggerAndScopeBasedConditions = deserializeIntoTriggerAndScopeBasedConditions;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoUserProcessingResult(userProcessingResult = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoEntity)(userProcessingResult)), { "completedDateTime": n => { userProcessingResult.completedDateTime = n.getDateValue(); }, "failedTasksCount": n => { userProcessingResult.failedTasksCount = n.getNumberValue(); }, "processingStatus": n => { userProcessingResult.processingStatus = n.getEnumValue(exports.LifecycleWorkflowProcessingStatusObject); }, "scheduledDateTime": n => { userProcessingResult.scheduledDateTime = n.getDateValue(); }, "startedDateTime": n => { userProcessingResult.startedDateTime = n.getDateValue(); }, "subject": n => { userProcessingResult.subject = n.getObjectValue(__1.createUserFromDiscriminatorValue); }, "taskProcessingResults": n => { userProcessingResult.taskProcessingResults = n.getCollectionOfObjectValues(createTaskProcessingResultFromDiscriminatorValue); }, "totalTasksCount": n => { userProcessingResult.totalTasksCount = n.getNumberValue(); }, "totalUnprocessedTasksCount": n => { userProcessingResult.totalUnprocessedTasksCount = n.getNumberValue(); }, "workflowExecutionType": n => { userProcessingResult.workflowExecutionType = n.getEnumValue(exports.WorkflowExecutionTypeObject); }, "workflowVersion": n => { userProcessingResult.workflowVersion = n.getNumberValue(); } });
}
exports.deserializeIntoUserProcessingResult = deserializeIntoUserProcessingResult;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoUserProcessingResultCollectionResponse(userProcessingResultCollectionResponse = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoBaseCollectionPaginationCountResponse)(userProcessingResultCollectionResponse)), { "value": n => { userProcessingResultCollectionResponse.value = n.getCollectionOfObjectValues(createUserProcessingResultFromDiscriminatorValue); } });
}
exports.deserializeIntoUserProcessingResultCollectionResponse = deserializeIntoUserProcessingResultCollectionResponse;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoUserSummary(userSummary = {}) {
    return {
        "backingStoreEnabled": n => { userSummary.backingStoreEnabled = true; },
        "failedTasks": n => { userSummary.failedTasks = n.getNumberValue(); },
        "failedUsers": n => { userSummary.failedUsers = n.getNumberValue(); },
        "@odata.type": n => { userSummary.odataType = n.getStringValue(); },
        "successfulUsers": n => { userSummary.successfulUsers = n.getNumberValue(); },
        "totalTasks": n => { userSummary.totalTasks = n.getNumberValue(); },
        "totalUsers": n => { userSummary.totalUsers = n.getNumberValue(); },
    };
}
exports.deserializeIntoUserSummary = deserializeIntoUserSummary;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoWorkflow(workflow = {}) {
    return Object.assign(Object.assign({}, deserializeIntoWorkflowBase(workflow)), { "deletedDateTime": n => { workflow.deletedDateTime = n.getDateValue(); }, "executionScope": n => { workflow.executionScope = n.getCollectionOfObjectValues(createUserProcessingResultFromDiscriminatorValue); }, "id": n => { workflow.id = n.getStringValue(); }, "nextScheduleRunDateTime": n => { workflow.nextScheduleRunDateTime = n.getDateValue(); }, "runs": n => { workflow.runs = n.getCollectionOfObjectValues(createRunFromDiscriminatorValue); }, "taskReports": n => { workflow.taskReports = n.getCollectionOfObjectValues(createTaskReportFromDiscriminatorValue); }, "userProcessingResults": n => { workflow.userProcessingResults = n.getCollectionOfObjectValues(createUserProcessingResultFromDiscriminatorValue); }, "version": n => { workflow.version = n.getNumberValue(); }, "versions": n => { workflow.versions = n.getCollectionOfObjectValues(createWorkflowVersionFromDiscriminatorValue); } });
}
exports.deserializeIntoWorkflow = deserializeIntoWorkflow;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoWorkflowBase(workflowBase = {}) {
    return {
        "backingStoreEnabled": n => { workflowBase.backingStoreEnabled = true; },
        "category": n => { workflowBase.category = n.getEnumValue(exports.LifecycleWorkflowCategoryObject); },
        "createdBy": n => { workflowBase.createdBy = n.getObjectValue(__1.createUserFromDiscriminatorValue); },
        "createdDateTime": n => { workflowBase.createdDateTime = n.getDateValue(); },
        "description": n => { workflowBase.description = n.getStringValue(); },
        "displayName": n => { workflowBase.displayName = n.getStringValue(); },
        "executionConditions": n => { workflowBase.executionConditions = n.getObjectValue(createWorkflowExecutionConditionsFromDiscriminatorValue); },
        "isEnabled": n => { workflowBase.isEnabled = n.getBooleanValue(); },
        "isSchedulingEnabled": n => { workflowBase.isSchedulingEnabled = n.getBooleanValue(); },
        "lastModifiedBy": n => { workflowBase.lastModifiedBy = n.getObjectValue(__1.createUserFromDiscriminatorValue); },
        "lastModifiedDateTime": n => { workflowBase.lastModifiedDateTime = n.getDateValue(); },
        "@odata.type": n => { workflowBase.odataType = n.getStringValue(); },
        "tasks": n => { workflowBase.tasks = n.getCollectionOfObjectValues(createTaskFromDiscriminatorValue); },
    };
}
exports.deserializeIntoWorkflowBase = deserializeIntoWorkflowBase;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoWorkflowCollectionResponse(workflowCollectionResponse = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoBaseCollectionPaginationCountResponse)(workflowCollectionResponse)), { "value": n => { workflowCollectionResponse.value = n.getCollectionOfObjectValues(createWorkflowFromDiscriminatorValue); } });
}
exports.deserializeIntoWorkflowCollectionResponse = deserializeIntoWorkflowCollectionResponse;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoWorkflowExecutionConditions(workflowExecutionConditions = {}) {
    return {
        "backingStoreEnabled": n => { workflowExecutionConditions.backingStoreEnabled = true; },
        "@odata.type": n => { workflowExecutionConditions.odataType = n.getStringValue(); },
    };
}
exports.deserializeIntoWorkflowExecutionConditions = deserializeIntoWorkflowExecutionConditions;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoWorkflowExecutionTrigger(workflowExecutionTrigger = {}) {
    return {
        "backingStoreEnabled": n => { workflowExecutionTrigger.backingStoreEnabled = true; },
        "@odata.type": n => { workflowExecutionTrigger.odataType = n.getStringValue(); },
    };
}
exports.deserializeIntoWorkflowExecutionTrigger = deserializeIntoWorkflowExecutionTrigger;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoWorkflowTemplate(workflowTemplate = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoEntity)(workflowTemplate)), { "category": n => { workflowTemplate.category = n.getEnumValue(exports.LifecycleWorkflowCategoryObject); }, "description": n => { workflowTemplate.description = n.getStringValue(); }, "displayName": n => { workflowTemplate.displayName = n.getStringValue(); }, "executionConditions": n => { workflowTemplate.executionConditions = n.getObjectValue(createWorkflowExecutionConditionsFromDiscriminatorValue); }, "tasks": n => { workflowTemplate.tasks = n.getCollectionOfObjectValues(createTaskFromDiscriminatorValue); } });
}
exports.deserializeIntoWorkflowTemplate = deserializeIntoWorkflowTemplate;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoWorkflowTemplateCollectionResponse(workflowTemplateCollectionResponse = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoBaseCollectionPaginationCountResponse)(workflowTemplateCollectionResponse)), { "value": n => { workflowTemplateCollectionResponse.value = n.getCollectionOfObjectValues(createWorkflowTemplateFromDiscriminatorValue); } });
}
exports.deserializeIntoWorkflowTemplateCollectionResponse = deserializeIntoWorkflowTemplateCollectionResponse;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoWorkflowVersion(workflowVersion = {}) {
    return Object.assign(Object.assign({}, deserializeIntoWorkflowBase(workflowVersion)), { "versionNumber": n => { workflowVersion.versionNumber = n.getNumberValue(); } });
}
exports.deserializeIntoWorkflowVersion = deserializeIntoWorkflowVersion;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoWorkflowVersionCollectionResponse(workflowVersionCollectionResponse = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoBaseCollectionPaginationCountResponse)(workflowVersionCollectionResponse)), { "value": n => { workflowVersionCollectionResponse.value = n.getCollectionOfObjectValues(createWorkflowVersionFromDiscriminatorValue); } });
}
exports.deserializeIntoWorkflowVersionCollectionResponse = deserializeIntoWorkflowVersionCollectionResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeCustomTaskExtension(writer, customTaskExtension = {}) {
    (0, __1.serializeCustomCalloutExtension)(writer, customTaskExtension);
    writer.writeObjectValue("callbackConfiguration", customTaskExtension.callbackConfiguration, __1.serializeCustomExtensionCallbackConfiguration);
    writer.writeObjectValue("createdBy", customTaskExtension.createdBy, __1.serializeUser);
    writer.writeDateValue("createdDateTime", customTaskExtension.createdDateTime);
    writer.writeObjectValue("lastModifiedBy", customTaskExtension.lastModifiedBy, __1.serializeUser);
    writer.writeDateValue("lastModifiedDateTime", customTaskExtension.lastModifiedDateTime);
}
exports.serializeCustomTaskExtension = serializeCustomTaskExtension;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeCustomTaskExtensionCallbackConfiguration(writer, customTaskExtensionCallbackConfiguration = {}) {
    (0, __1.serializeCustomExtensionCallbackConfiguration)(writer, customTaskExtensionCallbackConfiguration);
    writer.writeCollectionOfObjectValues("authorizedApps", customTaskExtensionCallbackConfiguration.authorizedApps, __1.serializeApplication);
}
exports.serializeCustomTaskExtensionCallbackConfiguration = serializeCustomTaskExtensionCallbackConfiguration;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeCustomTaskExtensionCallbackData(writer, customTaskExtensionCallbackData = {}) {
    (0, __1.serializeCustomExtensionData)(writer, customTaskExtensionCallbackData);
    writer.writeEnumValue("operationStatus", customTaskExtensionCallbackData.operationStatus);
}
exports.serializeCustomTaskExtensionCallbackData = serializeCustomTaskExtensionCallbackData;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeCustomTaskExtensionCalloutData(writer, customTaskExtensionCalloutData = {}) {
    (0, __1.serializeCustomExtensionData)(writer, customTaskExtensionCalloutData);
    writer.writeObjectValue("subject", customTaskExtensionCalloutData.subject, __1.serializeUser);
    writer.writeObjectValue("task", customTaskExtensionCalloutData.task, serializeTask);
    writer.writeObjectValue("taskProcessingresult", customTaskExtensionCalloutData.taskProcessingresult, serializeTaskProcessingResult);
    writer.writeObjectValue("workflow", customTaskExtensionCalloutData.workflow, serializeWorkflow);
}
exports.serializeCustomTaskExtensionCalloutData = serializeCustomTaskExtensionCalloutData;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeCustomTaskExtensionCollectionResponse(writer, customTaskExtensionCollectionResponse = {}) {
    (0, __1.serializeBaseCollectionPaginationCountResponse)(writer, customTaskExtensionCollectionResponse);
    writer.writeCollectionOfObjectValues("value", customTaskExtensionCollectionResponse.value, serializeCustomTaskExtension);
}
exports.serializeCustomTaskExtensionCollectionResponse = serializeCustomTaskExtensionCollectionResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeLifecycleManagementSettings(writer, lifecycleManagementSettings = {}) {
    (0, __1.serializeEntity)(writer, lifecycleManagementSettings);
    writer.writeObjectValue("emailSettings", lifecycleManagementSettings.emailSettings, __1.serializeEmailSettings);
    writer.writeNumberValue("workflowScheduleIntervalInHours", lifecycleManagementSettings.workflowScheduleIntervalInHours);
}
exports.serializeLifecycleManagementSettings = serializeLifecycleManagementSettings;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeLifecycleWorkflowsContainer(writer, lifecycleWorkflowsContainer = {}) {
    (0, __1.serializeEntity)(writer, lifecycleWorkflowsContainer);
    writer.writeCollectionOfObjectValues("customTaskExtensions", lifecycleWorkflowsContainer.customTaskExtensions, serializeCustomTaskExtension);
    writer.writeObjectValue("deletedItems", lifecycleWorkflowsContainer.deletedItems, __1.serializeDeletedItemContainer);
    writer.writeObjectValue("settings", lifecycleWorkflowsContainer.settings, serializeLifecycleManagementSettings);
    writer.writeCollectionOfObjectValues("taskDefinitions", lifecycleWorkflowsContainer.taskDefinitions, serializeTaskDefinition);
    writer.writeCollectionOfObjectValues("workflows", lifecycleWorkflowsContainer.workflows, serializeWorkflow);
    writer.writeCollectionOfObjectValues("workflowTemplates", lifecycleWorkflowsContainer.workflowTemplates, serializeWorkflowTemplate);
}
exports.serializeLifecycleWorkflowsContainer = serializeLifecycleWorkflowsContainer;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeOnDemandExecutionOnly(writer, onDemandExecutionOnly = {}) {
    serializeWorkflowExecutionConditions(writer, onDemandExecutionOnly);
}
exports.serializeOnDemandExecutionOnly = serializeOnDemandExecutionOnly;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeParameter(writer, parameter = {}) {
    writer.writeStringValue("name", parameter.name);
    writer.writeStringValue("@odata.type", parameter.odataType);
    writer.writeCollectionOfPrimitiveValues("values", parameter.values);
    writer.writeEnumValue("valueType", parameter.valueType);
    writer.writeAdditionalData(parameter.additionalData);
}
exports.serializeParameter = serializeParameter;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeRuleBasedSubjectSet(writer, ruleBasedSubjectSet = {}) {
    (0, __1.serializeSubjectSet)(writer, ruleBasedSubjectSet);
    writer.writeStringValue("rule", ruleBasedSubjectSet.rule);
}
exports.serializeRuleBasedSubjectSet = serializeRuleBasedSubjectSet;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeRun(writer, run = {}) {
    (0, __1.serializeEntity)(writer, run);
    writer.writeDateValue("completedDateTime", run.completedDateTime);
    writer.writeNumberValue("failedTasksCount", run.failedTasksCount);
    writer.writeNumberValue("failedUsersCount", run.failedUsersCount);
    writer.writeDateValue("lastUpdatedDateTime", run.lastUpdatedDateTime);
    writer.writeEnumValue("processingStatus", run.processingStatus);
    writer.writeDateValue("scheduledDateTime", run.scheduledDateTime);
    writer.writeDateValue("startedDateTime", run.startedDateTime);
    writer.writeNumberValue("successfulUsersCount", run.successfulUsersCount);
    writer.writeCollectionOfObjectValues("taskProcessingResults", run.taskProcessingResults, serializeTaskProcessingResult);
    writer.writeNumberValue("totalTasksCount", run.totalTasksCount);
    writer.writeNumberValue("totalUnprocessedTasksCount", run.totalUnprocessedTasksCount);
    writer.writeNumberValue("totalUsersCount", run.totalUsersCount);
    writer.writeCollectionOfObjectValues("userProcessingResults", run.userProcessingResults, serializeUserProcessingResult);
    writer.writeEnumValue("workflowExecutionType", run.workflowExecutionType);
}
exports.serializeRun = serializeRun;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeRunCollectionResponse(writer, runCollectionResponse = {}) {
    (0, __1.serializeBaseCollectionPaginationCountResponse)(writer, runCollectionResponse);
    writer.writeCollectionOfObjectValues("value", runCollectionResponse.value, serializeRun);
}
exports.serializeRunCollectionResponse = serializeRunCollectionResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeRunSummary(writer, runSummary = {}) {
    writer.writeNumberValue("failedRuns", runSummary.failedRuns);
    writer.writeNumberValue("failedTasks", runSummary.failedTasks);
    writer.writeStringValue("@odata.type", runSummary.odataType);
    writer.writeNumberValue("successfulRuns", runSummary.successfulRuns);
    writer.writeNumberValue("totalRuns", runSummary.totalRuns);
    writer.writeNumberValue("totalTasks", runSummary.totalTasks);
    writer.writeNumberValue("totalUsers", runSummary.totalUsers);
    writer.writeAdditionalData(runSummary.additionalData);
}
exports.serializeRunSummary = serializeRunSummary;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeTask(writer, task = {}) {
    (0, __1.serializeEntity)(writer, task);
    writer.writeCollectionOfObjectValues("arguments", task.arguments, __1.serializeKeyValuePair);
    writer.writeEnumValue("category", task.category);
    writer.writeBooleanValue("continueOnError", task.continueOnError);
    writer.writeStringValue("description", task.description);
    writer.writeStringValue("displayName", task.displayName);
    writer.writeNumberValue("executionSequence", task.executionSequence);
    writer.writeBooleanValue("isEnabled", task.isEnabled);
    writer.writeStringValue("taskDefinitionId", task.taskDefinitionId);
    writer.writeCollectionOfObjectValues("taskProcessingResults", task.taskProcessingResults, serializeTaskProcessingResult);
}
exports.serializeTask = serializeTask;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeTaskCollectionResponse(writer, taskCollectionResponse = {}) {
    (0, __1.serializeBaseCollectionPaginationCountResponse)(writer, taskCollectionResponse);
    writer.writeCollectionOfObjectValues("value", taskCollectionResponse.value, serializeTask);
}
exports.serializeTaskCollectionResponse = serializeTaskCollectionResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeTaskDefinition(writer, taskDefinition = {}) {
    (0, __1.serializeEntity)(writer, taskDefinition);
    writer.writeEnumValue("category", taskDefinition.category);
    writer.writeBooleanValue("continueOnError", taskDefinition.continueOnError);
    writer.writeStringValue("description", taskDefinition.description);
    writer.writeStringValue("displayName", taskDefinition.displayName);
    writer.writeCollectionOfObjectValues("parameters", taskDefinition.parameters, serializeParameter);
    writer.writeNumberValue("version", taskDefinition.version);
}
exports.serializeTaskDefinition = serializeTaskDefinition;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeTaskDefinitionCollectionResponse(writer, taskDefinitionCollectionResponse = {}) {
    (0, __1.serializeBaseCollectionPaginationCountResponse)(writer, taskDefinitionCollectionResponse);
    writer.writeCollectionOfObjectValues("value", taskDefinitionCollectionResponse.value, serializeTaskDefinition);
}
exports.serializeTaskDefinitionCollectionResponse = serializeTaskDefinitionCollectionResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeTaskProcessingResult(writer, taskProcessingResult = {}) {
    (0, __1.serializeEntity)(writer, taskProcessingResult);
    writer.writeDateValue("completedDateTime", taskProcessingResult.completedDateTime);
    writer.writeDateValue("createdDateTime", taskProcessingResult.createdDateTime);
    writer.writeStringValue("failureReason", taskProcessingResult.failureReason);
    writer.writeEnumValue("processingStatus", taskProcessingResult.processingStatus);
    writer.writeDateValue("startedDateTime", taskProcessingResult.startedDateTime);
    writer.writeObjectValue("subject", taskProcessingResult.subject, __1.serializeUser);
    writer.writeObjectValue("task", taskProcessingResult.task, serializeTask);
}
exports.serializeTaskProcessingResult = serializeTaskProcessingResult;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeTaskProcessingResultCollectionResponse(writer, taskProcessingResultCollectionResponse = {}) {
    (0, __1.serializeBaseCollectionPaginationCountResponse)(writer, taskProcessingResultCollectionResponse);
    writer.writeCollectionOfObjectValues("value", taskProcessingResultCollectionResponse.value, serializeTaskProcessingResult);
}
exports.serializeTaskProcessingResultCollectionResponse = serializeTaskProcessingResultCollectionResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeTaskReport(writer, taskReport = {}) {
    (0, __1.serializeEntity)(writer, taskReport);
    writer.writeDateValue("completedDateTime", taskReport.completedDateTime);
    writer.writeNumberValue("failedUsersCount", taskReport.failedUsersCount);
    writer.writeDateValue("lastUpdatedDateTime", taskReport.lastUpdatedDateTime);
    writer.writeEnumValue("processingStatus", taskReport.processingStatus);
    writer.writeStringValue("runId", taskReport.runId);
    writer.writeDateValue("startedDateTime", taskReport.startedDateTime);
    writer.writeNumberValue("successfulUsersCount", taskReport.successfulUsersCount);
    writer.writeObjectValue("task", taskReport.task, serializeTask);
    writer.writeObjectValue("taskDefinition", taskReport.taskDefinition, serializeTaskDefinition);
    writer.writeCollectionOfObjectValues("taskProcessingResults", taskReport.taskProcessingResults, serializeTaskProcessingResult);
    writer.writeNumberValue("totalUsersCount", taskReport.totalUsersCount);
    writer.writeNumberValue("unprocessedUsersCount", taskReport.unprocessedUsersCount);
}
exports.serializeTaskReport = serializeTaskReport;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeTaskReportCollectionResponse(writer, taskReportCollectionResponse = {}) {
    (0, __1.serializeBaseCollectionPaginationCountResponse)(writer, taskReportCollectionResponse);
    writer.writeCollectionOfObjectValues("value", taskReportCollectionResponse.value, serializeTaskReport);
}
exports.serializeTaskReportCollectionResponse = serializeTaskReportCollectionResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeTaskReportSummary(writer, taskReportSummary = {}) {
    writer.writeNumberValue("failedTasks", taskReportSummary.failedTasks);
    writer.writeStringValue("@odata.type", taskReportSummary.odataType);
    writer.writeNumberValue("successfulTasks", taskReportSummary.successfulTasks);
    writer.writeNumberValue("totalTasks", taskReportSummary.totalTasks);
    writer.writeNumberValue("unprocessedTasks", taskReportSummary.unprocessedTasks);
    writer.writeAdditionalData(taskReportSummary.additionalData);
}
exports.serializeTaskReportSummary = serializeTaskReportSummary;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeTimeBasedAttributeTrigger(writer, timeBasedAttributeTrigger = {}) {
    serializeWorkflowExecutionTrigger(writer, timeBasedAttributeTrigger);
    writer.writeNumberValue("offsetInDays", timeBasedAttributeTrigger.offsetInDays);
    writer.writeEnumValue("timeBasedAttribute", timeBasedAttributeTrigger.timeBasedAttribute);
}
exports.serializeTimeBasedAttributeTrigger = serializeTimeBasedAttributeTrigger;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeTriggerAndScopeBasedConditions(writer, triggerAndScopeBasedConditions = {}) {
    serializeWorkflowExecutionConditions(writer, triggerAndScopeBasedConditions);
    writer.writeObjectValue("scope", triggerAndScopeBasedConditions.scope, __1.serializeSubjectSet);
    writer.writeObjectValue("trigger", triggerAndScopeBasedConditions.trigger, serializeWorkflowExecutionTrigger);
}
exports.serializeTriggerAndScopeBasedConditions = serializeTriggerAndScopeBasedConditions;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeUserProcessingResult(writer, userProcessingResult = {}) {
    (0, __1.serializeEntity)(writer, userProcessingResult);
    writer.writeDateValue("completedDateTime", userProcessingResult.completedDateTime);
    writer.writeNumberValue("failedTasksCount", userProcessingResult.failedTasksCount);
    writer.writeEnumValue("processingStatus", userProcessingResult.processingStatus);
    writer.writeDateValue("scheduledDateTime", userProcessingResult.scheduledDateTime);
    writer.writeDateValue("startedDateTime", userProcessingResult.startedDateTime);
    writer.writeObjectValue("subject", userProcessingResult.subject, __1.serializeUser);
    writer.writeCollectionOfObjectValues("taskProcessingResults", userProcessingResult.taskProcessingResults, serializeTaskProcessingResult);
    writer.writeNumberValue("totalTasksCount", userProcessingResult.totalTasksCount);
    writer.writeNumberValue("totalUnprocessedTasksCount", userProcessingResult.totalUnprocessedTasksCount);
    writer.writeEnumValue("workflowExecutionType", userProcessingResult.workflowExecutionType);
    writer.writeNumberValue("workflowVersion", userProcessingResult.workflowVersion);
}
exports.serializeUserProcessingResult = serializeUserProcessingResult;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeUserProcessingResultCollectionResponse(writer, userProcessingResultCollectionResponse = {}) {
    (0, __1.serializeBaseCollectionPaginationCountResponse)(writer, userProcessingResultCollectionResponse);
    writer.writeCollectionOfObjectValues("value", userProcessingResultCollectionResponse.value, serializeUserProcessingResult);
}
exports.serializeUserProcessingResultCollectionResponse = serializeUserProcessingResultCollectionResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeUserSummary(writer, userSummary = {}) {
    writer.writeNumberValue("failedTasks", userSummary.failedTasks);
    writer.writeNumberValue("failedUsers", userSummary.failedUsers);
    writer.writeStringValue("@odata.type", userSummary.odataType);
    writer.writeNumberValue("successfulUsers", userSummary.successfulUsers);
    writer.writeNumberValue("totalTasks", userSummary.totalTasks);
    writer.writeNumberValue("totalUsers", userSummary.totalUsers);
    writer.writeAdditionalData(userSummary.additionalData);
}
exports.serializeUserSummary = serializeUserSummary;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeWorkflow(writer, workflow = {}) {
    serializeWorkflowBase(writer, workflow);
    writer.writeDateValue("deletedDateTime", workflow.deletedDateTime);
    writer.writeCollectionOfObjectValues("executionScope", workflow.executionScope, serializeUserProcessingResult);
    writer.writeStringValue("id", workflow.id);
    writer.writeDateValue("nextScheduleRunDateTime", workflow.nextScheduleRunDateTime);
    writer.writeCollectionOfObjectValues("runs", workflow.runs, serializeRun);
    writer.writeCollectionOfObjectValues("taskReports", workflow.taskReports, serializeTaskReport);
    writer.writeCollectionOfObjectValues("userProcessingResults", workflow.userProcessingResults, serializeUserProcessingResult);
    writer.writeNumberValue("version", workflow.version);
    writer.writeCollectionOfObjectValues("versions", workflow.versions, serializeWorkflowVersion);
}
exports.serializeWorkflow = serializeWorkflow;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeWorkflowBase(writer, workflowBase = {}) {
    writer.writeEnumValue("category", workflowBase.category);
    writer.writeObjectValue("createdBy", workflowBase.createdBy, __1.serializeUser);
    writer.writeDateValue("createdDateTime", workflowBase.createdDateTime);
    writer.writeStringValue("description", workflowBase.description);
    writer.writeStringValue("displayName", workflowBase.displayName);
    writer.writeObjectValue("executionConditions", workflowBase.executionConditions, serializeWorkflowExecutionConditions);
    writer.writeBooleanValue("isEnabled", workflowBase.isEnabled);
    writer.writeBooleanValue("isSchedulingEnabled", workflowBase.isSchedulingEnabled);
    writer.writeObjectValue("lastModifiedBy", workflowBase.lastModifiedBy, __1.serializeUser);
    writer.writeDateValue("lastModifiedDateTime", workflowBase.lastModifiedDateTime);
    writer.writeStringValue("@odata.type", workflowBase.odataType);
    writer.writeCollectionOfObjectValues("tasks", workflowBase.tasks, serializeTask);
    writer.writeAdditionalData(workflowBase.additionalData);
}
exports.serializeWorkflowBase = serializeWorkflowBase;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeWorkflowCollectionResponse(writer, workflowCollectionResponse = {}) {
    (0, __1.serializeBaseCollectionPaginationCountResponse)(writer, workflowCollectionResponse);
    writer.writeCollectionOfObjectValues("value", workflowCollectionResponse.value, serializeWorkflow);
}
exports.serializeWorkflowCollectionResponse = serializeWorkflowCollectionResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeWorkflowExecutionConditions(writer, workflowExecutionConditions = {}) {
    writer.writeStringValue("@odata.type", workflowExecutionConditions.odataType);
    writer.writeAdditionalData(workflowExecutionConditions.additionalData);
}
exports.serializeWorkflowExecutionConditions = serializeWorkflowExecutionConditions;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeWorkflowExecutionTrigger(writer, workflowExecutionTrigger = {}) {
    writer.writeStringValue("@odata.type", workflowExecutionTrigger.odataType);
    writer.writeAdditionalData(workflowExecutionTrigger.additionalData);
}
exports.serializeWorkflowExecutionTrigger = serializeWorkflowExecutionTrigger;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeWorkflowTemplate(writer, workflowTemplate = {}) {
    (0, __1.serializeEntity)(writer, workflowTemplate);
    writer.writeEnumValue("category", workflowTemplate.category);
    writer.writeStringValue("description", workflowTemplate.description);
    writer.writeStringValue("displayName", workflowTemplate.displayName);
    writer.writeObjectValue("executionConditions", workflowTemplate.executionConditions, serializeWorkflowExecutionConditions);
    writer.writeCollectionOfObjectValues("tasks", workflowTemplate.tasks, serializeTask);
}
exports.serializeWorkflowTemplate = serializeWorkflowTemplate;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeWorkflowTemplateCollectionResponse(writer, workflowTemplateCollectionResponse = {}) {
    (0, __1.serializeBaseCollectionPaginationCountResponse)(writer, workflowTemplateCollectionResponse);
    writer.writeCollectionOfObjectValues("value", workflowTemplateCollectionResponse.value, serializeWorkflowTemplate);
}
exports.serializeWorkflowTemplateCollectionResponse = serializeWorkflowTemplateCollectionResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeWorkflowVersion(writer, workflowVersion = {}) {
    serializeWorkflowBase(writer, workflowVersion);
    writer.writeNumberValue("versionNumber", workflowVersion.versionNumber);
}
exports.serializeWorkflowVersion = serializeWorkflowVersion;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeWorkflowVersionCollectionResponse(writer, workflowVersionCollectionResponse = {}) {
    (0, __1.serializeBaseCollectionPaginationCountResponse)(writer, workflowVersionCollectionResponse);
    writer.writeCollectionOfObjectValues("value", workflowVersionCollectionResponse.value, serializeWorkflowVersion);
}
exports.serializeWorkflowVersionCollectionResponse = serializeWorkflowVersionCollectionResponse;
exports.CustomTaskExtensionOperationStatusObject = {
    Completed: "completed",
    Failed: "failed",
    UnknownFutureValue: "unknownFutureValue",
};
exports.LifecycleTaskCategoryObject = {
    Joiner: "joiner",
    Leaver: "leaver",
    UnknownFutureValue: "unknownFutureValue",
    Mover: "mover",
};
exports.LifecycleWorkflowCategoryObject = {
    Joiner: "joiner",
    Leaver: "leaver",
    UnknownFutureValue: "unknownFutureValue",
    Mover: "mover",
};
exports.LifecycleWorkflowProcessingStatusObject = {
    Queued: "queued",
    InProgress: "inProgress",
    Completed: "completed",
    CompletedWithErrors: "completedWithErrors",
    Canceled: "canceled",
    Failed: "failed",
    UnknownFutureValue: "unknownFutureValue",
};
exports.ValueTypeObject = {
    EnumEscaped: "enum",
    String: "string",
    Int: "int",
    Bool: "bool",
    UnknownFutureValue: "unknownFutureValue",
};
exports.WorkflowExecutionTypeObject = {
    Scheduled: "scheduled",
    OnDemand: "onDemand",
    UnknownFutureValue: "unknownFutureValue",
};
exports.WorkflowTriggerTimeBasedAttributeObject = {
    EmployeeHireDate: "employeeHireDate",
    EmployeeLeaveDateTime: "employeeLeaveDateTime",
    UnknownFutureValue: "unknownFutureValue",
    CreatedDateTime: "createdDateTime",
};
/* tslint:enable */
/* eslint-enable */
