/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { BinaryOperatorObject, createPublicErrorFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, deserializeIntoEntity, serializeBaseCollectionPaginationCountResponse, serializeEntity, serializePublicError } from '../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}
 */
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}
 */
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 {Configuration}
 */
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}
 */
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}
 */
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 {DisplayTemplate}
 */
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}
 */
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}
 */
export 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;
}
/**
 * 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}
 */
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}
 */
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}
 */
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}
 */
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}
 */
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}
 */
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}
 */
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}
 */
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}
 */
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}
 */
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}
 */
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}
 */
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}
 */
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}
 */
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}
 */
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 {Schema}
 */
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}
 */
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}
 */
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}
 */
export 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;
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoAcl(acl = {}) {
    return {
        "accessType": n => { acl.accessType = n.getEnumValue(AccessTypeObject); },
        "backingStoreEnabled": n => { acl.backingStoreEnabled = true; },
        "@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>}
 */
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>}
 */
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>}
 */
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>}
 */
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>}
 */
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>}
 */
export function deserializeIntoExternal(external = {}) {
    return {
        "backingStoreEnabled": n => { external.backingStoreEnabled = true; },
        "connections": n => { external.connections = n.getCollectionOfObjectValues(createExternalConnectionFromDiscriminatorValue); },
        "@odata.type": n => { external.odataType = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
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>}
 */
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>}
 */
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>}
 */
export function deserializeIntoExternalConnection(externalConnection = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(externalConnection)), { "activitySettings": n => { externalConnection.activitySettings = n.getObjectValue(createActivitySettingsFromDiscriminatorValue); }, "configuration": n => { externalConnection.configuration = n.getObjectValue(createConfigurationFromDiscriminatorValue); }, "connectorId": n => { externalConnection.connectorId = n.getStringValue(); }, "description": n => { externalConnection.description = n.getStringValue(); }, "groups": n => { externalConnection.groups = n.getCollectionOfObjectValues(createExternalGroupFromDiscriminatorValue); }, "items": n => { externalConnection.items = n.getCollectionOfObjectValues(createExternalItemFromDiscriminatorValue); }, "name": n => { externalConnection.name = n.getStringValue(); }, "operations": n => { externalConnection.operations = n.getCollectionOfObjectValues(createConnectionOperationFromDiscriminatorValue); }, "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>}
 */
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>}
 */
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>}
 */
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>}
 */
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>}
 */
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>}
 */
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>}
 */
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>}
 */
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>}
 */
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>}
 */
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>}
 */
export function deserializeIntoProperty(property = {}) {
    return {
        "aliases": n => { property.aliases = n.getCollectionOfPrimitiveValues(); },
        "backingStoreEnabled": n => { property.backingStoreEnabled = true; },
        "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(); },
        "type": n => { property.type = n.getEnumValue(PropertyTypeObject); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
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>}
 */
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>}
 */
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>}
 */
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>}
 */
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
 */
export function serializeAcl(writer, acl = {}) {
    writer.writeEnumValue("accessType", acl.accessType);
    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
 */
export function serializeActivitySettings(writer, 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
 */
export function serializeConfiguration(writer, 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
 */
export function serializeConnectionOperation(writer, 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
 */
export function serializeConnectionOperationCollectionResponse(writer, 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
 */
export function serializeDisplayTemplate(writer, 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
 */
export function serializeExternal(writer, external = {}) {
    writer.writeCollectionOfObjectValues("connections", external.connections, serializeExternalConnection);
    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
 */
export function serializeExternalActivity(writer, 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
 */
export function serializeExternalActivityCollectionResponse(writer, 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
 */
export function serializeExternalActivityResult(writer, 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
 */
export function serializeExternalConnection(writer, externalConnection = {}) {
    serializeEntity(writer, externalConnection);
    writer.writeObjectValue("activitySettings", externalConnection.activitySettings, serializeActivitySettings);
    writer.writeObjectValue("configuration", externalConnection.configuration, serializeConfiguration);
    writer.writeStringValue("connectorId", externalConnection.connectorId);
    writer.writeStringValue("description", externalConnection.description);
    writer.writeCollectionOfObjectValues("groups", externalConnection.groups, serializeExternalGroup);
    writer.writeCollectionOfObjectValues("items", externalConnection.items, serializeExternalItem);
    writer.writeStringValue("name", externalConnection.name);
    writer.writeCollectionOfObjectValues("operations", externalConnection.operations, serializeConnectionOperation);
    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
 */
export function serializeExternalConnectionCollectionResponse(writer, 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
 */
export function serializeExternalGroup(writer, 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
 */
export function serializeExternalGroupCollectionResponse(writer, 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
 */
export function serializeExternalItem(writer, 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
 */
export function serializeExternalItemCollectionResponse(writer, 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
 */
export function serializeExternalItemContent(writer, 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
 */
export function serializeIdentity(writer, identity = {}) {
    serializeEntity(writer, identity);
    writer.writeEnumValue("type", identity.type);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeIdentityCollectionResponse(writer, 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
 */
export function serializeItemIdResolver(writer, 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
 */
export function serializeProperties(writer, 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
 */
export function serializeProperty(writer, property = {}) {
    writer.writeCollectionOfPrimitiveValues("aliases", property.aliases);
    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.writeEnumValue("type", property.type);
    writer.writeAdditionalData(property.additionalData);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export 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);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeSchema(writer, 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
 */
export function serializeSearchSettings(writer, 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
 */
export function serializeUrlMatchInfo(writer, 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
 */
export function serializeUrlToItemResolverBase(writer, 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 ExternalActivityTypeObject = {
    Viewed: "viewed",
    Modified: "modified",
    Created: "created",
    Commented: "commented",
    UnknownFutureValue: "unknownFutureValue",
};
export const ExternalItemContentTypeObject = {
    Text: "text",
    Html: "html",
    UnknownFutureValue: "unknownFutureValue",
};
export const IdentityTypeObject = {
    User: "user",
    Group: "group",
    ExternalGroup: "externalGroup",
    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",
    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 = {
    Equals: "equals",
    NotEquals: "notEquals",
    Contains: "contains",
    NotContains: "notContains",
    LessThan: "lessThan",
    GreaterThan: "greaterThan",
    StartsWith: "startsWith",
    UnknownFutureValue: "unknownFutureValue",
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map