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