/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createApplicationFromDiscriminatorValue, createCustomExtensionCallbackConfigurationFromDiscriminatorValue, createDeletedItemContainerFromDiscriminatorValue, createEmailSettingsFromDiscriminatorValue, createGroupFromDiscriminatorValue, createKeyValuePairFromDiscriminatorValue, createSubjectSetFromDiscriminatorValue, createUserFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, deserializeIntoCustomCalloutExtension, deserializeIntoCustomExtensionCallbackConfiguration, deserializeIntoCustomExtensionData, deserializeIntoEntity, deserializeIntoSubjectSet, serializeApplication, serializeBaseCollectionPaginationCountResponse, serializeCustomCalloutExtension, serializeCustomExtensionCallbackConfiguration, serializeCustomExtensionData, serializeDeletedItemContainer, serializeEmailSettings, serializeEntity, serializeGroup, serializeKeyValuePair, serializeSubjectSet, serializeUser } from '../index.js';
/**
 * 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 {AttributeChangeTrigger}
 */
// @ts-ignore
export function createAttributeChangeTriggerFromDiscriminatorValue(parseNode) {
    return deserializeIntoAttributeChangeTrigger;
}
/**
 * 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 {CustomTaskExtensionCallbackConfiguration}
 */
// @ts-ignore
export function createCustomTaskExtensionCallbackConfigurationFromDiscriminatorValue(parseNode) {
    return deserializeIntoCustomTaskExtensionCallbackConfiguration;
}
/**
 * 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 {CustomTaskExtensionCallbackData}
 */
// @ts-ignore
export function createCustomTaskExtensionCallbackDataFromDiscriminatorValue(parseNode) {
    return deserializeIntoCustomTaskExtensionCallbackData;
}
/**
 * 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 {CustomTaskExtensionCalloutData}
 */
// @ts-ignore
export function createCustomTaskExtensionCalloutDataFromDiscriminatorValue(parseNode) {
    return deserializeIntoCustomTaskExtensionCalloutData;
}
/**
 * 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 {CustomTaskExtensionCollectionResponse}
 */
// @ts-ignore
export function createCustomTaskExtensionCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoCustomTaskExtensionCollectionResponse;
}
/**
 * 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 {CustomTaskExtension}
 */
// @ts-ignore
export function createCustomTaskExtensionFromDiscriminatorValue(parseNode) {
    return deserializeIntoCustomTaskExtension;
}
/**
 * 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 {GroupBasedSubjectSet}
 */
// @ts-ignore
export function createGroupBasedSubjectSetFromDiscriminatorValue(parseNode) {
    return deserializeIntoGroupBasedSubjectSet;
}
/**
 * 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 {Insights}
 */
// @ts-ignore
export function createInsightsFromDiscriminatorValue(parseNode) {
    return deserializeIntoInsights;
}
/**
 * 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 {LifecycleManagementSettings}
 */
// @ts-ignore
export function createLifecycleManagementSettingsFromDiscriminatorValue(parseNode) {
    return deserializeIntoLifecycleManagementSettings;
}
/**
 * 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 {LifecycleWorkflowsContainer}
 */
// @ts-ignore
export function createLifecycleWorkflowsContainerFromDiscriminatorValue(parseNode) {
    return deserializeIntoLifecycleWorkflowsContainer;
}
/**
 * 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 {MembershipChangeTrigger}
 */
// @ts-ignore
export function createMembershipChangeTriggerFromDiscriminatorValue(parseNode) {
    return deserializeIntoMembershipChangeTrigger;
}
/**
 * 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 {OnDemandExecutionOnly}
 */
// @ts-ignore
export function createOnDemandExecutionOnlyFromDiscriminatorValue(parseNode) {
    return deserializeIntoOnDemandExecutionOnly;
}
/**
 * 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 {Parameter}
 */
// @ts-ignore
export function createParameterFromDiscriminatorValue(parseNode) {
    return deserializeIntoParameter;
}
/**
 * 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 {RuleBasedSubjectSet}
 */
// @ts-ignore
export function createRuleBasedSubjectSetFromDiscriminatorValue(parseNode) {
    return deserializeIntoRuleBasedSubjectSet;
}
/**
 * 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 {RunCollectionResponse}
 */
// @ts-ignore
export function createRunCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoRunCollectionResponse;
}
/**
 * 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 {Run}
 */
// @ts-ignore
export function createRunFromDiscriminatorValue(parseNode) {
    return deserializeIntoRun;
}
/**
 * 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 {RunSummary}
 */
// @ts-ignore
export function createRunSummaryFromDiscriminatorValue(parseNode) {
    return deserializeIntoRunSummary;
}
/**
 * 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 {TaskCollectionResponse}
 */
// @ts-ignore
export function createTaskCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoTaskCollectionResponse;
}
/**
 * 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 {TaskDefinitionCollectionResponse}
 */
// @ts-ignore
export function createTaskDefinitionCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoTaskDefinitionCollectionResponse;
}
/**
 * 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 {TaskDefinition}
 */
// @ts-ignore
export function createTaskDefinitionFromDiscriminatorValue(parseNode) {
    return deserializeIntoTaskDefinition;
}
/**
 * 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 {Task}
 */
// @ts-ignore
export function createTaskFromDiscriminatorValue(parseNode) {
    return deserializeIntoTask;
}
/**
 * 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 {TaskProcessingResultCollectionResponse}
 */
// @ts-ignore
export function createTaskProcessingResultCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoTaskProcessingResultCollectionResponse;
}
/**
 * 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 {TaskProcessingResult}
 */
// @ts-ignore
export function createTaskProcessingResultFromDiscriminatorValue(parseNode) {
    return deserializeIntoTaskProcessingResult;
}
/**
 * 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 {TaskReportCollectionResponse}
 */
// @ts-ignore
export function createTaskReportCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoTaskReportCollectionResponse;
}
/**
 * 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 {TaskReport}
 */
// @ts-ignore
export function createTaskReportFromDiscriminatorValue(parseNode) {
    return deserializeIntoTaskReport;
}
/**
 * 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 {TaskReportSummary}
 */
// @ts-ignore
export function createTaskReportSummaryFromDiscriminatorValue(parseNode) {
    return deserializeIntoTaskReportSummary;
}
/**
 * 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 {TimeBasedAttributeTrigger}
 */
// @ts-ignore
export function createTimeBasedAttributeTriggerFromDiscriminatorValue(parseNode) {
    return deserializeIntoTimeBasedAttributeTrigger;
}
/**
 * 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 {TopTasksInsightsSummary}
 */
// @ts-ignore
export function createTopTasksInsightsSummaryFromDiscriminatorValue(parseNode) {
    return deserializeIntoTopTasksInsightsSummary;
}
/**
 * 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 {TopWorkflowsInsightsSummary}
 */
// @ts-ignore
export function createTopWorkflowsInsightsSummaryFromDiscriminatorValue(parseNode) {
    return deserializeIntoTopWorkflowsInsightsSummary;
}
/**
 * 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 {TriggerAndScopeBasedConditions}
 */
// @ts-ignore
export function createTriggerAndScopeBasedConditionsFromDiscriminatorValue(parseNode) {
    return deserializeIntoTriggerAndScopeBasedConditions;
}
/**
 * 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 {TriggerAttribute}
 */
// @ts-ignore
export function createTriggerAttributeFromDiscriminatorValue(parseNode) {
    return deserializeIntoTriggerAttribute;
}
/**
 * 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 {UserProcessingResultCollectionResponse}
 */
// @ts-ignore
export function createUserProcessingResultCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoUserProcessingResultCollectionResponse;
}
/**
 * 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 {UserProcessingResult}
 */
// @ts-ignore
export function createUserProcessingResultFromDiscriminatorValue(parseNode) {
    return deserializeIntoUserProcessingResult;
}
/**
 * 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 {UserSummary}
 */
// @ts-ignore
export function createUserSummaryFromDiscriminatorValue(parseNode) {
    return deserializeIntoUserSummary;
}
/**
 * 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 {WorkflowBase}
 */
// @ts-ignore
export function createWorkflowBaseFromDiscriminatorValue(parseNode) {
    if (!parseNode)
        throw new Error("parseNode cannot be undefined");
    const mappingValueNode = parseNode === null || parseNode === void 0 ? void 0 : 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;
}
/**
 * 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 {WorkflowCollectionResponse}
 */
// @ts-ignore
export function createWorkflowCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoWorkflowCollectionResponse;
}
/**
 * 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 {WorkflowExecutionConditions}
 */
// @ts-ignore
export function createWorkflowExecutionConditionsFromDiscriminatorValue(parseNode) {
    if (!parseNode)
        throw new Error("parseNode cannot be undefined");
    const mappingValueNode = parseNode === null || parseNode === void 0 ? void 0 : 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;
}
/**
 * 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 {WorkflowExecutionTrigger}
 */
// @ts-ignore
export function createWorkflowExecutionTriggerFromDiscriminatorValue(parseNode) {
    if (!parseNode)
        throw new Error("parseNode cannot be undefined");
    const mappingValueNode = parseNode === null || parseNode === void 0 ? void 0 : parseNode.getChildNode("@odata.type");
    if (mappingValueNode) {
        const mappingValue = mappingValueNode.getStringValue();
        if (mappingValue) {
            switch (mappingValue) {
                case "#microsoft.graph.identityGovernance.attributeChangeTrigger":
                    return deserializeIntoAttributeChangeTrigger;
                case "#microsoft.graph.identityGovernance.membershipChangeTrigger":
                    return deserializeIntoMembershipChangeTrigger;
                case "#microsoft.graph.identityGovernance.timeBasedAttributeTrigger":
                    return deserializeIntoTimeBasedAttributeTrigger;
            }
        }
    }
    return deserializeIntoWorkflowExecutionTrigger;
}
/**
 * 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 {Workflow}
 */
// @ts-ignore
export function createWorkflowFromDiscriminatorValue(parseNode) {
    return deserializeIntoWorkflow;
}
/**
 * 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 {WorkflowsInsightsByCategory}
 */
// @ts-ignore
export function createWorkflowsInsightsByCategoryFromDiscriminatorValue(parseNode) {
    return deserializeIntoWorkflowsInsightsByCategory;
}
/**
 * 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 {WorkflowsInsightsSummary}
 */
// @ts-ignore
export function createWorkflowsInsightsSummaryFromDiscriminatorValue(parseNode) {
    return deserializeIntoWorkflowsInsightsSummary;
}
/**
 * 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 {WorkflowTemplateCollectionResponse}
 */
// @ts-ignore
export function createWorkflowTemplateCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoWorkflowTemplateCollectionResponse;
}
/**
 * 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 {WorkflowTemplate}
 */
// @ts-ignore
export function createWorkflowTemplateFromDiscriminatorValue(parseNode) {
    return deserializeIntoWorkflowTemplate;
}
/**
 * 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 {WorkflowVersionCollectionResponse}
 */
// @ts-ignore
export function createWorkflowVersionCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoWorkflowVersionCollectionResponse;
}
/**
 * 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 {WorkflowVersion}
 */
// @ts-ignore
export function createWorkflowVersionFromDiscriminatorValue(parseNode) {
    return deserializeIntoWorkflowVersion;
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoAttributeChangeTrigger(attributeChangeTrigger = {}) {
    return Object.assign(Object.assign({}, deserializeIntoWorkflowExecutionTrigger(attributeChangeTrigger)), { "triggerAttributes": n => { attributeChangeTrigger.triggerAttributes = n.getCollectionOfObjectValues(createTriggerAttributeFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCustomTaskExtension(customTaskExtension = {}) {
    return Object.assign(Object.assign({}, deserializeIntoCustomCalloutExtension(customTaskExtension)), { "callbackConfiguration": n => { customTaskExtension.callbackConfiguration = n.getObjectValue(createCustomExtensionCallbackConfigurationFromDiscriminatorValue); }, "createdBy": n => { customTaskExtension.createdBy = n.getObjectValue(createUserFromDiscriminatorValue); }, "createdDateTime": n => { customTaskExtension.createdDateTime = n.getDateValue(); }, "lastModifiedBy": n => { customTaskExtension.lastModifiedBy = n.getObjectValue(createUserFromDiscriminatorValue); }, "lastModifiedDateTime": n => { customTaskExtension.lastModifiedDateTime = n.getDateValue(); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCustomTaskExtensionCallbackConfiguration(customTaskExtensionCallbackConfiguration = {}) {
    return Object.assign(Object.assign({}, deserializeIntoCustomExtensionCallbackConfiguration(customTaskExtensionCallbackConfiguration)), { "authorizedApps": n => { customTaskExtensionCallbackConfiguration.authorizedApps = n.getCollectionOfObjectValues(createApplicationFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCustomTaskExtensionCallbackData(customTaskExtensionCallbackData = {}) {
    return Object.assign(Object.assign({}, deserializeIntoCustomExtensionData(customTaskExtensionCallbackData)), { "operationStatus": n => { customTaskExtensionCallbackData.operationStatus = n.getEnumValue(CustomTaskExtensionOperationStatusObject); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCustomTaskExtensionCalloutData(customTaskExtensionCalloutData = {}) {
    return Object.assign(Object.assign({}, deserializeIntoCustomExtensionData(customTaskExtensionCalloutData)), { "subject": n => { customTaskExtensionCalloutData.subject = n.getObjectValue(createUserFromDiscriminatorValue); }, "task": n => { customTaskExtensionCalloutData.task = n.getObjectValue(createTaskFromDiscriminatorValue); }, "taskProcessingresult": n => { customTaskExtensionCalloutData.taskProcessingresult = n.getObjectValue(createTaskProcessingResultFromDiscriminatorValue); }, "workflow": n => { customTaskExtensionCalloutData.workflow = n.getObjectValue(createWorkflowFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCustomTaskExtensionCollectionResponse(customTaskExtensionCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(customTaskExtensionCollectionResponse)), { "value": n => { customTaskExtensionCollectionResponse.value = n.getCollectionOfObjectValues(createCustomTaskExtensionFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoGroupBasedSubjectSet(groupBasedSubjectSet = {}) {
    return Object.assign(Object.assign({}, deserializeIntoSubjectSet(groupBasedSubjectSet)), { "groups": n => { groupBasedSubjectSet.groups = n.getCollectionOfObjectValues(createGroupFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoInsights(insights = {}) {
    return Object.assign({}, deserializeIntoEntity(insights));
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoLifecycleManagementSettings(lifecycleManagementSettings = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(lifecycleManagementSettings)), { "emailSettings": n => { lifecycleManagementSettings.emailSettings = n.getObjectValue(createEmailSettingsFromDiscriminatorValue); }, "workflowScheduleIntervalInHours": n => { lifecycleManagementSettings.workflowScheduleIntervalInHours = n.getNumberValue(); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoLifecycleWorkflowsContainer(lifecycleWorkflowsContainer = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(lifecycleWorkflowsContainer)), { "customTaskExtensions": n => { lifecycleWorkflowsContainer.customTaskExtensions = n.getCollectionOfObjectValues(createCustomTaskExtensionFromDiscriminatorValue); }, "deletedItems": n => { lifecycleWorkflowsContainer.deletedItems = n.getObjectValue(createDeletedItemContainerFromDiscriminatorValue); }, "insights": n => { lifecycleWorkflowsContainer.insights = n.getObjectValue(createInsightsFromDiscriminatorValue); }, "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); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoMembershipChangeTrigger(membershipChangeTrigger = {}) {
    return Object.assign(Object.assign({}, deserializeIntoWorkflowExecutionTrigger(membershipChangeTrigger)), { "changeType": n => { membershipChangeTrigger.changeType = n.getEnumValue(MembershipChangeTypeObject); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoOnDemandExecutionOnly(onDemandExecutionOnly = {}) {
    return Object.assign({}, deserializeIntoWorkflowExecutionConditions(onDemandExecutionOnly));
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export 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(ValueTypeObject); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoRuleBasedSubjectSet(ruleBasedSubjectSet = {}) {
    return Object.assign(Object.assign({}, deserializeIntoSubjectSet(ruleBasedSubjectSet)), { "rule": n => { ruleBasedSubjectSet.rule = n.getStringValue(); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoRun(run = {}) {
    return Object.assign(Object.assign({}, 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(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(WorkflowExecutionTypeObject); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoRunCollectionResponse(runCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(runCollectionResponse)), { "value": n => { runCollectionResponse.value = n.getCollectionOfObjectValues(createRunFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export 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(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTask(task = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(task)), { "arguments": n => { task.arguments = n.getCollectionOfObjectValues(createKeyValuePairFromDiscriminatorValue); }, "category": n => { task.category = n.getCollectionOfEnumValues(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); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTaskCollectionResponse(taskCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(taskCollectionResponse)), { "value": n => { taskCollectionResponse.value = n.getCollectionOfObjectValues(createTaskFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTaskDefinition(taskDefinition = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(taskDefinition)), { "category": n => { taskDefinition.category = n.getCollectionOfEnumValues(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(); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTaskDefinitionCollectionResponse(taskDefinitionCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(taskDefinitionCollectionResponse)), { "value": n => { taskDefinitionCollectionResponse.value = n.getCollectionOfObjectValues(createTaskDefinitionFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTaskProcessingResult(taskProcessingResult = {}) {
    return Object.assign(Object.assign({}, 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(LifecycleWorkflowProcessingStatusObject); }, "startedDateTime": n => { taskProcessingResult.startedDateTime = n.getDateValue(); }, "subject": n => { taskProcessingResult.subject = n.getObjectValue(createUserFromDiscriminatorValue); }, "task": n => { taskProcessingResult.task = n.getObjectValue(createTaskFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTaskProcessingResultCollectionResponse(taskProcessingResultCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(taskProcessingResultCollectionResponse)), { "value": n => { taskProcessingResultCollectionResponse.value = n.getCollectionOfObjectValues(createTaskProcessingResultFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTaskReport(taskReport = {}) {
    return Object.assign(Object.assign({}, 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(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(); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTaskReportCollectionResponse(taskReportCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(taskReportCollectionResponse)), { "value": n => { taskReportCollectionResponse.value = n.getCollectionOfObjectValues(createTaskReportFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export 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(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTimeBasedAttributeTrigger(timeBasedAttributeTrigger = {}) {
    return Object.assign(Object.assign({}, deserializeIntoWorkflowExecutionTrigger(timeBasedAttributeTrigger)), { "offsetInDays": n => { timeBasedAttributeTrigger.offsetInDays = n.getNumberValue(); }, "timeBasedAttribute": n => { timeBasedAttributeTrigger.timeBasedAttribute = n.getEnumValue(WorkflowTriggerTimeBasedAttributeObject); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTopTasksInsightsSummary(topTasksInsightsSummary = {}) {
    return {
        "backingStoreEnabled": n => { topTasksInsightsSummary.backingStoreEnabled = true; },
        "failedTasks": n => { topTasksInsightsSummary.failedTasks = n.getNumberValue(); },
        "failedUsers": n => { topTasksInsightsSummary.failedUsers = n.getNumberValue(); },
        "@odata.type": n => { topTasksInsightsSummary.odataType = n.getStringValue(); },
        "successfulTasks": n => { topTasksInsightsSummary.successfulTasks = n.getNumberValue(); },
        "successfulUsers": n => { topTasksInsightsSummary.successfulUsers = n.getNumberValue(); },
        "taskDefinitionDisplayName": n => { topTasksInsightsSummary.taskDefinitionDisplayName = n.getStringValue(); },
        "taskDefinitionId": n => { topTasksInsightsSummary.taskDefinitionId = n.getStringValue(); },
        "totalTasks": n => { topTasksInsightsSummary.totalTasks = n.getNumberValue(); },
        "totalUsers": n => { topTasksInsightsSummary.totalUsers = n.getNumberValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTopWorkflowsInsightsSummary(topWorkflowsInsightsSummary = {}) {
    return {
        "backingStoreEnabled": n => { topWorkflowsInsightsSummary.backingStoreEnabled = true; },
        "failedRuns": n => { topWorkflowsInsightsSummary.failedRuns = n.getNumberValue(); },
        "failedUsers": n => { topWorkflowsInsightsSummary.failedUsers = n.getNumberValue(); },
        "@odata.type": n => { topWorkflowsInsightsSummary.odataType = n.getStringValue(); },
        "successfulRuns": n => { topWorkflowsInsightsSummary.successfulRuns = n.getNumberValue(); },
        "successfulUsers": n => { topWorkflowsInsightsSummary.successfulUsers = n.getNumberValue(); },
        "totalRuns": n => { topWorkflowsInsightsSummary.totalRuns = n.getNumberValue(); },
        "totalUsers": n => { topWorkflowsInsightsSummary.totalUsers = n.getNumberValue(); },
        "workflowCategory": n => { topWorkflowsInsightsSummary.workflowCategory = n.getEnumValue(LifecycleWorkflowCategoryObject); },
        "workflowDisplayName": n => { topWorkflowsInsightsSummary.workflowDisplayName = n.getStringValue(); },
        "workflowId": n => { topWorkflowsInsightsSummary.workflowId = n.getStringValue(); },
        "workflowVersion": n => { topWorkflowsInsightsSummary.workflowVersion = n.getNumberValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTriggerAndScopeBasedConditions(triggerAndScopeBasedConditions = {}) {
    return Object.assign(Object.assign({}, deserializeIntoWorkflowExecutionConditions(triggerAndScopeBasedConditions)), { "scope": n => { triggerAndScopeBasedConditions.scope = n.getObjectValue(createSubjectSetFromDiscriminatorValue); }, "trigger": n => { triggerAndScopeBasedConditions.trigger = n.getObjectValue(createWorkflowExecutionTriggerFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTriggerAttribute(triggerAttribute = {}) {
    return {
        "backingStoreEnabled": n => { triggerAttribute.backingStoreEnabled = true; },
        "name": n => { triggerAttribute.name = n.getStringValue(); },
        "@odata.type": n => { triggerAttribute.odataType = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoUserProcessingResult(userProcessingResult = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(userProcessingResult)), { "completedDateTime": n => { userProcessingResult.completedDateTime = n.getDateValue(); }, "failedTasksCount": n => { userProcessingResult.failedTasksCount = n.getNumberValue(); }, "processingStatus": n => { userProcessingResult.processingStatus = n.getEnumValue(LifecycleWorkflowProcessingStatusObject); }, "scheduledDateTime": n => { userProcessingResult.scheduledDateTime = n.getDateValue(); }, "startedDateTime": n => { userProcessingResult.startedDateTime = n.getDateValue(); }, "subject": n => { userProcessingResult.subject = n.getObjectValue(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(WorkflowExecutionTypeObject); }, "workflowVersion": n => { userProcessingResult.workflowVersion = n.getNumberValue(); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoUserProcessingResultCollectionResponse(userProcessingResultCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(userProcessingResultCollectionResponse)), { "value": n => { userProcessingResultCollectionResponse.value = n.getCollectionOfObjectValues(createUserProcessingResultFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export 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(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export 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); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoWorkflowBase(workflowBase = {}) {
    return {
        "backingStoreEnabled": n => { workflowBase.backingStoreEnabled = true; },
        "category": n => { workflowBase.category = n.getEnumValue(LifecycleWorkflowCategoryObject); },
        "createdBy": n => { workflowBase.createdBy = n.getObjectValue(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(createUserFromDiscriminatorValue); },
        "lastModifiedDateTime": n => { workflowBase.lastModifiedDateTime = n.getDateValue(); },
        "@odata.type": n => { workflowBase.odataType = n.getStringValue(); },
        "tasks": n => { workflowBase.tasks = n.getCollectionOfObjectValues(createTaskFromDiscriminatorValue); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoWorkflowCollectionResponse(workflowCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(workflowCollectionResponse)), { "value": n => { workflowCollectionResponse.value = n.getCollectionOfObjectValues(createWorkflowFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoWorkflowExecutionConditions(workflowExecutionConditions = {}) {
    return {
        "backingStoreEnabled": n => { workflowExecutionConditions.backingStoreEnabled = true; },
        "@odata.type": n => { workflowExecutionConditions.odataType = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoWorkflowExecutionTrigger(workflowExecutionTrigger = {}) {
    return {
        "backingStoreEnabled": n => { workflowExecutionTrigger.backingStoreEnabled = true; },
        "@odata.type": n => { workflowExecutionTrigger.odataType = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoWorkflowsInsightsByCategory(workflowsInsightsByCategory = {}) {
    return {
        "backingStoreEnabled": n => { workflowsInsightsByCategory.backingStoreEnabled = true; },
        "failedJoinerRuns": n => { workflowsInsightsByCategory.failedJoinerRuns = n.getNumberValue(); },
        "failedLeaverRuns": n => { workflowsInsightsByCategory.failedLeaverRuns = n.getNumberValue(); },
        "failedMoverRuns": n => { workflowsInsightsByCategory.failedMoverRuns = n.getNumberValue(); },
        "@odata.type": n => { workflowsInsightsByCategory.odataType = n.getStringValue(); },
        "successfulJoinerRuns": n => { workflowsInsightsByCategory.successfulJoinerRuns = n.getNumberValue(); },
        "successfulLeaverRuns": n => { workflowsInsightsByCategory.successfulLeaverRuns = n.getNumberValue(); },
        "successfulMoverRuns": n => { workflowsInsightsByCategory.successfulMoverRuns = n.getNumberValue(); },
        "totalJoinerRuns": n => { workflowsInsightsByCategory.totalJoinerRuns = n.getNumberValue(); },
        "totalLeaverRuns": n => { workflowsInsightsByCategory.totalLeaverRuns = n.getNumberValue(); },
        "totalMoverRuns": n => { workflowsInsightsByCategory.totalMoverRuns = n.getNumberValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoWorkflowsInsightsSummary(workflowsInsightsSummary = {}) {
    return {
        "backingStoreEnabled": n => { workflowsInsightsSummary.backingStoreEnabled = true; },
        "failedRuns": n => { workflowsInsightsSummary.failedRuns = n.getNumberValue(); },
        "failedTasks": n => { workflowsInsightsSummary.failedTasks = n.getNumberValue(); },
        "failedUsers": n => { workflowsInsightsSummary.failedUsers = n.getNumberValue(); },
        "@odata.type": n => { workflowsInsightsSummary.odataType = n.getStringValue(); },
        "successfulRuns": n => { workflowsInsightsSummary.successfulRuns = n.getNumberValue(); },
        "successfulTasks": n => { workflowsInsightsSummary.successfulTasks = n.getNumberValue(); },
        "successfulUsers": n => { workflowsInsightsSummary.successfulUsers = n.getNumberValue(); },
        "totalRuns": n => { workflowsInsightsSummary.totalRuns = n.getNumberValue(); },
        "totalTasks": n => { workflowsInsightsSummary.totalTasks = n.getNumberValue(); },
        "totalUsers": n => { workflowsInsightsSummary.totalUsers = n.getNumberValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoWorkflowTemplate(workflowTemplate = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(workflowTemplate)), { "category": n => { workflowTemplate.category = n.getEnumValue(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); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoWorkflowTemplateCollectionResponse(workflowTemplateCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(workflowTemplateCollectionResponse)), { "value": n => { workflowTemplateCollectionResponse.value = n.getCollectionOfObjectValues(createWorkflowTemplateFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoWorkflowVersion(workflowVersion = {}) {
    return Object.assign(Object.assign({}, deserializeIntoWorkflowBase(workflowVersion)), { "versionNumber": n => { workflowVersion.versionNumber = n.getNumberValue(); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoWorkflowVersionCollectionResponse(workflowVersionCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(workflowVersionCollectionResponse)), { "value": n => { workflowVersionCollectionResponse.value = n.getCollectionOfObjectValues(createWorkflowVersionFromDiscriminatorValue); } });
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeAttributeChangeTrigger(writer, attributeChangeTrigger = {}) {
    if (attributeChangeTrigger) {
        serializeWorkflowExecutionTrigger(writer, attributeChangeTrigger);
        writer.writeCollectionOfObjectValues("triggerAttributes", attributeChangeTrigger.triggerAttributes, serializeTriggerAttribute);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeCustomTaskExtension(writer, customTaskExtension = {}) {
    if (customTaskExtension) {
        serializeCustomCalloutExtension(writer, customTaskExtension);
        writer.writeObjectValue("callbackConfiguration", customTaskExtension.callbackConfiguration, serializeCustomExtensionCallbackConfiguration);
        writer.writeObjectValue("createdBy", customTaskExtension.createdBy, serializeUser);
        writer.writeDateValue("createdDateTime", customTaskExtension.createdDateTime);
        writer.writeObjectValue("lastModifiedBy", customTaskExtension.lastModifiedBy, serializeUser);
        writer.writeDateValue("lastModifiedDateTime", customTaskExtension.lastModifiedDateTime);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeCustomTaskExtensionCallbackConfiguration(writer, customTaskExtensionCallbackConfiguration = {}) {
    if (customTaskExtensionCallbackConfiguration) {
        serializeCustomExtensionCallbackConfiguration(writer, customTaskExtensionCallbackConfiguration);
        writer.writeCollectionOfObjectValues("authorizedApps", customTaskExtensionCallbackConfiguration.authorizedApps, serializeApplication);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeCustomTaskExtensionCallbackData(writer, customTaskExtensionCallbackData = {}) {
    if (customTaskExtensionCallbackData) {
        serializeCustomExtensionData(writer, customTaskExtensionCallbackData);
        writer.writeEnumValue("operationStatus", customTaskExtensionCallbackData.operationStatus);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeCustomTaskExtensionCalloutData(writer, customTaskExtensionCalloutData = {}) {
    if (customTaskExtensionCalloutData) {
        serializeCustomExtensionData(writer, customTaskExtensionCalloutData);
        writer.writeObjectValue("subject", customTaskExtensionCalloutData.subject, serializeUser);
        writer.writeObjectValue("task", customTaskExtensionCalloutData.task, serializeTask);
        writer.writeObjectValue("taskProcessingresult", customTaskExtensionCalloutData.taskProcessingresult, serializeTaskProcessingResult);
        writer.writeObjectValue("workflow", customTaskExtensionCalloutData.workflow, serializeWorkflow);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeCustomTaskExtensionCollectionResponse(writer, customTaskExtensionCollectionResponse = {}) {
    if (customTaskExtensionCollectionResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, customTaskExtensionCollectionResponse);
        writer.writeCollectionOfObjectValues("value", customTaskExtensionCollectionResponse.value, serializeCustomTaskExtension);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeGroupBasedSubjectSet(writer, groupBasedSubjectSet = {}) {
    if (groupBasedSubjectSet) {
        serializeSubjectSet(writer, groupBasedSubjectSet);
        writer.writeCollectionOfObjectValues("groups", groupBasedSubjectSet.groups, serializeGroup);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeInsights(writer, insights = {}) {
    if (insights) {
        serializeEntity(writer, insights);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeLifecycleManagementSettings(writer, lifecycleManagementSettings = {}) {
    if (lifecycleManagementSettings) {
        serializeEntity(writer, lifecycleManagementSettings);
        writer.writeObjectValue("emailSettings", lifecycleManagementSettings.emailSettings, serializeEmailSettings);
        writer.writeNumberValue("workflowScheduleIntervalInHours", lifecycleManagementSettings.workflowScheduleIntervalInHours);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeLifecycleWorkflowsContainer(writer, lifecycleWorkflowsContainer = {}) {
    if (lifecycleWorkflowsContainer) {
        serializeEntity(writer, lifecycleWorkflowsContainer);
        writer.writeCollectionOfObjectValues("customTaskExtensions", lifecycleWorkflowsContainer.customTaskExtensions, serializeCustomTaskExtension);
        writer.writeObjectValue("deletedItems", lifecycleWorkflowsContainer.deletedItems, serializeDeletedItemContainer);
        writer.writeObjectValue("insights", lifecycleWorkflowsContainer.insights, serializeInsights);
        writer.writeObjectValue("settings", lifecycleWorkflowsContainer.settings, serializeLifecycleManagementSettings);
        writer.writeCollectionOfObjectValues("taskDefinitions", lifecycleWorkflowsContainer.taskDefinitions, serializeTaskDefinition);
        writer.writeCollectionOfObjectValues("workflows", lifecycleWorkflowsContainer.workflows, serializeWorkflow);
        writer.writeCollectionOfObjectValues("workflowTemplates", lifecycleWorkflowsContainer.workflowTemplates, serializeWorkflowTemplate);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeMembershipChangeTrigger(writer, membershipChangeTrigger = {}) {
    if (membershipChangeTrigger) {
        serializeWorkflowExecutionTrigger(writer, membershipChangeTrigger);
        writer.writeEnumValue("changeType", membershipChangeTrigger.changeType);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeOnDemandExecutionOnly(writer, onDemandExecutionOnly = {}) {
    if (onDemandExecutionOnly) {
        serializeWorkflowExecutionConditions(writer, onDemandExecutionOnly);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeParameter(writer, parameter = {}) {
    if (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);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeRuleBasedSubjectSet(writer, ruleBasedSubjectSet = {}) {
    if (ruleBasedSubjectSet) {
        serializeSubjectSet(writer, ruleBasedSubjectSet);
        writer.writeStringValue("rule", ruleBasedSubjectSet.rule);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeRun(writer, run = {}) {
    if (run) {
        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);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeRunCollectionResponse(writer, runCollectionResponse = {}) {
    if (runCollectionResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, runCollectionResponse);
        writer.writeCollectionOfObjectValues("value", runCollectionResponse.value, serializeRun);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeRunSummary(writer, runSummary = {}) {
    if (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);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTask(writer, task = {}) {
    if (task) {
        serializeEntity(writer, task);
        writer.writeCollectionOfObjectValues("arguments", task.arguments, 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);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTaskCollectionResponse(writer, taskCollectionResponse = {}) {
    if (taskCollectionResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, taskCollectionResponse);
        writer.writeCollectionOfObjectValues("value", taskCollectionResponse.value, serializeTask);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTaskDefinition(writer, taskDefinition = {}) {
    if (taskDefinition) {
        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);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTaskDefinitionCollectionResponse(writer, taskDefinitionCollectionResponse = {}) {
    if (taskDefinitionCollectionResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, taskDefinitionCollectionResponse);
        writer.writeCollectionOfObjectValues("value", taskDefinitionCollectionResponse.value, serializeTaskDefinition);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTaskProcessingResult(writer, taskProcessingResult = {}) {
    if (taskProcessingResult) {
        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, serializeUser);
        writer.writeObjectValue("task", taskProcessingResult.task, serializeTask);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTaskProcessingResultCollectionResponse(writer, taskProcessingResultCollectionResponse = {}) {
    if (taskProcessingResultCollectionResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, taskProcessingResultCollectionResponse);
        writer.writeCollectionOfObjectValues("value", taskProcessingResultCollectionResponse.value, serializeTaskProcessingResult);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTaskReport(writer, taskReport = {}) {
    if (taskReport) {
        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);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTaskReportCollectionResponse(writer, taskReportCollectionResponse = {}) {
    if (taskReportCollectionResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, taskReportCollectionResponse);
        writer.writeCollectionOfObjectValues("value", taskReportCollectionResponse.value, serializeTaskReport);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTaskReportSummary(writer, taskReportSummary = {}) {
    if (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);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTimeBasedAttributeTrigger(writer, timeBasedAttributeTrigger = {}) {
    if (timeBasedAttributeTrigger) {
        serializeWorkflowExecutionTrigger(writer, timeBasedAttributeTrigger);
        writer.writeNumberValue("offsetInDays", timeBasedAttributeTrigger.offsetInDays);
        writer.writeEnumValue("timeBasedAttribute", timeBasedAttributeTrigger.timeBasedAttribute);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTopTasksInsightsSummary(writer, topTasksInsightsSummary = {}) {
    if (topTasksInsightsSummary) {
        writer.writeNumberValue("failedTasks", topTasksInsightsSummary.failedTasks);
        writer.writeNumberValue("failedUsers", topTasksInsightsSummary.failedUsers);
        writer.writeStringValue("@odata.type", topTasksInsightsSummary.odataType);
        writer.writeNumberValue("successfulTasks", topTasksInsightsSummary.successfulTasks);
        writer.writeNumberValue("successfulUsers", topTasksInsightsSummary.successfulUsers);
        writer.writeStringValue("taskDefinitionDisplayName", topTasksInsightsSummary.taskDefinitionDisplayName);
        writer.writeStringValue("taskDefinitionId", topTasksInsightsSummary.taskDefinitionId);
        writer.writeNumberValue("totalTasks", topTasksInsightsSummary.totalTasks);
        writer.writeNumberValue("totalUsers", topTasksInsightsSummary.totalUsers);
        writer.writeAdditionalData(topTasksInsightsSummary.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTopWorkflowsInsightsSummary(writer, topWorkflowsInsightsSummary = {}) {
    if (topWorkflowsInsightsSummary) {
        writer.writeNumberValue("failedRuns", topWorkflowsInsightsSummary.failedRuns);
        writer.writeNumberValue("failedUsers", topWorkflowsInsightsSummary.failedUsers);
        writer.writeStringValue("@odata.type", topWorkflowsInsightsSummary.odataType);
        writer.writeNumberValue("successfulRuns", topWorkflowsInsightsSummary.successfulRuns);
        writer.writeNumberValue("successfulUsers", topWorkflowsInsightsSummary.successfulUsers);
        writer.writeNumberValue("totalRuns", topWorkflowsInsightsSummary.totalRuns);
        writer.writeNumberValue("totalUsers", topWorkflowsInsightsSummary.totalUsers);
        writer.writeEnumValue("workflowCategory", topWorkflowsInsightsSummary.workflowCategory);
        writer.writeStringValue("workflowDisplayName", topWorkflowsInsightsSummary.workflowDisplayName);
        writer.writeStringValue("workflowId", topWorkflowsInsightsSummary.workflowId);
        writer.writeNumberValue("workflowVersion", topWorkflowsInsightsSummary.workflowVersion);
        writer.writeAdditionalData(topWorkflowsInsightsSummary.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTriggerAndScopeBasedConditions(writer, triggerAndScopeBasedConditions = {}) {
    if (triggerAndScopeBasedConditions) {
        serializeWorkflowExecutionConditions(writer, triggerAndScopeBasedConditions);
        writer.writeObjectValue("scope", triggerAndScopeBasedConditions.scope, serializeSubjectSet);
        writer.writeObjectValue("trigger", triggerAndScopeBasedConditions.trigger, serializeWorkflowExecutionTrigger);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTriggerAttribute(writer, triggerAttribute = {}) {
    if (triggerAttribute) {
        writer.writeStringValue("name", triggerAttribute.name);
        writer.writeStringValue("@odata.type", triggerAttribute.odataType);
        writer.writeAdditionalData(triggerAttribute.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeUserProcessingResult(writer, userProcessingResult = {}) {
    if (userProcessingResult) {
        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, 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);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeUserProcessingResultCollectionResponse(writer, userProcessingResultCollectionResponse = {}) {
    if (userProcessingResultCollectionResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, userProcessingResultCollectionResponse);
        writer.writeCollectionOfObjectValues("value", userProcessingResultCollectionResponse.value, serializeUserProcessingResult);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeUserSummary(writer, userSummary = {}) {
    if (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);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeWorkflow(writer, workflow = {}) {
    if (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);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeWorkflowBase(writer, workflowBase = {}) {
    if (workflowBase) {
        writer.writeEnumValue("category", workflowBase.category);
        writer.writeObjectValue("createdBy", workflowBase.createdBy, 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, serializeUser);
        writer.writeDateValue("lastModifiedDateTime", workflowBase.lastModifiedDateTime);
        writer.writeStringValue("@odata.type", workflowBase.odataType);
        writer.writeCollectionOfObjectValues("tasks", workflowBase.tasks, serializeTask);
        writer.writeAdditionalData(workflowBase.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeWorkflowCollectionResponse(writer, workflowCollectionResponse = {}) {
    if (workflowCollectionResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, workflowCollectionResponse);
        writer.writeCollectionOfObjectValues("value", workflowCollectionResponse.value, serializeWorkflow);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeWorkflowExecutionConditions(writer, workflowExecutionConditions = {}) {
    if (workflowExecutionConditions) {
        writer.writeStringValue("@odata.type", workflowExecutionConditions.odataType);
        writer.writeAdditionalData(workflowExecutionConditions.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeWorkflowExecutionTrigger(writer, workflowExecutionTrigger = {}) {
    if (workflowExecutionTrigger) {
        writer.writeStringValue("@odata.type", workflowExecutionTrigger.odataType);
        writer.writeAdditionalData(workflowExecutionTrigger.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeWorkflowsInsightsByCategory(writer, workflowsInsightsByCategory = {}) {
    if (workflowsInsightsByCategory) {
        writer.writeNumberValue("failedJoinerRuns", workflowsInsightsByCategory.failedJoinerRuns);
        writer.writeNumberValue("failedLeaverRuns", workflowsInsightsByCategory.failedLeaverRuns);
        writer.writeNumberValue("failedMoverRuns", workflowsInsightsByCategory.failedMoverRuns);
        writer.writeStringValue("@odata.type", workflowsInsightsByCategory.odataType);
        writer.writeNumberValue("successfulJoinerRuns", workflowsInsightsByCategory.successfulJoinerRuns);
        writer.writeNumberValue("successfulLeaverRuns", workflowsInsightsByCategory.successfulLeaverRuns);
        writer.writeNumberValue("successfulMoverRuns", workflowsInsightsByCategory.successfulMoverRuns);
        writer.writeNumberValue("totalJoinerRuns", workflowsInsightsByCategory.totalJoinerRuns);
        writer.writeNumberValue("totalLeaverRuns", workflowsInsightsByCategory.totalLeaverRuns);
        writer.writeNumberValue("totalMoverRuns", workflowsInsightsByCategory.totalMoverRuns);
        writer.writeAdditionalData(workflowsInsightsByCategory.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeWorkflowsInsightsSummary(writer, workflowsInsightsSummary = {}) {
    if (workflowsInsightsSummary) {
        writer.writeNumberValue("failedRuns", workflowsInsightsSummary.failedRuns);
        writer.writeNumberValue("failedTasks", workflowsInsightsSummary.failedTasks);
        writer.writeNumberValue("failedUsers", workflowsInsightsSummary.failedUsers);
        writer.writeStringValue("@odata.type", workflowsInsightsSummary.odataType);
        writer.writeNumberValue("successfulRuns", workflowsInsightsSummary.successfulRuns);
        writer.writeNumberValue("successfulTasks", workflowsInsightsSummary.successfulTasks);
        writer.writeNumberValue("successfulUsers", workflowsInsightsSummary.successfulUsers);
        writer.writeNumberValue("totalRuns", workflowsInsightsSummary.totalRuns);
        writer.writeNumberValue("totalTasks", workflowsInsightsSummary.totalTasks);
        writer.writeNumberValue("totalUsers", workflowsInsightsSummary.totalUsers);
        writer.writeAdditionalData(workflowsInsightsSummary.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeWorkflowTemplate(writer, workflowTemplate = {}) {
    if (workflowTemplate) {
        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);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeWorkflowTemplateCollectionResponse(writer, workflowTemplateCollectionResponse = {}) {
    if (workflowTemplateCollectionResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, workflowTemplateCollectionResponse);
        writer.writeCollectionOfObjectValues("value", workflowTemplateCollectionResponse.value, serializeWorkflowTemplate);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeWorkflowVersion(writer, workflowVersion = {}) {
    if (workflowVersion) {
        serializeWorkflowBase(writer, workflowVersion);
        writer.writeNumberValue("versionNumber", workflowVersion.versionNumber);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeWorkflowVersionCollectionResponse(writer, workflowVersionCollectionResponse = {}) {
    if (workflowVersionCollectionResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, workflowVersionCollectionResponse);
        writer.writeCollectionOfObjectValues("value", workflowVersionCollectionResponse.value, serializeWorkflowVersion);
    }
}
export const CustomTaskExtensionOperationStatusObject = {
    Completed: "completed",
    Failed: "failed",
    UnknownFutureValue: "unknownFutureValue",
};
export const LifecycleTaskCategoryObject = {
    Joiner: "joiner",
    Leaver: "leaver",
    UnknownFutureValue: "unknownFutureValue",
    Mover: "mover",
};
export const LifecycleWorkflowCategoryObject = {
    Joiner: "joiner",
    Leaver: "leaver",
    UnknownFutureValue: "unknownFutureValue",
    Mover: "mover",
};
export const LifecycleWorkflowProcessingStatusObject = {
    Queued: "queued",
    InProgress: "inProgress",
    Completed: "completed",
    CompletedWithErrors: "completedWithErrors",
    Canceled: "canceled",
    Failed: "failed",
    UnknownFutureValue: "unknownFutureValue",
};
export const MembershipChangeTypeObject = {
    Add: "add",
    Remove: "remove",
    UnknownFutureValue: "unknownFutureValue",
};
export const ValueTypeObject = {
    EnumEscaped: "enum",
    String: "string",
    Int: "int",
    Bool: "bool",
    UnknownFutureValue: "unknownFutureValue",
};
export const WorkflowExecutionTypeObject = {
    Scheduled: "scheduled",
    OnDemand: "onDemand",
    UnknownFutureValue: "unknownFutureValue",
};
export const WorkflowTriggerTimeBasedAttributeObject = {
    EmployeeHireDate: "employeeHireDate",
    EmployeeLeaveDateTime: "employeeLeaveDateTime",
    UnknownFutureValue: "unknownFutureValue",
    CreatedDateTime: "createdDateTime",
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map