/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createUserFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, deserializeIntoEntity, 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 {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 {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 {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;
}
/**
 * The deserialization information for the current model
 * @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
 * @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
 * @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
 * @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); }, "userConfigurations": n => { teamsAdminRoot.userConfigurations = n.getCollectionOfObjectValues(createTeamsUserConfigurationFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoTeamsPolicyAssignment(teamsPolicyAssignment = {}) {
    return Object.assign({}, deserializeIntoEntity(teamsPolicyAssignment));
}
/**
 * The deserialization information for the current model
 * @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
 * @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); } });
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeAssignedTelephoneNumber(writer, assignedTelephoneNumber = {}) {
    if (assignedTelephoneNumber) {
        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 writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeEffectivePolicyAssignment(writer, effectivePolicyAssignment = {}) {
    if (effectivePolicyAssignment) {
        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 writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializePolicyAssignment(writer, policyAssignment = {}) {
    if (policyAssignment) {
        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 writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTeamsAdminRoot(writer, teamsAdminRoot = {}) {
    if (teamsAdminRoot) {
        serializeEntity(writer, teamsAdminRoot);
        writer.writeObjectValue("policy", teamsAdminRoot.policy, serializeTeamsPolicyAssignment);
        writer.writeCollectionOfObjectValues("userConfigurations", teamsAdminRoot.userConfigurations, serializeTeamsUserConfiguration);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTeamsPolicyAssignment(writer, teamsPolicyAssignment = {}) {
    if (teamsPolicyAssignment) {
        serializeEntity(writer, teamsPolicyAssignment);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTeamsUserConfiguration(writer, teamsUserConfiguration = {}) {
    if (teamsUserConfiguration) {
        serializeEntity(writer, teamsUserConfiguration);
        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 writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeTeamsUserConfigurationCollectionResponse(writer, teamsUserConfigurationCollectionResponse = {}) {
    if (teamsUserConfigurationCollectionResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, teamsUserConfigurationCollectionResponse);
        writer.writeCollectionOfObjectValues("value", teamsUserConfigurationCollectionResponse.value, serializeTeamsUserConfiguration);
    }
}
export const AccountTypeObject = {
    User: "user",
    ResourceAccount: "resourceAccount",
    Guest: "guest",
    SfbOnPremUser: "sfbOnPremUser",
    Unknown: "unknown",
    UnknownFutureValue: "unknownFutureValue",
    IneligibleUser: "ineligibleUser",
};
export const AssignmentCategoryObject = {
    Primary: "primary",
    Private: "private",
    Alternate: "alternate",
    UnknownFutureValue: "unknownFutureValue",
};
export const AssignmentTypeObject = {
    Direct: "direct",
    Group: "group",
    UnknownFutureValue: "unknownFutureValue",
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map