"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EvaluateApplicationRequestBuilderRequestsMetadata = exports.EvaluateApplicationRequestBuilderUriTemplate = exports.serializeEvaluateApplicationPostResponse = exports.serializeEvaluateApplicationPostRequestBody = exports.deserializeIntoEvaluateApplicationPostResponse = exports.deserializeIntoEvaluateApplicationPostRequestBody = exports.createEvaluateApplicationPostResponseFromDiscriminatorValue = exports.createEvaluateApplicationPostRequestBodyFromDiscriminatorValue = 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 {EvaluateApplicationPostRequestBody}
 */
function createEvaluateApplicationPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoEvaluateApplicationPostRequestBody;
}
exports.createEvaluateApplicationPostRequestBodyFromDiscriminatorValue = createEvaluateApplicationPostRequestBodyFromDiscriminatorValue;
/**
 * 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 {EvaluateApplicationPostResponse}
 */
function createEvaluateApplicationPostResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoEvaluateApplicationPostResponse;
}
exports.createEvaluateApplicationPostResponseFromDiscriminatorValue = createEvaluateApplicationPostResponseFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoEvaluateApplicationPostRequestBody(evaluateApplicationPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { evaluateApplicationPostRequestBody.backingStoreEnabled = true; },
        "contentInfo": n => { evaluateApplicationPostRequestBody.contentInfo = n.getObjectValue(models_1.createContentInfoFromDiscriminatorValue); },
        "labelingOptions": n => { evaluateApplicationPostRequestBody.labelingOptions = n.getObjectValue(models_1.createLabelingOptionsFromDiscriminatorValue); },
    };
}
exports.deserializeIntoEvaluateApplicationPostRequestBody = deserializeIntoEvaluateApplicationPostRequestBody;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoEvaluateApplicationPostResponse(evaluateApplicationPostResponse = {}) {
    return Object.assign(Object.assign({}, (0, models_1.deserializeIntoBaseCollectionPaginationCountResponse)(evaluateApplicationPostResponse)), { "value": n => { evaluateApplicationPostResponse.value = n.getCollectionOfObjectValues(models_1.createInformationProtectionActionFromDiscriminatorValue); } });
}
exports.deserializeIntoEvaluateApplicationPostResponse = deserializeIntoEvaluateApplicationPostResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeEvaluateApplicationPostRequestBody(writer, evaluateApplicationPostRequestBody = {}) {
    writer.writeObjectValue("contentInfo", evaluateApplicationPostRequestBody.contentInfo, models_1.serializeContentInfo);
    writer.writeObjectValue("labelingOptions", evaluateApplicationPostRequestBody.labelingOptions, models_1.serializeLabelingOptions);
    writer.writeAdditionalData(evaluateApplicationPostRequestBody.additionalData);
}
exports.serializeEvaluateApplicationPostRequestBody = serializeEvaluateApplicationPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeEvaluateApplicationPostResponse(writer, evaluateApplicationPostResponse = {}) {
    (0, models_1.serializeBaseCollectionPaginationCountResponse)(writer, evaluateApplicationPostResponse);
    writer.writeCollectionOfObjectValues("value", evaluateApplicationPostResponse.value, models_1.serializeInformationProtectionAction);
}
exports.serializeEvaluateApplicationPostResponse = serializeEvaluateApplicationPostResponse;
/**
 * Uri template for the request builder.
 */
exports.EvaluateApplicationRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/informationProtection/policy/labels/evaluateApplication";
/**
 * Metadata for all the requests in the request builder.
 */
exports.EvaluateApplicationRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: exports.EvaluateApplicationRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "send",
        responseBodyFactory: createEvaluateApplicationPostResponseFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeEvaluateApplicationPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
