"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CheckMemberGroupsRequestBuilderUriTemplate = exports.CheckMemberGroupsRequestBuilderRequestsMetadata = exports.serializeCheckMemberGroupsPostResponse = exports.serializeCheckMemberGroupsPostRequestBody = exports.deserializeIntoCheckMemberGroupsPostResponse = exports.deserializeIntoCheckMemberGroupsPostRequestBody = exports.createCheckMemberGroupsPostResponseFromDiscriminatorValue = exports.createCheckMemberGroupsPostRequestBodyFromDiscriminatorValue = 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 checkMemberGroupsPostRequestBody
 */
function createCheckMemberGroupsPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoCheckMemberGroupsPostRequestBody;
}
exports.createCheckMemberGroupsPostRequestBodyFromDiscriminatorValue = createCheckMemberGroupsPostRequestBodyFromDiscriminatorValue;
/**
 * 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 checkMemberGroupsPostResponse
 */
function createCheckMemberGroupsPostResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoCheckMemberGroupsPostResponse;
}
exports.createCheckMemberGroupsPostResponseFromDiscriminatorValue = createCheckMemberGroupsPostResponseFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoCheckMemberGroupsPostRequestBody(checkMemberGroupsPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { checkMemberGroupsPostRequestBody.backingStoreEnabled = true; },
        "groupIds": n => { checkMemberGroupsPostRequestBody.groupIds = n.getCollectionOfPrimitiveValues(); },
    };
}
exports.deserializeIntoCheckMemberGroupsPostRequestBody = deserializeIntoCheckMemberGroupsPostRequestBody;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoCheckMemberGroupsPostResponse(checkMemberGroupsPostResponse = {}) {
    return Object.assign(Object.assign({}, (0, models_1.deserializeIntoBaseCollectionPaginationCountResponse)(checkMemberGroupsPostResponse)), { "value": n => { checkMemberGroupsPostResponse.value = n.getCollectionOfPrimitiveValues(); } });
}
exports.deserializeIntoCheckMemberGroupsPostResponse = deserializeIntoCheckMemberGroupsPostResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeCheckMemberGroupsPostRequestBody(writer, checkMemberGroupsPostRequestBody = {}) {
    writer.writeCollectionOfPrimitiveValues("groupIds", checkMemberGroupsPostRequestBody.groupIds);
    writer.writeAdditionalData(checkMemberGroupsPostRequestBody.additionalData);
}
exports.serializeCheckMemberGroupsPostRequestBody = serializeCheckMemberGroupsPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeCheckMemberGroupsPostResponse(writer, checkMemberGroupsPostResponse = {}) {
    (0, models_1.serializeBaseCollectionPaginationCountResponse)(writer, checkMemberGroupsPostResponse);
    writer.writeCollectionOfPrimitiveValues("value", checkMemberGroupsPostResponse.value);
}
exports.serializeCheckMemberGroupsPostResponse = serializeCheckMemberGroupsPostResponse;
/**
 * Metadata for all the requests in the request builder.
 */
exports.CheckMemberGroupsRequestBuilderRequestsMetadata = {
    post: {
        responseBodyContentType: "application/json",
        errorMappings: {
            _4XX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
            _5XX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "sendAsync",
        responseBodyFactory: createCheckMemberGroupsPostResponseFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeCheckMemberGroupsPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/**
 * Uri template for the request builder.
 */
exports.CheckMemberGroupsRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/checkMemberGroups";
/* tslint:enable */
/* eslint-enable */
