"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetByIdsRequestBuilderUriTemplate = exports.GetByIdsRequestBuilderRequestsMetadata = exports.serializeGetByIdsPostResponse = exports.serializeGetByIdsPostRequestBody = exports.deserializeIntoGetByIdsPostResponse = exports.deserializeIntoGetByIdsPostRequestBody = exports.createGetByIdsPostResponseFromDiscriminatorValue = exports.createGetByIdsPostRequestBodyFromDiscriminatorValue = 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 a getByIdsPostRequestBody
 */
function createGetByIdsPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoGetByIdsPostRequestBody;
}
exports.createGetByIdsPostRequestBodyFromDiscriminatorValue = createGetByIdsPostRequestBodyFromDiscriminatorValue;
/**
 * 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 a getByIdsPostResponse
 */
function createGetByIdsPostResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoGetByIdsPostResponse;
}
exports.createGetByIdsPostResponseFromDiscriminatorValue = createGetByIdsPostResponseFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoGetByIdsPostRequestBody(getByIdsPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { getByIdsPostRequestBody.backingStoreEnabled = true; },
        "ids": n => { getByIdsPostRequestBody.ids = n.getCollectionOfPrimitiveValues(); },
        "types": n => { getByIdsPostRequestBody.types = n.getCollectionOfPrimitiveValues(); },
    };
}
exports.deserializeIntoGetByIdsPostRequestBody = deserializeIntoGetByIdsPostRequestBody;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoGetByIdsPostResponse(getByIdsPostResponse = {}) {
    return Object.assign(Object.assign({}, (0, models_1.deserializeIntoBaseCollectionPaginationCountResponse)(getByIdsPostResponse)), { "value": n => { getByIdsPostResponse.value = n.getCollectionOfObjectValues(models_1.createDirectoryObjectFromDiscriminatorValue); } });
}
exports.deserializeIntoGetByIdsPostResponse = deserializeIntoGetByIdsPostResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeGetByIdsPostRequestBody(writer, getByIdsPostRequestBody = {}) {
    writer.writeCollectionOfPrimitiveValues("ids", getByIdsPostRequestBody.ids);
    writer.writeCollectionOfPrimitiveValues("types", getByIdsPostRequestBody.types);
    writer.writeAdditionalData(getByIdsPostRequestBody.additionalData);
}
exports.serializeGetByIdsPostRequestBody = serializeGetByIdsPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeGetByIdsPostResponse(writer, getByIdsPostResponse = {}) {
    (0, models_1.serializeBaseCollectionPaginationCountResponse)(writer, getByIdsPostResponse);
    writer.writeCollectionOfObjectValues("value", getByIdsPostResponse.value, models_1.serializeDirectoryObject);
}
exports.serializeGetByIdsPostResponse = serializeGetByIdsPostResponse;
/**
 * Metadata for all the requests in the request builder.
 */
exports.GetByIdsRequestBuilderRequestsMetadata = {
    post: {
        responseBodyContentType: "application/json",
        errorMappings: {
            _4XX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
            _5XX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "sendAsync",
        responseBodyFactory: createGetByIdsPostResponseFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeGetByIdsPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/**
 * Uri template for the request builder.
 */
exports.GetByIdsRequestBuilderUriTemplate = "{+baseurl}/users/getByIds";
/* tslint:enable */
/* eslint-enable */
