"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetMemberObjectsRequestBuilderRequestsMetadata = exports.GetMemberObjectsRequestBuilderUriTemplate = exports.serializeGetMemberObjectsPostResponse = exports.serializeGetMemberObjectsPostRequestBody = exports.deserializeIntoGetMemberObjectsPostResponse = exports.deserializeIntoGetMemberObjectsPostRequestBody = exports.createGetMemberObjectsPostResponseFromDiscriminatorValue = exports.createGetMemberObjectsPostRequestBodyFromDiscriminatorValue = 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 {GetMemberObjectsPostRequestBody}
 */
function createGetMemberObjectsPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoGetMemberObjectsPostRequestBody;
}
exports.createGetMemberObjectsPostRequestBodyFromDiscriminatorValue = createGetMemberObjectsPostRequestBodyFromDiscriminatorValue;
/**
 * 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 {GetMemberObjectsPostResponse}
 */
function createGetMemberObjectsPostResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoGetMemberObjectsPostResponse;
}
exports.createGetMemberObjectsPostResponseFromDiscriminatorValue = createGetMemberObjectsPostResponseFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoGetMemberObjectsPostRequestBody(getMemberObjectsPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { getMemberObjectsPostRequestBody.backingStoreEnabled = true; },
        "securityEnabledOnly": n => { getMemberObjectsPostRequestBody.securityEnabledOnly = n.getBooleanValue(); },
    };
}
exports.deserializeIntoGetMemberObjectsPostRequestBody = deserializeIntoGetMemberObjectsPostRequestBody;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoGetMemberObjectsPostResponse(getMemberObjectsPostResponse = {}) {
    return Object.assign(Object.assign({}, (0, models_1.deserializeIntoBaseCollectionPaginationCountResponse)(getMemberObjectsPostResponse)), { "value": n => { getMemberObjectsPostResponse.value = n.getCollectionOfPrimitiveValues(); } });
}
exports.deserializeIntoGetMemberObjectsPostResponse = deserializeIntoGetMemberObjectsPostResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeGetMemberObjectsPostRequestBody(writer, getMemberObjectsPostRequestBody = {}) {
    writer.writeBooleanValue("securityEnabledOnly", getMemberObjectsPostRequestBody.securityEnabledOnly);
    writer.writeAdditionalData(getMemberObjectsPostRequestBody.additionalData);
}
exports.serializeGetMemberObjectsPostRequestBody = serializeGetMemberObjectsPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeGetMemberObjectsPostResponse(writer, getMemberObjectsPostResponse = {}) {
    (0, models_1.serializeBaseCollectionPaginationCountResponse)(writer, getMemberObjectsPostResponse);
    writer.writeCollectionOfPrimitiveValues("value", getMemberObjectsPostResponse.value);
}
exports.serializeGetMemberObjectsPostResponse = serializeGetMemberObjectsPostResponse;
/**
 * Uri template for the request builder.
 */
exports.GetMemberObjectsRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/getMemberObjects";
/**
 * Metadata for all the requests in the request builder.
 */
exports.GetMemberObjectsRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: exports.GetMemberObjectsRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "send",
        responseBodyFactory: createGetMemberObjectsPostResponseFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeGetMemberObjectsPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
