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