"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CreateOrGetRequestBuilderRequestsMetadata = exports.CreateOrGetRequestBuilderUriTemplate = exports.serializeCreateOrGetPostRequestBody = exports.deserializeIntoCreateOrGetPostRequestBody = exports.createCreateOrGetPostRequestBodyFromDiscriminatorValue = void 0;
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
const models_1 = require("@microsoft/msgraph-beta-sdk/models/");
const oDataErrors_1 = require("@microsoft/msgraph-beta-sdk/models/oDataErrors/");
/**
 * 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 {CreateOrGetPostRequestBody}
 */
function createCreateOrGetPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoCreateOrGetPostRequestBody;
}
exports.createCreateOrGetPostRequestBodyFromDiscriminatorValue = createCreateOrGetPostRequestBodyFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoCreateOrGetPostRequestBody(createOrGetPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { createOrGetPostRequestBody.backingStoreEnabled = true; },
        "chatInfo": n => { createOrGetPostRequestBody.chatInfo = n.getObjectValue(models_1.createChatInfoFromDiscriminatorValue); },
        "endDateTime": n => { createOrGetPostRequestBody.endDateTime = n.getDateValue(); },
        "externalId": n => { createOrGetPostRequestBody.externalId = n.getStringValue(); },
        "participants": n => { createOrGetPostRequestBody.participants = n.getObjectValue(models_1.createMeetingParticipantsFromDiscriminatorValue); },
        "startDateTime": n => { createOrGetPostRequestBody.startDateTime = n.getDateValue(); },
        "subject": n => { createOrGetPostRequestBody.subject = n.getStringValue(); },
    };
}
exports.deserializeIntoCreateOrGetPostRequestBody = deserializeIntoCreateOrGetPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeCreateOrGetPostRequestBody(writer, createOrGetPostRequestBody = {}) {
    writer.writeObjectValue("chatInfo", createOrGetPostRequestBody.chatInfo, models_1.serializeChatInfo);
    writer.writeDateValue("endDateTime", createOrGetPostRequestBody.endDateTime);
    writer.writeStringValue("externalId", createOrGetPostRequestBody.externalId);
    writer.writeObjectValue("participants", createOrGetPostRequestBody.participants, models_1.serializeMeetingParticipants);
    writer.writeDateValue("startDateTime", createOrGetPostRequestBody.startDateTime);
    writer.writeStringValue("subject", createOrGetPostRequestBody.subject);
    writer.writeAdditionalData(createOrGetPostRequestBody.additionalData);
}
exports.serializeCreateOrGetPostRequestBody = serializeCreateOrGetPostRequestBody;
/**
 * Uri template for the request builder.
 */
exports.CreateOrGetRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/onlineMeetings/createOrGet";
/**
 * Metadata for all the requests in the request builder.
 */
exports.CreateOrGetRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: exports.CreateOrGetRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "send",
        responseBodyFactory: models_1.createOnlineMeetingFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeCreateOrGetPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
