"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RestoreRequestBuilderRequestsMetadata = exports.RestoreRequestBuilderUriTemplate = exports.serializeRestorePostRequestBody = exports.deserializeIntoRestorePostRequestBody = exports.createRestorePostRequestBodyFromDiscriminatorValue = 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 {RestorePostRequestBody}
 */
function createRestorePostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoRestorePostRequestBody;
}
exports.createRestorePostRequestBodyFromDiscriminatorValue = createRestorePostRequestBodyFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
function deserializeIntoRestorePostRequestBody(restorePostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { restorePostRequestBody.backingStoreEnabled = true; },
        "cloudPcSnapshotId": n => { restorePostRequestBody.cloudPcSnapshotId = n.getStringValue(); },
    };
}
exports.deserializeIntoRestorePostRequestBody = deserializeIntoRestorePostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeRestorePostRequestBody(writer, restorePostRequestBody = {}) {
    writer.writeStringValue("cloudPcSnapshotId", restorePostRequestBody.cloudPcSnapshotId);
    writer.writeAdditionalData(restorePostRequestBody.additionalData);
}
exports.serializeRestorePostRequestBody = serializeRestorePostRequestBody;
/**
 * Uri template for the request builder.
 */
exports.RestoreRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/cloudPCs/{cloudPC%2Did}/restore";
/**
 * Metadata for all the requests in the request builder.
 */
exports.RestoreRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: exports.RestoreRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "sendNoResponseContent",
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeRestorePostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
