/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createUserFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, deserializeIntoEntity, LongRunningOperationStatusObject, serializeBaseCollectionPaginationCountResponse, serializeEntity, serializeUser } from '../index.js';
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns {AssignedTelephoneNumber}
 */
// @ts-ignore
export function createAssignedTelephoneNumberFromDiscriminatorValue(parseNode) {
    return deserializeIntoAssignedTelephoneNumber;
}
/**
 * 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 {EffectivePolicyAssignment}
 */
// @ts-ignore
export function createEffectivePolicyAssignmentFromDiscriminatorValue(parseNode) {
    return deserializeIntoEffectivePolicyAssignment;
}
/**
 * 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 {NumberAssignmentCollectionResponse}
 */
// @ts-ignore
export function createNumberAssignmentCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoNumberAssignmentCollectionResponse;
}
/**
 * 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 {NumberAssignment}
 */
// @ts-ignore
export function createNumberAssignmentFromDiscriminatorValue(parseNode) {
    return deserializeIntoNumberAssignment;
}
/**
 * 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 {PolicyAssignment}
 */
// @ts-ignore
export function createPolicyAssignmentFromDiscriminatorValue(parseNode) {
    return deserializeIntoPolicyAssignment;
}
/**
 * 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 {PolicyIdentifierDetail}
 */
// @ts-ignore
export function createPolicyIdentifierDetailFromDiscriminatorValue(parseNode) {
    return deserializeIntoPolicyIdentifierDetail;
}
/**
 * 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 {TeamsAdminRoot}
 */
// @ts-ignore
export function createTeamsAdminRootFromDiscriminatorValue(parseNode) {
    return deserializeIntoTeamsAdminRoot;
}
/**
 * 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 {TeamsPolicyAssignment}
 */
// @ts-ignore
export function createTeamsPolicyAssignmentFromDiscriminatorValue(parseNode) {
    return deserializeIntoTeamsPolicyAssignment;
}
/**
 * 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 {TeamsPolicyUserAssignmentCollectionResponse}
 */
// @ts-ignore
export function createTeamsPolicyUserAssignmentCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoTeamsPolicyUserAssignmentCollectionResponse;
}
/**
 * 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 {TeamsPolicyUserAssignment}
 */
// @ts-ignore
export function createTeamsPolicyUserAssignmentFromDiscriminatorValue(parseNode) {
    return deserializeIntoTeamsPolicyUserAssignment;
}
/**
 * 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 {TeamsUserConfigurationCollectionResponse}
 */
// @ts-ignore
export function createTeamsUserConfigurationCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoTeamsUserConfigurationCollectionResponse;
}
/**
 * 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 {TeamsUserConfiguration}
 */
// @ts-ignore
export function createTeamsUserConfigurationFromDiscriminatorValue(parseNode) {
    return deserializeIntoTeamsUserConfiguration;
}
/**
 * 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 {TelephoneNumberLongRunningOperationCollectionResponse}
 */
// @ts-ignore
export function createTelephoneNumberLongRunningOperationCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoTelephoneNumberLongRunningOperationCollectionResponse;
}
/**
 * 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 {TelephoneNumberLongRunningOperationDetails}
 */
// @ts-ignore
export function createTelephoneNumberLongRunningOperationDetailsFromDiscriminatorValue(parseNode) {
    return deserializeIntoTelephoneNumberLongRunningOperationDetails;
}
/**
 * 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 {TelephoneNumberLongRunningOperation}
 */
// @ts-ignore
export function createTelephoneNumberLongRunningOperationFromDiscriminatorValue(parseNode) {
    return deserializeIntoTelephoneNumberLongRunningOperation;
}
/**
 * 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 {TelephoneNumberManagementRoot}
 */
// @ts-ignore
export function createTelephoneNumberManagementRootFromDiscriminatorValue(parseNode) {
    return deserializeIntoTelephoneNumberManagementRoot;
}
/**
 * The deserialization information for the current model
 * @param AssignedTelephoneNumber The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoAssignedTelephoneNumber(assignedTelephoneNumber = {}) {
    return {
        "assignmentCategory": n => { assignedTelephoneNumber.assignmentCategory = n.getEnumValue(AssignmentCategoryObject); },
        "backingStoreEnabled": n => { assignedTelephoneNumber.backingStoreEnabled = true; },
        "@odata.type": n => { assignedTelephoneNumber.odataType = n.getStringValue(); },
        "telephoneNumber": n => { assignedTelephoneNumber.telephoneNumber = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @param EffectivePolicyAssignment The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoEffectivePolicyAssignment(effectivePolicyAssignment = {}) {
    return {
        "backingStoreEnabled": n => { effectivePolicyAssignment.backingStoreEnabled = true; },
        "@odata.type": n => { effectivePolicyAssignment.odataType = n.getStringValue(); },
        "policyAssignment": n => { effectivePolicyAssignment.policyAssignment = n.getObjectValue(createPolicyAssignmentFromDiscriminatorValue); },
        "policyType": n => { effectivePolicyAssignment.policyType = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @param NumberAssignment The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoNumberAssignment(numberAssignment = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(numberAssignment)), { "activationState": n => { numberAssignment.activationState = n.getEnumValue(ActivationStateObject); }, "assignmentCategory": n => { numberAssignment.assignmentCategory = n.getEnumValue(AssignmentCategoryObject); }, "assignmentStatus": n => { numberAssignment.assignmentStatus = n.getEnumValue(AssignmentStatusObject); }, "assignmentTargetId": n => { numberAssignment.assignmentTargetId = n.getStringValue(); }, "capabilities": n => { numberAssignment.capabilities = n.getCollectionOfEnumValues(NumberCapabilityObject); }, "city": n => { numberAssignment.city = n.getStringValue(); }, "civicAddressId": n => { numberAssignment.civicAddressId = n.getStringValue(); }, "isoCountryCode": n => { numberAssignment.isoCountryCode = n.getStringValue(); }, "locationId": n => { numberAssignment.locationId = n.getStringValue(); }, "networkSiteId": n => { numberAssignment.networkSiteId = n.getStringValue(); }, "numberSource": n => { numberAssignment.numberSource = n.getEnumValue(NumberSourceObject); }, "numberType": n => { numberAssignment.numberType = n.getEnumValue(NumberTypeObject); }, "operatorId": n => { numberAssignment.operatorId = n.getStringValue(); }, "portInStatus": n => { numberAssignment.portInStatus = n.getEnumValue(PortInStatusObject); }, "reverseNumberLookupOptions": n => { numberAssignment.reverseNumberLookupOptions = n.getCollectionOfEnumValues(ReverseNumberLookupOptionObject); }, "supportedCustomerActions": n => { numberAssignment.supportedCustomerActions = n.getCollectionOfEnumValues(CustomerActionObject); }, "telephoneNumber": n => { numberAssignment.telephoneNumber = n.getStringValue(); } });
}
/**
 * The deserialization information for the current model
 * @param NumberAssignmentCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoNumberAssignmentCollectionResponse(numberAssignmentCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(numberAssignmentCollectionResponse)), { "value": n => { numberAssignmentCollectionResponse.value = n.getCollectionOfObjectValues(createNumberAssignmentFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param PolicyAssignment The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoPolicyAssignment(policyAssignment = {}) {
    return {
        "assignmentType": n => { policyAssignment.assignmentType = n.getEnumValue(AssignmentTypeObject); },
        "backingStoreEnabled": n => { policyAssignment.backingStoreEnabled = true; },
        "displayName": n => { policyAssignment.displayName = n.getStringValue(); },
        "groupId": n => { policyAssignment.groupId = n.getStringValue(); },
        "@odata.type": n => { policyAssignment.odataType = n.getStringValue(); },
        "policyId": n => { policyAssignment.policyId = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @param PolicyIdentifierDetail The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoPolicyIdentifierDetail(policyIdentifierDetail = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(policyIdentifierDetail)), { "name": n => { policyIdentifierDetail.name = n.getStringValue(); }, "policyId": n => { policyIdentifierDetail.policyId = n.getStringValue(); } });
}
/**
 * The deserialization information for the current model
 * @param TeamsAdminRoot The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTeamsAdminRoot(teamsAdminRoot = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(teamsAdminRoot)), { "policy": n => { teamsAdminRoot.policy = n.getObjectValue(createTeamsPolicyAssignmentFromDiscriminatorValue); }, "telephoneNumberManagement": n => { teamsAdminRoot.telephoneNumberManagement = n.getObjectValue(createTelephoneNumberManagementRootFromDiscriminatorValue); }, "userConfigurations": n => { teamsAdminRoot.userConfigurations = n.getCollectionOfObjectValues(createTeamsUserConfigurationFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param TeamsPolicyAssignment The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTeamsPolicyAssignment(teamsPolicyAssignment = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(teamsPolicyAssignment)), { "userAssignments": n => { teamsPolicyAssignment.userAssignments = n.getCollectionOfObjectValues(createTeamsPolicyUserAssignmentFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param TeamsPolicyUserAssignment The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTeamsPolicyUserAssignment(teamsPolicyUserAssignment = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(teamsPolicyUserAssignment)), { "policyId": n => { teamsPolicyUserAssignment.policyId = n.getStringValue(); }, "policyType": n => { teamsPolicyUserAssignment.policyType = n.getStringValue(); }, "userId": n => { teamsPolicyUserAssignment.userId = n.getStringValue(); } });
}
/**
 * The deserialization information for the current model
 * @param TeamsPolicyUserAssignmentCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTeamsPolicyUserAssignmentCollectionResponse(teamsPolicyUserAssignmentCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(teamsPolicyUserAssignmentCollectionResponse)), { "value": n => { teamsPolicyUserAssignmentCollectionResponse.value = n.getCollectionOfObjectValues(createTeamsPolicyUserAssignmentFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param TeamsUserConfiguration The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTeamsUserConfiguration(teamsUserConfiguration = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(teamsUserConfiguration)), { "accountType": n => { teamsUserConfiguration.accountType = n.getEnumValue(AccountTypeObject); }, "createdDateTime": n => { teamsUserConfiguration.createdDateTime = n.getDateValue(); }, "effectivePolicyAssignments": n => { teamsUserConfiguration.effectivePolicyAssignments = n.getCollectionOfObjectValues(createEffectivePolicyAssignmentFromDiscriminatorValue); }, "featureTypes": n => { teamsUserConfiguration.featureTypes = n.getCollectionOfPrimitiveValues(); }, "isEnterpriseVoiceEnabled": n => { teamsUserConfiguration.isEnterpriseVoiceEnabled = n.getBooleanValue(); }, "modifiedDateTime": n => { teamsUserConfiguration.modifiedDateTime = n.getDateValue(); }, "telephoneNumbers": n => { teamsUserConfiguration.telephoneNumbers = n.getCollectionOfObjectValues(createAssignedTelephoneNumberFromDiscriminatorValue); }, "tenantId": n => { teamsUserConfiguration.tenantId = n.getStringValue(); }, "user": n => { teamsUserConfiguration.user = n.getObjectValue(createUserFromDiscriminatorValue); }, "userPrincipalName": n => { teamsUserConfiguration.userPrincipalName = n.getStringValue(); } });
}
/**
 * The deserialization information for the current model
 * @param TeamsUserConfigurationCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTeamsUserConfigurationCollectionResponse(teamsUserConfigurationCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(teamsUserConfigurationCollectionResponse)), { "value": n => { teamsUserConfigurationCollectionResponse.value = n.getCollectionOfObjectValues(createTeamsUserConfigurationFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param TelephoneNumberLongRunningOperation The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTelephoneNumberLongRunningOperation(telephoneNumberLongRunningOperation = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(telephoneNumberLongRunningOperation)), { "createdDateTime": n => { telephoneNumberLongRunningOperation.createdDateTime = n.getStringValue(); }, "numbers": n => { telephoneNumberLongRunningOperation.numbers = n.getCollectionOfObjectValues(createTelephoneNumberLongRunningOperationDetailsFromDiscriminatorValue); }, "status": n => { telephoneNumberLongRunningOperation.status = n.getEnumValue(LongRunningOperationStatusObject); } });
}
/**
 * The deserialization information for the current model
 * @param TelephoneNumberLongRunningOperationCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTelephoneNumberLongRunningOperationCollectionResponse(telephoneNumberLongRunningOperationCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(telephoneNumberLongRunningOperationCollectionResponse)), { "value": n => { telephoneNumberLongRunningOperationCollectionResponse.value = n.getCollectionOfObjectValues(createTelephoneNumberLongRunningOperationFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param TelephoneNumberLongRunningOperationDetails The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTelephoneNumberLongRunningOperationDetails(telephoneNumberLongRunningOperationDetails = {}) {
    return {
        "backingStoreEnabled": n => { telephoneNumberLongRunningOperationDetails.backingStoreEnabled = true; },
        "@odata.type": n => { telephoneNumberLongRunningOperationDetails.odataType = n.getStringValue(); },
        "resourceLocation": n => { telephoneNumberLongRunningOperationDetails.resourceLocation = n.getStringValue(); },
        "status": n => { telephoneNumberLongRunningOperationDetails.status = n.getEnumValue(LongRunningOperationStatusObject); },
        "statusDetail": n => { telephoneNumberLongRunningOperationDetails.statusDetail = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @param TelephoneNumberManagementRoot The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTelephoneNumberManagementRoot(telephoneNumberManagementRoot = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(telephoneNumberManagementRoot)), { "numberAssignments": n => { telephoneNumberManagementRoot.numberAssignments = n.getCollectionOfObjectValues(createNumberAssignmentFromDiscriminatorValue); }, "operations": n => { telephoneNumberManagementRoot.operations = n.getCollectionOfObjectValues(createTelephoneNumberLongRunningOperationFromDiscriminatorValue); } });
}
/**
 * Serializes information the current object
 * @param AssignedTelephoneNumber The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeAssignedTelephoneNumber(writer, assignedTelephoneNumber = {}, isSerializingDerivedType = false) {
    if (!assignedTelephoneNumber || isSerializingDerivedType) {
        return;
    }
    writer.writeEnumValue("assignmentCategory", assignedTelephoneNumber.assignmentCategory);
    writer.writeStringValue("@odata.type", assignedTelephoneNumber.odataType);
    writer.writeStringValue("telephoneNumber", assignedTelephoneNumber.telephoneNumber);
    writer.writeAdditionalData(assignedTelephoneNumber.additionalData);
}
/**
 * Serializes information the current object
 * @param EffectivePolicyAssignment The instance to serialize from.
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeEffectivePolicyAssignment(writer, effectivePolicyAssignment = {}, isSerializingDerivedType = false) {
    if (!effectivePolicyAssignment || isSerializingDerivedType) {
        return;
    }
    writer.writeStringValue("@odata.type", effectivePolicyAssignment.odataType);
    writer.writeObjectValue("policyAssignment", effectivePolicyAssignment.policyAssignment, serializePolicyAssignment);
    writer.writeStringValue("policyType", effectivePolicyAssignment.policyType);
    writer.writeAdditionalData(effectivePolicyAssignment.additionalData);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param NumberAssignment The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeNumberAssignment(writer, numberAssignment = {}, isSerializingDerivedType = false) {
    if (!numberAssignment || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, numberAssignment, isSerializingDerivedType);
    writer.writeEnumValue("activationState", numberAssignment.activationState);
    writer.writeEnumValue("assignmentCategory", numberAssignment.assignmentCategory);
    writer.writeEnumValue("assignmentStatus", numberAssignment.assignmentStatus);
    writer.writeStringValue("assignmentTargetId", numberAssignment.assignmentTargetId);
    if (numberAssignment.capabilities)
        writer.writeCollectionOfEnumValues("capabilities", numberAssignment.capabilities);
    writer.writeStringValue("city", numberAssignment.city);
    writer.writeStringValue("civicAddressId", numberAssignment.civicAddressId);
    writer.writeStringValue("isoCountryCode", numberAssignment.isoCountryCode);
    writer.writeStringValue("locationId", numberAssignment.locationId);
    writer.writeStringValue("networkSiteId", numberAssignment.networkSiteId);
    writer.writeEnumValue("numberSource", numberAssignment.numberSource);
    writer.writeEnumValue("numberType", numberAssignment.numberType);
    writer.writeStringValue("operatorId", numberAssignment.operatorId);
    writer.writeEnumValue("portInStatus", numberAssignment.portInStatus);
    if (numberAssignment.reverseNumberLookupOptions)
        writer.writeCollectionOfEnumValues("reverseNumberLookupOptions", numberAssignment.reverseNumberLookupOptions);
    if (numberAssignment.supportedCustomerActions)
        writer.writeCollectionOfEnumValues("supportedCustomerActions", numberAssignment.supportedCustomerActions);
    writer.writeStringValue("telephoneNumber", numberAssignment.telephoneNumber);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param NumberAssignmentCollectionResponse The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeNumberAssignmentCollectionResponse(writer, numberAssignmentCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!numberAssignmentCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, numberAssignmentCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", numberAssignmentCollectionResponse.value, serializeNumberAssignment);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param PolicyAssignment The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializePolicyAssignment(writer, policyAssignment = {}, isSerializingDerivedType = false) {
    if (!policyAssignment || isSerializingDerivedType) {
        return;
    }
    writer.writeEnumValue("assignmentType", policyAssignment.assignmentType);
    writer.writeStringValue("displayName", policyAssignment.displayName);
    writer.writeStringValue("groupId", policyAssignment.groupId);
    writer.writeStringValue("@odata.type", policyAssignment.odataType);
    writer.writeStringValue("policyId", policyAssignment.policyId);
    writer.writeAdditionalData(policyAssignment.additionalData);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param PolicyIdentifierDetail The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializePolicyIdentifierDetail(writer, policyIdentifierDetail = {}, isSerializingDerivedType = false) {
    if (!policyIdentifierDetail || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, policyIdentifierDetail, isSerializingDerivedType);
    writer.writeStringValue("name", policyIdentifierDetail.name);
    writer.writeStringValue("policyId", policyIdentifierDetail.policyId);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param TeamsAdminRoot The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTeamsAdminRoot(writer, teamsAdminRoot = {}, isSerializingDerivedType = false) {
    if (!teamsAdminRoot || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, teamsAdminRoot, isSerializingDerivedType);
    writer.writeObjectValue("policy", teamsAdminRoot.policy, serializeTeamsPolicyAssignment);
    writer.writeObjectValue("telephoneNumberManagement", teamsAdminRoot.telephoneNumberManagement, serializeTelephoneNumberManagementRoot);
    writer.writeCollectionOfObjectValues("userConfigurations", teamsAdminRoot.userConfigurations, serializeTeamsUserConfiguration);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param TeamsPolicyAssignment The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTeamsPolicyAssignment(writer, teamsPolicyAssignment = {}, isSerializingDerivedType = false) {
    if (!teamsPolicyAssignment || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, teamsPolicyAssignment, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("userAssignments", teamsPolicyAssignment.userAssignments, serializeTeamsPolicyUserAssignment);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param TeamsPolicyUserAssignment The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTeamsPolicyUserAssignment(writer, teamsPolicyUserAssignment = {}, isSerializingDerivedType = false) {
    if (!teamsPolicyUserAssignment || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, teamsPolicyUserAssignment, isSerializingDerivedType);
    writer.writeStringValue("policyId", teamsPolicyUserAssignment.policyId);
    writer.writeStringValue("policyType", teamsPolicyUserAssignment.policyType);
    writer.writeStringValue("userId", teamsPolicyUserAssignment.userId);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param TeamsPolicyUserAssignmentCollectionResponse The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTeamsPolicyUserAssignmentCollectionResponse(writer, teamsPolicyUserAssignmentCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!teamsPolicyUserAssignmentCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, teamsPolicyUserAssignmentCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", teamsPolicyUserAssignmentCollectionResponse.value, serializeTeamsPolicyUserAssignment);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param TeamsUserConfiguration The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTeamsUserConfiguration(writer, teamsUserConfiguration = {}, isSerializingDerivedType = false) {
    if (!teamsUserConfiguration || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, teamsUserConfiguration, isSerializingDerivedType);
    writer.writeEnumValue("accountType", teamsUserConfiguration.accountType);
    writer.writeDateValue("createdDateTime", teamsUserConfiguration.createdDateTime);
    writer.writeCollectionOfObjectValues("effectivePolicyAssignments", teamsUserConfiguration.effectivePolicyAssignments, serializeEffectivePolicyAssignment);
    writer.writeCollectionOfPrimitiveValues("featureTypes", teamsUserConfiguration.featureTypes);
    writer.writeBooleanValue("isEnterpriseVoiceEnabled", teamsUserConfiguration.isEnterpriseVoiceEnabled);
    writer.writeDateValue("modifiedDateTime", teamsUserConfiguration.modifiedDateTime);
    writer.writeCollectionOfObjectValues("telephoneNumbers", teamsUserConfiguration.telephoneNumbers, serializeAssignedTelephoneNumber);
    writer.writeStringValue("tenantId", teamsUserConfiguration.tenantId);
    writer.writeObjectValue("user", teamsUserConfiguration.user, serializeUser);
    writer.writeStringValue("userPrincipalName", teamsUserConfiguration.userPrincipalName);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param TeamsUserConfigurationCollectionResponse The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTeamsUserConfigurationCollectionResponse(writer, teamsUserConfigurationCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!teamsUserConfigurationCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, teamsUserConfigurationCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", teamsUserConfigurationCollectionResponse.value, serializeTeamsUserConfiguration);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param TelephoneNumberLongRunningOperation The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTelephoneNumberLongRunningOperation(writer, telephoneNumberLongRunningOperation = {}, isSerializingDerivedType = false) {
    if (!telephoneNumberLongRunningOperation || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, telephoneNumberLongRunningOperation, isSerializingDerivedType);
    writer.writeStringValue("createdDateTime", telephoneNumberLongRunningOperation.createdDateTime);
    writer.writeCollectionOfObjectValues("numbers", telephoneNumberLongRunningOperation.numbers, serializeTelephoneNumberLongRunningOperationDetails);
    writer.writeEnumValue("status", telephoneNumberLongRunningOperation.status);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param TelephoneNumberLongRunningOperationCollectionResponse The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTelephoneNumberLongRunningOperationCollectionResponse(writer, telephoneNumberLongRunningOperationCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!telephoneNumberLongRunningOperationCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, telephoneNumberLongRunningOperationCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", telephoneNumberLongRunningOperationCollectionResponse.value, serializeTelephoneNumberLongRunningOperation);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param TelephoneNumberLongRunningOperationDetails The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTelephoneNumberLongRunningOperationDetails(writer, telephoneNumberLongRunningOperationDetails = {}, isSerializingDerivedType = false) {
    if (!telephoneNumberLongRunningOperationDetails || isSerializingDerivedType) {
        return;
    }
    writer.writeStringValue("@odata.type", telephoneNumberLongRunningOperationDetails.odataType);
    writer.writeStringValue("resourceLocation", telephoneNumberLongRunningOperationDetails.resourceLocation);
    writer.writeEnumValue("status", telephoneNumberLongRunningOperationDetails.status);
    writer.writeStringValue("statusDetail", telephoneNumberLongRunningOperationDetails.statusDetail);
    writer.writeAdditionalData(telephoneNumberLongRunningOperationDetails.additionalData);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param TelephoneNumberManagementRoot The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTelephoneNumberManagementRoot(writer, telephoneNumberManagementRoot = {}, isSerializingDerivedType = false) {
    if (!telephoneNumberManagementRoot || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, telephoneNumberManagementRoot, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("numberAssignments", telephoneNumberManagementRoot.numberAssignments, serializeNumberAssignment);
    writer.writeCollectionOfObjectValues("operations", telephoneNumberManagementRoot.operations, serializeTelephoneNumberLongRunningOperation);
}
export const AccountTypeObject = {
    User: "user",
    ResourceAccount: "resourceAccount",
    Guest: "guest",
    SfbOnPremUser: "sfbOnPremUser",
    Unknown: "unknown",
    UnknownFutureValue: "unknownFutureValue",
    IneligibleUser: "ineligibleUser",
};
export const ActivationStateObject = {
    Activated: "activated",
    AssignmentPending: "assignmentPending",
    AssignmentFailed: "assignmentFailed",
    UpdatePending: "updatePending",
    UpdateFailed: "updateFailed",
    UnknownFutureValue: "unknownFutureValue",
};
export const AssignmentCategoryObject = {
    Primary: "primary",
    Private: "private",
    Alternate: "alternate",
    UnknownFutureValue: "unknownFutureValue",
};
export const AssignmentStatusObject = {
    Unassigned: "unassigned",
    InternalError: "internalError",
    UserAssigned: "userAssigned",
    ConferenceAssigned: "conferenceAssigned",
    VoiceApplicationAssigned: "voiceApplicationAssigned",
    ThirdPartyAppAssigned: "thirdPartyAppAssigned",
    PolicyAssigned: "policyAssigned",
    UnknownFutureValue: "unknownFutureValue",
};
export const AssignmentTypeObject = {
    Direct: "direct",
    Group: "group",
    UnknownFutureValue: "unknownFutureValue",
};
export const CustomerActionObject = {
    LocationUpdate: "locationUpdate",
    Release: "release",
    UnknownFutureValue: "unknownFutureValue",
};
export const NumberCapabilityObject = {
    ConferenceAssignment: "conferenceAssignment",
    VoiceApplicationAssignment: "voiceApplicationAssignment",
    UserAssignment: "userAssignment",
    TeamsPhoneMobile: "teamsPhoneMobile",
    UnknownFutureValue: "unknownFutureValue",
};
export const NumberSourceObject = {
    Online: "online",
    OnPremises: "onPremises",
    UnknownFutureValue: "unknownFutureValue",
};
export const NumberTypeObject = {
    InternalError: "internalError",
    DirectRouting: "directRouting",
    CallingPlan: "callingPlan",
    OperatorConnect: "operatorConnect",
    UnknownFutureValue: "unknownFutureValue",
};
export const PortInStatusObject = {
    Completed: "completed",
    FirmOrderCommitmentAccepted: "firmOrderCommitmentAccepted",
    UnknownFutureValue: "unknownFutureValue",
};
export const ReverseNumberLookupOptionObject = {
    SkipInternalVoip: "skipInternalVoip",
    UnknownFutureValue: "unknownFutureValue",
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map