/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createDateTimeTimeZoneFromDiscriminatorValue, createScheduleInformationFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, serializeDateTimeTimeZone, serializeScheduleInformation } 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 {GetSchedulePostRequestBody}
 */
// @ts-ignore
export function createGetSchedulePostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoGetSchedulePostRequestBody;
}
/**
 * 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 {GetSchedulePostResponse}
 */
// @ts-ignore
export function createGetSchedulePostResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoGetSchedulePostResponse;
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoGetSchedulePostRequestBody(getSchedulePostRequestBody = {}) {
    return {
        "AvailabilityViewInterval": n => { getSchedulePostRequestBody.availabilityViewInterval = n.getNumberValue(); },
        "backingStoreEnabled": n => { getSchedulePostRequestBody.backingStoreEnabled = true; },
        "EndTime": n => { getSchedulePostRequestBody.endTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); },
        "Schedules": n => { getSchedulePostRequestBody.schedules = n.getCollectionOfPrimitiveValues(); },
        "StartTime": n => { getSchedulePostRequestBody.startTime = n.getObjectValue(createDateTimeTimeZoneFromDiscriminatorValue); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoGetSchedulePostResponse(getSchedulePostResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(getSchedulePostResponse)), { "value": n => { getSchedulePostResponse.value = n.getCollectionOfObjectValues(createScheduleInformationFromDiscriminatorValue); } });
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeGetSchedulePostRequestBody(writer, getSchedulePostRequestBody = {}) {
    if (getSchedulePostRequestBody) {
        writer.writeNumberValue("AvailabilityViewInterval", getSchedulePostRequestBody.availabilityViewInterval);
        writer.writeObjectValue("EndTime", getSchedulePostRequestBody.endTime, serializeDateTimeTimeZone);
        writer.writeCollectionOfPrimitiveValues("Schedules", getSchedulePostRequestBody.schedules);
        writer.writeObjectValue("StartTime", getSchedulePostRequestBody.startTime, serializeDateTimeTimeZone);
        writer.writeAdditionalData(getSchedulePostRequestBody.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeGetSchedulePostResponse(writer, getSchedulePostResponse = {}) {
    if (getSchedulePostResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, getSchedulePostResponse);
        writer.writeCollectionOfObjectValues("value", getSchedulePostResponse.value, serializeScheduleInformation);
    }
}
/**
 * Uri template for the request builder.
 */
export const GetScheduleRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/calendars/{calendar%2Did}/getSchedule";
/**
 * Metadata for all the requests in the request builder.
 */
export const GetScheduleRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: GetScheduleRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "send",
        responseBodyFactory: createGetSchedulePostResponseFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeGetSchedulePostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map