/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { BinaryOperatorObject, createAuthorizationSystemFromDiscriminatorValue, createPublicErrorFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, deserializeIntoEntity, serializeAuthorizationSystem, serializeBaseCollectionPaginationCountResponse, serializeEntity, serializePublicError } from '../index.js';
// @ts-ignore
import { createIndustryDataRootFromDiscriminatorValue, serializeIndustryDataRoot } from '../industryData/index.js';
// @ts-ignore
import { createUntypedNodeFromDiscriminatorValue } from '@microsoft/kiota-abstractions';
/**
 * 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}
 */
// @ts-ignore
export function createAclFromDiscriminatorValue(parseNode) {
    return deserializeIntoAcl;
}
/**
 * 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}
 */
// @ts-ignore
export function createActivitySettingsFromDiscriminatorValue(parseNode) {
    return deserializeIntoActivitySettings;
}
/**
 * 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}
 */
// @ts-ignore
export function createComplianceSettingsFromDiscriminatorValue(parseNode) {
    return deserializeIntoComplianceSettings;
}
/**
 * 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}
 */
// @ts-ignore
export function createConfigurationFromDiscriminatorValue(parseNode) {
    return deserializeIntoConfiguration;
}
/**
 * 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}
 */
// @ts-ignore
export function createConnectionOperationCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoConnectionOperationCollectionResponse;
}
/**
 * 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}
 */
// @ts-ignore
export function createConnectionOperationFromDiscriminatorValue(parseNode) {
    return deserializeIntoConnectionOperation;
}
/**
 * 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}
 */
// @ts-ignore
export function createConnectionQuotaFromDiscriminatorValue(parseNode) {
    return deserializeIntoConnectionQuota;
}
/**
 * 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}
 */
// @ts-ignore
export function createDisplayTemplateFromDiscriminatorValue(parseNode) {
    return deserializeIntoDisplayTemplate;
}
/**
 * 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}
 */
// @ts-ignore
export function createExternalActivityCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalActivityCollectionResponse;
}
/**
 * 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}
 */
// @ts-ignore
export function createExternalActivityFromDiscriminatorValue(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.externalConnectors.externalActivityResult":
                    return deserializeIntoExternalActivityResult;
            }
        }
    }
    return deserializeIntoExternalActivity;
}
/**
 * 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}
 */
// @ts-ignore
export function createExternalActivityResultFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalActivityResult;
}
/**
 * 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}
 */
// @ts-ignore
export function createExternalConnectionCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalConnectionCollectionResponse;
}
/**
 * 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}
 */
// @ts-ignore
export function createExternalConnectionFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalConnection;
}
/**
 * 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}
 */
// @ts-ignore
export function createExternalFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternal;
}
/**
 * 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}
 */
// @ts-ignore
export function createExternalGroupCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalGroupCollectionResponse;
}
/**
 * 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}
 */
// @ts-ignore
export function createExternalGroupFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalGroup;
}
/**
 * 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}
 */
// @ts-ignore
export function createExternalItemCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalItemCollectionResponse;
}
/**
 * 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}
 */
// @ts-ignore
export function createExternalItemContentFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalItemContent;
}
/**
 * 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}
 */
// @ts-ignore
export function createExternalItemFromDiscriminatorValue(parseNode) {
    return deserializeIntoExternalItem;
}
/**
 * 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}
 */
// @ts-ignore
export function createIdentityCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoIdentityCollectionResponse;
}
/**
 * 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}
 */
// @ts-ignore
export function createIdentityFromDiscriminatorValue(parseNode) {
    return deserializeIntoIdentity;
}
/**
 * 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}
 */
// @ts-ignore
export function createItemIdResolverFromDiscriminatorValue(parseNode) {
    return deserializeIntoItemIdResolver;
}
/**
 * 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}
 */
// @ts-ignore
export function createPropertiesFromDiscriminatorValue(parseNode) {
    return deserializeIntoProperties;
}
/**
 * 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}
 */
// @ts-ignore
export function createPropertyFromDiscriminatorValue(parseNode) {
    return deserializeIntoProperty;
}
/**
 * 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}
 */
// @ts-ignore
export function createPropertyRuleFromDiscriminatorValue(parseNode) {
    return deserializeIntoPropertyRule;
}
/**
 * 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}
 */
// @ts-ignore
export function createRankingHintFromDiscriminatorValue(parseNode) {
    return deserializeIntoRankingHint;
}
/**
 * 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}
 */
// @ts-ignore
export function createSchemaFromDiscriminatorValue(parseNode) {
    return deserializeIntoSchema;
}
/**
 * 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}
 */
// @ts-ignore
export function createSearchSettingsFromDiscriminatorValue(parseNode) {
    return deserializeIntoSearchSettings;
}
/**
 * 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}
 */
// @ts-ignore
export function createUrlMatchInfoFromDiscriminatorValue(parseNode) {
    return deserializeIntoUrlMatchInfo;
}
/**
 * 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}
 */
// @ts-ignore
export function createUrlToItemResolverBaseFromDiscriminatorValue(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.externalConnectors.itemIdResolver":
                    return deserializeIntoItemIdResolver;
            }
        }
    }
    return deserializeIntoUrlToItemResolverBase;
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoAcl(acl = {}) {
    return {
        "accessType": n => { acl.accessType = n.getEnumValue(AccessTypeObject); },
        "backingStoreEnabled": n => { acl.backingStoreEnabled = true; },
        "identitySource": n => { acl.identitySource = n.getEnumValue(IdentitySourceTypeObject); },
        "@odata.type": n => { acl.odataType = n.getStringValue(); },
        "type": n => { acl.type = n.getEnumValue(AclTypeObject); },
        "value": n => { acl.value = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoActivitySettings(activitySettings = {}) {
    return {
        "backingStoreEnabled": n => { activitySettings.backingStoreEnabled = true; },
        "@odata.type": n => { activitySettings.odataType = n.getStringValue(); },
        "urlToItemResolvers": n => { activitySettings.urlToItemResolvers = n.getCollectionOfObjectValues(createUrlToItemResolverBaseFromDiscriminatorValue); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoComplianceSettings(complianceSettings = {}) {
    return {
        "backingStoreEnabled": n => { complianceSettings.backingStoreEnabled = true; },
        "eDiscoveryResultTemplates": n => { complianceSettings.eDiscoveryResultTemplates = n.getCollectionOfObjectValues(createDisplayTemplateFromDiscriminatorValue); },
        "@odata.type": n => { complianceSettings.odataType = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoConfiguration(configuration = {}) {
    return {
        "authorizedAppIds": n => { configuration.authorizedAppIds = n.getCollectionOfPrimitiveValues(); },
        "backingStoreEnabled": n => { configuration.backingStoreEnabled = true; },
        "@odata.type": n => { configuration.odataType = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoConnectionOperation(connectionOperation = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(connectionOperation)), { "error": n => { connectionOperation.errorEscaped = n.getObjectValue(createPublicErrorFromDiscriminatorValue); }, "status": n => { connectionOperation.status = n.getEnumValue(ConnectionOperationStatusObject); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoConnectionOperationCollectionResponse(connectionOperationCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(connectionOperationCollectionResponse)), { "value": n => { connectionOperationCollectionResponse.value = n.getCollectionOfObjectValues(createConnectionOperationFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoConnectionQuota(connectionQuota = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(connectionQuota)), { "itemsRemaining": n => { connectionQuota.itemsRemaining = n.getNumberValue(); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoDisplayTemplate(displayTemplate = {}) {
    return {
        "backingStoreEnabled": n => { displayTemplate.backingStoreEnabled = true; },
        "id": n => { displayTemplate.id = n.getStringValue(); },
        "layout": n => { displayTemplate.layout = n.getObjectValue(createUntypedNodeFromDiscriminatorValue); },
        "@odata.type": n => { displayTemplate.odataType = n.getStringValue(); },
        "priority": n => { displayTemplate.priority = n.getNumberValue(); },
        "rules": n => { displayTemplate.rules = n.getCollectionOfObjectValues(createPropertyRuleFromDiscriminatorValue); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoExternal(external = {}) {
    return {
        "authorizationSystems": n => { external.authorizationSystems = n.getCollectionOfObjectValues(createAuthorizationSystemFromDiscriminatorValue); },
        "backingStoreEnabled": n => { external.backingStoreEnabled = true; },
        "connections": n => { external.connections = n.getCollectionOfObjectValues(createExternalConnectionFromDiscriminatorValue); },
        "industryData": n => { external.industryData = n.getObjectValue(createIndustryDataRootFromDiscriminatorValue); },
        "@odata.type": n => { external.odataType = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoExternalActivity(externalActivity = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(externalActivity)), { "performedBy": n => { externalActivity.performedBy = n.getObjectValue(createIdentityFromDiscriminatorValue); }, "startDateTime": n => { externalActivity.startDateTime = n.getDateValue(); }, "type": n => { externalActivity.type = n.getEnumValue(ExternalActivityTypeObject); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoExternalActivityCollectionResponse(externalActivityCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(externalActivityCollectionResponse)), { "value": n => { externalActivityCollectionResponse.value = n.getCollectionOfObjectValues(createExternalActivityFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoExternalActivityResult(externalActivityResult = {}) {
    return Object.assign(Object.assign({}, deserializeIntoExternalActivity(externalActivityResult)), { "error": n => { externalActivityResult.errorEscaped = n.getObjectValue(createPublicErrorFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoExternalConnection(externalConnection = {}) {
    return Object.assign(Object.assign({}, 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(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(ConnectionStateObject); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoExternalConnectionCollectionResponse(externalConnectionCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(externalConnectionCollectionResponse)), { "value": n => { externalConnectionCollectionResponse.value = n.getCollectionOfObjectValues(createExternalConnectionFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoExternalGroup(externalGroup = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(externalGroup)), { "description": n => { externalGroup.description = n.getStringValue(); }, "displayName": n => { externalGroup.displayName = n.getStringValue(); }, "members": n => { externalGroup.members = n.getCollectionOfObjectValues(createIdentityFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoExternalGroupCollectionResponse(externalGroupCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(externalGroupCollectionResponse)), { "value": n => { externalGroupCollectionResponse.value = n.getCollectionOfObjectValues(createExternalGroupFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoExternalItem(externalItem = {}) {
    return Object.assign(Object.assign({}, 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); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoExternalItemCollectionResponse(externalItemCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(externalItemCollectionResponse)), { "value": n => { externalItemCollectionResponse.value = n.getCollectionOfObjectValues(createExternalItemFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoExternalItemContent(externalItemContent = {}) {
    return {
        "backingStoreEnabled": n => { externalItemContent.backingStoreEnabled = true; },
        "@odata.type": n => { externalItemContent.odataType = n.getStringValue(); },
        "type": n => { externalItemContent.type = n.getEnumValue(ExternalItemContentTypeObject); },
        "value": n => { externalItemContent.value = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoIdentity(identity = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(identity)), { "type": n => { identity.type = n.getEnumValue(IdentityTypeObject); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoIdentityCollectionResponse(identityCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(identityCollectionResponse)), { "value": n => { identityCollectionResponse.value = n.getCollectionOfObjectValues(createIdentityFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoItemIdResolver(itemIdResolver = {}) {
    return Object.assign(Object.assign({}, deserializeIntoUrlToItemResolverBase(itemIdResolver)), { "itemId": n => { itemIdResolver.itemId = n.getStringValue(); }, "urlMatchInfo": n => { itemIdResolver.urlMatchInfo = n.getObjectValue(createUrlMatchInfoFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoProperties(properties = {}) {
    return {
        "backingStoreEnabled": n => { properties.backingStoreEnabled = true; },
        "@odata.type": n => { properties.odataType = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export 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(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(PropertyTypeObject); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoPropertyRule(propertyRule = {}) {
    return {
        "backingStoreEnabled": n => { propertyRule.backingStoreEnabled = true; },
        "@odata.type": n => { propertyRule.odataType = n.getStringValue(); },
        "operation": n => { propertyRule.operation = n.getEnumValue(RuleOperationObject); },
        "property": n => { propertyRule.property = n.getStringValue(); },
        "values": n => { propertyRule.values = n.getCollectionOfPrimitiveValues(); },
        "valuesJoinedBy": n => { propertyRule.valuesJoinedBy = n.getEnumValue(BinaryOperatorObject); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoRankingHint(rankingHint = {}) {
    return {
        "backingStoreEnabled": n => { rankingHint.backingStoreEnabled = true; },
        "importanceScore": n => { rankingHint.importanceScore = n.getEnumValue(ImportanceScoreObject); },
        "@odata.type": n => { rankingHint.odataType = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoSchema(schema = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(schema)), { "baseType": n => { schema.baseType = n.getStringValue(); }, "properties": n => { schema.properties = n.getCollectionOfObjectValues(createPropertyFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoSearchSettings(searchSettings = {}) {
    return {
        "backingStoreEnabled": n => { searchSettings.backingStoreEnabled = true; },
        "@odata.type": n => { searchSettings.odataType = n.getStringValue(); },
        "searchResultTemplates": n => { searchSettings.searchResultTemplates = n.getCollectionOfObjectValues(createDisplayTemplateFromDiscriminatorValue); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export 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(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoUrlToItemResolverBase(urlToItemResolverBase = {}) {
    return {
        "backingStoreEnabled": n => { urlToItemResolverBase.backingStoreEnabled = true; },
        "@odata.type": n => { urlToItemResolverBase.odataType = n.getStringValue(); },
        "priority": n => { urlToItemResolverBase.priority = n.getNumberValue(); },
    };
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeAcl(writer, acl = {}) {
    if (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);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeActivitySettings(writer, activitySettings = {}) {
    if (activitySettings) {
        writer.writeStringValue("@odata.type", activitySettings.odataType);
        writer.writeCollectionOfObjectValues("urlToItemResolvers", activitySettings.urlToItemResolvers, serializeUrlToItemResolverBase);
        writer.writeAdditionalData(activitySettings.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeComplianceSettings(writer, complianceSettings = {}) {
    if (complianceSettings) {
        writer.writeCollectionOfObjectValues("eDiscoveryResultTemplates", complianceSettings.eDiscoveryResultTemplates, serializeDisplayTemplate);
        writer.writeStringValue("@odata.type", complianceSettings.odataType);
        writer.writeAdditionalData(complianceSettings.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeConfiguration(writer, configuration = {}) {
    if (configuration) {
        writer.writeCollectionOfPrimitiveValues("authorizedAppIds", configuration.authorizedAppIds);
        writer.writeStringValue("@odata.type", configuration.odataType);
        writer.writeAdditionalData(configuration.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeConnectionOperation(writer, connectionOperation = {}) {
    if (connectionOperation) {
        serializeEntity(writer, connectionOperation);
        writer.writeObjectValue("error", connectionOperation.errorEscaped, serializePublicError);
        writer.writeEnumValue("status", connectionOperation.status);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeConnectionOperationCollectionResponse(writer, connectionOperationCollectionResponse = {}) {
    if (connectionOperationCollectionResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, connectionOperationCollectionResponse);
        writer.writeCollectionOfObjectValues("value", connectionOperationCollectionResponse.value, serializeConnectionOperation);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeConnectionQuota(writer, connectionQuota = {}) {
    if (connectionQuota) {
        serializeEntity(writer, connectionQuota);
        writer.writeNumberValue("itemsRemaining", connectionQuota.itemsRemaining);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeDisplayTemplate(writer, displayTemplate = {}) {
    if (displayTemplate) {
        writer.writeStringValue("id", displayTemplate.id);
        writer.writeObjectValue("layout", displayTemplate.layout);
        writer.writeStringValue("@odata.type", displayTemplate.odataType);
        writer.writeNumberValue("priority", displayTemplate.priority);
        writer.writeCollectionOfObjectValues("rules", displayTemplate.rules, serializePropertyRule);
        writer.writeAdditionalData(displayTemplate.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeExternal(writer, external = {}) {
    if (external) {
        writer.writeCollectionOfObjectValues("authorizationSystems", external.authorizationSystems, serializeAuthorizationSystem);
        writer.writeCollectionOfObjectValues("connections", external.connections, serializeExternalConnection);
        writer.writeObjectValue("industryData", external.industryData, serializeIndustryDataRoot);
        writer.writeStringValue("@odata.type", external.odataType);
        writer.writeAdditionalData(external.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeExternalActivity(writer, externalActivity = {}) {
    if (externalActivity) {
        serializeEntity(writer, externalActivity);
        writer.writeObjectValue("performedBy", externalActivity.performedBy, serializeIdentity);
        writer.writeDateValue("startDateTime", externalActivity.startDateTime);
        writer.writeEnumValue("type", externalActivity.type);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeExternalActivityCollectionResponse(writer, externalActivityCollectionResponse = {}) {
    if (externalActivityCollectionResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, externalActivityCollectionResponse);
        writer.writeCollectionOfObjectValues("value", externalActivityCollectionResponse.value, serializeExternalActivity);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeExternalActivityResult(writer, externalActivityResult = {}) {
    if (externalActivityResult) {
        serializeExternalActivity(writer, externalActivityResult);
        writer.writeObjectValue("error", externalActivityResult.errorEscaped, serializePublicError);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeExternalConnection(writer, externalConnection = {}) {
    if (externalConnection) {
        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);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeExternalConnectionCollectionResponse(writer, externalConnectionCollectionResponse = {}) {
    if (externalConnectionCollectionResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, externalConnectionCollectionResponse);
        writer.writeCollectionOfObjectValues("value", externalConnectionCollectionResponse.value, serializeExternalConnection);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeExternalGroup(writer, externalGroup = {}) {
    if (externalGroup) {
        serializeEntity(writer, externalGroup);
        writer.writeStringValue("description", externalGroup.description);
        writer.writeStringValue("displayName", externalGroup.displayName);
        writer.writeCollectionOfObjectValues("members", externalGroup.members, serializeIdentity);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeExternalGroupCollectionResponse(writer, externalGroupCollectionResponse = {}) {
    if (externalGroupCollectionResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, externalGroupCollectionResponse);
        writer.writeCollectionOfObjectValues("value", externalGroupCollectionResponse.value, serializeExternalGroup);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeExternalItem(writer, externalItem = {}) {
    if (externalItem) {
        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);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeExternalItemCollectionResponse(writer, externalItemCollectionResponse = {}) {
    if (externalItemCollectionResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, externalItemCollectionResponse);
        writer.writeCollectionOfObjectValues("value", externalItemCollectionResponse.value, serializeExternalItem);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeExternalItemContent(writer, externalItemContent = {}) {
    if (externalItemContent) {
        writer.writeStringValue("@odata.type", externalItemContent.odataType);
        writer.writeEnumValue("type", externalItemContent.type);
        writer.writeStringValue("value", externalItemContent.value);
        writer.writeAdditionalData(externalItemContent.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeIdentity(writer, identity = {}) {
    if (identity) {
        serializeEntity(writer, identity);
        writer.writeEnumValue("type", identity.type);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeIdentityCollectionResponse(writer, identityCollectionResponse = {}) {
    if (identityCollectionResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, identityCollectionResponse);
        writer.writeCollectionOfObjectValues("value", identityCollectionResponse.value, serializeIdentity);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeItemIdResolver(writer, itemIdResolver = {}) {
    if (itemIdResolver) {
        serializeUrlToItemResolverBase(writer, itemIdResolver);
        writer.writeStringValue("itemId", itemIdResolver.itemId);
        writer.writeObjectValue("urlMatchInfo", itemIdResolver.urlMatchInfo, serializeUrlMatchInfo);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeProperties(writer, properties = {}) {
    if (properties) {
        writer.writeStringValue("@odata.type", properties.odataType);
        writer.writeAdditionalData(properties.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeProperty(writer, property = {}) {
    if (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.writeCollectionOfEnumValues("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);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializePropertyRule(writer, propertyRule = {}) {
    if (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);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeRankingHint(writer, rankingHint = {}) {
    if (rankingHint) {
        writer.writeEnumValue("importanceScore", rankingHint.importanceScore);
        writer.writeStringValue("@odata.type", rankingHint.odataType);
        writer.writeAdditionalData(rankingHint.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeSchema(writer, schema = {}) {
    if (schema) {
        serializeEntity(writer, schema);
        writer.writeStringValue("baseType", schema.baseType);
        writer.writeCollectionOfObjectValues("properties", schema.properties, serializeProperty);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeSearchSettings(writer, searchSettings = {}) {
    if (searchSettings) {
        writer.writeStringValue("@odata.type", searchSettings.odataType);
        writer.writeCollectionOfObjectValues("searchResultTemplates", searchSettings.searchResultTemplates, serializeDisplayTemplate);
        writer.writeAdditionalData(searchSettings.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeUrlMatchInfo(writer, urlMatchInfo = {}) {
    if (urlMatchInfo) {
        writer.writeCollectionOfPrimitiveValues("baseUrls", urlMatchInfo.baseUrls);
        writer.writeStringValue("@odata.type", urlMatchInfo.odataType);
        writer.writeStringValue("urlPattern", urlMatchInfo.urlPattern);
        writer.writeAdditionalData(urlMatchInfo.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeUrlToItemResolverBase(writer, urlToItemResolverBase = {}) {
    if (urlToItemResolverBase) {
        writer.writeStringValue("@odata.type", urlToItemResolverBase.odataType);
        writer.writeNumberValue("priority", urlToItemResolverBase.priority);
        writer.writeAdditionalData(urlToItemResolverBase.additionalData);
    }
}
export const AccessTypeObject = {
    Grant: "grant",
    Deny: "deny",
    UnknownFutureValue: "unknownFutureValue",
};
export const AclTypeObject = {
    User: "user",
    Group: "group",
    Everyone: "everyone",
    EveryoneExceptGuests: "everyoneExceptGuests",
    ExternalGroup: "externalGroup",
    UnknownFutureValue: "unknownFutureValue",
};
export const ConnectionOperationStatusObject = {
    Unspecified: "unspecified",
    Inprogress: "inprogress",
    Completed: "completed",
    Failed: "failed",
    UnknownFutureValue: "unknownFutureValue",
};
export const ConnectionStateObject = {
    Draft: "draft",
    Ready: "ready",
    Obsolete: "obsolete",
    LimitExceeded: "limitExceeded",
    UnknownFutureValue: "unknownFutureValue",
};
export const ContentExperienceTypeObject = {
    Search: "search",
    Compliance: "compliance",
    UnknownFutureValue: "unknownFutureValue",
};
export const ExternalActivityTypeObject = {
    Viewed: "viewed",
    Modified: "modified",
    Created: "created",
    Commented: "commented",
    UnknownFutureValue: "unknownFutureValue",
};
export const ExternalItemContentTypeObject = {
    Text: "text",
    Html: "html",
    UnknownFutureValue: "unknownFutureValue",
};
export const IdentitySourceTypeObject = {
    AzureActiveDirectory: "azureActiveDirectory",
    External: "external",
    UnknownFutureValue: "unknownFutureValue",
};
export const IdentityTypeObject = {
    User: "user",
    Group: "group",
    ExternalGroup: "externalGroup",
    UnknownFutureValue: "unknownFutureValue",
};
export const ImportanceScoreObject = {
    Low: "low",
    Medium: "medium",
    High: "high",
    VeryHigh: "veryHigh",
    UnknownFutureValue: "unknownFutureValue",
};
export const 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",
};
export const PropertyTypeObject = {
    String: "string",
    Int64: "int64",
    Double: "double",
    DateTime: "dateTime",
    Boolean: "boolean",
    StringCollection: "stringCollection",
    Int64Collection: "int64Collection",
    DoubleCollection: "doubleCollection",
    DateTimeCollection: "dateTimeCollection",
    UnknownFutureValue: "unknownFutureValue",
};
export const RuleOperationObject = {
    NullEscaped: "null",
    Equals: "equals",
    NotEquals: "notEquals",
    Contains: "contains",
    NotContains: "notContains",
    LessThan: "lessThan",
    GreaterThan: "greaterThan",
    StartsWith: "startsWith",
    UnknownFutureValue: "unknownFutureValue",
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map