"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.deserializeIntoIdentity = exports.deserializeIntoExternalItemContent = exports.deserializeIntoExternalItemCollectionResponse = exports.deserializeIntoExternalItem = exports.deserializeIntoExternalGroupCollectionResponse = exports.deserializeIntoExternalGroup = exports.deserializeIntoExternalConnectionCollectionResponse = exports.deserializeIntoExternalConnection = exports.deserializeIntoExternalActivityResult = exports.deserializeIntoExternalActivityCollectionResponse = exports.deserializeIntoExternalActivity = exports.deserializeIntoExternal = exports.deserializeIntoDisplayTemplate = exports.deserializeIntoConnectionQuota = exports.deserializeIntoConnectionOperationCollectionResponse = exports.deserializeIntoConnectionOperation = exports.deserializeIntoConfiguration = exports.deserializeIntoComplianceSettings = exports.deserializeIntoActivitySettings = exports.deserializeIntoAcl = exports.createUrlToItemResolverBaseFromDiscriminatorValue = exports.createUrlMatchInfoFromDiscriminatorValue = exports.createSearchSettingsFromDiscriminatorValue = exports.createSchemaFromDiscriminatorValue = exports.createRankingHintFromDiscriminatorValue = exports.createPropertyRuleFromDiscriminatorValue = exports.createPropertyFromDiscriminatorValue = exports.createPropertiesFromDiscriminatorValue = exports.createItemIdResolverFromDiscriminatorValue = exports.createIdentityFromDiscriminatorValue = exports.createIdentityCollectionResponseFromDiscriminatorValue = exports.createExternalItemFromDiscriminatorValue = exports.createExternalItemContentFromDiscriminatorValue = exports.createExternalItemCollectionResponseFromDiscriminatorValue = exports.createExternalGroupFromDiscriminatorValue = exports.createExternalGroupCollectionResponseFromDiscriminatorValue = exports.createExternalFromDiscriminatorValue = exports.createExternalConnectionFromDiscriminatorValue = exports.createExternalConnectionCollectionResponseFromDiscriminatorValue = exports.createExternalActivityResultFromDiscriminatorValue = exports.createExternalActivityFromDiscriminatorValue = exports.createExternalActivityCollectionResponseFromDiscriminatorValue = exports.createDisplayTemplateFromDiscriminatorValue = exports.createConnectionQuotaFromDiscriminatorValue = exports.createConnectionOperationFromDiscriminatorValue = exports.createConnectionOperationCollectionResponseFromDiscriminatorValue = exports.createConfigurationFromDiscriminatorValue = exports.createComplianceSettingsFromDiscriminatorValue = exports.createActivitySettingsFromDiscriminatorValue = exports.createAclFromDiscriminatorValue = void 0;
exports.ImportanceScoreObject = exports.IdentityTypeObject = exports.IdentitySourceTypeObject = exports.ExternalItemContentTypeObject = exports.ExternalActivityTypeObject = exports.ContentExperienceTypeObject = exports.ConnectionStateObject = exports.ConnectionOperationStatusObject = exports.AclTypeObject = exports.AccessTypeObject = exports.serializeUrlToItemResolverBase = exports.serializeUrlMatchInfo = exports.serializeSearchSettings = exports.serializeSchema = exports.serializeRankingHint = exports.serializePropertyRule = exports.serializeProperty = exports.serializeProperties = exports.serializeItemIdResolver = exports.serializeIdentityCollectionResponse = exports.serializeIdentity = exports.serializeExternalItemContent = exports.serializeExternalItemCollectionResponse = exports.serializeExternalItem = exports.serializeExternalGroupCollectionResponse = exports.serializeExternalGroup = exports.serializeExternalConnectionCollectionResponse = exports.serializeExternalConnection = exports.serializeExternalActivityResult = exports.serializeExternalActivityCollectionResponse = exports.serializeExternalActivity = exports.serializeExternal = exports.serializeDisplayTemplate = exports.serializeConnectionQuota = exports.serializeConnectionOperationCollectionResponse = exports.serializeConnectionOperation = exports.serializeConfiguration = exports.serializeComplianceSettings = exports.serializeActivitySettings = exports.serializeAcl = exports.deserializeIntoUrlToItemResolverBase = exports.deserializeIntoUrlMatchInfo = exports.deserializeIntoSearchSettings = exports.deserializeIntoSchema = exports.deserializeIntoRankingHint = exports.deserializeIntoPropertyRule = exports.deserializeIntoProperty = exports.deserializeIntoProperties = exports.deserializeIntoItemIdResolver = exports.deserializeIntoIdentityCollectionResponse = void 0;
exports.RuleOperationObject = exports.PropertyTypeObject = exports.LabelObject = void 0;
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
const __1 = require("../");
// @ts-ignore
const industryData_1 = require("../industryData/");
/**
 * 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 {Acl}
 */
function createAclFromDiscriminatorValue(parseNode) {
    return deserializeIntoAcl;
}
exports.createAclFromDiscriminatorValue = createAclFromDiscriminatorValue;
/**
 * 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 {ActivitySettings}
 */
function createActivitySettingsFromDiscriminatorValue(parseNode) {
    return deserializeIntoActivitySettings;
}
exports.createActivitySettingsFromDiscriminatorValue = createActivitySettingsFromDiscriminatorValue;
/**
 * 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 {ComplianceSettings}
 */
function createComplianceSettingsFromDiscriminatorValue(parseNode) {
    return deserializeIntoComplianceSettings;
}
exports.createComplianceSettingsFromDiscriminatorValue = createComplianceSettingsFromDiscriminatorValue;
/**
 * 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 {Configuration}
 */
function createConfigurationFromDiscriminatorValue(parseNode) {
    return deserializeIntoConfiguration;
}
exports.createConfigurationFromDiscriminatorValue = createConfigurationFromDiscriminatorValue;
/**
 * 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 {ConnectionOperationCollectionResponse}
 */
function createConnectionOperationCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoConnectionOperationCollectionResponse;
}
exports.createConnectionOperationCollectionResponseFromDiscriminatorValue = createConnectionOperationCollectionResponseFromDiscriminatorValue;
/**
 * 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 {ConnectionOperation}
 */
function createConnectionOperationFromDiscriminatorValue(parseNode) {
    return deserializeIntoConnectionOperation;
}
exports.createConnectionOperationFromDiscriminatorValue = createConnectionOperationFromDiscriminatorValue;
/**
 * 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 {ConnectionQuota}
 */
function createConnectionQuotaFromDiscriminatorValue(parseNode) {
    return deserializeIntoConnectionQuota;
}
exports.createConnectionQuotaFromDiscriminatorValue = createConnectionQuotaFromDiscriminatorValue;
/**
 * 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 {DisplayTemplate}
 */
function createDisplayTemplateFromDiscriminatorValue(parseNode) {
    return deserializeIntoDisplayTemplate;
}
exports.createDisplayTemplateFromDiscriminatorValue = createDisplayTemplateFromDiscriminatorValue;
/**
 * 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 {ExternalActivityCollectionResponse}
 */
function createExternalActivityCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalActivityCollectionResponse;
}
exports.createExternalActivityCollectionResponseFromDiscriminatorValue = createExternalActivityCollectionResponseFromDiscriminatorValue;
/**
 * 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 {ExternalActivity}
 */
function createExternalActivityFromDiscriminatorValue(parseNode) {
    if (!parseNode)
        throw new Error("parseNode cannot be undefined");
    const mappingValueNode = parseNode.getChildNode("@odata.type");
    if (mappingValueNode) {
        const mappingValue = mappingValueNode.getStringValue();
        if (mappingValue) {
            switch (mappingValue) {
                case "#microsoft.graph.externalConnectors.externalActivityResult":
                    return deserializeIntoExternalActivityResult;
            }
        }
    }
    return deserializeIntoExternalActivity;
}
exports.createExternalActivityFromDiscriminatorValue = createExternalActivityFromDiscriminatorValue;
/**
 * 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 {ExternalActivityResult}
 */
function createExternalActivityResultFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalActivityResult;
}
exports.createExternalActivityResultFromDiscriminatorValue = createExternalActivityResultFromDiscriminatorValue;
/**
 * 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 {ExternalConnectionCollectionResponse}
 */
function createExternalConnectionCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalConnectionCollectionResponse;
}
exports.createExternalConnectionCollectionResponseFromDiscriminatorValue = createExternalConnectionCollectionResponseFromDiscriminatorValue;
/**
 * 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 {ExternalConnection}
 */
function createExternalConnectionFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalConnection;
}
exports.createExternalConnectionFromDiscriminatorValue = createExternalConnectionFromDiscriminatorValue;
/**
 * 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 {External}
 */
function createExternalFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternal;
}
exports.createExternalFromDiscriminatorValue = createExternalFromDiscriminatorValue;
/**
 * 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 {ExternalGroupCollectionResponse}
 */
function createExternalGroupCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalGroupCollectionResponse;
}
exports.createExternalGroupCollectionResponseFromDiscriminatorValue = createExternalGroupCollectionResponseFromDiscriminatorValue;
/**
 * 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 {ExternalGroup}
 */
function createExternalGroupFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalGroup;
}
exports.createExternalGroupFromDiscriminatorValue = createExternalGroupFromDiscriminatorValue;
/**
 * 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 {ExternalItemCollectionResponse}
 */
function createExternalItemCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalItemCollectionResponse;
}
exports.createExternalItemCollectionResponseFromDiscriminatorValue = createExternalItemCollectionResponseFromDiscriminatorValue;
/**
 * 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 {ExternalItemContent}
 */
function createExternalItemContentFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalItemContent;
}
exports.createExternalItemContentFromDiscriminatorValue = createExternalItemContentFromDiscriminatorValue;
/**
 * 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 {ExternalItem}
 */
function createExternalItemFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalItem;
}
exports.createExternalItemFromDiscriminatorValue = createExternalItemFromDiscriminatorValue;
/**
 * 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 {IdentityCollectionResponse}
 */
function createIdentityCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoIdentityCollectionResponse;
}
exports.createIdentityCollectionResponseFromDiscriminatorValue = createIdentityCollectionResponseFromDiscriminatorValue;
/**
 * 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 {Identity}
 */
function createIdentityFromDiscriminatorValue(parseNode) {
    return deserializeIntoIdentity;
}
exports.createIdentityFromDiscriminatorValue = createIdentityFromDiscriminatorValue;
/**
 * 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 {ItemIdResolver}
 */
function createItemIdResolverFromDiscriminatorValue(parseNode) {
    return deserializeIntoItemIdResolver;
}
exports.createItemIdResolverFromDiscriminatorValue = createItemIdResolverFromDiscriminatorValue;
/**
 * 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 {Properties}
 */
function createPropertiesFromDiscriminatorValue(parseNode) {
    return deserializeIntoProperties;
}
exports.createPropertiesFromDiscriminatorValue = createPropertiesFromDiscriminatorValue;
/**
 * 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 {Property}
 */
function createPropertyFromDiscriminatorValue(parseNode) {
    return deserializeIntoProperty;
}
exports.createPropertyFromDiscriminatorValue = createPropertyFromDiscriminatorValue;
/**
 * 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 {PropertyRule}
 */
function createPropertyRuleFromDiscriminatorValue(parseNode) {
    return deserializeIntoPropertyRule;
}
exports.createPropertyRuleFromDiscriminatorValue = createPropertyRuleFromDiscriminatorValue;
/**
 * 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 {RankingHint}
 */
function createRankingHintFromDiscriminatorValue(parseNode) {
    return deserializeIntoRankingHint;
}
exports.createRankingHintFromDiscriminatorValue = createRankingHintFromDiscriminatorValue;
/**
 * 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 {Schema}
 */
function createSchemaFromDiscriminatorValue(parseNode) {
    return deserializeIntoSchema;
}
exports.createSchemaFromDiscriminatorValue = createSchemaFromDiscriminatorValue;
/**
 * 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 {SearchSettings}
 */
function createSearchSettingsFromDiscriminatorValue(parseNode) {
    return deserializeIntoSearchSettings;
}
exports.createSearchSettingsFromDiscriminatorValue = createSearchSettingsFromDiscriminatorValue;
/**
 * 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 {UrlMatchInfo}
 */
function createUrlMatchInfoFromDiscriminatorValue(parseNode) {
    return deserializeIntoUrlMatchInfo;
}
exports.createUrlMatchInfoFromDiscriminatorValue = createUrlMatchInfoFromDiscriminatorValue;
/**
 * 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 {UrlToItemResolverBase}
 */
function createUrlToItemResolverBaseFromDiscriminatorValue(parseNode) {
    if (!parseNode)
        throw new Error("parseNode cannot be undefined");
    const mappingValueNode = parseNode.getChildNode("@odata.type");
    if (mappingValueNode) {
        const mappingValue = mappingValueNode.getStringValue();
        if (mappingValue) {
            switch (mappingValue) {
                case "#microsoft.graph.externalConnectors.itemIdResolver":
                    return deserializeIntoItemIdResolver;
            }
        }
    }
    return deserializeIntoUrlToItemResolverBase;
}
exports.createUrlToItemResolverBaseFromDiscriminatorValue = createUrlToItemResolverBaseFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoAcl(acl = {}) {
    return {
        "accessType": n => { acl.accessType = n.getEnumValue(exports.AccessTypeObject); },
        "backingStoreEnabled": n => { acl.backingStoreEnabled = true; },
        "identitySource": n => { acl.identitySource = n.getEnumValue(exports.IdentitySourceTypeObject); },
        "@odata.type": n => { acl.odataType = n.getStringValue(); },
        "type": n => { acl.type = n.getEnumValue(exports.AclTypeObject); },
        "value": n => { acl.value = n.getStringValue(); },
    };
}
exports.deserializeIntoAcl = deserializeIntoAcl;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoActivitySettings(activitySettings = {}) {
    return {
        "backingStoreEnabled": n => { activitySettings.backingStoreEnabled = true; },
        "@odata.type": n => { activitySettings.odataType = n.getStringValue(); },
        "urlToItemResolvers": n => { activitySettings.urlToItemResolvers = n.getCollectionOfObjectValues(createUrlToItemResolverBaseFromDiscriminatorValue); },
    };
}
exports.deserializeIntoActivitySettings = deserializeIntoActivitySettings;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoComplianceSettings(complianceSettings = {}) {
    return {
        "backingStoreEnabled": n => { complianceSettings.backingStoreEnabled = true; },
        "eDiscoveryResultTemplates": n => { complianceSettings.eDiscoveryResultTemplates = n.getCollectionOfObjectValues(createDisplayTemplateFromDiscriminatorValue); },
        "@odata.type": n => { complianceSettings.odataType = n.getStringValue(); },
    };
}
exports.deserializeIntoComplianceSettings = deserializeIntoComplianceSettings;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoConfiguration(configuration = {}) {
    return {
        "authorizedAppIds": n => { configuration.authorizedAppIds = n.getCollectionOfPrimitiveValues(); },
        "backingStoreEnabled": n => { configuration.backingStoreEnabled = true; },
        "@odata.type": n => { configuration.odataType = n.getStringValue(); },
    };
}
exports.deserializeIntoConfiguration = deserializeIntoConfiguration;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoConnectionOperation(connectionOperation = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoEntity)(connectionOperation)), { "error": n => { connectionOperation.errorEscaped = n.getObjectValue(__1.createPublicErrorFromDiscriminatorValue); }, "status": n => { connectionOperation.status = n.getEnumValue(exports.ConnectionOperationStatusObject); } });
}
exports.deserializeIntoConnectionOperation = deserializeIntoConnectionOperation;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoConnectionOperationCollectionResponse(connectionOperationCollectionResponse = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoBaseCollectionPaginationCountResponse)(connectionOperationCollectionResponse)), { "value": n => { connectionOperationCollectionResponse.value = n.getCollectionOfObjectValues(createConnectionOperationFromDiscriminatorValue); } });
}
exports.deserializeIntoConnectionOperationCollectionResponse = deserializeIntoConnectionOperationCollectionResponse;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoConnectionQuota(connectionQuota = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoEntity)(connectionQuota)), { "itemsRemaining": n => { connectionQuota.itemsRemaining = n.getNumberValue(); } });
}
exports.deserializeIntoConnectionQuota = deserializeIntoConnectionQuota;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoDisplayTemplate(displayTemplate = {}) {
    return {
        "backingStoreEnabled": n => { displayTemplate.backingStoreEnabled = true; },
        "id": n => { displayTemplate.id = n.getStringValue(); },
        "layout": n => { displayTemplate.layout = n.getObjectValue(__1.createJsonFromDiscriminatorValue); },
        "@odata.type": n => { displayTemplate.odataType = n.getStringValue(); },
        "priority": n => { displayTemplate.priority = n.getNumberValue(); },
        "rules": n => { displayTemplate.rules = n.getCollectionOfObjectValues(createPropertyRuleFromDiscriminatorValue); },
    };
}
exports.deserializeIntoDisplayTemplate = deserializeIntoDisplayTemplate;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoExternal(external = {}) {
    return {
        "authorizationSystems": n => { external.authorizationSystems = n.getCollectionOfObjectValues(__1.createAuthorizationSystemFromDiscriminatorValue); },
        "backingStoreEnabled": n => { external.backingStoreEnabled = true; },
        "connections": n => { external.connections = n.getCollectionOfObjectValues(createExternalConnectionFromDiscriminatorValue); },
        "industryData": n => { external.industryData = n.getObjectValue(industryData_1.createIndustryDataRootFromDiscriminatorValue); },
        "@odata.type": n => { external.odataType = n.getStringValue(); },
    };
}
exports.deserializeIntoExternal = deserializeIntoExternal;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoExternalActivity(externalActivity = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoEntity)(externalActivity)), { "performedBy": n => { externalActivity.performedBy = n.getObjectValue(createIdentityFromDiscriminatorValue); }, "startDateTime": n => { externalActivity.startDateTime = n.getDateValue(); }, "type": n => { externalActivity.type = n.getEnumValue(exports.ExternalActivityTypeObject); } });
}
exports.deserializeIntoExternalActivity = deserializeIntoExternalActivity;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoExternalActivityCollectionResponse(externalActivityCollectionResponse = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoBaseCollectionPaginationCountResponse)(externalActivityCollectionResponse)), { "value": n => { externalActivityCollectionResponse.value = n.getCollectionOfObjectValues(createExternalActivityFromDiscriminatorValue); } });
}
exports.deserializeIntoExternalActivityCollectionResponse = deserializeIntoExternalActivityCollectionResponse;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoExternalActivityResult(externalActivityResult = {}) {
    return Object.assign(Object.assign({}, deserializeIntoExternalActivity(externalActivityResult)), { "error": n => { externalActivityResult.errorEscaped = n.getObjectValue(__1.createPublicErrorFromDiscriminatorValue); } });
}
exports.deserializeIntoExternalActivityResult = deserializeIntoExternalActivityResult;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoExternalConnection(externalConnection = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoEntity)(externalConnection)), { "activitySettings": n => { externalConnection.activitySettings = n.getObjectValue(createActivitySettingsFromDiscriminatorValue); }, "complianceSettings": n => { externalConnection.complianceSettings = n.getObjectValue(createComplianceSettingsFromDiscriminatorValue); }, "configuration": n => { externalConnection.configuration = n.getObjectValue(createConfigurationFromDiscriminatorValue); }, "connectorId": n => { externalConnection.connectorId = n.getStringValue(); }, "description": n => { externalConnection.description = n.getStringValue(); }, "enabledContentExperiences": n => { externalConnection.enabledContentExperiences = n.getCollectionOfEnumValues(exports.ContentExperienceTypeObject); }, "groups": n => { externalConnection.groups = n.getCollectionOfObjectValues(createExternalGroupFromDiscriminatorValue); }, "ingestedItemsCount": n => { externalConnection.ingestedItemsCount = n.getNumberValue(); }, "items": n => { externalConnection.items = n.getCollectionOfObjectValues(createExternalItemFromDiscriminatorValue); }, "name": n => { externalConnection.name = n.getStringValue(); }, "operations": n => { externalConnection.operations = n.getCollectionOfObjectValues(createConnectionOperationFromDiscriminatorValue); }, "quota": n => { externalConnection.quota = n.getObjectValue(createConnectionQuotaFromDiscriminatorValue); }, "schema": n => { externalConnection.schema = n.getObjectValue(createSchemaFromDiscriminatorValue); }, "searchSettings": n => { externalConnection.searchSettings = n.getObjectValue(createSearchSettingsFromDiscriminatorValue); }, "state": n => { externalConnection.state = n.getEnumValue(exports.ConnectionStateObject); } });
}
exports.deserializeIntoExternalConnection = deserializeIntoExternalConnection;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoExternalConnectionCollectionResponse(externalConnectionCollectionResponse = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoBaseCollectionPaginationCountResponse)(externalConnectionCollectionResponse)), { "value": n => { externalConnectionCollectionResponse.value = n.getCollectionOfObjectValues(createExternalConnectionFromDiscriminatorValue); } });
}
exports.deserializeIntoExternalConnectionCollectionResponse = deserializeIntoExternalConnectionCollectionResponse;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoExternalGroup(externalGroup = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoEntity)(externalGroup)), { "description": n => { externalGroup.description = n.getStringValue(); }, "displayName": n => { externalGroup.displayName = n.getStringValue(); }, "members": n => { externalGroup.members = n.getCollectionOfObjectValues(createIdentityFromDiscriminatorValue); } });
}
exports.deserializeIntoExternalGroup = deserializeIntoExternalGroup;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoExternalGroupCollectionResponse(externalGroupCollectionResponse = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoBaseCollectionPaginationCountResponse)(externalGroupCollectionResponse)), { "value": n => { externalGroupCollectionResponse.value = n.getCollectionOfObjectValues(createExternalGroupFromDiscriminatorValue); } });
}
exports.deserializeIntoExternalGroupCollectionResponse = deserializeIntoExternalGroupCollectionResponse;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoExternalItem(externalItem = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoEntity)(externalItem)), { "acl": n => { externalItem.acl = n.getCollectionOfObjectValues(createAclFromDiscriminatorValue); }, "activities": n => { externalItem.activities = n.getCollectionOfObjectValues(createExternalActivityFromDiscriminatorValue); }, "content": n => { externalItem.content = n.getObjectValue(createExternalItemContentFromDiscriminatorValue); }, "properties": n => { externalItem.properties = n.getObjectValue(createPropertiesFromDiscriminatorValue); } });
}
exports.deserializeIntoExternalItem = deserializeIntoExternalItem;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoExternalItemCollectionResponse(externalItemCollectionResponse = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoBaseCollectionPaginationCountResponse)(externalItemCollectionResponse)), { "value": n => { externalItemCollectionResponse.value = n.getCollectionOfObjectValues(createExternalItemFromDiscriminatorValue); } });
}
exports.deserializeIntoExternalItemCollectionResponse = deserializeIntoExternalItemCollectionResponse;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoExternalItemContent(externalItemContent = {}) {
    return {
        "backingStoreEnabled": n => { externalItemContent.backingStoreEnabled = true; },
        "@odata.type": n => { externalItemContent.odataType = n.getStringValue(); },
        "type": n => { externalItemContent.type = n.getEnumValue(exports.ExternalItemContentTypeObject); },
        "value": n => { externalItemContent.value = n.getStringValue(); },
    };
}
exports.deserializeIntoExternalItemContent = deserializeIntoExternalItemContent;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoIdentity(identity = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoEntity)(identity)), { "type": n => { identity.type = n.getEnumValue(exports.IdentityTypeObject); } });
}
exports.deserializeIntoIdentity = deserializeIntoIdentity;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoIdentityCollectionResponse(identityCollectionResponse = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoBaseCollectionPaginationCountResponse)(identityCollectionResponse)), { "value": n => { identityCollectionResponse.value = n.getCollectionOfObjectValues(createIdentityFromDiscriminatorValue); } });
}
exports.deserializeIntoIdentityCollectionResponse = deserializeIntoIdentityCollectionResponse;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoItemIdResolver(itemIdResolver = {}) {
    return Object.assign(Object.assign({}, deserializeIntoUrlToItemResolverBase(itemIdResolver)), { "itemId": n => { itemIdResolver.itemId = n.getStringValue(); }, "urlMatchInfo": n => { itemIdResolver.urlMatchInfo = n.getObjectValue(createUrlMatchInfoFromDiscriminatorValue); } });
}
exports.deserializeIntoItemIdResolver = deserializeIntoItemIdResolver;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoProperties(properties = {}) {
    return {
        "backingStoreEnabled": n => { properties.backingStoreEnabled = true; },
        "@odata.type": n => { properties.odataType = n.getStringValue(); },
    };
}
exports.deserializeIntoProperties = deserializeIntoProperties;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoProperty(property = {}) {
    return {
        "aliases": n => { property.aliases = n.getCollectionOfPrimitiveValues(); },
        "backingStoreEnabled": n => { property.backingStoreEnabled = true; },
        "isExactMatchRequired": n => { property.isExactMatchRequired = n.getBooleanValue(); },
        "isQueryable": n => { property.isQueryable = n.getBooleanValue(); },
        "isRefinable": n => { property.isRefinable = n.getBooleanValue(); },
        "isRetrievable": n => { property.isRetrievable = n.getBooleanValue(); },
        "isSearchable": n => { property.isSearchable = n.getBooleanValue(); },
        "labels": n => { property.labels = n.getCollectionOfEnumValues(exports.LabelObject); },
        "name": n => { property.name = n.getStringValue(); },
        "@odata.type": n => { property.odataType = n.getStringValue(); },
        "rankingHint": n => { property.rankingHint = n.getObjectValue(createRankingHintFromDiscriminatorValue); },
        "type": n => { property.type = n.getEnumValue(exports.PropertyTypeObject); },
    };
}
exports.deserializeIntoProperty = deserializeIntoProperty;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoPropertyRule(propertyRule = {}) {
    return {
        "backingStoreEnabled": n => { propertyRule.backingStoreEnabled = true; },
        "@odata.type": n => { propertyRule.odataType = n.getStringValue(); },
        "operation": n => { propertyRule.operation = n.getEnumValue(exports.RuleOperationObject); },
        "property": n => { propertyRule.property = n.getStringValue(); },
        "values": n => { propertyRule.values = n.getCollectionOfPrimitiveValues(); },
        "valuesJoinedBy": n => { propertyRule.valuesJoinedBy = n.getEnumValue(__1.BinaryOperatorObject); },
    };
}
exports.deserializeIntoPropertyRule = deserializeIntoPropertyRule;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoRankingHint(rankingHint = {}) {
    return {
        "backingStoreEnabled": n => { rankingHint.backingStoreEnabled = true; },
        "importanceScore": n => { rankingHint.importanceScore = n.getEnumValue(exports.ImportanceScoreObject); },
        "@odata.type": n => { rankingHint.odataType = n.getStringValue(); },
    };
}
exports.deserializeIntoRankingHint = deserializeIntoRankingHint;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoSchema(schema = {}) {
    return Object.assign(Object.assign({}, (0, __1.deserializeIntoEntity)(schema)), { "baseType": n => { schema.baseType = n.getStringValue(); }, "properties": n => { schema.properties = n.getCollectionOfObjectValues(createPropertyFromDiscriminatorValue); } });
}
exports.deserializeIntoSchema = deserializeIntoSchema;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoSearchSettings(searchSettings = {}) {
    return {
        "backingStoreEnabled": n => { searchSettings.backingStoreEnabled = true; },
        "@odata.type": n => { searchSettings.odataType = n.getStringValue(); },
        "searchResultTemplates": n => { searchSettings.searchResultTemplates = n.getCollectionOfObjectValues(createDisplayTemplateFromDiscriminatorValue); },
    };
}
exports.deserializeIntoSearchSettings = deserializeIntoSearchSettings;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoUrlMatchInfo(urlMatchInfo = {}) {
    return {
        "backingStoreEnabled": n => { urlMatchInfo.backingStoreEnabled = true; },
        "baseUrls": n => { urlMatchInfo.baseUrls = n.getCollectionOfPrimitiveValues(); },
        "@odata.type": n => { urlMatchInfo.odataType = n.getStringValue(); },
        "urlPattern": n => { urlMatchInfo.urlPattern = n.getStringValue(); },
    };
}
exports.deserializeIntoUrlMatchInfo = deserializeIntoUrlMatchInfo;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoUrlToItemResolverBase(urlToItemResolverBase = {}) {
    return {
        "backingStoreEnabled": n => { urlToItemResolverBase.backingStoreEnabled = true; },
        "@odata.type": n => { urlToItemResolverBase.odataType = n.getStringValue(); },
        "priority": n => { urlToItemResolverBase.priority = n.getNumberValue(); },
    };
}
exports.deserializeIntoUrlToItemResolverBase = deserializeIntoUrlToItemResolverBase;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeAcl(writer, acl = {}) {
    writer.writeEnumValue("accessType", acl.accessType);
    writer.writeEnumValue("identitySource", acl.identitySource);
    writer.writeStringValue("@odata.type", acl.odataType);
    writer.writeEnumValue("type", acl.type);
    writer.writeStringValue("value", acl.value);
    writer.writeAdditionalData(acl.additionalData);
}
exports.serializeAcl = serializeAcl;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeActivitySettings(writer, activitySettings = {}) {
    writer.writeStringValue("@odata.type", activitySettings.odataType);
    writer.writeCollectionOfObjectValues("urlToItemResolvers", activitySettings.urlToItemResolvers, serializeUrlToItemResolverBase);
    writer.writeAdditionalData(activitySettings.additionalData);
}
exports.serializeActivitySettings = serializeActivitySettings;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeComplianceSettings(writer, complianceSettings = {}) {
    writer.writeCollectionOfObjectValues("eDiscoveryResultTemplates", complianceSettings.eDiscoveryResultTemplates, serializeDisplayTemplate);
    writer.writeStringValue("@odata.type", complianceSettings.odataType);
    writer.writeAdditionalData(complianceSettings.additionalData);
}
exports.serializeComplianceSettings = serializeComplianceSettings;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeConfiguration(writer, configuration = {}) {
    writer.writeCollectionOfPrimitiveValues("authorizedAppIds", configuration.authorizedAppIds);
    writer.writeStringValue("@odata.type", configuration.odataType);
    writer.writeAdditionalData(configuration.additionalData);
}
exports.serializeConfiguration = serializeConfiguration;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeConnectionOperation(writer, connectionOperation = {}) {
    (0, __1.serializeEntity)(writer, connectionOperation);
    writer.writeObjectValue("error", connectionOperation.errorEscaped, __1.serializePublicError);
    writer.writeEnumValue("status", connectionOperation.status);
}
exports.serializeConnectionOperation = serializeConnectionOperation;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeConnectionOperationCollectionResponse(writer, connectionOperationCollectionResponse = {}) {
    (0, __1.serializeBaseCollectionPaginationCountResponse)(writer, connectionOperationCollectionResponse);
    writer.writeCollectionOfObjectValues("value", connectionOperationCollectionResponse.value, serializeConnectionOperation);
}
exports.serializeConnectionOperationCollectionResponse = serializeConnectionOperationCollectionResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeConnectionQuota(writer, connectionQuota = {}) {
    (0, __1.serializeEntity)(writer, connectionQuota);
    writer.writeNumberValue("itemsRemaining", connectionQuota.itemsRemaining);
}
exports.serializeConnectionQuota = serializeConnectionQuota;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeDisplayTemplate(writer, displayTemplate = {}) {
    writer.writeStringValue("id", displayTemplate.id);
    writer.writeObjectValue("layout", displayTemplate.layout, __1.serializeJson);
    writer.writeStringValue("@odata.type", displayTemplate.odataType);
    writer.writeNumberValue("priority", displayTemplate.priority);
    writer.writeCollectionOfObjectValues("rules", displayTemplate.rules, serializePropertyRule);
    writer.writeAdditionalData(displayTemplate.additionalData);
}
exports.serializeDisplayTemplate = serializeDisplayTemplate;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeExternal(writer, external = {}) {
    writer.writeCollectionOfObjectValues("authorizationSystems", external.authorizationSystems, __1.serializeAuthorizationSystem);
    writer.writeCollectionOfObjectValues("connections", external.connections, serializeExternalConnection);
    writer.writeObjectValue("industryData", external.industryData, industryData_1.serializeIndustryDataRoot);
    writer.writeStringValue("@odata.type", external.odataType);
    writer.writeAdditionalData(external.additionalData);
}
exports.serializeExternal = serializeExternal;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeExternalActivity(writer, externalActivity = {}) {
    (0, __1.serializeEntity)(writer, externalActivity);
    writer.writeObjectValue("performedBy", externalActivity.performedBy, serializeIdentity);
    writer.writeDateValue("startDateTime", externalActivity.startDateTime);
    writer.writeEnumValue("type", externalActivity.type);
}
exports.serializeExternalActivity = serializeExternalActivity;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeExternalActivityCollectionResponse(writer, externalActivityCollectionResponse = {}) {
    (0, __1.serializeBaseCollectionPaginationCountResponse)(writer, externalActivityCollectionResponse);
    writer.writeCollectionOfObjectValues("value", externalActivityCollectionResponse.value, serializeExternalActivity);
}
exports.serializeExternalActivityCollectionResponse = serializeExternalActivityCollectionResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeExternalActivityResult(writer, externalActivityResult = {}) {
    serializeExternalActivity(writer, externalActivityResult);
    writer.writeObjectValue("error", externalActivityResult.errorEscaped, __1.serializePublicError);
}
exports.serializeExternalActivityResult = serializeExternalActivityResult;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeExternalConnection(writer, externalConnection = {}) {
    (0, __1.serializeEntity)(writer, externalConnection);
    writer.writeObjectValue("activitySettings", externalConnection.activitySettings, serializeActivitySettings);
    writer.writeObjectValue("complianceSettings", externalConnection.complianceSettings, serializeComplianceSettings);
    writer.writeObjectValue("configuration", externalConnection.configuration, serializeConfiguration);
    writer.writeStringValue("connectorId", externalConnection.connectorId);
    writer.writeStringValue("description", externalConnection.description);
    writer.writeEnumValue("enabledContentExperiences", externalConnection.enabledContentExperiences);
    writer.writeCollectionOfObjectValues("groups", externalConnection.groups, serializeExternalGroup);
    writer.writeNumberValue("ingestedItemsCount", externalConnection.ingestedItemsCount);
    writer.writeCollectionOfObjectValues("items", externalConnection.items, serializeExternalItem);
    writer.writeStringValue("name", externalConnection.name);
    writer.writeCollectionOfObjectValues("operations", externalConnection.operations, serializeConnectionOperation);
    writer.writeObjectValue("quota", externalConnection.quota, serializeConnectionQuota);
    writer.writeObjectValue("schema", externalConnection.schema, serializeSchema);
    writer.writeObjectValue("searchSettings", externalConnection.searchSettings, serializeSearchSettings);
}
exports.serializeExternalConnection = serializeExternalConnection;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeExternalConnectionCollectionResponse(writer, externalConnectionCollectionResponse = {}) {
    (0, __1.serializeBaseCollectionPaginationCountResponse)(writer, externalConnectionCollectionResponse);
    writer.writeCollectionOfObjectValues("value", externalConnectionCollectionResponse.value, serializeExternalConnection);
}
exports.serializeExternalConnectionCollectionResponse = serializeExternalConnectionCollectionResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeExternalGroup(writer, externalGroup = {}) {
    (0, __1.serializeEntity)(writer, externalGroup);
    writer.writeStringValue("description", externalGroup.description);
    writer.writeStringValue("displayName", externalGroup.displayName);
    writer.writeCollectionOfObjectValues("members", externalGroup.members, serializeIdentity);
}
exports.serializeExternalGroup = serializeExternalGroup;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeExternalGroupCollectionResponse(writer, externalGroupCollectionResponse = {}) {
    (0, __1.serializeBaseCollectionPaginationCountResponse)(writer, externalGroupCollectionResponse);
    writer.writeCollectionOfObjectValues("value", externalGroupCollectionResponse.value, serializeExternalGroup);
}
exports.serializeExternalGroupCollectionResponse = serializeExternalGroupCollectionResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeExternalItem(writer, externalItem = {}) {
    (0, __1.serializeEntity)(writer, externalItem);
    writer.writeCollectionOfObjectValues("acl", externalItem.acl, serializeAcl);
    writer.writeCollectionOfObjectValues("activities", externalItem.activities, serializeExternalActivity);
    writer.writeObjectValue("content", externalItem.content, serializeExternalItemContent);
    writer.writeObjectValue("properties", externalItem.properties, serializeProperties);
}
exports.serializeExternalItem = serializeExternalItem;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeExternalItemCollectionResponse(writer, externalItemCollectionResponse = {}) {
    (0, __1.serializeBaseCollectionPaginationCountResponse)(writer, externalItemCollectionResponse);
    writer.writeCollectionOfObjectValues("value", externalItemCollectionResponse.value, serializeExternalItem);
}
exports.serializeExternalItemCollectionResponse = serializeExternalItemCollectionResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeExternalItemContent(writer, externalItemContent = {}) {
    writer.writeStringValue("@odata.type", externalItemContent.odataType);
    writer.writeEnumValue("type", externalItemContent.type);
    writer.writeStringValue("value", externalItemContent.value);
    writer.writeAdditionalData(externalItemContent.additionalData);
}
exports.serializeExternalItemContent = serializeExternalItemContent;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeIdentity(writer, identity = {}) {
    (0, __1.serializeEntity)(writer, identity);
    writer.writeEnumValue("type", identity.type);
}
exports.serializeIdentity = serializeIdentity;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeIdentityCollectionResponse(writer, identityCollectionResponse = {}) {
    (0, __1.serializeBaseCollectionPaginationCountResponse)(writer, identityCollectionResponse);
    writer.writeCollectionOfObjectValues("value", identityCollectionResponse.value, serializeIdentity);
}
exports.serializeIdentityCollectionResponse = serializeIdentityCollectionResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeItemIdResolver(writer, itemIdResolver = {}) {
    serializeUrlToItemResolverBase(writer, itemIdResolver);
    writer.writeStringValue("itemId", itemIdResolver.itemId);
    writer.writeObjectValue("urlMatchInfo", itemIdResolver.urlMatchInfo, serializeUrlMatchInfo);
}
exports.serializeItemIdResolver = serializeItemIdResolver;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeProperties(writer, properties = {}) {
    writer.writeStringValue("@odata.type", properties.odataType);
    writer.writeAdditionalData(properties.additionalData);
}
exports.serializeProperties = serializeProperties;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeProperty(writer, property = {}) {
    writer.writeCollectionOfPrimitiveValues("aliases", property.aliases);
    writer.writeBooleanValue("isExactMatchRequired", property.isExactMatchRequired);
    writer.writeBooleanValue("isQueryable", property.isQueryable);
    writer.writeBooleanValue("isRefinable", property.isRefinable);
    writer.writeBooleanValue("isRetrievable", property.isRetrievable);
    writer.writeBooleanValue("isSearchable", property.isSearchable);
    if (property.labels)
        writer.writeEnumValue("labels", ...property.labels);
    writer.writeStringValue("name", property.name);
    writer.writeStringValue("@odata.type", property.odataType);
    writer.writeObjectValue("rankingHint", property.rankingHint, serializeRankingHint);
    writer.writeEnumValue("type", property.type);
    writer.writeAdditionalData(property.additionalData);
}
exports.serializeProperty = serializeProperty;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializePropertyRule(writer, propertyRule = {}) {
    writer.writeStringValue("@odata.type", propertyRule.odataType);
    writer.writeEnumValue("operation", propertyRule.operation);
    writer.writeStringValue("property", propertyRule.property);
    writer.writeCollectionOfPrimitiveValues("values", propertyRule.values);
    writer.writeEnumValue("valuesJoinedBy", propertyRule.valuesJoinedBy);
    writer.writeAdditionalData(propertyRule.additionalData);
}
exports.serializePropertyRule = serializePropertyRule;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeRankingHint(writer, rankingHint = {}) {
    writer.writeEnumValue("importanceScore", rankingHint.importanceScore);
    writer.writeStringValue("@odata.type", rankingHint.odataType);
    writer.writeAdditionalData(rankingHint.additionalData);
}
exports.serializeRankingHint = serializeRankingHint;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeSchema(writer, schema = {}) {
    (0, __1.serializeEntity)(writer, schema);
    writer.writeStringValue("baseType", schema.baseType);
    writer.writeCollectionOfObjectValues("properties", schema.properties, serializeProperty);
}
exports.serializeSchema = serializeSchema;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeSearchSettings(writer, searchSettings = {}) {
    writer.writeStringValue("@odata.type", searchSettings.odataType);
    writer.writeCollectionOfObjectValues("searchResultTemplates", searchSettings.searchResultTemplates, serializeDisplayTemplate);
    writer.writeAdditionalData(searchSettings.additionalData);
}
exports.serializeSearchSettings = serializeSearchSettings;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeUrlMatchInfo(writer, urlMatchInfo = {}) {
    writer.writeCollectionOfPrimitiveValues("baseUrls", urlMatchInfo.baseUrls);
    writer.writeStringValue("@odata.type", urlMatchInfo.odataType);
    writer.writeStringValue("urlPattern", urlMatchInfo.urlPattern);
    writer.writeAdditionalData(urlMatchInfo.additionalData);
}
exports.serializeUrlMatchInfo = serializeUrlMatchInfo;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeUrlToItemResolverBase(writer, urlToItemResolverBase = {}) {
    writer.writeStringValue("@odata.type", urlToItemResolverBase.odataType);
    writer.writeNumberValue("priority", urlToItemResolverBase.priority);
    writer.writeAdditionalData(urlToItemResolverBase.additionalData);
}
exports.serializeUrlToItemResolverBase = serializeUrlToItemResolverBase;
exports.AccessTypeObject = {
    Grant: "grant",
    Deny: "deny",
    UnknownFutureValue: "unknownFutureValue",
};
exports.AclTypeObject = {
    User: "user",
    Group: "group",
    Everyone: "everyone",
    EveryoneExceptGuests: "everyoneExceptGuests",
    ExternalGroup: "externalGroup",
    UnknownFutureValue: "unknownFutureValue",
};
exports.ConnectionOperationStatusObject = {
    Unspecified: "unspecified",
    Inprogress: "inprogress",
    Completed: "completed",
    Failed: "failed",
    UnknownFutureValue: "unknownFutureValue",
};
exports.ConnectionStateObject = {
    Draft: "draft",
    Ready: "ready",
    Obsolete: "obsolete",
    LimitExceeded: "limitExceeded",
    UnknownFutureValue: "unknownFutureValue",
};
exports.ContentExperienceTypeObject = {
    Search: "search",
    Compliance: "compliance",
    UnknownFutureValue: "unknownFutureValue",
};
exports.ExternalActivityTypeObject = {
    Viewed: "viewed",
    Modified: "modified",
    Created: "created",
    Commented: "commented",
    UnknownFutureValue: "unknownFutureValue",
};
exports.ExternalItemContentTypeObject = {
    Text: "text",
    Html: "html",
    UnknownFutureValue: "unknownFutureValue",
};
exports.IdentitySourceTypeObject = {
    AzureActiveDirectory: "azureActiveDirectory",
    External: "external",
    UnknownFutureValue: "unknownFutureValue",
};
exports.IdentityTypeObject = {
    User: "user",
    Group: "group",
    ExternalGroup: "externalGroup",
    UnknownFutureValue: "unknownFutureValue",
};
exports.ImportanceScoreObject = {
    Low: "low",
    Medium: "medium",
    High: "high",
    VeryHigh: "veryHigh",
    UnknownFutureValue: "unknownFutureValue",
};
exports.LabelObject = {
    Title: "title",
    Url: "url",
    CreatedBy: "createdBy",
    LastModifiedBy: "lastModifiedBy",
    Authors: "authors",
    CreatedDateTime: "createdDateTime",
    LastModifiedDateTime: "lastModifiedDateTime",
    FileName: "fileName",
    FileExtension: "fileExtension",
    UnknownFutureValue: "unknownFutureValue",
    ContainerName: "containerName",
    ContainerUrl: "containerUrl",
    IconUrl: "iconUrl",
};
exports.PropertyTypeObject = {
    String: "string",
    Int64: "int64",
    Double: "double",
    DateTime: "dateTime",
    Boolean: "boolean",
    StringCollection: "stringCollection",
    Int64Collection: "int64Collection",
    DoubleCollection: "doubleCollection",
    DateTimeCollection: "dateTimeCollection",
    UnknownFutureValue: "unknownFutureValue",
};
exports.RuleOperationObject = {
    Equals: "equals",
    NotEquals: "notEquals",
    Contains: "contains",
    NotContains: "notContains",
    LessThan: "lessThan",
    GreaterThan: "greaterThan",
    StartsWith: "startsWith",
    UnknownFutureValue: "unknownFutureValue",
};
/* tslint:enable */
/* eslint-enable */
