"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TranslateExchangeIdsRequestBuilderRequestsMetadata = exports.TranslateExchangeIdsRequestBuilderUriTemplate = exports.serializeTranslateExchangeIdsPostResponse = exports.serializeTranslateExchangeIdsPostRequestBody = exports.deserializeIntoTranslateExchangeIdsPostResponse = exports.deserializeIntoTranslateExchangeIdsPostRequestBody = exports.createTranslateExchangeIdsPostResponseFromDiscriminatorValue = exports.createTranslateExchangeIdsPostRequestBodyFromDiscriminatorValue = 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 {TranslateExchangeIdsPostRequestBody}
 */
function createTranslateExchangeIdsPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoTranslateExchangeIdsPostRequestBody;
}
exports.createTranslateExchangeIdsPostRequestBodyFromDiscriminatorValue = createTranslateExchangeIdsPostRequestBodyFromDiscriminatorValue;
/**
 * 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 {TranslateExchangeIdsPostResponse}
 */
function createTranslateExchangeIdsPostResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoTranslateExchangeIdsPostResponse;
}
exports.createTranslateExchangeIdsPostResponseFromDiscriminatorValue = createTranslateExchangeIdsPostResponseFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoTranslateExchangeIdsPostRequestBody(translateExchangeIdsPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { translateExchangeIdsPostRequestBody.backingStoreEnabled = true; },
        "inputIds": n => { translateExchangeIdsPostRequestBody.inputIds = n.getCollectionOfPrimitiveValues(); },
        "sourceIdType": n => { translateExchangeIdsPostRequestBody.sourceIdType = n.getEnumValue(models_1.ExchangeIdFormatObject); },
        "targetIdType": n => { translateExchangeIdsPostRequestBody.targetIdType = n.getEnumValue(models_1.ExchangeIdFormatObject); },
    };
}
exports.deserializeIntoTranslateExchangeIdsPostRequestBody = deserializeIntoTranslateExchangeIdsPostRequestBody;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoTranslateExchangeIdsPostResponse(translateExchangeIdsPostResponse = {}) {
    return Object.assign(Object.assign({}, (0, models_1.deserializeIntoBaseCollectionPaginationCountResponse)(translateExchangeIdsPostResponse)), { "value": n => { translateExchangeIdsPostResponse.value = n.getCollectionOfObjectValues(models_1.createConvertIdResultFromDiscriminatorValue); } });
}
exports.deserializeIntoTranslateExchangeIdsPostResponse = deserializeIntoTranslateExchangeIdsPostResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeTranslateExchangeIdsPostRequestBody(writer, translateExchangeIdsPostRequestBody = {}) {
    writer.writeCollectionOfPrimitiveValues("InputIds", translateExchangeIdsPostRequestBody.inputIds);
    writer.writeEnumValue("SourceIdType", translateExchangeIdsPostRequestBody.sourceIdType);
    writer.writeEnumValue("TargetIdType", translateExchangeIdsPostRequestBody.targetIdType);
    writer.writeAdditionalData(translateExchangeIdsPostRequestBody.additionalData);
}
exports.serializeTranslateExchangeIdsPostRequestBody = serializeTranslateExchangeIdsPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeTranslateExchangeIdsPostResponse(writer, translateExchangeIdsPostResponse = {}) {
    (0, models_1.serializeBaseCollectionPaginationCountResponse)(writer, translateExchangeIdsPostResponse);
    writer.writeCollectionOfObjectValues("value", translateExchangeIdsPostResponse.value, models_1.serializeConvertIdResult);
}
exports.serializeTranslateExchangeIdsPostResponse = serializeTranslateExchangeIdsPostResponse;
/**
 * Uri template for the request builder.
 */
exports.TranslateExchangeIdsRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/translateExchangeIds";
/**
 * Metadata for all the requests in the request builder.
 */
exports.TranslateExchangeIdsRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: exports.TranslateExchangeIdsRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "send",
        responseBodyFactory: createTranslateExchangeIdsPostResponseFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeTranslateExchangeIdsPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
