"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AcceptRequestBuilderUriTemplate = exports.AcceptRequestBuilderRequestsMetadata = exports.serializeAcceptPostRequestBody = exports.deserializeIntoAcceptPostRequestBody = exports.createAcceptPostRequestBodyFromDiscriminatorValue = void 0;
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
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 a acceptPostRequestBody
 */
function createAcceptPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoAcceptPostRequestBody;
}
exports.createAcceptPostRequestBodyFromDiscriminatorValue = createAcceptPostRequestBodyFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoAcceptPostRequestBody(acceptPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { acceptPostRequestBody.backingStoreEnabled = true; },
        "comment": n => { acceptPostRequestBody.comment = n.getStringValue(); },
        "sendResponse": n => { acceptPostRequestBody.sendResponse = n.getBooleanValue(); },
    };
}
exports.deserializeIntoAcceptPostRequestBody = deserializeIntoAcceptPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeAcceptPostRequestBody(writer, acceptPostRequestBody = {}) {
    writer.writeStringValue("Comment", acceptPostRequestBody.comment);
    writer.writeBooleanValue("SendResponse", acceptPostRequestBody.sendResponse);
    writer.writeAdditionalData(acceptPostRequestBody.additionalData);
}
exports.serializeAcceptPostRequestBody = serializeAcceptPostRequestBody;
/**
 * Metadata for all the requests in the request builder.
 */
exports.AcceptRequestBuilderRequestsMetadata = {
    post: {
        responseBodyContentType: "application/json",
        errorMappings: {
            _4XX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
            _5XX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "sendNoResponseContentAsync",
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeAcceptPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/**
 * Uri template for the request builder.
 */
exports.AcceptRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/calendar/events/{event%2Did}/exceptionOccurrences/{event%2Did1}/instances/{event%2Did2}/accept";
/* tslint:enable */
/* eslint-enable */
