"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetMemberGroupsRequestBuilderRequestsMetadata = exports.GetMemberGroupsRequestBuilderUriTemplate = exports.serializeGetMemberGroupsPostResponse = exports.serializeGetMemberGroupsPostRequestBody = exports.deserializeIntoGetMemberGroupsPostResponse = exports.deserializeIntoGetMemberGroupsPostRequestBody = exports.createGetMemberGroupsPostResponseFromDiscriminatorValue = exports.createGetMemberGroupsPostRequestBodyFromDiscriminatorValue = 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 {GetMemberGroupsPostRequestBody}
 */
function createGetMemberGroupsPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoGetMemberGroupsPostRequestBody;
}
exports.createGetMemberGroupsPostRequestBodyFromDiscriminatorValue = createGetMemberGroupsPostRequestBodyFromDiscriminatorValue;
/**
 * 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 {GetMemberGroupsPostResponse}
 */
function createGetMemberGroupsPostResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoGetMemberGroupsPostResponse;
}
exports.createGetMemberGroupsPostResponseFromDiscriminatorValue = createGetMemberGroupsPostResponseFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoGetMemberGroupsPostRequestBody(getMemberGroupsPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { getMemberGroupsPostRequestBody.backingStoreEnabled = true; },
        "securityEnabledOnly": n => { getMemberGroupsPostRequestBody.securityEnabledOnly = n.getBooleanValue(); },
    };
}
exports.deserializeIntoGetMemberGroupsPostRequestBody = deserializeIntoGetMemberGroupsPostRequestBody;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoGetMemberGroupsPostResponse(getMemberGroupsPostResponse = {}) {
    return Object.assign(Object.assign({}, (0, models_1.deserializeIntoBaseCollectionPaginationCountResponse)(getMemberGroupsPostResponse)), { "value": n => { getMemberGroupsPostResponse.value = n.getCollectionOfPrimitiveValues(); } });
}
exports.deserializeIntoGetMemberGroupsPostResponse = deserializeIntoGetMemberGroupsPostResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeGetMemberGroupsPostRequestBody(writer, getMemberGroupsPostRequestBody = {}) {
    writer.writeBooleanValue("securityEnabledOnly", getMemberGroupsPostRequestBody.securityEnabledOnly);
    writer.writeAdditionalData(getMemberGroupsPostRequestBody.additionalData);
}
exports.serializeGetMemberGroupsPostRequestBody = serializeGetMemberGroupsPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeGetMemberGroupsPostResponse(writer, getMemberGroupsPostResponse = {}) {
    (0, models_1.serializeBaseCollectionPaginationCountResponse)(writer, getMemberGroupsPostResponse);
    writer.writeCollectionOfPrimitiveValues("value", getMemberGroupsPostResponse.value);
}
exports.serializeGetMemberGroupsPostResponse = serializeGetMemberGroupsPostResponse;
/**
 * Uri template for the request builder.
 */
exports.GetMemberGroupsRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/getMemberGroups";
/**
 * Metadata for all the requests in the request builder.
 */
exports.GetMemberGroupsRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: exports.GetMemberGroupsRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "send",
        responseBodyFactory: createGetMemberGroupsPostResponseFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeGetMemberGroupsPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
