"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CopyToNotebookRequestBuilderRequestsMetadata = exports.CopyToNotebookRequestBuilderUriTemplate = exports.serializeCopyToNotebookPostRequestBody = exports.deserializeIntoCopyToNotebookPostRequestBody = exports.createCopyToNotebookPostRequestBodyFromDiscriminatorValue = 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 {CopyToNotebookPostRequestBody}
 */
function createCopyToNotebookPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoCopyToNotebookPostRequestBody;
}
exports.createCopyToNotebookPostRequestBodyFromDiscriminatorValue = createCopyToNotebookPostRequestBodyFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoCopyToNotebookPostRequestBody(copyToNotebookPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { copyToNotebookPostRequestBody.backingStoreEnabled = true; },
        "groupId": n => { copyToNotebookPostRequestBody.groupId = n.getStringValue(); },
        "id": n => { copyToNotebookPostRequestBody.id = n.getStringValue(); },
        "renameAs": n => { copyToNotebookPostRequestBody.renameAs = n.getStringValue(); },
        "siteCollectionId": n => { copyToNotebookPostRequestBody.siteCollectionId = n.getStringValue(); },
        "siteId": n => { copyToNotebookPostRequestBody.siteId = n.getStringValue(); },
    };
}
exports.deserializeIntoCopyToNotebookPostRequestBody = deserializeIntoCopyToNotebookPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeCopyToNotebookPostRequestBody(writer, copyToNotebookPostRequestBody = {}) {
    writer.writeStringValue("groupId", copyToNotebookPostRequestBody.groupId);
    writer.writeStringValue("id", copyToNotebookPostRequestBody.id);
    writer.writeStringValue("renameAs", copyToNotebookPostRequestBody.renameAs);
    writer.writeStringValue("siteCollectionId", copyToNotebookPostRequestBody.siteCollectionId);
    writer.writeStringValue("siteId", copyToNotebookPostRequestBody.siteId);
    writer.writeAdditionalData(copyToNotebookPostRequestBody.additionalData);
}
exports.serializeCopyToNotebookPostRequestBody = serializeCopyToNotebookPostRequestBody;
/**
 * Uri template for the request builder.
 */
exports.CopyToNotebookRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/onenote/notebooks/{notebook%2Did}/sectionGroups/{sectionGroup%2Did}/sections/{onenoteSection%2Did}/copyToNotebook";
/**
 * Metadata for all the requests in the request builder.
 */
exports.CopyToNotebookRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: exports.CopyToNotebookRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "send",
        responseBodyFactory: models_1.createOnenoteOperationFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeCopyToNotebookPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
