"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EvaluateRemovalRequestBuilderRequestsMetadata = exports.EvaluateRemovalRequestBuilderUriTemplate = exports.serializeEvaluateRemovalPostResponse = exports.serializeEvaluateRemovalPostRequestBody = exports.deserializeIntoEvaluateRemovalPostResponse = exports.deserializeIntoEvaluateRemovalPostRequestBody = exports.createEvaluateRemovalPostResponseFromDiscriminatorValue = exports.createEvaluateRemovalPostRequestBodyFromDiscriminatorValue = 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 {EvaluateRemovalPostRequestBody}
 */
function createEvaluateRemovalPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoEvaluateRemovalPostRequestBody;
}
exports.createEvaluateRemovalPostRequestBodyFromDiscriminatorValue = createEvaluateRemovalPostRequestBodyFromDiscriminatorValue;
/**
 * 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 {EvaluateRemovalPostResponse}
 */
function createEvaluateRemovalPostResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoEvaluateRemovalPostResponse;
}
exports.createEvaluateRemovalPostResponseFromDiscriminatorValue = createEvaluateRemovalPostResponseFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoEvaluateRemovalPostRequestBody(evaluateRemovalPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { evaluateRemovalPostRequestBody.backingStoreEnabled = true; },
        "contentInfo": n => { evaluateRemovalPostRequestBody.contentInfo = n.getObjectValue(models_1.createContentInfoFromDiscriminatorValue); },
        "downgradeJustification": n => { evaluateRemovalPostRequestBody.downgradeJustification = n.getObjectValue(models_1.createDowngradeJustificationFromDiscriminatorValue); },
    };
}
exports.deserializeIntoEvaluateRemovalPostRequestBody = deserializeIntoEvaluateRemovalPostRequestBody;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoEvaluateRemovalPostResponse(evaluateRemovalPostResponse = {}) {
    return Object.assign(Object.assign({}, (0, models_1.deserializeIntoBaseCollectionPaginationCountResponse)(evaluateRemovalPostResponse)), { "value": n => { evaluateRemovalPostResponse.value = n.getCollectionOfObjectValues(models_1.createInformationProtectionActionFromDiscriminatorValue); } });
}
exports.deserializeIntoEvaluateRemovalPostResponse = deserializeIntoEvaluateRemovalPostResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeEvaluateRemovalPostRequestBody(writer, evaluateRemovalPostRequestBody = {}) {
    writer.writeObjectValue("contentInfo", evaluateRemovalPostRequestBody.contentInfo, models_1.serializeContentInfo);
    writer.writeObjectValue("downgradeJustification", evaluateRemovalPostRequestBody.downgradeJustification, models_1.serializeDowngradeJustification);
    writer.writeAdditionalData(evaluateRemovalPostRequestBody.additionalData);
}
exports.serializeEvaluateRemovalPostRequestBody = serializeEvaluateRemovalPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeEvaluateRemovalPostResponse(writer, evaluateRemovalPostResponse = {}) {
    (0, models_1.serializeBaseCollectionPaginationCountResponse)(writer, evaluateRemovalPostResponse);
    writer.writeCollectionOfObjectValues("value", evaluateRemovalPostResponse.value, models_1.serializeInformationProtectionAction);
}
exports.serializeEvaluateRemovalPostResponse = serializeEvaluateRemovalPostResponse;
/**
 * Uri template for the request builder.
 */
exports.EvaluateRemovalRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/informationProtection/policy/labels/evaluateRemoval";
/**
 * Metadata for all the requests in the request builder.
 */
exports.EvaluateRemovalRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: exports.EvaluateRemovalRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "send",
        responseBodyFactory: createEvaluateRemovalPostResponseFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeEvaluateRemovalPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
