"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RecordAllDecisionsRequestBuilderRequestsMetadata = exports.RecordAllDecisionsRequestBuilderUriTemplate = exports.serializeRecordAllDecisionsPostRequestBody = exports.deserializeIntoRecordAllDecisionsPostRequestBody = exports.createRecordAllDecisionsPostRequestBodyFromDiscriminatorValue = void 0;
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
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 {RecordAllDecisionsPostRequestBody}
 */
function createRecordAllDecisionsPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoRecordAllDecisionsPostRequestBody;
}
exports.createRecordAllDecisionsPostRequestBodyFromDiscriminatorValue = createRecordAllDecisionsPostRequestBodyFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoRecordAllDecisionsPostRequestBody(recordAllDecisionsPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { recordAllDecisionsPostRequestBody.backingStoreEnabled = true; },
        "decision": n => { recordAllDecisionsPostRequestBody.decision = n.getStringValue(); },
        "justification": n => { recordAllDecisionsPostRequestBody.justification = n.getStringValue(); },
        "principalId": n => { recordAllDecisionsPostRequestBody.principalId = n.getStringValue(); },
        "resourceId": n => { recordAllDecisionsPostRequestBody.resourceId = n.getStringValue(); },
    };
}
exports.deserializeIntoRecordAllDecisionsPostRequestBody = deserializeIntoRecordAllDecisionsPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeRecordAllDecisionsPostRequestBody(writer, recordAllDecisionsPostRequestBody = {}) {
    writer.writeStringValue("decision", recordAllDecisionsPostRequestBody.decision);
    writer.writeStringValue("justification", recordAllDecisionsPostRequestBody.justification);
    writer.writeStringValue("principalId", recordAllDecisionsPostRequestBody.principalId);
    writer.writeStringValue("resourceId", recordAllDecisionsPostRequestBody.resourceId);
    writer.writeAdditionalData(recordAllDecisionsPostRequestBody.additionalData);
}
exports.serializeRecordAllDecisionsPostRequestBody = serializeRecordAllDecisionsPostRequestBody;
/**
 * Uri template for the request builder.
 */
exports.RecordAllDecisionsRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/pendingAccessReviewInstances/{accessReviewInstance%2Did}/stages/{accessReviewStage%2Did}/decisions/{accessReviewInstanceDecisionItem%2Did}/instance/decisions/recordAllDecisions";
/**
 * Metadata for all the requests in the request builder.
 */
exports.RecordAllDecisionsRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: exports.RecordAllDecisionsRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "sendNoResponseContent",
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeRecordAllDecisionsPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
