"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CheckMemberObjectsRequestBuilderRequestsMetadata = exports.CheckMemberObjectsRequestBuilderUriTemplate = exports.serializeCheckMemberObjectsPostResponse = exports.serializeCheckMemberObjectsPostRequestBody = exports.deserializeIntoCheckMemberObjectsPostResponse = exports.deserializeIntoCheckMemberObjectsPostRequestBody = exports.createCheckMemberObjectsPostResponseFromDiscriminatorValue = exports.createCheckMemberObjectsPostRequestBodyFromDiscriminatorValue = 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 {CheckMemberObjectsPostRequestBody}
 */
function createCheckMemberObjectsPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoCheckMemberObjectsPostRequestBody;
}
exports.createCheckMemberObjectsPostRequestBodyFromDiscriminatorValue = createCheckMemberObjectsPostRequestBodyFromDiscriminatorValue;
/**
 * 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 {CheckMemberObjectsPostResponse}
 */
function createCheckMemberObjectsPostResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoCheckMemberObjectsPostResponse;
}
exports.createCheckMemberObjectsPostResponseFromDiscriminatorValue = createCheckMemberObjectsPostResponseFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoCheckMemberObjectsPostRequestBody(checkMemberObjectsPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { checkMemberObjectsPostRequestBody.backingStoreEnabled = true; },
        "ids": n => { checkMemberObjectsPostRequestBody.ids = n.getCollectionOfPrimitiveValues(); },
    };
}
exports.deserializeIntoCheckMemberObjectsPostRequestBody = deserializeIntoCheckMemberObjectsPostRequestBody;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoCheckMemberObjectsPostResponse(checkMemberObjectsPostResponse = {}) {
    return Object.assign(Object.assign({}, (0, models_1.deserializeIntoBaseCollectionPaginationCountResponse)(checkMemberObjectsPostResponse)), { "value": n => { checkMemberObjectsPostResponse.value = n.getCollectionOfPrimitiveValues(); } });
}
exports.deserializeIntoCheckMemberObjectsPostResponse = deserializeIntoCheckMemberObjectsPostResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeCheckMemberObjectsPostRequestBody(writer, checkMemberObjectsPostRequestBody = {}) {
    writer.writeCollectionOfPrimitiveValues("ids", checkMemberObjectsPostRequestBody.ids);
    writer.writeAdditionalData(checkMemberObjectsPostRequestBody.additionalData);
}
exports.serializeCheckMemberObjectsPostRequestBody = serializeCheckMemberObjectsPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeCheckMemberObjectsPostResponse(writer, checkMemberObjectsPostResponse = {}) {
    (0, models_1.serializeBaseCollectionPaginationCountResponse)(writer, checkMemberObjectsPostResponse);
    writer.writeCollectionOfPrimitiveValues("value", checkMemberObjectsPostResponse.value);
}
exports.serializeCheckMemberObjectsPostResponse = serializeCheckMemberObjectsPostResponse;
/**
 * Uri template for the request builder.
 */
exports.CheckMemberObjectsRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/checkMemberObjects";
/**
 * Metadata for all the requests in the request builder.
 */
exports.CheckMemberObjectsRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: exports.CheckMemberObjectsRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "send",
        responseBodyFactory: createCheckMemberObjectsPostResponseFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeCheckMemberObjectsPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
