"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RemoveRequestBuilderRequestsMetadata = exports.RemoveRequestBuilderUriTemplate = exports.serializeRemovePostResponse = exports.serializeRemovePostRequestBody = exports.deserializeIntoRemovePostResponse = exports.deserializeIntoRemovePostRequestBody = exports.createRemovePostResponseFromDiscriminatorValue = exports.createRemovePostRequestBodyFromDiscriminatorValue = 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 {RemovePostRequestBody}
 */
function createRemovePostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoRemovePostRequestBody;
}
exports.createRemovePostRequestBodyFromDiscriminatorValue = createRemovePostRequestBodyFromDiscriminatorValue;
/**
 * 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 {RemovePostResponse}
 */
function createRemovePostResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoRemovePostResponse;
}
exports.createRemovePostResponseFromDiscriminatorValue = createRemovePostResponseFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoRemovePostRequestBody(removePostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { removePostRequestBody.backingStoreEnabled = true; },
        "value": n => { removePostRequestBody.value = n.getCollectionOfObjectValues(models_1.createSiteFromDiscriminatorValue); },
    };
}
exports.deserializeIntoRemovePostRequestBody = deserializeIntoRemovePostRequestBody;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoRemovePostResponse(removePostResponse = {}) {
    return Object.assign(Object.assign({}, (0, models_1.deserializeIntoBaseCollectionPaginationCountResponse)(removePostResponse)), { "value": n => { removePostResponse.value = n.getCollectionOfObjectValues(models_1.createSiteFromDiscriminatorValue); } });
}
exports.deserializeIntoRemovePostResponse = deserializeIntoRemovePostResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeRemovePostRequestBody(writer, removePostRequestBody = {}) {
    writer.writeCollectionOfObjectValues("value", removePostRequestBody.value, models_1.serializeSite);
    writer.writeAdditionalData(removePostRequestBody.additionalData);
}
exports.serializeRemovePostRequestBody = serializeRemovePostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeRemovePostResponse(writer, removePostResponse = {}) {
    (0, models_1.serializeBaseCollectionPaginationCountResponse)(writer, removePostResponse);
    writer.writeCollectionOfObjectValues("value", removePostResponse.value, models_1.serializeSite);
}
exports.serializeRemovePostResponse = serializeRemovePostResponse;
/**
 * Uri template for the request builder.
 */
exports.RemoveRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/followedSites/remove";
/**
 * Metadata for all the requests in the request builder.
 */
exports.RemoveRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: exports.RemoveRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "send",
        responseBodyFactory: createRemovePostResponseFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeRemovePostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
