"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BulkResizeRequestBuilderUriTemplate = exports.BulkResizeRequestBuilderRequestsMetadata = exports.serializeBulkResizePostResponse = exports.serializeBulkResizePostRequestBody = exports.deserializeIntoBulkResizePostResponse = exports.deserializeIntoBulkResizePostRequestBody = exports.createBulkResizePostResponseFromDiscriminatorValue = exports.createBulkResizePostRequestBodyFromDiscriminatorValue = 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 a bulkResizePostRequestBody
 */
function createBulkResizePostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoBulkResizePostRequestBody;
}
exports.createBulkResizePostRequestBodyFromDiscriminatorValue = createBulkResizePostRequestBodyFromDiscriminatorValue;
/**
 * 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 a bulkResizePostResponse
 */
function createBulkResizePostResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoBulkResizePostResponse;
}
exports.createBulkResizePostResponseFromDiscriminatorValue = createBulkResizePostResponseFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoBulkResizePostRequestBody(bulkResizePostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { bulkResizePostRequestBody.backingStoreEnabled = true; },
        "cloudPcIds": n => { bulkResizePostRequestBody.cloudPcIds = n.getCollectionOfPrimitiveValues(); },
        "targetServicePlanId": n => { bulkResizePostRequestBody.targetServicePlanId = n.getStringValue(); },
    };
}
exports.deserializeIntoBulkResizePostRequestBody = deserializeIntoBulkResizePostRequestBody;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoBulkResizePostResponse(bulkResizePostResponse = {}) {
    return Object.assign(Object.assign({}, (0, models_1.deserializeIntoBaseCollectionPaginationCountResponse)(bulkResizePostResponse)), { "value": n => { bulkResizePostResponse.value = n.getCollectionOfObjectValues(models_1.createCloudPcRemoteActionResultFromDiscriminatorValue); } });
}
exports.deserializeIntoBulkResizePostResponse = deserializeIntoBulkResizePostResponse;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeBulkResizePostRequestBody(writer, bulkResizePostRequestBody = {}) {
    writer.writeCollectionOfPrimitiveValues("cloudPcIds", bulkResizePostRequestBody.cloudPcIds);
    writer.writeStringValue("targetServicePlanId", bulkResizePostRequestBody.targetServicePlanId);
    writer.writeAdditionalData(bulkResizePostRequestBody.additionalData);
}
exports.serializeBulkResizePostRequestBody = serializeBulkResizePostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeBulkResizePostResponse(writer, bulkResizePostResponse = {}) {
    (0, models_1.serializeBaseCollectionPaginationCountResponse)(writer, bulkResizePostResponse);
    writer.writeCollectionOfObjectValues("value", bulkResizePostResponse.value, models_1.serializeCloudPcRemoteActionResult);
}
exports.serializeBulkResizePostResponse = serializeBulkResizePostResponse;
/**
 * Metadata for all the requests in the request builder.
 */
exports.BulkResizeRequestBuilderRequestsMetadata = {
    post: {
        responseBodyContentType: "application/json",
        errorMappings: {
            _4XX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
            _5XX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "sendAsync",
        responseBodyFactory: createBulkResizePostResponseFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeBulkResizePostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/**
 * Uri template for the request builder.
 */
exports.BulkResizeRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/cloudPCs/bulkResize";
/* tslint:enable */
/* eslint-enable */
