"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EvaluateClassificationResultsRequestBuilderRequestsMetadata = exports.EvaluateClassificationResultsRequestBuilderUriTemplate = exports.serializeEvaluateClassificationResultsPostResponse = exports.serializeEvaluateClassificationResultsPostRequestBody = exports.deserializeIntoEvaluateClassificationResultsPostResponse = exports.deserializeIntoEvaluateClassificationResultsPostRequestBody = exports.createEvaluateClassificationResultsPostResponseFromDiscriminatorValue = exports.createEvaluateClassificationResultsPostRequestBodyFromDiscriminatorValue = 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 {EvaluateClassificationResultsPostRequestBody}
 */
function createEvaluateClassificationResultsPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoEvaluateClassificationResultsPostRequestBody;
}
exports.createEvaluateClassificationResultsPostRequestBodyFromDiscriminatorValue = createEvaluateClassificationResultsPostRequestBodyFromDiscriminatorValue;
/**
 * 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 {EvaluateClassificationResultsPostResponse}
 */
function createEvaluateClassificationResultsPostResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoEvaluateClassificationResultsPostResponse;
}
exports.createEvaluateClassificationResultsPostResponseFromDiscriminatorValue = createEvaluateClassificationResultsPostResponseFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoEvaluateClassificationResultsPostRequestBody(evaluateClassificationResultsPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { evaluateClassificationResultsPostRequestBody.backingStoreEnabled = true; },
        "classificationResults": n => { evaluateClassificationResultsPostRequestBody.classificationResults = n.getCollectionOfObjectValues(models_1.createClassificationResultFromDiscriminatorValue); },
        "contentInfo": n => { evaluateClassificationResultsPostRequestBody.contentInfo = n.getObjectValue(models_1.createContentInfoFromDiscriminatorValue); },
    };
}
exports.deserializeIntoEvaluateClassificationResultsPostRequestBody = deserializeIntoEvaluateClassificationResultsPostRequestBody;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoEvaluateClassificationResultsPostResponse(evaluateClassificationResultsPostResponse = {}) {
    return Object.assign(Object.assign({}, (0, models_1.deserializeIntoBaseCollectionPaginationCountResponse)(evaluateClassificationResultsPostResponse)), { "value": n => { evaluateClassificationResultsPostResponse.value = n.getCollectionOfObjectValues(models_1.createInformationProtectionActionFromDiscriminatorValue); } });
}
exports.deserializeIntoEvaluateClassificationResultsPostResponse = deserializeIntoEvaluateClassificationResultsPostResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeEvaluateClassificationResultsPostRequestBody(writer, evaluateClassificationResultsPostRequestBody = {}) {
    writer.writeCollectionOfObjectValues("classificationResults", evaluateClassificationResultsPostRequestBody.classificationResults, models_1.serializeClassificationResult);
    writer.writeObjectValue("contentInfo", evaluateClassificationResultsPostRequestBody.contentInfo, models_1.serializeContentInfo);
    writer.writeAdditionalData(evaluateClassificationResultsPostRequestBody.additionalData);
}
exports.serializeEvaluateClassificationResultsPostRequestBody = serializeEvaluateClassificationResultsPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeEvaluateClassificationResultsPostResponse(writer, evaluateClassificationResultsPostResponse = {}) {
    (0, models_1.serializeBaseCollectionPaginationCountResponse)(writer, evaluateClassificationResultsPostResponse);
    writer.writeCollectionOfObjectValues("value", evaluateClassificationResultsPostResponse.value, models_1.serializeInformationProtectionAction);
}
exports.serializeEvaluateClassificationResultsPostResponse = serializeEvaluateClassificationResultsPostResponse;
/**
 * Uri template for the request builder.
 */
exports.EvaluateClassificationResultsRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/informationProtection/policy/labels/evaluateClassificationResults";
/**
 * Metadata for all the requests in the request builder.
 */
exports.EvaluateClassificationResultsRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: exports.EvaluateClassificationResultsRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "send",
        responseBodyFactory: createEvaluateClassificationResultsPostResponseFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeEvaluateClassificationResultsPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
