"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConvertExternalToInternalMemberUserRequestBuilderRequestsMetadata = exports.ConvertExternalToInternalMemberUserRequestBuilderUriTemplate = exports.serializeConvertExternalToInternalMemberUserPostRequestBody = exports.deserializeIntoConvertExternalToInternalMemberUserPostRequestBody = exports.createConvertExternalToInternalMemberUserPostRequestBodyFromDiscriminatorValue = 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 {ConvertExternalToInternalMemberUserPostRequestBody}
 */
function createConvertExternalToInternalMemberUserPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoConvertExternalToInternalMemberUserPostRequestBody;
}
exports.createConvertExternalToInternalMemberUserPostRequestBodyFromDiscriminatorValue = createConvertExternalToInternalMemberUserPostRequestBodyFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoConvertExternalToInternalMemberUserPostRequestBody(convertExternalToInternalMemberUserPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { convertExternalToInternalMemberUserPostRequestBody.backingStoreEnabled = true; },
        "mail": n => { convertExternalToInternalMemberUserPostRequestBody.mail = n.getStringValue(); },
        "passwordProfile": n => { convertExternalToInternalMemberUserPostRequestBody.passwordProfile = n.getObjectValue(models_1.createPasswordProfileFromDiscriminatorValue); },
        "userPrincipalName": n => { convertExternalToInternalMemberUserPostRequestBody.userPrincipalName = n.getStringValue(); },
    };
}
exports.deserializeIntoConvertExternalToInternalMemberUserPostRequestBody = deserializeIntoConvertExternalToInternalMemberUserPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeConvertExternalToInternalMemberUserPostRequestBody(writer, convertExternalToInternalMemberUserPostRequestBody = {}) {
    writer.writeStringValue("mail", convertExternalToInternalMemberUserPostRequestBody.mail);
    writer.writeObjectValue("passwordProfile", convertExternalToInternalMemberUserPostRequestBody.passwordProfile, models_1.serializePasswordProfile);
    writer.writeStringValue("userPrincipalName", convertExternalToInternalMemberUserPostRequestBody.userPrincipalName);
    writer.writeAdditionalData(convertExternalToInternalMemberUserPostRequestBody.additionalData);
}
exports.serializeConvertExternalToInternalMemberUserPostRequestBody = serializeConvertExternalToInternalMemberUserPostRequestBody;
/**
 * Uri template for the request builder.
 */
exports.ConvertExternalToInternalMemberUserRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/convertExternalToInternalMemberUser";
/**
 * Metadata for all the requests in the request builder.
 */
exports.ConvertExternalToInternalMemberUserRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: exports.ConvertExternalToInternalMemberUserRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "send",
        responseBodyFactory: models_1.createConversionUserDetailsFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeConvertExternalToInternalMemberUserPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
