"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReplyRequestBuilderRequestsMetadata = exports.ReplyRequestBuilderUriTemplate = exports.serializeReplyPostRequestBody = exports.deserializeIntoReplyPostRequestBody = exports.createReplyPostRequestBodyFromDiscriminatorValue = 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 {ReplyPostRequestBody}
 */
function createReplyPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoReplyPostRequestBody;
}
exports.createReplyPostRequestBodyFromDiscriminatorValue = createReplyPostRequestBodyFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoReplyPostRequestBody(replyPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { replyPostRequestBody.backingStoreEnabled = true; },
        "comment": n => { replyPostRequestBody.comment = n.getStringValue(); },
        "message": n => { replyPostRequestBody.message = n.getObjectValue(models_1.createMessageFromDiscriminatorValue); },
    };
}
exports.deserializeIntoReplyPostRequestBody = deserializeIntoReplyPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeReplyPostRequestBody(writer, replyPostRequestBody = {}) {
    writer.writeStringValue("Comment", replyPostRequestBody.comment);
    writer.writeObjectValue("Message", replyPostRequestBody.message, models_1.serializeMessage);
    writer.writeAdditionalData(replyPostRequestBody.additionalData);
}
exports.serializeReplyPostRequestBody = serializeReplyPostRequestBody;
/**
 * Uri template for the request builder.
 */
exports.ReplyRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/mailFolders/{mailFolder%2Did}/childFolders/{mailFolder%2Did1}/messages/{message%2Did}/reply";
/**
 * Metadata for all the requests in the request builder.
 */
exports.ReplyRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: exports.ReplyRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "sendNoResponseContent",
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeReplyPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
