"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CreateEnrollmentNotificationConfigurationRequestBuilderRequestsMetadata = exports.CreateEnrollmentNotificationConfigurationRequestBuilderUriTemplate = exports.serializeCreateEnrollmentNotificationConfigurationPostRequestBody = exports.deserializeIntoCreateEnrollmentNotificationConfigurationPostRequestBody = exports.createCreateEnrollmentNotificationConfigurationPostRequestBodyFromDiscriminatorValue = 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 {CreateEnrollmentNotificationConfigurationPostRequestBody}
 */
function createCreateEnrollmentNotificationConfigurationPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoCreateEnrollmentNotificationConfigurationPostRequestBody;
}
exports.createCreateEnrollmentNotificationConfigurationPostRequestBodyFromDiscriminatorValue = createCreateEnrollmentNotificationConfigurationPostRequestBodyFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoCreateEnrollmentNotificationConfigurationPostRequestBody(createEnrollmentNotificationConfigurationPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { createEnrollmentNotificationConfigurationPostRequestBody.backingStoreEnabled = true; },
        "deviceEnrollmentNotificationConfigurations": n => { createEnrollmentNotificationConfigurationPostRequestBody.deviceEnrollmentNotificationConfigurations = n.getCollectionOfObjectValues(models_1.createDeviceEnrollmentConfigurationFromDiscriminatorValue); },
    };
}
exports.deserializeIntoCreateEnrollmentNotificationConfigurationPostRequestBody = deserializeIntoCreateEnrollmentNotificationConfigurationPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeCreateEnrollmentNotificationConfigurationPostRequestBody(writer, createEnrollmentNotificationConfigurationPostRequestBody = {}) {
    writer.writeCollectionOfObjectValues("deviceEnrollmentNotificationConfigurations", createEnrollmentNotificationConfigurationPostRequestBody.deviceEnrollmentNotificationConfigurations, models_1.serializeDeviceEnrollmentConfiguration);
    writer.writeAdditionalData(createEnrollmentNotificationConfigurationPostRequestBody.additionalData);
}
exports.serializeCreateEnrollmentNotificationConfigurationPostRequestBody = serializeCreateEnrollmentNotificationConfigurationPostRequestBody;
/**
 * Uri template for the request builder.
 */
exports.CreateEnrollmentNotificationConfigurationRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/deviceEnrollmentConfigurations/createEnrollmentNotificationConfiguration";
/**
 * Metadata for all the requests in the request builder.
 */
exports.CreateEnrollmentNotificationConfigurationRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: exports.CreateEnrollmentNotificationConfigurationRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "sendNoResponseContent",
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeCreateEnrollmentNotificationConfigurationPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
