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