"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExtractLabelRequestBuilderRequestsMetadata = exports.ExtractLabelRequestBuilderUriTemplate = exports.serializeExtractLabelPostRequestBody = exports.deserializeIntoExtractLabelPostRequestBody = exports.createExtractLabelPostRequestBodyFromDiscriminatorValue = 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 {ExtractLabelPostRequestBody}
 */
function createExtractLabelPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoExtractLabelPostRequestBody;
}
exports.createExtractLabelPostRequestBodyFromDiscriminatorValue = createExtractLabelPostRequestBodyFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoExtractLabelPostRequestBody(extractLabelPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { extractLabelPostRequestBody.backingStoreEnabled = true; },
        "contentInfo": n => { extractLabelPostRequestBody.contentInfo = n.getObjectValue(models_1.createContentInfoFromDiscriminatorValue); },
    };
}
exports.deserializeIntoExtractLabelPostRequestBody = deserializeIntoExtractLabelPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeExtractLabelPostRequestBody(writer, extractLabelPostRequestBody = {}) {
    writer.writeObjectValue("contentInfo", extractLabelPostRequestBody.contentInfo, models_1.serializeContentInfo);
    writer.writeAdditionalData(extractLabelPostRequestBody.additionalData);
}
exports.serializeExtractLabelPostRequestBody = serializeExtractLabelPostRequestBody;
/**
 * Uri template for the request builder.
 */
exports.ExtractLabelRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/informationProtection/policy/labels/extractLabel";
/**
 * Metadata for all the requests in the request builder.
 */
exports.ExtractLabelRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: exports.ExtractLabelRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "send",
        responseBodyFactory: models_1.createInformationProtectionContentLabelFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeExtractLabelPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
