/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createAttendeeBaseFromDiscriminatorValue, createLocationConstraintFromDiscriminatorValue, createMeetingTimeSuggestionsResultFromDiscriminatorValue, createTimeConstraintFromDiscriminatorValue, serializeAttendeeBase, serializeLocationConstraint, serializeTimeConstraint } 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 {FindMeetingTimesPostRequestBody}
 */
// @ts-ignore
export function createFindMeetingTimesPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoFindMeetingTimesPostRequestBody;
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoFindMeetingTimesPostRequestBody(findMeetingTimesPostRequestBody = {}) {
    return {
        "attendees": n => { findMeetingTimesPostRequestBody.attendees = n.getCollectionOfObjectValues(createAttendeeBaseFromDiscriminatorValue); },
        "backingStoreEnabled": n => { findMeetingTimesPostRequestBody.backingStoreEnabled = true; },
        "isOrganizerOptional": n => { findMeetingTimesPostRequestBody.isOrganizerOptional = n.getBooleanValue(); },
        "locationConstraint": n => { findMeetingTimesPostRequestBody.locationConstraint = n.getObjectValue(createLocationConstraintFromDiscriminatorValue); },
        "maxCandidates": n => { findMeetingTimesPostRequestBody.maxCandidates = n.getNumberValue(); },
        "meetingDuration": n => { findMeetingTimesPostRequestBody.meetingDuration = n.getDurationValue(); },
        "minimumAttendeePercentage": n => { findMeetingTimesPostRequestBody.minimumAttendeePercentage = n.getNumberValue(); },
        "returnSuggestionReasons": n => { findMeetingTimesPostRequestBody.returnSuggestionReasons = n.getBooleanValue(); },
        "timeConstraint": n => { findMeetingTimesPostRequestBody.timeConstraint = n.getObjectValue(createTimeConstraintFromDiscriminatorValue); },
    };
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeFindMeetingTimesPostRequestBody(writer, findMeetingTimesPostRequestBody = {}) {
    if (findMeetingTimesPostRequestBody) {
        writer.writeCollectionOfObjectValues("attendees", findMeetingTimesPostRequestBody.attendees, serializeAttendeeBase);
        writer.writeBooleanValue("isOrganizerOptional", findMeetingTimesPostRequestBody.isOrganizerOptional);
        writer.writeObjectValue("locationConstraint", findMeetingTimesPostRequestBody.locationConstraint, serializeLocationConstraint);
        writer.writeNumberValue("maxCandidates", findMeetingTimesPostRequestBody.maxCandidates);
        writer.writeDurationValue("meetingDuration", findMeetingTimesPostRequestBody.meetingDuration);
        writer.writeNumberValue("minimumAttendeePercentage", findMeetingTimesPostRequestBody.minimumAttendeePercentage);
        writer.writeBooleanValue("returnSuggestionReasons", findMeetingTimesPostRequestBody.returnSuggestionReasons);
        writer.writeObjectValue("timeConstraint", findMeetingTimesPostRequestBody.timeConstraint, serializeTimeConstraint);
        writer.writeAdditionalData(findMeetingTimesPostRequestBody.additionalData);
    }
}
/**
 * Uri template for the request builder.
 */
export const FindMeetingTimesRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/findMeetingTimes";
/**
 * Metadata for all the requests in the request builder.
 */
export const FindMeetingTimesRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: FindMeetingTimesRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "send",
        responseBodyFactory: createMeetingTimeSuggestionsResultFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeFindMeetingTimesPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map