/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createCommunicationsIdentitySetFromDiscriminatorValue, createIdentityFromDiscriminatorValue, createIdentitySetFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, deserializeIntoEntity, deserializeIntoIdentity, serializeBaseCollectionPaginationCountResponse, serializeCommunicationsIdentitySet, serializeEntity, serializeIdentity, serializeIdentitySet } 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 {CallRecordCollectionResponse}
 */
export function createCallRecordCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoCallRecordCollectionResponse;
}
/**
 * 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 {CallRecord}
 */
export function createCallRecordFromDiscriminatorValue(parseNode) {
    return deserializeIntoCallRecord;
}
/**
 * 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 {ClientUserAgent}
 */
export function createClientUserAgentFromDiscriminatorValue(parseNode) {
    return deserializeIntoClientUserAgent;
}
/**
 * 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 {DeviceInfo}
 */
export function createDeviceInfoFromDiscriminatorValue(parseNode) {
    return deserializeIntoDeviceInfo;
}
/**
 * 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 {DirectRoutingLogRow}
 */
export function createDirectRoutingLogRowFromDiscriminatorValue(parseNode) {
    return deserializeIntoDirectRoutingLogRow;
}
/**
 * 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 {Endpoint}
 */
export function createEndpointFromDiscriminatorValue(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.callRecords.participantEndpoint":
                    return deserializeIntoParticipantEndpoint;
                case "#microsoft.graph.callRecords.serviceEndpoint":
                    return deserializeIntoServiceEndpoint;
            }
        }
    }
    return deserializeIntoEndpoint;
}
/**
 * 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 {FailureInfo}
 */
export function createFailureInfoFromDiscriminatorValue(parseNode) {
    return deserializeIntoFailureInfo;
}
/**
 * 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 {FeedbackTokenSet}
 */
export function createFeedbackTokenSetFromDiscriminatorValue(parseNode) {
    return deserializeIntoFeedbackTokenSet;
}
/**
 * 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 {Media}
 */
export function createMediaFromDiscriminatorValue(parseNode) {
    return deserializeIntoMedia;
}
/**
 * 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 {MediaStream}
 */
export function createMediaStreamFromDiscriminatorValue(parseNode) {
    return deserializeIntoMediaStream;
}
/**
 * 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 {NetworkInfo}
 */
export function createNetworkInfoFromDiscriminatorValue(parseNode) {
    return deserializeIntoNetworkInfo;
}
/**
 * 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 {Organizer}
 */
export function createOrganizerFromDiscriminatorValue(parseNode) {
    return deserializeIntoOrganizer;
}
/**
 * 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 {ParticipantBase}
 */
export function createParticipantBaseFromDiscriminatorValue(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.callRecords.organizer":
                    return deserializeIntoOrganizer;
                case "#microsoft.graph.callRecords.participant":
                    return deserializeIntoParticipant;
            }
        }
    }
    return deserializeIntoParticipantBase;
}
/**
 * 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 {ParticipantCollectionResponse}
 */
export function createParticipantCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoParticipantCollectionResponse;
}
/**
 * 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 {ParticipantEndpoint}
 */
export function createParticipantEndpointFromDiscriminatorValue(parseNode) {
    return deserializeIntoParticipantEndpoint;
}
/**
 * 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 {Participant}
 */
export function createParticipantFromDiscriminatorValue(parseNode) {
    return deserializeIntoParticipant;
}
/**
 * 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 {PstnCallLogRow}
 */
export function createPstnCallLogRowFromDiscriminatorValue(parseNode) {
    return deserializeIntoPstnCallLogRow;
}
/**
 * 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 {SegmentCollectionResponse}
 */
export function createSegmentCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoSegmentCollectionResponse;
}
/**
 * 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 {Segment}
 */
export function createSegmentFromDiscriminatorValue(parseNode) {
    return deserializeIntoSegment;
}
/**
 * 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 {ServiceEndpoint}
 */
export function createServiceEndpointFromDiscriminatorValue(parseNode) {
    return deserializeIntoServiceEndpoint;
}
/**
 * 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 {ServiceUserAgent}
 */
export function createServiceUserAgentFromDiscriminatorValue(parseNode) {
    return deserializeIntoServiceUserAgent;
}
/**
 * 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 {SessionCollectionResponse}
 */
export function createSessionCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoSessionCollectionResponse;
}
/**
 * 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 {Session}
 */
export function createSessionFromDiscriminatorValue(parseNode) {
    return deserializeIntoSession;
}
/**
 * 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 {TraceRouteHop}
 */
export function createTraceRouteHopFromDiscriminatorValue(parseNode) {
    return deserializeIntoTraceRouteHop;
}
/**
 * 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 {UserAgent}
 */
export function createUserAgentFromDiscriminatorValue(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.callRecords.clientUserAgent":
                    return deserializeIntoClientUserAgent;
                case "#microsoft.graph.callRecords.serviceUserAgent":
                    return deserializeIntoServiceUserAgent;
            }
        }
    }
    return deserializeIntoUserAgent;
}
/**
 * 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 {UserFeedback}
 */
export function createUserFeedbackFromDiscriminatorValue(parseNode) {
    return deserializeIntoUserFeedback;
}
/**
 * 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 {UserIdentity}
 */
export function createUserIdentityFromDiscriminatorValue(parseNode) {
    return deserializeIntoUserIdentity;
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoCallRecord(callRecord = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(callRecord)), { "endDateTime": n => { callRecord.endDateTime = n.getDateValue(); }, "joinWebUrl": n => { callRecord.joinWebUrl = n.getStringValue(); }, "lastModifiedDateTime": n => { callRecord.lastModifiedDateTime = n.getDateValue(); }, "modalities": n => { callRecord.modalities = n.getCollectionOfEnumValues(ModalityObject); }, "organizer": n => { callRecord.organizer = n.getObjectValue(createIdentitySetFromDiscriminatorValue); }, "organizer_v2": n => { callRecord.organizer_v2 = n.getObjectValue(createOrganizerFromDiscriminatorValue); }, "participants": n => { callRecord.participants = n.getCollectionOfObjectValues(createIdentitySetFromDiscriminatorValue); }, "participants_v2": n => { callRecord.participants_v2 = n.getCollectionOfObjectValues(createParticipantFromDiscriminatorValue); }, "sessions": n => { callRecord.sessions = n.getCollectionOfObjectValues(createSessionFromDiscriminatorValue); }, "startDateTime": n => { callRecord.startDateTime = n.getDateValue(); }, "type": n => { callRecord.type = n.getEnumValue(CallTypeObject); }, "version": n => { callRecord.version = n.getNumberValue(); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoCallRecordCollectionResponse(callRecordCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(callRecordCollectionResponse)), { "value": n => { callRecordCollectionResponse.value = n.getCollectionOfObjectValues(createCallRecordFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoClientUserAgent(clientUserAgent = {}) {
    return Object.assign(Object.assign({}, deserializeIntoUserAgent(clientUserAgent)), { "azureADAppId": n => { clientUserAgent.azureADAppId = n.getStringValue(); }, "communicationServiceId": n => { clientUserAgent.communicationServiceId = n.getStringValue(); }, "platform": n => { clientUserAgent.platform = n.getEnumValue(ClientPlatformObject); }, "productFamily": n => { clientUserAgent.productFamily = n.getEnumValue(ProductFamilyObject); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoDeviceInfo(deviceInfo = {}) {
    return {
        "backingStoreEnabled": n => { deviceInfo.backingStoreEnabled = true; },
        "captureDeviceDriver": n => { deviceInfo.captureDeviceDriver = n.getStringValue(); },
        "captureDeviceName": n => { deviceInfo.captureDeviceName = n.getStringValue(); },
        "captureNotFunctioningEventRatio": n => { deviceInfo.captureNotFunctioningEventRatio = n.getNumberValue(); },
        "cpuInsufficentEventRatio": n => { deviceInfo.cpuInsufficentEventRatio = n.getNumberValue(); },
        "deviceClippingEventRatio": n => { deviceInfo.deviceClippingEventRatio = n.getNumberValue(); },
        "deviceGlitchEventRatio": n => { deviceInfo.deviceGlitchEventRatio = n.getNumberValue(); },
        "howlingEventCount": n => { deviceInfo.howlingEventCount = n.getNumberValue(); },
        "initialSignalLevelRootMeanSquare": n => { deviceInfo.initialSignalLevelRootMeanSquare = n.getNumberValue(); },
        "lowSpeechLevelEventRatio": n => { deviceInfo.lowSpeechLevelEventRatio = n.getNumberValue(); },
        "lowSpeechToNoiseEventRatio": n => { deviceInfo.lowSpeechToNoiseEventRatio = n.getNumberValue(); },
        "micGlitchRate": n => { deviceInfo.micGlitchRate = n.getNumberValue(); },
        "@odata.type": n => { deviceInfo.odataType = n.getStringValue(); },
        "receivedNoiseLevel": n => { deviceInfo.receivedNoiseLevel = n.getNumberValue(); },
        "receivedSignalLevel": n => { deviceInfo.receivedSignalLevel = n.getNumberValue(); },
        "renderDeviceDriver": n => { deviceInfo.renderDeviceDriver = n.getStringValue(); },
        "renderDeviceName": n => { deviceInfo.renderDeviceName = n.getStringValue(); },
        "renderMuteEventRatio": n => { deviceInfo.renderMuteEventRatio = n.getNumberValue(); },
        "renderNotFunctioningEventRatio": n => { deviceInfo.renderNotFunctioningEventRatio = n.getNumberValue(); },
        "renderZeroVolumeEventRatio": n => { deviceInfo.renderZeroVolumeEventRatio = n.getNumberValue(); },
        "sentNoiseLevel": n => { deviceInfo.sentNoiseLevel = n.getNumberValue(); },
        "sentSignalLevel": n => { deviceInfo.sentSignalLevel = n.getNumberValue(); },
        "speakerGlitchRate": n => { deviceInfo.speakerGlitchRate = n.getNumberValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoDirectRoutingLogRow(directRoutingLogRow = {}) {
    return {
        "backingStoreEnabled": n => { directRoutingLogRow.backingStoreEnabled = true; },
        "calleeNumber": n => { directRoutingLogRow.calleeNumber = n.getStringValue(); },
        "callEndSubReason": n => { directRoutingLogRow.callEndSubReason = n.getNumberValue(); },
        "callerNumber": n => { directRoutingLogRow.callerNumber = n.getStringValue(); },
        "callType": n => { directRoutingLogRow.callType = n.getStringValue(); },
        "correlationId": n => { directRoutingLogRow.correlationId = n.getStringValue(); },
        "duration": n => { directRoutingLogRow.duration = n.getNumberValue(); },
        "endDateTime": n => { directRoutingLogRow.endDateTime = n.getDateValue(); },
        "failureDateTime": n => { directRoutingLogRow.failureDateTime = n.getDateValue(); },
        "finalSipCode": n => { directRoutingLogRow.finalSipCode = n.getNumberValue(); },
        "finalSipCodePhrase": n => { directRoutingLogRow.finalSipCodePhrase = n.getStringValue(); },
        "id": n => { directRoutingLogRow.id = n.getStringValue(); },
        "inviteDateTime": n => { directRoutingLogRow.inviteDateTime = n.getDateValue(); },
        "mediaBypassEnabled": n => { directRoutingLogRow.mediaBypassEnabled = n.getBooleanValue(); },
        "mediaPathLocation": n => { directRoutingLogRow.mediaPathLocation = n.getStringValue(); },
        "@odata.type": n => { directRoutingLogRow.odataType = n.getStringValue(); },
        "signalingLocation": n => { directRoutingLogRow.signalingLocation = n.getStringValue(); },
        "startDateTime": n => { directRoutingLogRow.startDateTime = n.getDateValue(); },
        "successfulCall": n => { directRoutingLogRow.successfulCall = n.getBooleanValue(); },
        "trunkFullyQualifiedDomainName": n => { directRoutingLogRow.trunkFullyQualifiedDomainName = n.getStringValue(); },
        "userDisplayName": n => { directRoutingLogRow.userDisplayName = n.getStringValue(); },
        "userId": n => { directRoutingLogRow.userId = n.getStringValue(); },
        "userPrincipalName": n => { directRoutingLogRow.userPrincipalName = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoEndpoint(endpoint = {}) {
    return {
        "backingStoreEnabled": n => { endpoint.backingStoreEnabled = true; },
        "@odata.type": n => { endpoint.odataType = n.getStringValue(); },
        "userAgent": n => { endpoint.userAgent = n.getObjectValue(createUserAgentFromDiscriminatorValue); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoFailureInfo(failureInfo = {}) {
    return {
        "backingStoreEnabled": n => { failureInfo.backingStoreEnabled = true; },
        "@odata.type": n => { failureInfo.odataType = n.getStringValue(); },
        "reason": n => { failureInfo.reason = n.getStringValue(); },
        "stage": n => { failureInfo.stage = n.getEnumValue(FailureStageObject); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoFeedbackTokenSet(feedbackTokenSet = {}) {
    return {
        "backingStoreEnabled": n => { feedbackTokenSet.backingStoreEnabled = true; },
        "@odata.type": n => { feedbackTokenSet.odataType = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoMedia(media = {}) {
    return {
        "backingStoreEnabled": n => { media.backingStoreEnabled = true; },
        "calleeDevice": n => { media.calleeDevice = n.getObjectValue(createDeviceInfoFromDiscriminatorValue); },
        "calleeNetwork": n => { media.calleeNetwork = n.getObjectValue(createNetworkInfoFromDiscriminatorValue); },
        "callerDevice": n => { media.callerDevice = n.getObjectValue(createDeviceInfoFromDiscriminatorValue); },
        "callerNetwork": n => { media.callerNetwork = n.getObjectValue(createNetworkInfoFromDiscriminatorValue); },
        "label": n => { media.label = n.getStringValue(); },
        "@odata.type": n => { media.odataType = n.getStringValue(); },
        "streams": n => { media.streams = n.getCollectionOfObjectValues(createMediaStreamFromDiscriminatorValue); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoMediaStream(mediaStream = {}) {
    return {
        "audioCodec": n => { mediaStream.audioCodec = n.getEnumValue(AudioCodecObject); },
        "averageAudioDegradation": n => { mediaStream.averageAudioDegradation = n.getNumberValue(); },
        "averageAudioNetworkJitter": n => { mediaStream.averageAudioNetworkJitter = n.getDurationValue(); },
        "averageBandwidthEstimate": n => { mediaStream.averageBandwidthEstimate = n.getNumberValue(); },
        "averageFreezeDuration": n => { mediaStream.averageFreezeDuration = n.getDurationValue(); },
        "averageJitter": n => { mediaStream.averageJitter = n.getDurationValue(); },
        "averagePacketLossRate": n => { mediaStream.averagePacketLossRate = n.getNumberValue(); },
        "averageRatioOfConcealedSamples": n => { mediaStream.averageRatioOfConcealedSamples = n.getNumberValue(); },
        "averageReceivedFrameRate": n => { mediaStream.averageReceivedFrameRate = n.getNumberValue(); },
        "averageRoundTripTime": n => { mediaStream.averageRoundTripTime = n.getDurationValue(); },
        "averageVideoFrameLossPercentage": n => { mediaStream.averageVideoFrameLossPercentage = n.getNumberValue(); },
        "averageVideoFrameRate": n => { mediaStream.averageVideoFrameRate = n.getNumberValue(); },
        "averageVideoPacketLossRate": n => { mediaStream.averageVideoPacketLossRate = n.getNumberValue(); },
        "backingStoreEnabled": n => { mediaStream.backingStoreEnabled = true; },
        "endDateTime": n => { mediaStream.endDateTime = n.getDateValue(); },
        "isAudioForwardErrorCorrectionUsed": n => { mediaStream.isAudioForwardErrorCorrectionUsed = n.getBooleanValue(); },
        "lowFrameRateRatio": n => { mediaStream.lowFrameRateRatio = n.getNumberValue(); },
        "lowVideoProcessingCapabilityRatio": n => { mediaStream.lowVideoProcessingCapabilityRatio = n.getNumberValue(); },
        "maxAudioNetworkJitter": n => { mediaStream.maxAudioNetworkJitter = n.getDurationValue(); },
        "maxJitter": n => { mediaStream.maxJitter = n.getDurationValue(); },
        "maxPacketLossRate": n => { mediaStream.maxPacketLossRate = n.getNumberValue(); },
        "maxRatioOfConcealedSamples": n => { mediaStream.maxRatioOfConcealedSamples = n.getNumberValue(); },
        "maxRoundTripTime": n => { mediaStream.maxRoundTripTime = n.getDurationValue(); },
        "@odata.type": n => { mediaStream.odataType = n.getStringValue(); },
        "packetUtilization": n => { mediaStream.packetUtilization = n.getNumberValue(); },
        "postForwardErrorCorrectionPacketLossRate": n => { mediaStream.postForwardErrorCorrectionPacketLossRate = n.getNumberValue(); },
        "rmsFreezeDuration": n => { mediaStream.rmsFreezeDuration = n.getDurationValue(); },
        "startDateTime": n => { mediaStream.startDateTime = n.getDateValue(); },
        "streamDirection": n => { mediaStream.streamDirection = n.getEnumValue(MediaStreamDirectionObject); },
        "streamId": n => { mediaStream.streamId = n.getStringValue(); },
        "videoCodec": n => { mediaStream.videoCodec = n.getEnumValue(VideoCodecObject); },
        "wasMediaBypassed": n => { mediaStream.wasMediaBypassed = n.getBooleanValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoNetworkInfo(networkInfo = {}) {
    return {
        "backingStoreEnabled": n => { networkInfo.backingStoreEnabled = true; },
        "bandwidthLowEventRatio": n => { networkInfo.bandwidthLowEventRatio = n.getNumberValue(); },
        "basicServiceSetIdentifier": n => { networkInfo.basicServiceSetIdentifier = n.getStringValue(); },
        "connectionType": n => { networkInfo.connectionType = n.getEnumValue(NetworkConnectionTypeObject); },
        "delayEventRatio": n => { networkInfo.delayEventRatio = n.getNumberValue(); },
        "dnsSuffix": n => { networkInfo.dnsSuffix = n.getStringValue(); },
        "ipAddress": n => { networkInfo.ipAddress = n.getStringValue(); },
        "linkSpeed": n => { networkInfo.linkSpeed = n.getNumberValue(); },
        "macAddress": n => { networkInfo.macAddress = n.getStringValue(); },
        "networkTransportProtocol": n => { networkInfo.networkTransportProtocol = n.getEnumValue(NetworkTransportProtocolObject); },
        "@odata.type": n => { networkInfo.odataType = n.getStringValue(); },
        "port": n => { networkInfo.port = n.getNumberValue(); },
        "receivedQualityEventRatio": n => { networkInfo.receivedQualityEventRatio = n.getNumberValue(); },
        "reflexiveIPAddress": n => { networkInfo.reflexiveIPAddress = n.getStringValue(); },
        "relayIPAddress": n => { networkInfo.relayIPAddress = n.getStringValue(); },
        "relayPort": n => { networkInfo.relayPort = n.getNumberValue(); },
        "sentQualityEventRatio": n => { networkInfo.sentQualityEventRatio = n.getNumberValue(); },
        "subnet": n => { networkInfo.subnet = n.getStringValue(); },
        "traceRouteHops": n => { networkInfo.traceRouteHops = n.getCollectionOfObjectValues(createTraceRouteHopFromDiscriminatorValue); },
        "wifiBand": n => { networkInfo.wifiBand = n.getEnumValue(WifiBandObject); },
        "wifiBatteryCharge": n => { networkInfo.wifiBatteryCharge = n.getNumberValue(); },
        "wifiChannel": n => { networkInfo.wifiChannel = n.getNumberValue(); },
        "wifiMicrosoftDriver": n => { networkInfo.wifiMicrosoftDriver = n.getStringValue(); },
        "wifiMicrosoftDriverVersion": n => { networkInfo.wifiMicrosoftDriverVersion = n.getStringValue(); },
        "wifiRadioType": n => { networkInfo.wifiRadioType = n.getEnumValue(WifiRadioTypeObject); },
        "wifiSignalStrength": n => { networkInfo.wifiSignalStrength = n.getNumberValue(); },
        "wifiVendorDriver": n => { networkInfo.wifiVendorDriver = n.getStringValue(); },
        "wifiVendorDriverVersion": n => { networkInfo.wifiVendorDriverVersion = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoOrganizer(organizer = {}) {
    return Object.assign({}, deserializeIntoParticipantBase(organizer));
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoParticipant(participant = {}) {
    return Object.assign({}, deserializeIntoParticipantBase(participant));
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoParticipantBase(participantBase = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(participantBase)), { "identity": n => { participantBase.identity = n.getObjectValue(createCommunicationsIdentitySetFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoParticipantCollectionResponse(participantCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(participantCollectionResponse)), { "value": n => { participantCollectionResponse.value = n.getCollectionOfObjectValues(createParticipantFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoParticipantEndpoint(participantEndpoint = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEndpoint(participantEndpoint)), { "associatedIdentity": n => { participantEndpoint.associatedIdentity = n.getObjectValue(createIdentityFromDiscriminatorValue); }, "cpuCoresCount": n => { participantEndpoint.cpuCoresCount = n.getNumberValue(); }, "cpuName": n => { participantEndpoint.cpuName = n.getStringValue(); }, "cpuProcessorSpeedInMhz": n => { participantEndpoint.cpuProcessorSpeedInMhz = n.getNumberValue(); }, "feedback": n => { participantEndpoint.feedback = n.getObjectValue(createUserFeedbackFromDiscriminatorValue); }, "identity": n => { participantEndpoint.identity = n.getObjectValue(createIdentitySetFromDiscriminatorValue); }, "name": n => { participantEndpoint.name = n.getStringValue(); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoPstnCallLogRow(pstnCallLogRow = {}) {
    return {
        "backingStoreEnabled": n => { pstnCallLogRow.backingStoreEnabled = true; },
        "callDurationSource": n => { pstnCallLogRow.callDurationSource = n.getEnumValue(PstnCallDurationSourceObject); },
        "calleeNumber": n => { pstnCallLogRow.calleeNumber = n.getStringValue(); },
        "callerNumber": n => { pstnCallLogRow.callerNumber = n.getStringValue(); },
        "callId": n => { pstnCallLogRow.callId = n.getStringValue(); },
        "callType": n => { pstnCallLogRow.callType = n.getStringValue(); },
        "charge": n => { pstnCallLogRow.charge = n.getNumberValue(); },
        "conferenceId": n => { pstnCallLogRow.conferenceId = n.getStringValue(); },
        "connectionCharge": n => { pstnCallLogRow.connectionCharge = n.getNumberValue(); },
        "currency": n => { pstnCallLogRow.currency = n.getStringValue(); },
        "destinationContext": n => { pstnCallLogRow.destinationContext = n.getStringValue(); },
        "destinationName": n => { pstnCallLogRow.destinationName = n.getStringValue(); },
        "duration": n => { pstnCallLogRow.duration = n.getNumberValue(); },
        "endDateTime": n => { pstnCallLogRow.endDateTime = n.getDateValue(); },
        "id": n => { pstnCallLogRow.id = n.getStringValue(); },
        "inventoryType": n => { pstnCallLogRow.inventoryType = n.getStringValue(); },
        "licenseCapability": n => { pstnCallLogRow.licenseCapability = n.getStringValue(); },
        "@odata.type": n => { pstnCallLogRow.odataType = n.getStringValue(); },
        "operator": n => { pstnCallLogRow.operator = n.getStringValue(); },
        "startDateTime": n => { pstnCallLogRow.startDateTime = n.getDateValue(); },
        "tenantCountryCode": n => { pstnCallLogRow.tenantCountryCode = n.getStringValue(); },
        "usageCountryCode": n => { pstnCallLogRow.usageCountryCode = n.getStringValue(); },
        "userDisplayName": n => { pstnCallLogRow.userDisplayName = n.getStringValue(); },
        "userId": n => { pstnCallLogRow.userId = n.getStringValue(); },
        "userPrincipalName": n => { pstnCallLogRow.userPrincipalName = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoSegment(segment = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(segment)), { "callee": n => { segment.callee = n.getObjectValue(createEndpointFromDiscriminatorValue); }, "caller": n => { segment.caller = n.getObjectValue(createEndpointFromDiscriminatorValue); }, "endDateTime": n => { segment.endDateTime = n.getDateValue(); }, "failureInfo": n => { segment.failureInfo = n.getObjectValue(createFailureInfoFromDiscriminatorValue); }, "media": n => { segment.media = n.getCollectionOfObjectValues(createMediaFromDiscriminatorValue); }, "startDateTime": n => { segment.startDateTime = n.getDateValue(); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoSegmentCollectionResponse(segmentCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(segmentCollectionResponse)), { "value": n => { segmentCollectionResponse.value = n.getCollectionOfObjectValues(createSegmentFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoServiceEndpoint(serviceEndpoint = {}) {
    return Object.assign({}, deserializeIntoEndpoint(serviceEndpoint));
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoServiceUserAgent(serviceUserAgent = {}) {
    return Object.assign(Object.assign({}, deserializeIntoUserAgent(serviceUserAgent)), { "role": n => { serviceUserAgent.role = n.getEnumValue(ServiceRoleObject); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoSession(session = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(session)), { "callee": n => { session.callee = n.getObjectValue(createEndpointFromDiscriminatorValue); }, "caller": n => { session.caller = n.getObjectValue(createEndpointFromDiscriminatorValue); }, "endDateTime": n => { session.endDateTime = n.getDateValue(); }, "failureInfo": n => { session.failureInfo = n.getObjectValue(createFailureInfoFromDiscriminatorValue); }, "isTest": n => { session.isTest = n.getBooleanValue(); }, "modalities": n => { session.modalities = n.getCollectionOfEnumValues(ModalityObject); }, "segments": n => { session.segments = n.getCollectionOfObjectValues(createSegmentFromDiscriminatorValue); }, "startDateTime": n => { session.startDateTime = n.getDateValue(); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoSessionCollectionResponse(sessionCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(sessionCollectionResponse)), { "value": n => { sessionCollectionResponse.value = n.getCollectionOfObjectValues(createSessionFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoTraceRouteHop(traceRouteHop = {}) {
    return {
        "backingStoreEnabled": n => { traceRouteHop.backingStoreEnabled = true; },
        "hopCount": n => { traceRouteHop.hopCount = n.getNumberValue(); },
        "ipAddress": n => { traceRouteHop.ipAddress = n.getStringValue(); },
        "@odata.type": n => { traceRouteHop.odataType = n.getStringValue(); },
        "roundTripTime": n => { traceRouteHop.roundTripTime = n.getDurationValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoUserAgent(userAgent = {}) {
    return {
        "applicationVersion": n => { userAgent.applicationVersion = n.getStringValue(); },
        "backingStoreEnabled": n => { userAgent.backingStoreEnabled = true; },
        "headerValue": n => { userAgent.headerValue = n.getStringValue(); },
        "@odata.type": n => { userAgent.odataType = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoUserFeedback(userFeedback = {}) {
    return {
        "backingStoreEnabled": n => { userFeedback.backingStoreEnabled = true; },
        "@odata.type": n => { userFeedback.odataType = n.getStringValue(); },
        "rating": n => { userFeedback.rating = n.getEnumValue(UserFeedbackRatingObject); },
        "text": n => { userFeedback.text = n.getStringValue(); },
        "tokens": n => { userFeedback.tokens = n.getObjectValue(createFeedbackTokenSetFromDiscriminatorValue); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
export function deserializeIntoUserIdentity(userIdentity = {}) {
    return Object.assign(Object.assign({}, deserializeIntoIdentity(userIdentity)), { "userPrincipalName": n => { userIdentity.userPrincipalName = n.getStringValue(); } });
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeCallRecord(writer, callRecord = {}) {
    serializeEntity(writer, callRecord);
    writer.writeDateValue("endDateTime", callRecord.endDateTime);
    writer.writeStringValue("joinWebUrl", callRecord.joinWebUrl);
    writer.writeDateValue("lastModifiedDateTime", callRecord.lastModifiedDateTime);
    if (callRecord.modalities)
        writer.writeEnumValue("modalities", ...callRecord.modalities);
    writer.writeObjectValue("organizer", callRecord.organizer, serializeIdentitySet);
    writer.writeObjectValue("organizer_v2", callRecord.organizer_v2, serializeOrganizer);
    writer.writeCollectionOfObjectValues("participants", callRecord.participants, serializeIdentitySet);
    writer.writeCollectionOfObjectValues("participants_v2", callRecord.participants_v2, serializeParticipant);
    writer.writeCollectionOfObjectValues("sessions", callRecord.sessions, serializeSession);
    writer.writeDateValue("startDateTime", callRecord.startDateTime);
    writer.writeEnumValue("type", callRecord.type);
    writer.writeNumberValue("version", callRecord.version);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeCallRecordCollectionResponse(writer, callRecordCollectionResponse = {}) {
    serializeBaseCollectionPaginationCountResponse(writer, callRecordCollectionResponse);
    writer.writeCollectionOfObjectValues("value", callRecordCollectionResponse.value, serializeCallRecord);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeClientUserAgent(writer, clientUserAgent = {}) {
    serializeUserAgent(writer, clientUserAgent);
    writer.writeStringValue("azureADAppId", clientUserAgent.azureADAppId);
    writer.writeStringValue("communicationServiceId", clientUserAgent.communicationServiceId);
    writer.writeEnumValue("platform", clientUserAgent.platform);
    writer.writeEnumValue("productFamily", clientUserAgent.productFamily);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeDeviceInfo(writer, deviceInfo = {}) {
    writer.writeStringValue("captureDeviceDriver", deviceInfo.captureDeviceDriver);
    writer.writeStringValue("captureDeviceName", deviceInfo.captureDeviceName);
    writer.writeNumberValue("captureNotFunctioningEventRatio", deviceInfo.captureNotFunctioningEventRatio);
    writer.writeNumberValue("cpuInsufficentEventRatio", deviceInfo.cpuInsufficentEventRatio);
    writer.writeNumberValue("deviceClippingEventRatio", deviceInfo.deviceClippingEventRatio);
    writer.writeNumberValue("deviceGlitchEventRatio", deviceInfo.deviceGlitchEventRatio);
    writer.writeNumberValue("howlingEventCount", deviceInfo.howlingEventCount);
    writer.writeNumberValue("initialSignalLevelRootMeanSquare", deviceInfo.initialSignalLevelRootMeanSquare);
    writer.writeNumberValue("lowSpeechLevelEventRatio", deviceInfo.lowSpeechLevelEventRatio);
    writer.writeNumberValue("lowSpeechToNoiseEventRatio", deviceInfo.lowSpeechToNoiseEventRatio);
    writer.writeNumberValue("micGlitchRate", deviceInfo.micGlitchRate);
    writer.writeStringValue("@odata.type", deviceInfo.odataType);
    writer.writeNumberValue("receivedNoiseLevel", deviceInfo.receivedNoiseLevel);
    writer.writeNumberValue("receivedSignalLevel", deviceInfo.receivedSignalLevel);
    writer.writeStringValue("renderDeviceDriver", deviceInfo.renderDeviceDriver);
    writer.writeStringValue("renderDeviceName", deviceInfo.renderDeviceName);
    writer.writeNumberValue("renderMuteEventRatio", deviceInfo.renderMuteEventRatio);
    writer.writeNumberValue("renderNotFunctioningEventRatio", deviceInfo.renderNotFunctioningEventRatio);
    writer.writeNumberValue("renderZeroVolumeEventRatio", deviceInfo.renderZeroVolumeEventRatio);
    writer.writeNumberValue("sentNoiseLevel", deviceInfo.sentNoiseLevel);
    writer.writeNumberValue("sentSignalLevel", deviceInfo.sentSignalLevel);
    writer.writeNumberValue("speakerGlitchRate", deviceInfo.speakerGlitchRate);
    writer.writeAdditionalData(deviceInfo.additionalData);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeDirectRoutingLogRow(writer, directRoutingLogRow = {}) {
    writer.writeStringValue("calleeNumber", directRoutingLogRow.calleeNumber);
    writer.writeNumberValue("callEndSubReason", directRoutingLogRow.callEndSubReason);
    writer.writeStringValue("callerNumber", directRoutingLogRow.callerNumber);
    writer.writeStringValue("callType", directRoutingLogRow.callType);
    writer.writeStringValue("correlationId", directRoutingLogRow.correlationId);
    writer.writeNumberValue("duration", directRoutingLogRow.duration);
    writer.writeDateValue("endDateTime", directRoutingLogRow.endDateTime);
    writer.writeDateValue("failureDateTime", directRoutingLogRow.failureDateTime);
    writer.writeNumberValue("finalSipCode", directRoutingLogRow.finalSipCode);
    writer.writeStringValue("finalSipCodePhrase", directRoutingLogRow.finalSipCodePhrase);
    writer.writeStringValue("id", directRoutingLogRow.id);
    writer.writeDateValue("inviteDateTime", directRoutingLogRow.inviteDateTime);
    writer.writeBooleanValue("mediaBypassEnabled", directRoutingLogRow.mediaBypassEnabled);
    writer.writeStringValue("mediaPathLocation", directRoutingLogRow.mediaPathLocation);
    writer.writeStringValue("@odata.type", directRoutingLogRow.odataType);
    writer.writeStringValue("signalingLocation", directRoutingLogRow.signalingLocation);
    writer.writeDateValue("startDateTime", directRoutingLogRow.startDateTime);
    writer.writeBooleanValue("successfulCall", directRoutingLogRow.successfulCall);
    writer.writeStringValue("trunkFullyQualifiedDomainName", directRoutingLogRow.trunkFullyQualifiedDomainName);
    writer.writeStringValue("userDisplayName", directRoutingLogRow.userDisplayName);
    writer.writeStringValue("userId", directRoutingLogRow.userId);
    writer.writeStringValue("userPrincipalName", directRoutingLogRow.userPrincipalName);
    writer.writeAdditionalData(directRoutingLogRow.additionalData);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeEndpoint(writer, endpoint = {}) {
    writer.writeStringValue("@odata.type", endpoint.odataType);
    writer.writeObjectValue("userAgent", endpoint.userAgent, serializeUserAgent);
    writer.writeAdditionalData(endpoint.additionalData);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeFailureInfo(writer, failureInfo = {}) {
    writer.writeStringValue("@odata.type", failureInfo.odataType);
    writer.writeStringValue("reason", failureInfo.reason);
    writer.writeEnumValue("stage", failureInfo.stage);
    writer.writeAdditionalData(failureInfo.additionalData);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeFeedbackTokenSet(writer, feedbackTokenSet = {}) {
    writer.writeStringValue("@odata.type", feedbackTokenSet.odataType);
    writer.writeAdditionalData(feedbackTokenSet.additionalData);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeMedia(writer, media = {}) {
    writer.writeObjectValue("calleeDevice", media.calleeDevice, serializeDeviceInfo);
    writer.writeObjectValue("calleeNetwork", media.calleeNetwork, serializeNetworkInfo);
    writer.writeObjectValue("callerDevice", media.callerDevice, serializeDeviceInfo);
    writer.writeObjectValue("callerNetwork", media.callerNetwork, serializeNetworkInfo);
    writer.writeStringValue("label", media.label);
    writer.writeStringValue("@odata.type", media.odataType);
    writer.writeCollectionOfObjectValues("streams", media.streams, serializeMediaStream);
    writer.writeAdditionalData(media.additionalData);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeMediaStream(writer, mediaStream = {}) {
    writer.writeEnumValue("audioCodec", mediaStream.audioCodec);
    writer.writeNumberValue("averageAudioDegradation", mediaStream.averageAudioDegradation);
    writer.writeDurationValue("averageAudioNetworkJitter", mediaStream.averageAudioNetworkJitter);
    writer.writeNumberValue("averageBandwidthEstimate", mediaStream.averageBandwidthEstimate);
    writer.writeDurationValue("averageFreezeDuration", mediaStream.averageFreezeDuration);
    writer.writeDurationValue("averageJitter", mediaStream.averageJitter);
    writer.writeNumberValue("averagePacketLossRate", mediaStream.averagePacketLossRate);
    writer.writeNumberValue("averageRatioOfConcealedSamples", mediaStream.averageRatioOfConcealedSamples);
    writer.writeNumberValue("averageReceivedFrameRate", mediaStream.averageReceivedFrameRate);
    writer.writeDurationValue("averageRoundTripTime", mediaStream.averageRoundTripTime);
    writer.writeNumberValue("averageVideoFrameLossPercentage", mediaStream.averageVideoFrameLossPercentage);
    writer.writeNumberValue("averageVideoFrameRate", mediaStream.averageVideoFrameRate);
    writer.writeNumberValue("averageVideoPacketLossRate", mediaStream.averageVideoPacketLossRate);
    writer.writeDateValue("endDateTime", mediaStream.endDateTime);
    writer.writeBooleanValue("isAudioForwardErrorCorrectionUsed", mediaStream.isAudioForwardErrorCorrectionUsed);
    writer.writeNumberValue("lowFrameRateRatio", mediaStream.lowFrameRateRatio);
    writer.writeNumberValue("lowVideoProcessingCapabilityRatio", mediaStream.lowVideoProcessingCapabilityRatio);
    writer.writeDurationValue("maxAudioNetworkJitter", mediaStream.maxAudioNetworkJitter);
    writer.writeDurationValue("maxJitter", mediaStream.maxJitter);
    writer.writeNumberValue("maxPacketLossRate", mediaStream.maxPacketLossRate);
    writer.writeNumberValue("maxRatioOfConcealedSamples", mediaStream.maxRatioOfConcealedSamples);
    writer.writeDurationValue("maxRoundTripTime", mediaStream.maxRoundTripTime);
    writer.writeStringValue("@odata.type", mediaStream.odataType);
    writer.writeNumberValue("packetUtilization", mediaStream.packetUtilization);
    writer.writeNumberValue("postForwardErrorCorrectionPacketLossRate", mediaStream.postForwardErrorCorrectionPacketLossRate);
    writer.writeDurationValue("rmsFreezeDuration", mediaStream.rmsFreezeDuration);
    writer.writeDateValue("startDateTime", mediaStream.startDateTime);
    writer.writeEnumValue("streamDirection", mediaStream.streamDirection);
    writer.writeStringValue("streamId", mediaStream.streamId);
    writer.writeEnumValue("videoCodec", mediaStream.videoCodec);
    writer.writeBooleanValue("wasMediaBypassed", mediaStream.wasMediaBypassed);
    writer.writeAdditionalData(mediaStream.additionalData);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeNetworkInfo(writer, networkInfo = {}) {
    writer.writeNumberValue("bandwidthLowEventRatio", networkInfo.bandwidthLowEventRatio);
    writer.writeStringValue("basicServiceSetIdentifier", networkInfo.basicServiceSetIdentifier);
    writer.writeEnumValue("connectionType", networkInfo.connectionType);
    writer.writeNumberValue("delayEventRatio", networkInfo.delayEventRatio);
    writer.writeStringValue("dnsSuffix", networkInfo.dnsSuffix);
    writer.writeStringValue("ipAddress", networkInfo.ipAddress);
    writer.writeNumberValue("linkSpeed", networkInfo.linkSpeed);
    writer.writeStringValue("macAddress", networkInfo.macAddress);
    writer.writeEnumValue("networkTransportProtocol", networkInfo.networkTransportProtocol);
    writer.writeStringValue("@odata.type", networkInfo.odataType);
    writer.writeNumberValue("port", networkInfo.port);
    writer.writeNumberValue("receivedQualityEventRatio", networkInfo.receivedQualityEventRatio);
    writer.writeStringValue("reflexiveIPAddress", networkInfo.reflexiveIPAddress);
    writer.writeStringValue("relayIPAddress", networkInfo.relayIPAddress);
    writer.writeNumberValue("relayPort", networkInfo.relayPort);
    writer.writeNumberValue("sentQualityEventRatio", networkInfo.sentQualityEventRatio);
    writer.writeStringValue("subnet", networkInfo.subnet);
    writer.writeCollectionOfObjectValues("traceRouteHops", networkInfo.traceRouteHops, serializeTraceRouteHop);
    writer.writeEnumValue("wifiBand", networkInfo.wifiBand);
    writer.writeNumberValue("wifiBatteryCharge", networkInfo.wifiBatteryCharge);
    writer.writeNumberValue("wifiChannel", networkInfo.wifiChannel);
    writer.writeStringValue("wifiMicrosoftDriver", networkInfo.wifiMicrosoftDriver);
    writer.writeStringValue("wifiMicrosoftDriverVersion", networkInfo.wifiMicrosoftDriverVersion);
    writer.writeEnumValue("wifiRadioType", networkInfo.wifiRadioType);
    writer.writeNumberValue("wifiSignalStrength", networkInfo.wifiSignalStrength);
    writer.writeStringValue("wifiVendorDriver", networkInfo.wifiVendorDriver);
    writer.writeStringValue("wifiVendorDriverVersion", networkInfo.wifiVendorDriverVersion);
    writer.writeAdditionalData(networkInfo.additionalData);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeOrganizer(writer, organizer = {}) {
    serializeParticipantBase(writer, organizer);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeParticipant(writer, participant = {}) {
    serializeParticipantBase(writer, participant);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeParticipantBase(writer, participantBase = {}) {
    serializeEntity(writer, participantBase);
    writer.writeObjectValue("identity", participantBase.identity, serializeCommunicationsIdentitySet);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeParticipantCollectionResponse(writer, participantCollectionResponse = {}) {
    serializeBaseCollectionPaginationCountResponse(writer, participantCollectionResponse);
    writer.writeCollectionOfObjectValues("value", participantCollectionResponse.value, serializeParticipant);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeParticipantEndpoint(writer, participantEndpoint = {}) {
    serializeEndpoint(writer, participantEndpoint);
    writer.writeObjectValue("associatedIdentity", participantEndpoint.associatedIdentity, serializeIdentity);
    writer.writeNumberValue("cpuCoresCount", participantEndpoint.cpuCoresCount);
    writer.writeStringValue("cpuName", participantEndpoint.cpuName);
    writer.writeNumberValue("cpuProcessorSpeedInMhz", participantEndpoint.cpuProcessorSpeedInMhz);
    writer.writeObjectValue("feedback", participantEndpoint.feedback, serializeUserFeedback);
    writer.writeObjectValue("identity", participantEndpoint.identity, serializeIdentitySet);
    writer.writeStringValue("name", participantEndpoint.name);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializePstnCallLogRow(writer, pstnCallLogRow = {}) {
    writer.writeEnumValue("callDurationSource", pstnCallLogRow.callDurationSource);
    writer.writeStringValue("calleeNumber", pstnCallLogRow.calleeNumber);
    writer.writeStringValue("callerNumber", pstnCallLogRow.callerNumber);
    writer.writeStringValue("callId", pstnCallLogRow.callId);
    writer.writeStringValue("callType", pstnCallLogRow.callType);
    writer.writeNumberValue("charge", pstnCallLogRow.charge);
    writer.writeStringValue("conferenceId", pstnCallLogRow.conferenceId);
    writer.writeNumberValue("connectionCharge", pstnCallLogRow.connectionCharge);
    writer.writeStringValue("currency", pstnCallLogRow.currency);
    writer.writeStringValue("destinationContext", pstnCallLogRow.destinationContext);
    writer.writeStringValue("destinationName", pstnCallLogRow.destinationName);
    writer.writeNumberValue("duration", pstnCallLogRow.duration);
    writer.writeDateValue("endDateTime", pstnCallLogRow.endDateTime);
    writer.writeStringValue("id", pstnCallLogRow.id);
    writer.writeStringValue("inventoryType", pstnCallLogRow.inventoryType);
    writer.writeStringValue("licenseCapability", pstnCallLogRow.licenseCapability);
    writer.writeStringValue("@odata.type", pstnCallLogRow.odataType);
    writer.writeStringValue("operator", pstnCallLogRow.operator);
    writer.writeDateValue("startDateTime", pstnCallLogRow.startDateTime);
    writer.writeStringValue("tenantCountryCode", pstnCallLogRow.tenantCountryCode);
    writer.writeStringValue("usageCountryCode", pstnCallLogRow.usageCountryCode);
    writer.writeStringValue("userDisplayName", pstnCallLogRow.userDisplayName);
    writer.writeStringValue("userId", pstnCallLogRow.userId);
    writer.writeStringValue("userPrincipalName", pstnCallLogRow.userPrincipalName);
    writer.writeAdditionalData(pstnCallLogRow.additionalData);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeSegment(writer, segment = {}) {
    serializeEntity(writer, segment);
    writer.writeObjectValue("callee", segment.callee, serializeEndpoint);
    writer.writeObjectValue("caller", segment.caller, serializeEndpoint);
    writer.writeDateValue("endDateTime", segment.endDateTime);
    writer.writeObjectValue("failureInfo", segment.failureInfo, serializeFailureInfo);
    writer.writeCollectionOfObjectValues("media", segment.media, serializeMedia);
    writer.writeDateValue("startDateTime", segment.startDateTime);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeSegmentCollectionResponse(writer, segmentCollectionResponse = {}) {
    serializeBaseCollectionPaginationCountResponse(writer, segmentCollectionResponse);
    writer.writeCollectionOfObjectValues("value", segmentCollectionResponse.value, serializeSegment);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeServiceEndpoint(writer, serviceEndpoint = {}) {
    serializeEndpoint(writer, serviceEndpoint);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeServiceUserAgent(writer, serviceUserAgent = {}) {
    serializeUserAgent(writer, serviceUserAgent);
    writer.writeEnumValue("role", serviceUserAgent.role);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeSession(writer, session = {}) {
    serializeEntity(writer, session);
    writer.writeObjectValue("callee", session.callee, serializeEndpoint);
    writer.writeObjectValue("caller", session.caller, serializeEndpoint);
    writer.writeDateValue("endDateTime", session.endDateTime);
    writer.writeObjectValue("failureInfo", session.failureInfo, serializeFailureInfo);
    writer.writeBooleanValue("isTest", session.isTest);
    if (session.modalities)
        writer.writeEnumValue("modalities", ...session.modalities);
    writer.writeCollectionOfObjectValues("segments", session.segments, serializeSegment);
    writer.writeDateValue("startDateTime", session.startDateTime);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeSessionCollectionResponse(writer, sessionCollectionResponse = {}) {
    serializeBaseCollectionPaginationCountResponse(writer, sessionCollectionResponse);
    writer.writeCollectionOfObjectValues("value", sessionCollectionResponse.value, serializeSession);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeTraceRouteHop(writer, traceRouteHop = {}) {
    writer.writeNumberValue("hopCount", traceRouteHop.hopCount);
    writer.writeStringValue("ipAddress", traceRouteHop.ipAddress);
    writer.writeStringValue("@odata.type", traceRouteHop.odataType);
    writer.writeDurationValue("roundTripTime", traceRouteHop.roundTripTime);
    writer.writeAdditionalData(traceRouteHop.additionalData);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeUserAgent(writer, userAgent = {}) {
    writer.writeStringValue("applicationVersion", userAgent.applicationVersion);
    writer.writeStringValue("headerValue", userAgent.headerValue);
    writer.writeStringValue("@odata.type", userAgent.odataType);
    writer.writeAdditionalData(userAgent.additionalData);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeUserFeedback(writer, userFeedback = {}) {
    writer.writeStringValue("@odata.type", userFeedback.odataType);
    writer.writeEnumValue("rating", userFeedback.rating);
    writer.writeStringValue("text", userFeedback.text);
    writer.writeObjectValue("tokens", userFeedback.tokens, serializeFeedbackTokenSet);
    writer.writeAdditionalData(userFeedback.additionalData);
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
export function serializeUserIdentity(writer, userIdentity = {}) {
    serializeIdentity(writer, userIdentity);
    writer.writeStringValue("userPrincipalName", userIdentity.userPrincipalName);
}
export const AudioCodecObject = {
    Unknown: "unknown",
    Invalid: "invalid",
    Cn: "cn",
    Pcma: "pcma",
    Pcmu: "pcmu",
    AmrWide: "amrWide",
    G722: "g722",
    G7221: "g7221",
    G7221c: "g7221c",
    G729: "g729",
    MultiChannelAudio: "multiChannelAudio",
    Muchv2: "muchv2",
    Opus: "opus",
    Satin: "satin",
    SatinFullband: "satinFullband",
    RtAudio8: "rtAudio8",
    RtAudio16: "rtAudio16",
    Silk: "silk",
    SilkNarrow: "silkNarrow",
    SilkWide: "silkWide",
    Siren: "siren",
    XmsRta: "xmsRta",
    UnknownFutureValue: "unknownFutureValue",
};
export const CallTypeObject = {
    Unknown: "unknown",
    GroupCall: "groupCall",
    PeerToPeer: "peerToPeer",
    UnknownFutureValue: "unknownFutureValue",
};
export const ClientPlatformObject = {
    Unknown: "unknown",
    Windows: "windows",
    MacOS: "macOS",
    IOS: "iOS",
    Android: "android",
    Web: "web",
    IpPhone: "ipPhone",
    RoomSystem: "roomSystem",
    SurfaceHub: "surfaceHub",
    HoloLens: "holoLens",
    UnknownFutureValue: "unknownFutureValue",
};
export const FailureStageObject = {
    Unknown: "unknown",
    CallSetup: "callSetup",
    Midcall: "midcall",
    UnknownFutureValue: "unknownFutureValue",
};
export const MediaStreamDirectionObject = {
    CallerToCallee: "callerToCallee",
    CalleeToCaller: "calleeToCaller",
};
export const ModalityObject = {
    Audio: "audio",
    Video: "video",
    VideoBasedScreenSharing: "videoBasedScreenSharing",
    Data: "data",
    ScreenSharing: "screenSharing",
    UnknownFutureValue: "unknownFutureValue",
};
export const NetworkConnectionTypeObject = {
    Unknown: "unknown",
    Wired: "wired",
    Wifi: "wifi",
    Mobile: "mobile",
    Tunnel: "tunnel",
    UnknownFutureValue: "unknownFutureValue",
};
export const NetworkTransportProtocolObject = {
    Unknown: "unknown",
    Udp: "udp",
    Tcp: "tcp",
    UnknownFutureValue: "unknownFutureValue",
};
export const ProductFamilyObject = {
    Unknown: "unknown",
    Teams: "teams",
    SkypeForBusiness: "skypeForBusiness",
    Lync: "lync",
    UnknownFutureValue: "unknownFutureValue",
    AzureCommunicationServices: "azureCommunicationServices",
};
export const PstnCallDurationSourceObject = {
    Microsoft: "microsoft",
    Operator: "operator",
};
export const ServiceRoleObject = {
    Unknown: "unknown",
    CustomBot: "customBot",
    SkypeForBusinessMicrosoftTeamsGateway: "skypeForBusinessMicrosoftTeamsGateway",
    SkypeForBusinessAudioVideoMcu: "skypeForBusinessAudioVideoMcu",
    SkypeForBusinessApplicationSharingMcu: "skypeForBusinessApplicationSharingMcu",
    SkypeForBusinessCallQueues: "skypeForBusinessCallQueues",
    SkypeForBusinessAutoAttendant: "skypeForBusinessAutoAttendant",
    MediationServer: "mediationServer",
    MediationServerCloudConnectorEdition: "mediationServerCloudConnectorEdition",
    ExchangeUnifiedMessagingService: "exchangeUnifiedMessagingService",
    MediaController: "mediaController",
    ConferencingAnnouncementService: "conferencingAnnouncementService",
    ConferencingAttendant: "conferencingAttendant",
    AudioTeleconferencerController: "audioTeleconferencerController",
    SkypeForBusinessUnifiedCommunicationApplicationPlatform: "skypeForBusinessUnifiedCommunicationApplicationPlatform",
    ResponseGroupServiceAnnouncementService: "responseGroupServiceAnnouncementService",
    Gateway: "gateway",
    SkypeTranslator: "skypeTranslator",
    SkypeForBusinessAttendant: "skypeForBusinessAttendant",
    ResponseGroupService: "responseGroupService",
    Voicemail: "voicemail",
    UnknownFutureValue: "unknownFutureValue",
};
export const UserFeedbackRatingObject = {
    NotRated: "notRated",
    Bad: "bad",
    Poor: "poor",
    Fair: "fair",
    Good: "good",
    Excellent: "excellent",
    UnknownFutureValue: "unknownFutureValue",
};
export const VideoCodecObject = {
    Unknown: "unknown",
    Invalid: "invalid",
    Av1: "av1",
    H263: "h263",
    H264: "h264",
    H264s: "h264s",
    H264uc: "h264uc",
    H265: "h265",
    Rtvc1: "rtvc1",
    RtVideo: "rtVideo",
    Xrtvc1: "xrtvc1",
    UnknownFutureValue: "unknownFutureValue",
};
export const WifiBandObject = {
    Unknown: "unknown",
    Frequency24GHz: "frequency24GHz",
    Frequency50GHz: "frequency50GHz",
    Frequency60GHz: "frequency60GHz",
    UnknownFutureValue: "unknownFutureValue",
};
export const WifiRadioTypeObject = {
    Unknown: "unknown",
    Wifi80211a: "wifi80211a",
    Wifi80211b: "wifi80211b",
    Wifi80211g: "wifi80211g",
    Wifi80211n: "wifi80211n",
    Wifi80211ac: "wifi80211ac",
    Wifi80211ax: "wifi80211ax",
    UnknownFutureValue: "unknownFutureValue",
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map