/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createGroupFromDiscriminatorValue, createIdentitySetFromDiscriminatorValue, createResultInfoFromDiscriminatorValue, createSiteFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, deserializeIntoEntity, serializeBaseCollectionPaginationCountResponse, serializeEntity, serializeGroup, serializeIdentitySet, serializeResultInfo, serializeSite } 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 {AddToReviewSetOperation}
 */
// @ts-ignore
export function createAddToReviewSetOperationFromDiscriminatorValue(parseNode) {
    return deserializeIntoAddToReviewSetOperation;
}
/**
 * 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 {CaseCollectionResponse}
 */
// @ts-ignore
export function createCaseCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoCaseCollectionResponse;
}
/**
 * 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 {CaseEscaped}
 */
// @ts-ignore
export function createCaseEscapedFromDiscriminatorValue(parseNode) {
    return deserializeIntoCaseEscaped;
}
/**
 * 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 {CaseExportOperationCollectionResponse}
 */
// @ts-ignore
export function createCaseExportOperationCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoCaseExportOperationCollectionResponse;
}
/**
 * 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 {CaseExportOperation}
 */
// @ts-ignore
export function createCaseExportOperationFromDiscriminatorValue(parseNode) {
    return deserializeIntoCaseExportOperation;
}
/**
 * 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 {CaseHoldOperation}
 */
// @ts-ignore
export function createCaseHoldOperationFromDiscriminatorValue(parseNode) {
    return deserializeIntoCaseHoldOperation;
}
/**
 * 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 {CaseIndexOperation}
 */
// @ts-ignore
export function createCaseIndexOperationFromDiscriminatorValue(parseNode) {
    return deserializeIntoCaseIndexOperation;
}
/**
 * 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 {CaseOperationCollectionResponse}
 */
// @ts-ignore
export function createCaseOperationCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoCaseOperationCollectionResponse;
}
/**
 * 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 {CaseOperation}
 */
// @ts-ignore
export function createCaseOperationFromDiscriminatorValue(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.ediscovery.addToReviewSetOperation":
                    return deserializeIntoAddToReviewSetOperation;
                case "#microsoft.graph.ediscovery.caseExportOperation":
                    return deserializeIntoCaseExportOperation;
                case "#microsoft.graph.ediscovery.caseHoldOperation":
                    return deserializeIntoCaseHoldOperation;
                case "#microsoft.graph.ediscovery.caseIndexOperation":
                    return deserializeIntoCaseIndexOperation;
                case "#microsoft.graph.ediscovery.estimateStatisticsOperation":
                    return deserializeIntoEstimateStatisticsOperation;
                case "#microsoft.graph.ediscovery.purgeDataOperation":
                    return deserializeIntoPurgeDataOperation;
                case "#microsoft.graph.ediscovery.tagOperation":
                    return deserializeIntoTagOperation;
            }
        }
    }
    return deserializeIntoCaseOperation;
}
/**
 * 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 {CaseSettings}
 */
// @ts-ignore
export function createCaseSettingsFromDiscriminatorValue(parseNode) {
    return deserializeIntoCaseSettings;
}
/**
 * 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 {CustodianCollectionResponse}
 */
// @ts-ignore
export function createCustodianCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoCustodianCollectionResponse;
}
/**
 * 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 {Custodian}
 */
// @ts-ignore
export function createCustodianFromDiscriminatorValue(parseNode) {
    return deserializeIntoCustodian;
}
/**
 * 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 {DataSourceCollectionResponse}
 */
// @ts-ignore
export function createDataSourceCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoDataSourceCollectionResponse;
}
/**
 * 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 {DataSourceContainer}
 */
// @ts-ignore
export function createDataSourceContainerFromDiscriminatorValue(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.ediscovery.custodian":
                    return deserializeIntoCustodian;
                case "#microsoft.graph.ediscovery.noncustodialDataSource":
                    return deserializeIntoNoncustodialDataSource;
            }
        }
    }
    return deserializeIntoDataSourceContainer;
}
/**
 * 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 {DataSource}
 */
// @ts-ignore
export function createDataSourceFromDiscriminatorValue(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.ediscovery.siteSource":
                    return deserializeIntoSiteSource;
                case "#microsoft.graph.ediscovery.unifiedGroupSource":
                    return deserializeIntoUnifiedGroupSource;
                case "#microsoft.graph.ediscovery.userSource":
                    return deserializeIntoUserSource;
            }
        }
    }
    return deserializeIntoDataSource;
}
/**
 * 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 {Ediscoveryroot}
 */
// @ts-ignore
export function createEdiscoveryrootFromDiscriminatorValue(parseNode) {
    return deserializeIntoEdiscoveryroot;
}
/**
 * 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 {EstimateStatisticsOperation}
 */
// @ts-ignore
export function createEstimateStatisticsOperationFromDiscriminatorValue(parseNode) {
    return deserializeIntoEstimateStatisticsOperation;
}
/**
 * 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 {LegalHoldCollectionResponse}
 */
// @ts-ignore
export function createLegalHoldCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoLegalHoldCollectionResponse;
}
/**
 * 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 {LegalHold}
 */
// @ts-ignore
export function createLegalHoldFromDiscriminatorValue(parseNode) {
    return deserializeIntoLegalHold;
}
/**
 * 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 {NoncustodialDataSourceCollectionResponse}
 */
// @ts-ignore
export function createNoncustodialDataSourceCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoNoncustodialDataSourceCollectionResponse;
}
/**
 * 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 {NoncustodialDataSource}
 */
// @ts-ignore
export function createNoncustodialDataSourceFromDiscriminatorValue(parseNode) {
    return deserializeIntoNoncustodialDataSource;
}
/**
 * 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 {OcrSettings}
 */
// @ts-ignore
export function createOcrSettingsFromDiscriminatorValue(parseNode) {
    return deserializeIntoOcrSettings;
}
/**
 * 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 {PurgeDataOperation}
 */
// @ts-ignore
export function createPurgeDataOperationFromDiscriminatorValue(parseNode) {
    return deserializeIntoPurgeDataOperation;
}
/**
 * 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 {RedundancyDetectionSettings}
 */
// @ts-ignore
export function createRedundancyDetectionSettingsFromDiscriminatorValue(parseNode) {
    return deserializeIntoRedundancyDetectionSettings;
}
/**
 * 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 {ReviewSetCollectionResponse}
 */
// @ts-ignore
export function createReviewSetCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoReviewSetCollectionResponse;
}
/**
 * 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 {ReviewSet}
 */
// @ts-ignore
export function createReviewSetFromDiscriminatorValue(parseNode) {
    return deserializeIntoReviewSet;
}
/**
 * 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 {ReviewSetQueryCollectionResponse}
 */
// @ts-ignore
export function createReviewSetQueryCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoReviewSetQueryCollectionResponse;
}
/**
 * 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 {ReviewSetQuery}
 */
// @ts-ignore
export function createReviewSetQueryFromDiscriminatorValue(parseNode) {
    return deserializeIntoReviewSetQuery;
}
/**
 * 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 {SiteSourceCollectionResponse}
 */
// @ts-ignore
export function createSiteSourceCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoSiteSourceCollectionResponse;
}
/**
 * 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 {SiteSource}
 */
// @ts-ignore
export function createSiteSourceFromDiscriminatorValue(parseNode) {
    return deserializeIntoSiteSource;
}
/**
 * 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 {SourceCollectionCollectionResponse}
 */
// @ts-ignore
export function createSourceCollectionCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoSourceCollectionCollectionResponse;
}
/**
 * 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 {SourceCollection}
 */
// @ts-ignore
export function createSourceCollectionFromDiscriminatorValue(parseNode) {
    return deserializeIntoSourceCollection;
}
/**
 * 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 {TagCollectionResponse}
 */
// @ts-ignore
export function createTagCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoTagCollectionResponse;
}
/**
 * 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 {Tag}
 */
// @ts-ignore
export function createTagFromDiscriminatorValue(parseNode) {
    return deserializeIntoTag;
}
/**
 * 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 {TagOperation}
 */
// @ts-ignore
export function createTagOperationFromDiscriminatorValue(parseNode) {
    return deserializeIntoTagOperation;
}
/**
 * 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 {TopicModelingSettings}
 */
// @ts-ignore
export function createTopicModelingSettingsFromDiscriminatorValue(parseNode) {
    return deserializeIntoTopicModelingSettings;
}
/**
 * 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 {UnifiedGroupSourceCollectionResponse}
 */
// @ts-ignore
export function createUnifiedGroupSourceCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoUnifiedGroupSourceCollectionResponse;
}
/**
 * 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 {UnifiedGroupSource}
 */
// @ts-ignore
export function createUnifiedGroupSourceFromDiscriminatorValue(parseNode) {
    return deserializeIntoUnifiedGroupSource;
}
/**
 * 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 {UserSourceCollectionResponse}
 */
// @ts-ignore
export function createUserSourceCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoUserSourceCollectionResponse;
}
/**
 * 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 {UserSource}
 */
// @ts-ignore
export function createUserSourceFromDiscriminatorValue(parseNode) {
    return deserializeIntoUserSource;
}
/**
 * The deserialization information for the current model
 * @param AddToReviewSetOperation The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoAddToReviewSetOperation(addToReviewSetOperation = {}) {
    return Object.assign(Object.assign({}, deserializeIntoCaseOperation(addToReviewSetOperation)), { "reviewSet": n => { addToReviewSetOperation.reviewSet = n.getObjectValue(createReviewSetFromDiscriminatorValue); }, "sourceCollection": n => { addToReviewSetOperation.sourceCollection = n.getObjectValue(createSourceCollectionFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param CaseCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCaseCollectionResponse(caseCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(caseCollectionResponse)), { "value": n => { caseCollectionResponse.value = n.getCollectionOfObjectValues(createCaseEscapedFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param CaseEscaped The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCaseEscaped(caseEscaped = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(caseEscaped)), { "closedBy": n => { caseEscaped.closedBy = n.getObjectValue(createIdentitySetFromDiscriminatorValue); }, "closedDateTime": n => { caseEscaped.closedDateTime = n.getDateValue(); }, "createdDateTime": n => { caseEscaped.createdDateTime = n.getDateValue(); }, "custodians": n => { caseEscaped.custodians = n.getCollectionOfObjectValues(createCustodianFromDiscriminatorValue); }, "description": n => { caseEscaped.description = n.getStringValue(); }, "displayName": n => { caseEscaped.displayName = n.getStringValue(); }, "externalId": n => { caseEscaped.externalId = n.getStringValue(); }, "lastModifiedBy": n => { caseEscaped.lastModifiedBy = n.getObjectValue(createIdentitySetFromDiscriminatorValue); }, "lastModifiedDateTime": n => { caseEscaped.lastModifiedDateTime = n.getDateValue(); }, "legalHolds": n => { caseEscaped.legalHolds = n.getCollectionOfObjectValues(createLegalHoldFromDiscriminatorValue); }, "noncustodialDataSources": n => { caseEscaped.noncustodialDataSources = n.getCollectionOfObjectValues(createNoncustodialDataSourceFromDiscriminatorValue); }, "operations": n => { caseEscaped.operations = n.getCollectionOfObjectValues(createCaseOperationFromDiscriminatorValue); }, "reviewSets": n => { caseEscaped.reviewSets = n.getCollectionOfObjectValues(createReviewSetFromDiscriminatorValue); }, "settings": n => { caseEscaped.settings = n.getObjectValue(createCaseSettingsFromDiscriminatorValue); }, "sourceCollections": n => { caseEscaped.sourceCollections = n.getCollectionOfObjectValues(createSourceCollectionFromDiscriminatorValue); }, "status": n => { caseEscaped.status = n.getEnumValue(CaseStatusObject); }, "tags": n => { caseEscaped.tags = n.getCollectionOfObjectValues(createTagFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param CaseExportOperation The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCaseExportOperation(caseExportOperation = {}) {
    return Object.assign(Object.assign({}, deserializeIntoCaseOperation(caseExportOperation)), { "azureBlobContainer": n => { caseExportOperation.azureBlobContainer = n.getStringValue(); }, "azureBlobToken": n => { caseExportOperation.azureBlobToken = n.getStringValue(); }, "description": n => { caseExportOperation.description = n.getStringValue(); }, "exportOptions": n => { caseExportOperation.exportOptions = n.getCollectionOfEnumValues(ExportOptionsObject); }, "exportStructure": n => { caseExportOperation.exportStructure = n.getEnumValue(ExportFileStructureObject); }, "outputFolderId": n => { caseExportOperation.outputFolderId = n.getStringValue(); }, "outputName": n => { caseExportOperation.outputName = n.getStringValue(); }, "reviewSet": n => { caseExportOperation.reviewSet = n.getObjectValue(createReviewSetFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param CaseExportOperationCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCaseExportOperationCollectionResponse(caseExportOperationCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(caseExportOperationCollectionResponse)), { "value": n => { caseExportOperationCollectionResponse.value = n.getCollectionOfObjectValues(createCaseExportOperationFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param CaseHoldOperation The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCaseHoldOperation(caseHoldOperation = {}) {
    return Object.assign({}, deserializeIntoCaseOperation(caseHoldOperation));
}
/**
 * The deserialization information for the current model
 * @param CaseIndexOperation The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCaseIndexOperation(caseIndexOperation = {}) {
    return Object.assign({}, deserializeIntoCaseOperation(caseIndexOperation));
}
/**
 * The deserialization information for the current model
 * @param CaseOperation The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCaseOperation(caseOperation = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(caseOperation)), { "action": n => { caseOperation.action = n.getEnumValue(CaseActionObject); }, "completedDateTime": n => { caseOperation.completedDateTime = n.getDateValue(); }, "createdBy": n => { caseOperation.createdBy = n.getObjectValue(createIdentitySetFromDiscriminatorValue); }, "createdDateTime": n => { caseOperation.createdDateTime = n.getDateValue(); }, "percentProgress": n => { caseOperation.percentProgress = n.getNumberValue(); }, "resultInfo": n => { caseOperation.resultInfo = n.getObjectValue(createResultInfoFromDiscriminatorValue); }, "status": n => { caseOperation.status = n.getEnumValue(CaseOperationStatusObject); } });
}
/**
 * The deserialization information for the current model
 * @param CaseOperationCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCaseOperationCollectionResponse(caseOperationCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(caseOperationCollectionResponse)), { "value": n => { caseOperationCollectionResponse.value = n.getCollectionOfObjectValues(createCaseOperationFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param CaseSettings The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCaseSettings(caseSettings = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(caseSettings)), { "ocr": n => { caseSettings.ocr = n.getObjectValue(createOcrSettingsFromDiscriminatorValue); }, "redundancyDetection": n => { caseSettings.redundancyDetection = n.getObjectValue(createRedundancyDetectionSettingsFromDiscriminatorValue); }, "topicModeling": n => { caseSettings.topicModeling = n.getObjectValue(createTopicModelingSettingsFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param Custodian The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCustodian(custodian = {}) {
    return Object.assign(Object.assign({}, deserializeIntoDataSourceContainer(custodian)), { "acknowledgedDateTime": n => { custodian.acknowledgedDateTime = n.getDateValue(); }, "applyHoldToSources": n => { custodian.applyHoldToSources = n.getBooleanValue(); }, "email": n => { custodian.email = n.getStringValue(); }, "siteSources": n => { custodian.siteSources = n.getCollectionOfObjectValues(createSiteSourceFromDiscriminatorValue); }, "unifiedGroupSources": n => { custodian.unifiedGroupSources = n.getCollectionOfObjectValues(createUnifiedGroupSourceFromDiscriminatorValue); }, "userSources": n => { custodian.userSources = n.getCollectionOfObjectValues(createUserSourceFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param CustodianCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCustodianCollectionResponse(custodianCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(custodianCollectionResponse)), { "value": n => { custodianCollectionResponse.value = n.getCollectionOfObjectValues(createCustodianFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param DataSource The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoDataSource(dataSource = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(dataSource)), { "createdBy": n => { dataSource.createdBy = n.getObjectValue(createIdentitySetFromDiscriminatorValue); }, "createdDateTime": n => { dataSource.createdDateTime = n.getDateValue(); }, "displayName": n => { dataSource.displayName = n.getStringValue(); }, "holdStatus": n => { dataSource.holdStatus = n.getEnumValue(DataSourceHoldStatusObject); } });
}
/**
 * The deserialization information for the current model
 * @param DataSourceCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoDataSourceCollectionResponse(dataSourceCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(dataSourceCollectionResponse)), { "value": n => { dataSourceCollectionResponse.value = n.getCollectionOfObjectValues(createDataSourceFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param DataSourceContainer The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoDataSourceContainer(dataSourceContainer = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(dataSourceContainer)), { "createdDateTime": n => { dataSourceContainer.createdDateTime = n.getDateValue(); }, "displayName": n => { dataSourceContainer.displayName = n.getStringValue(); }, "holdStatus": n => { dataSourceContainer.holdStatus = n.getEnumValue(DataSourceHoldStatusObject); }, "lastIndexOperation": n => { dataSourceContainer.lastIndexOperation = n.getObjectValue(createCaseIndexOperationFromDiscriminatorValue); }, "lastModifiedDateTime": n => { dataSourceContainer.lastModifiedDateTime = n.getDateValue(); }, "releasedDateTime": n => { dataSourceContainer.releasedDateTime = n.getDateValue(); }, "status": n => { dataSourceContainer.status = n.getEnumValue(DataSourceContainerStatusObject); } });
}
/**
 * The deserialization information for the current model
 * @param Ediscoveryroot The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoEdiscoveryroot(ediscoveryroot = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(ediscoveryroot)), { "cases": n => { ediscoveryroot.cases = n.getCollectionOfObjectValues(createCaseEscapedFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param EstimateStatisticsOperation The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoEstimateStatisticsOperation(estimateStatisticsOperation = {}) {
    return Object.assign(Object.assign({}, deserializeIntoCaseOperation(estimateStatisticsOperation)), { "indexedItemCount": n => { estimateStatisticsOperation.indexedItemCount = n.getNumberValue(); }, "indexedItemsSize": n => { estimateStatisticsOperation.indexedItemsSize = n.getNumberValue(); }, "mailboxCount": n => { estimateStatisticsOperation.mailboxCount = n.getNumberValue(); }, "siteCount": n => { estimateStatisticsOperation.siteCount = n.getNumberValue(); }, "sourceCollection": n => { estimateStatisticsOperation.sourceCollection = n.getObjectValue(createSourceCollectionFromDiscriminatorValue); }, "unindexedItemCount": n => { estimateStatisticsOperation.unindexedItemCount = n.getNumberValue(); }, "unindexedItemsSize": n => { estimateStatisticsOperation.unindexedItemsSize = n.getNumberValue(); } });
}
/**
 * The deserialization information for the current model
 * @param LegalHold The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoLegalHold(legalHold = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(legalHold)), { "contentQuery": n => { legalHold.contentQuery = n.getStringValue(); }, "createdBy": n => { legalHold.createdBy = n.getObjectValue(createIdentitySetFromDiscriminatorValue); }, "createdDateTime": n => { legalHold.createdDateTime = n.getDateValue(); }, "description": n => { legalHold.description = n.getStringValue(); }, "displayName": n => { legalHold.displayName = n.getStringValue(); }, "errors": n => { legalHold.errors = n.getCollectionOfPrimitiveValues(); }, "isEnabled": n => { legalHold.isEnabled = n.getBooleanValue(); }, "lastModifiedBy": n => { legalHold.lastModifiedBy = n.getObjectValue(createIdentitySetFromDiscriminatorValue); }, "lastModifiedDateTime": n => { legalHold.lastModifiedDateTime = n.getDateValue(); }, "siteSources": n => { legalHold.siteSources = n.getCollectionOfObjectValues(createSiteSourceFromDiscriminatorValue); }, "status": n => { legalHold.status = n.getEnumValue(LegalHoldStatusObject); }, "unifiedGroupSources": n => { legalHold.unifiedGroupSources = n.getCollectionOfObjectValues(createUnifiedGroupSourceFromDiscriminatorValue); }, "userSources": n => { legalHold.userSources = n.getCollectionOfObjectValues(createUserSourceFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param LegalHoldCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoLegalHoldCollectionResponse(legalHoldCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(legalHoldCollectionResponse)), { "value": n => { legalHoldCollectionResponse.value = n.getCollectionOfObjectValues(createLegalHoldFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param NoncustodialDataSource The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoNoncustodialDataSource(noncustodialDataSource = {}) {
    return Object.assign(Object.assign({}, deserializeIntoDataSourceContainer(noncustodialDataSource)), { "applyHoldToSource": n => { noncustodialDataSource.applyHoldToSource = n.getBooleanValue(); }, "dataSource": n => { noncustodialDataSource.dataSource = n.getObjectValue(createDataSourceFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param NoncustodialDataSourceCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoNoncustodialDataSourceCollectionResponse(noncustodialDataSourceCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(noncustodialDataSourceCollectionResponse)), { "value": n => { noncustodialDataSourceCollectionResponse.value = n.getCollectionOfObjectValues(createNoncustodialDataSourceFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param OcrSettings The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoOcrSettings(ocrSettings = {}) {
    return {
        "backingStoreEnabled": n => { ocrSettings.backingStoreEnabled = true; },
        "isEnabled": n => { ocrSettings.isEnabled = n.getBooleanValue(); },
        "maxImageSize": n => { ocrSettings.maxImageSize = n.getNumberValue(); },
        "@odata.type": n => { ocrSettings.odataType = n.getStringValue(); },
        "timeout": n => { ocrSettings.timeout = n.getDurationValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @param PurgeDataOperation The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoPurgeDataOperation(purgeDataOperation = {}) {
    return Object.assign({}, deserializeIntoCaseOperation(purgeDataOperation));
}
/**
 * The deserialization information for the current model
 * @param RedundancyDetectionSettings The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoRedundancyDetectionSettings(redundancyDetectionSettings = {}) {
    return {
        "backingStoreEnabled": n => { redundancyDetectionSettings.backingStoreEnabled = true; },
        "isEnabled": n => { redundancyDetectionSettings.isEnabled = n.getBooleanValue(); },
        "maxWords": n => { redundancyDetectionSettings.maxWords = n.getNumberValue(); },
        "minWords": n => { redundancyDetectionSettings.minWords = n.getNumberValue(); },
        "@odata.type": n => { redundancyDetectionSettings.odataType = n.getStringValue(); },
        "similarityThreshold": n => { redundancyDetectionSettings.similarityThreshold = n.getNumberValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @param ReviewSet The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoReviewSet(reviewSet = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(reviewSet)), { "createdBy": n => { reviewSet.createdBy = n.getObjectValue(createIdentitySetFromDiscriminatorValue); }, "createdDateTime": n => { reviewSet.createdDateTime = n.getDateValue(); }, "displayName": n => { reviewSet.displayName = n.getStringValue(); }, "queries": n => { reviewSet.queries = n.getCollectionOfObjectValues(createReviewSetQueryFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param ReviewSetCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoReviewSetCollectionResponse(reviewSetCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(reviewSetCollectionResponse)), { "value": n => { reviewSetCollectionResponse.value = n.getCollectionOfObjectValues(createReviewSetFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param ReviewSetQuery The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoReviewSetQuery(reviewSetQuery = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(reviewSetQuery)), { "createdBy": n => { reviewSetQuery.createdBy = n.getObjectValue(createIdentitySetFromDiscriminatorValue); }, "createdDateTime": n => { reviewSetQuery.createdDateTime = n.getDateValue(); }, "displayName": n => { reviewSetQuery.displayName = n.getStringValue(); }, "lastModifiedBy": n => { reviewSetQuery.lastModifiedBy = n.getObjectValue(createIdentitySetFromDiscriminatorValue); }, "lastModifiedDateTime": n => { reviewSetQuery.lastModifiedDateTime = n.getDateValue(); }, "query": n => { reviewSetQuery.query = n.getStringValue(); } });
}
/**
 * The deserialization information for the current model
 * @param ReviewSetQueryCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoReviewSetQueryCollectionResponse(reviewSetQueryCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(reviewSetQueryCollectionResponse)), { "value": n => { reviewSetQueryCollectionResponse.value = n.getCollectionOfObjectValues(createReviewSetQueryFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param SiteSource The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoSiteSource(siteSource = {}) {
    return Object.assign(Object.assign({}, deserializeIntoDataSource(siteSource)), { "site": n => { siteSource.site = n.getObjectValue(createSiteFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param SiteSourceCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoSiteSourceCollectionResponse(siteSourceCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(siteSourceCollectionResponse)), { "value": n => { siteSourceCollectionResponse.value = n.getCollectionOfObjectValues(createSiteSourceFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param SourceCollection The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoSourceCollection(sourceCollection = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(sourceCollection)), { "additionalSources": n => { sourceCollection.additionalSources = n.getCollectionOfObjectValues(createDataSourceFromDiscriminatorValue); }, "addToReviewSetOperation": n => { sourceCollection.addToReviewSetOperation = n.getObjectValue(createAddToReviewSetOperationFromDiscriminatorValue); }, "contentQuery": n => { sourceCollection.contentQuery = n.getStringValue(); }, "createdBy": n => { sourceCollection.createdBy = n.getObjectValue(createIdentitySetFromDiscriminatorValue); }, "createdDateTime": n => { sourceCollection.createdDateTime = n.getDateValue(); }, "custodianSources": n => { sourceCollection.custodianSources = n.getCollectionOfObjectValues(createDataSourceFromDiscriminatorValue); }, "dataSourceScopes": n => { sourceCollection.dataSourceScopes = n.getCollectionOfEnumValues(DataSourceScopesObject); }, "description": n => { sourceCollection.description = n.getStringValue(); }, "displayName": n => { sourceCollection.displayName = n.getStringValue(); }, "lastEstimateStatisticsOperation": n => { sourceCollection.lastEstimateStatisticsOperation = n.getObjectValue(createEstimateStatisticsOperationFromDiscriminatorValue); }, "lastModifiedBy": n => { sourceCollection.lastModifiedBy = n.getObjectValue(createIdentitySetFromDiscriminatorValue); }, "lastModifiedDateTime": n => { sourceCollection.lastModifiedDateTime = n.getDateValue(); }, "noncustodialSources": n => { sourceCollection.noncustodialSources = n.getCollectionOfObjectValues(createNoncustodialDataSourceFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param SourceCollectionCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoSourceCollectionCollectionResponse(sourceCollectionCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(sourceCollectionCollectionResponse)), { "value": n => { sourceCollectionCollectionResponse.value = n.getCollectionOfObjectValues(createSourceCollectionFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param Tag The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTag(tag = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(tag)), { "childSelectability": n => { tag.childSelectability = n.getEnumValue(ChildSelectabilityObject); }, "childTags": n => { tag.childTags = n.getCollectionOfObjectValues(createTagFromDiscriminatorValue); }, "createdBy": n => { tag.createdBy = n.getObjectValue(createIdentitySetFromDiscriminatorValue); }, "description": n => { tag.description = n.getStringValue(); }, "displayName": n => { tag.displayName = n.getStringValue(); }, "lastModifiedDateTime": n => { tag.lastModifiedDateTime = n.getDateValue(); }, "parent": n => { tag.parent = n.getObjectValue(createTagFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param TagCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTagCollectionResponse(tagCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(tagCollectionResponse)), { "value": n => { tagCollectionResponse.value = n.getCollectionOfObjectValues(createTagFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param TagOperation The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTagOperation(tagOperation = {}) {
    return Object.assign({}, deserializeIntoCaseOperation(tagOperation));
}
/**
 * The deserialization information for the current model
 * @param TopicModelingSettings The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTopicModelingSettings(topicModelingSettings = {}) {
    return {
        "backingStoreEnabled": n => { topicModelingSettings.backingStoreEnabled = true; },
        "dynamicallyAdjustTopicCount": n => { topicModelingSettings.dynamicallyAdjustTopicCount = n.getBooleanValue(); },
        "ignoreNumbers": n => { topicModelingSettings.ignoreNumbers = n.getBooleanValue(); },
        "isEnabled": n => { topicModelingSettings.isEnabled = n.getBooleanValue(); },
        "@odata.type": n => { topicModelingSettings.odataType = n.getStringValue(); },
        "topicCount": n => { topicModelingSettings.topicCount = n.getNumberValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @param UnifiedGroupSource The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoUnifiedGroupSource(unifiedGroupSource = {}) {
    return Object.assign(Object.assign({}, deserializeIntoDataSource(unifiedGroupSource)), { "group": n => { unifiedGroupSource.group = n.getObjectValue(createGroupFromDiscriminatorValue); }, "includedSources": n => { unifiedGroupSource.includedSources = n.getCollectionOfEnumValues(SourceTypeObject); } });
}
/**
 * The deserialization information for the current model
 * @param UnifiedGroupSourceCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoUnifiedGroupSourceCollectionResponse(unifiedGroupSourceCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(unifiedGroupSourceCollectionResponse)), { "value": n => { unifiedGroupSourceCollectionResponse.value = n.getCollectionOfObjectValues(createUnifiedGroupSourceFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param UserSource The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoUserSource(userSource = {}) {
    return Object.assign(Object.assign({}, deserializeIntoDataSource(userSource)), { "email": n => { userSource.email = n.getStringValue(); }, "includedSources": n => { userSource.includedSources = n.getCollectionOfEnumValues(SourceTypeObject); }, "siteWebUrl": n => { userSource.siteWebUrl = n.getStringValue(); } });
}
/**
 * The deserialization information for the current model
 * @param UserSourceCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoUserSourceCollectionResponse(userSourceCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(userSourceCollectionResponse)), { "value": n => { userSourceCollectionResponse.value = n.getCollectionOfObjectValues(createUserSourceFromDiscriminatorValue); } });
}
/**
 * Serializes information the current object
 * @param AddToReviewSetOperation The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeAddToReviewSetOperation(writer, addToReviewSetOperation = {}, isSerializingDerivedType = false) {
    if (!addToReviewSetOperation || isSerializingDerivedType) {
        return;
    }
    serializeCaseOperation(writer, addToReviewSetOperation, isSerializingDerivedType);
    writer.writeObjectValue("reviewSet", addToReviewSetOperation.reviewSet, serializeReviewSet);
    writer.writeObjectValue("sourceCollection", addToReviewSetOperation.sourceCollection, serializeSourceCollection);
}
/**
 * Serializes information the current object
 * @param CaseCollectionResponse The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeCaseCollectionResponse(writer, caseCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!caseCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, caseCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", caseCollectionResponse.value, serializeCaseEscaped);
}
/**
 * Serializes information the current object
 * @param CaseEscaped The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeCaseEscaped(writer, caseEscaped = {}, isSerializingDerivedType = false) {
    if (!caseEscaped || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, caseEscaped, isSerializingDerivedType);
    writer.writeObjectValue("closedBy", caseEscaped.closedBy, serializeIdentitySet);
    writer.writeDateValue("closedDateTime", caseEscaped.closedDateTime);
    writer.writeDateValue("createdDateTime", caseEscaped.createdDateTime);
    writer.writeCollectionOfObjectValues("custodians", caseEscaped.custodians, serializeCustodian);
    writer.writeStringValue("description", caseEscaped.description);
    writer.writeStringValue("displayName", caseEscaped.displayName);
    writer.writeStringValue("externalId", caseEscaped.externalId);
    writer.writeObjectValue("lastModifiedBy", caseEscaped.lastModifiedBy, serializeIdentitySet);
    writer.writeDateValue("lastModifiedDateTime", caseEscaped.lastModifiedDateTime);
    writer.writeCollectionOfObjectValues("legalHolds", caseEscaped.legalHolds, serializeLegalHold);
    writer.writeCollectionOfObjectValues("noncustodialDataSources", caseEscaped.noncustodialDataSources, serializeNoncustodialDataSource);
    writer.writeCollectionOfObjectValues("operations", caseEscaped.operations, serializeCaseOperation);
    writer.writeCollectionOfObjectValues("reviewSets", caseEscaped.reviewSets, serializeReviewSet);
    writer.writeObjectValue("settings", caseEscaped.settings, serializeCaseSettings);
    writer.writeCollectionOfObjectValues("sourceCollections", caseEscaped.sourceCollections, serializeSourceCollection);
    writer.writeEnumValue("status", caseEscaped.status);
    writer.writeCollectionOfObjectValues("tags", caseEscaped.tags, serializeTag);
}
/**
 * Serializes information the current object
 * @param CaseExportOperation The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeCaseExportOperation(writer, caseExportOperation = {}, isSerializingDerivedType = false) {
    if (!caseExportOperation || isSerializingDerivedType) {
        return;
    }
    serializeCaseOperation(writer, caseExportOperation, isSerializingDerivedType);
    writer.writeStringValue("azureBlobContainer", caseExportOperation.azureBlobContainer);
    writer.writeStringValue("azureBlobToken", caseExportOperation.azureBlobToken);
    writer.writeStringValue("description", caseExportOperation.description);
    writer.writeEnumValue("exportOptions", caseExportOperation.exportOptions);
    writer.writeEnumValue("exportStructure", caseExportOperation.exportStructure);
    writer.writeStringValue("outputFolderId", caseExportOperation.outputFolderId);
    writer.writeStringValue("outputName", caseExportOperation.outputName);
    writer.writeObjectValue("reviewSet", caseExportOperation.reviewSet, serializeReviewSet);
}
/**
 * Serializes information the current object
 * @param CaseExportOperationCollectionResponse The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeCaseExportOperationCollectionResponse(writer, caseExportOperationCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!caseExportOperationCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, caseExportOperationCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", caseExportOperationCollectionResponse.value, serializeCaseExportOperation);
}
/**
 * Serializes information the current object
 * @param CaseHoldOperation The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeCaseHoldOperation(writer, caseHoldOperation = {}, isSerializingDerivedType = false) {
    if (!caseHoldOperation || isSerializingDerivedType) {
        return;
    }
    serializeCaseOperation(writer, caseHoldOperation, isSerializingDerivedType);
}
/**
 * Serializes information the current object
 * @param CaseIndexOperation The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeCaseIndexOperation(writer, caseIndexOperation = {}, isSerializingDerivedType = false) {
    if (!caseIndexOperation || isSerializingDerivedType) {
        return;
    }
    serializeCaseOperation(writer, caseIndexOperation, isSerializingDerivedType);
}
/**
 * Serializes information the current object
 * @param CaseOperation The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeCaseOperation(writer, caseOperation = {}, isSerializingDerivedType = false) {
    if (!caseOperation || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, caseOperation, isSerializingDerivedType);
    writer.writeEnumValue("action", caseOperation.action);
    writer.writeDateValue("completedDateTime", caseOperation.completedDateTime);
    writer.writeObjectValue("createdBy", caseOperation.createdBy, serializeIdentitySet);
    writer.writeDateValue("createdDateTime", caseOperation.createdDateTime);
    writer.writeNumberValue("percentProgress", caseOperation.percentProgress);
    writer.writeObjectValue("resultInfo", caseOperation.resultInfo, serializeResultInfo);
    writer.writeEnumValue("status", caseOperation.status);
    switch (caseOperation.odataType) {
        case "#microsoft.graph.ediscovery.addToReviewSetOperation":
            serializeAddToReviewSetOperation(writer, caseOperation, true);
            break;
        case "#microsoft.graph.ediscovery.caseExportOperation":
            serializeCaseExportOperation(writer, caseOperation, true);
            break;
        case "#microsoft.graph.ediscovery.caseHoldOperation":
            serializeCaseHoldOperation(writer, caseOperation, true);
            break;
        case "#microsoft.graph.ediscovery.caseIndexOperation":
            serializeCaseIndexOperation(writer, caseOperation, true);
            break;
        case "#microsoft.graph.ediscovery.estimateStatisticsOperation":
            serializeEstimateStatisticsOperation(writer, caseOperation, true);
            break;
        case "#microsoft.graph.ediscovery.purgeDataOperation":
            serializePurgeDataOperation(writer, caseOperation, true);
            break;
        case "#microsoft.graph.ediscovery.tagOperation":
            serializeTagOperation(writer, caseOperation, true);
            break;
    }
}
/**
 * Serializes information the current object
 * @param CaseOperationCollectionResponse The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeCaseOperationCollectionResponse(writer, caseOperationCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!caseOperationCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, caseOperationCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", caseOperationCollectionResponse.value, serializeCaseOperation);
}
/**
 * Serializes information the current object
 * @param CaseSettings The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeCaseSettings(writer, caseSettings = {}, isSerializingDerivedType = false) {
    if (!caseSettings || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, caseSettings, isSerializingDerivedType);
    writer.writeObjectValue("ocr", caseSettings.ocr, serializeOcrSettings);
    writer.writeObjectValue("redundancyDetection", caseSettings.redundancyDetection, serializeRedundancyDetectionSettings);
    writer.writeObjectValue("topicModeling", caseSettings.topicModeling, serializeTopicModelingSettings);
}
/**
 * Serializes information the current object
 * @param Custodian The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeCustodian(writer, custodian = {}, isSerializingDerivedType = false) {
    if (!custodian || isSerializingDerivedType) {
        return;
    }
    serializeDataSourceContainer(writer, custodian, isSerializingDerivedType);
    writer.writeDateValue("acknowledgedDateTime", custodian.acknowledgedDateTime);
    writer.writeBooleanValue("applyHoldToSources", custodian.applyHoldToSources);
    writer.writeStringValue("email", custodian.email);
    writer.writeCollectionOfObjectValues("siteSources", custodian.siteSources, serializeSiteSource);
    writer.writeCollectionOfObjectValues("unifiedGroupSources", custodian.unifiedGroupSources, serializeUnifiedGroupSource);
    writer.writeCollectionOfObjectValues("userSources", custodian.userSources, serializeUserSource);
}
/**
 * Serializes information the current object
 * @param CustodianCollectionResponse The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeCustodianCollectionResponse(writer, custodianCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!custodianCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, custodianCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", custodianCollectionResponse.value, serializeCustodian);
}
/**
 * Serializes information the current object
 * @param DataSource The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeDataSource(writer, dataSource = {}, isSerializingDerivedType = false) {
    if (!dataSource || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, dataSource, isSerializingDerivedType);
    writer.writeObjectValue("createdBy", dataSource.createdBy, serializeIdentitySet);
    writer.writeDateValue("createdDateTime", dataSource.createdDateTime);
    writer.writeStringValue("displayName", dataSource.displayName);
    writer.writeEnumValue("holdStatus", dataSource.holdStatus);
    switch (dataSource.odataType) {
        case "#microsoft.graph.ediscovery.siteSource":
            serializeSiteSource(writer, dataSource, true);
            break;
        case "#microsoft.graph.ediscovery.unifiedGroupSource":
            serializeUnifiedGroupSource(writer, dataSource, true);
            break;
        case "#microsoft.graph.ediscovery.userSource":
            serializeUserSource(writer, dataSource, true);
            break;
    }
}
/**
 * Serializes information the current object
 * @param DataSourceCollectionResponse The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeDataSourceCollectionResponse(writer, dataSourceCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!dataSourceCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, dataSourceCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", dataSourceCollectionResponse.value, serializeDataSource);
}
/**
 * Serializes information the current object
 * @param DataSourceContainer The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeDataSourceContainer(writer, dataSourceContainer = {}, isSerializingDerivedType = false) {
    if (!dataSourceContainer || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, dataSourceContainer, isSerializingDerivedType);
    writer.writeDateValue("createdDateTime", dataSourceContainer.createdDateTime);
    writer.writeStringValue("displayName", dataSourceContainer.displayName);
    writer.writeEnumValue("holdStatus", dataSourceContainer.holdStatus);
    writer.writeObjectValue("lastIndexOperation", dataSourceContainer.lastIndexOperation, serializeCaseIndexOperation);
    writer.writeDateValue("lastModifiedDateTime", dataSourceContainer.lastModifiedDateTime);
    writer.writeDateValue("releasedDateTime", dataSourceContainer.releasedDateTime);
    writer.writeEnumValue("status", dataSourceContainer.status);
    switch (dataSourceContainer.odataType) {
        case "#microsoft.graph.ediscovery.custodian":
            serializeCustodian(writer, dataSourceContainer, true);
            break;
        case "#microsoft.graph.ediscovery.noncustodialDataSource":
            serializeNoncustodialDataSource(writer, dataSourceContainer, true);
            break;
    }
}
/**
 * Serializes information the current object
 * @param Ediscoveryroot The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeEdiscoveryroot(writer, ediscoveryroot = {}, isSerializingDerivedType = false) {
    if (!ediscoveryroot || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, ediscoveryroot, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("cases", ediscoveryroot.cases, serializeCaseEscaped);
}
/**
 * Serializes information the current object
 * @param EstimateStatisticsOperation The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeEstimateStatisticsOperation(writer, estimateStatisticsOperation = {}, isSerializingDerivedType = false) {
    if (!estimateStatisticsOperation || isSerializingDerivedType) {
        return;
    }
    serializeCaseOperation(writer, estimateStatisticsOperation, isSerializingDerivedType);
    writer.writeNumberValue("indexedItemCount", estimateStatisticsOperation.indexedItemCount);
    writer.writeNumberValue("indexedItemsSize", estimateStatisticsOperation.indexedItemsSize);
    writer.writeNumberValue("mailboxCount", estimateStatisticsOperation.mailboxCount);
    writer.writeNumberValue("siteCount", estimateStatisticsOperation.siteCount);
    writer.writeObjectValue("sourceCollection", estimateStatisticsOperation.sourceCollection, serializeSourceCollection);
    writer.writeNumberValue("unindexedItemCount", estimateStatisticsOperation.unindexedItemCount);
    writer.writeNumberValue("unindexedItemsSize", estimateStatisticsOperation.unindexedItemsSize);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param LegalHold The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeLegalHold(writer, legalHold = {}, isSerializingDerivedType = false) {
    if (!legalHold || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, legalHold, isSerializingDerivedType);
    writer.writeStringValue("contentQuery", legalHold.contentQuery);
    writer.writeObjectValue("createdBy", legalHold.createdBy, serializeIdentitySet);
    writer.writeDateValue("createdDateTime", legalHold.createdDateTime);
    writer.writeStringValue("description", legalHold.description);
    writer.writeStringValue("displayName", legalHold.displayName);
    writer.writeCollectionOfPrimitiveValues("errors", legalHold.errors);
    writer.writeBooleanValue("isEnabled", legalHold.isEnabled);
    writer.writeObjectValue("lastModifiedBy", legalHold.lastModifiedBy, serializeIdentitySet);
    writer.writeDateValue("lastModifiedDateTime", legalHold.lastModifiedDateTime);
    writer.writeCollectionOfObjectValues("siteSources", legalHold.siteSources, serializeSiteSource);
    writer.writeEnumValue("status", legalHold.status);
    writer.writeCollectionOfObjectValues("unifiedGroupSources", legalHold.unifiedGroupSources, serializeUnifiedGroupSource);
    writer.writeCollectionOfObjectValues("userSources", legalHold.userSources, serializeUserSource);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param LegalHoldCollectionResponse The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeLegalHoldCollectionResponse(writer, legalHoldCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!legalHoldCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, legalHoldCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", legalHoldCollectionResponse.value, serializeLegalHold);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param NoncustodialDataSource The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeNoncustodialDataSource(writer, noncustodialDataSource = {}, isSerializingDerivedType = false) {
    if (!noncustodialDataSource || isSerializingDerivedType) {
        return;
    }
    serializeDataSourceContainer(writer, noncustodialDataSource, isSerializingDerivedType);
    writer.writeBooleanValue("applyHoldToSource", noncustodialDataSource.applyHoldToSource);
    writer.writeObjectValue("dataSource", noncustodialDataSource.dataSource, serializeDataSource);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param NoncustodialDataSourceCollectionResponse The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeNoncustodialDataSourceCollectionResponse(writer, noncustodialDataSourceCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!noncustodialDataSourceCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, noncustodialDataSourceCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", noncustodialDataSourceCollectionResponse.value, serializeNoncustodialDataSource);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param OcrSettings The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeOcrSettings(writer, ocrSettings = {}, isSerializingDerivedType = false) {
    if (!ocrSettings || isSerializingDerivedType) {
        return;
    }
    writer.writeBooleanValue("isEnabled", ocrSettings.isEnabled);
    writer.writeNumberValue("maxImageSize", ocrSettings.maxImageSize);
    writer.writeStringValue("@odata.type", ocrSettings.odataType);
    writer.writeDurationValue("timeout", ocrSettings.timeout);
    writer.writeAdditionalData(ocrSettings.additionalData);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param PurgeDataOperation The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializePurgeDataOperation(writer, purgeDataOperation = {}, isSerializingDerivedType = false) {
    if (!purgeDataOperation || isSerializingDerivedType) {
        return;
    }
    serializeCaseOperation(writer, purgeDataOperation, isSerializingDerivedType);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param RedundancyDetectionSettings The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeRedundancyDetectionSettings(writer, redundancyDetectionSettings = {}, isSerializingDerivedType = false) {
    if (!redundancyDetectionSettings || isSerializingDerivedType) {
        return;
    }
    writer.writeBooleanValue("isEnabled", redundancyDetectionSettings.isEnabled);
    writer.writeNumberValue("maxWords", redundancyDetectionSettings.maxWords);
    writer.writeNumberValue("minWords", redundancyDetectionSettings.minWords);
    writer.writeStringValue("@odata.type", redundancyDetectionSettings.odataType);
    writer.writeNumberValue("similarityThreshold", redundancyDetectionSettings.similarityThreshold);
    writer.writeAdditionalData(redundancyDetectionSettings.additionalData);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param ReviewSet The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeReviewSet(writer, reviewSet = {}, isSerializingDerivedType = false) {
    if (!reviewSet || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, reviewSet, isSerializingDerivedType);
    writer.writeObjectValue("createdBy", reviewSet.createdBy, serializeIdentitySet);
    writer.writeDateValue("createdDateTime", reviewSet.createdDateTime);
    writer.writeStringValue("displayName", reviewSet.displayName);
    writer.writeCollectionOfObjectValues("queries", reviewSet.queries, serializeReviewSetQuery);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param ReviewSetCollectionResponse The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeReviewSetCollectionResponse(writer, reviewSetCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!reviewSetCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, reviewSetCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", reviewSetCollectionResponse.value, serializeReviewSet);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param ReviewSetQuery The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeReviewSetQuery(writer, reviewSetQuery = {}, isSerializingDerivedType = false) {
    if (!reviewSetQuery || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, reviewSetQuery, isSerializingDerivedType);
    writer.writeObjectValue("createdBy", reviewSetQuery.createdBy, serializeIdentitySet);
    writer.writeDateValue("createdDateTime", reviewSetQuery.createdDateTime);
    writer.writeStringValue("displayName", reviewSetQuery.displayName);
    writer.writeObjectValue("lastModifiedBy", reviewSetQuery.lastModifiedBy, serializeIdentitySet);
    writer.writeDateValue("lastModifiedDateTime", reviewSetQuery.lastModifiedDateTime);
    writer.writeStringValue("query", reviewSetQuery.query);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param ReviewSetQueryCollectionResponse The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeReviewSetQueryCollectionResponse(writer, reviewSetQueryCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!reviewSetQueryCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, reviewSetQueryCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", reviewSetQueryCollectionResponse.value, serializeReviewSetQuery);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param SiteSource The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeSiteSource(writer, siteSource = {}, isSerializingDerivedType = false) {
    if (!siteSource || isSerializingDerivedType) {
        return;
    }
    serializeDataSource(writer, siteSource, isSerializingDerivedType);
    writer.writeObjectValue("site", siteSource.site, serializeSite);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param SiteSourceCollectionResponse The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeSiteSourceCollectionResponse(writer, siteSourceCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!siteSourceCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, siteSourceCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", siteSourceCollectionResponse.value, serializeSiteSource);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param SourceCollection The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeSourceCollection(writer, sourceCollection = {}, isSerializingDerivedType = false) {
    if (!sourceCollection || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, sourceCollection, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("additionalSources", sourceCollection.additionalSources, serializeDataSource);
    writer.writeObjectValue("addToReviewSetOperation", sourceCollection.addToReviewSetOperation, serializeAddToReviewSetOperation);
    writer.writeStringValue("contentQuery", sourceCollection.contentQuery);
    writer.writeObjectValue("createdBy", sourceCollection.createdBy, serializeIdentitySet);
    writer.writeDateValue("createdDateTime", sourceCollection.createdDateTime);
    writer.writeCollectionOfObjectValues("custodianSources", sourceCollection.custodianSources, serializeDataSource);
    writer.writeEnumValue("dataSourceScopes", sourceCollection.dataSourceScopes);
    writer.writeStringValue("description", sourceCollection.description);
    writer.writeStringValue("displayName", sourceCollection.displayName);
    writer.writeObjectValue("lastEstimateStatisticsOperation", sourceCollection.lastEstimateStatisticsOperation, serializeEstimateStatisticsOperation);
    writer.writeObjectValue("lastModifiedBy", sourceCollection.lastModifiedBy, serializeIdentitySet);
    writer.writeDateValue("lastModifiedDateTime", sourceCollection.lastModifiedDateTime);
    writer.writeCollectionOfObjectValues("noncustodialSources", sourceCollection.noncustodialSources, serializeNoncustodialDataSource);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param SourceCollectionCollectionResponse The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeSourceCollectionCollectionResponse(writer, sourceCollectionCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!sourceCollectionCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, sourceCollectionCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", sourceCollectionCollectionResponse.value, serializeSourceCollection);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param Tag The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTag(writer, tag = {}, isSerializingDerivedType = false) {
    if (!tag || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, tag, isSerializingDerivedType);
    writer.writeEnumValue("childSelectability", tag.childSelectability);
    writer.writeCollectionOfObjectValues("childTags", tag.childTags, serializeTag);
    writer.writeObjectValue("createdBy", tag.createdBy, serializeIdentitySet);
    writer.writeStringValue("description", tag.description);
    writer.writeStringValue("displayName", tag.displayName);
    writer.writeDateValue("lastModifiedDateTime", tag.lastModifiedDateTime);
    writer.writeObjectValue("parent", tag.parent, serializeTag);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param TagCollectionResponse The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTagCollectionResponse(writer, tagCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!tagCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, tagCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", tagCollectionResponse.value, serializeTag);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param TagOperation The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTagOperation(writer, tagOperation = {}, isSerializingDerivedType = false) {
    if (!tagOperation || isSerializingDerivedType) {
        return;
    }
    serializeCaseOperation(writer, tagOperation, isSerializingDerivedType);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param TopicModelingSettings The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTopicModelingSettings(writer, topicModelingSettings = {}, isSerializingDerivedType = false) {
    if (!topicModelingSettings || isSerializingDerivedType) {
        return;
    }
    writer.writeBooleanValue("dynamicallyAdjustTopicCount", topicModelingSettings.dynamicallyAdjustTopicCount);
    writer.writeBooleanValue("ignoreNumbers", topicModelingSettings.ignoreNumbers);
    writer.writeBooleanValue("isEnabled", topicModelingSettings.isEnabled);
    writer.writeStringValue("@odata.type", topicModelingSettings.odataType);
    writer.writeNumberValue("topicCount", topicModelingSettings.topicCount);
    writer.writeAdditionalData(topicModelingSettings.additionalData);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param UnifiedGroupSource The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeUnifiedGroupSource(writer, unifiedGroupSource = {}, isSerializingDerivedType = false) {
    if (!unifiedGroupSource || isSerializingDerivedType) {
        return;
    }
    serializeDataSource(writer, unifiedGroupSource, isSerializingDerivedType);
    writer.writeObjectValue("group", unifiedGroupSource.group, serializeGroup);
    writer.writeEnumValue("includedSources", unifiedGroupSource.includedSources);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param UnifiedGroupSourceCollectionResponse The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeUnifiedGroupSourceCollectionResponse(writer, unifiedGroupSourceCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!unifiedGroupSourceCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, unifiedGroupSourceCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", unifiedGroupSourceCollectionResponse.value, serializeUnifiedGroupSource);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param UserSource The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeUserSource(writer, userSource = {}, isSerializingDerivedType = false) {
    if (!userSource || isSerializingDerivedType) {
        return;
    }
    serializeDataSource(writer, userSource, isSerializingDerivedType);
    writer.writeStringValue("email", userSource.email);
    writer.writeEnumValue("includedSources", userSource.includedSources);
    writer.writeStringValue("siteWebUrl", userSource.siteWebUrl);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param UserSourceCollectionResponse The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeUserSourceCollectionResponse(writer, userSourceCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!userSourceCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, userSourceCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", userSourceCollectionResponse.value, serializeUserSource);
}
export const AdditionalDataOptionsObject = {
    AllVersions: "allVersions",
    LinkedFiles: "linkedFiles",
    UnknownFutureValue: "unknownFutureValue",
};
export const CaseActionObject = {
    ContentExport: "contentExport",
    ApplyTags: "applyTags",
    ConvertToPdf: "convertToPdf",
    Index: "index",
    EstimateStatistics: "estimateStatistics",
    AddToReviewSet: "addToReviewSet",
    HoldUpdate: "holdUpdate",
    UnknownFutureValue: "unknownFutureValue",
    PurgeData: "purgeData",
};
export const CaseOperationStatusObject = {
    NotStarted: "notStarted",
    SubmissionFailed: "submissionFailed",
    Running: "running",
    Succeeded: "succeeded",
    PartiallySucceeded: "partiallySucceeded",
    Failed: "failed",
};
export const CaseStatusObject = {
    Unknown: "unknown",
    Active: "active",
    PendingDelete: "pendingDelete",
    Closing: "closing",
    Closed: "closed",
    ClosedWithError: "closedWithError",
};
export const ChildSelectabilityObject = {
    One: "One",
    Many: "Many",
};
export const DataSourceContainerStatusObject = {
    Active: "Active",
    Released: "Released",
    UnknownFutureValue: "UnknownFutureValue",
};
export const DataSourceHoldStatusObject = {
    NotApplied: "notApplied",
    Applied: "applied",
    Applying: "applying",
    Removing: "removing",
    Partial: "partial",
    UnknownFutureValue: "unknownFutureValue",
};
export const DataSourceScopesObject = {
    None: "none",
    AllTenantMailboxes: "allTenantMailboxes",
    AllTenantSites: "allTenantSites",
    AllCaseCustodians: "allCaseCustodians",
    AllCaseNoncustodialDataSources: "allCaseNoncustodialDataSources",
    UnknownFutureValue: "unknownFutureValue",
};
export const ExportFileStructureObject = {
    None: "none",
    Directory: "directory",
    Pst: "pst",
    UnknownFutureValue: "unknownFutureValue",
};
export const ExportOptionsObject = {
    OriginalFiles: "originalFiles",
    Text: "text",
    PdfReplacement: "pdfReplacement",
    FileInfo: "fileInfo",
    Tags: "tags",
    UnknownFutureValue: "unknownFutureValue",
};
export const LegalHoldStatusObject = {
    Pending: "Pending",
    ErrorEscaped: "Error",
    Success: "Success",
    UnknownFutureValue: "UnknownFutureValue",
};
export const SourceTypeObject = {
    Mailbox: "mailbox",
    Site: "site",
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map