"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
Object.defineProperty(exports, "__esModule", { value: true });
exports.OperationArrayExpansionPersistence = void 0;
const internal_1 = require("../../../internal");
const OperationBasePersistence_1 = require("./OperationBasePersistence");
/**
 * Operation ArrayExpansion persistence
 */
class OperationArrayExpansionPersistence {
    static fromData(ctx, object) {
        if (!object) {
            return undefined;
        }
        const arrayExpansionOp = OperationBasePersistence_1.OperationBasePersistence.fromData(ctx, internal_1.cdmObjectType.operationArrayExpansionDef, object);
        arrayExpansionOp.startOrdinal = object.startOrdinal;
        arrayExpansionOp.endOrdinal = object.endOrdinal;
        return arrayExpansionOp;
    }
    static toData(instance, resOpt, options) {
        if (!instance) {
            return undefined;
        }
        const data = OperationBasePersistence_1.OperationBasePersistence.toData(instance, resOpt, options);
        data.startOrdinal = instance.startOrdinal;
        data.endOrdinal = instance.endOrdinal;
        return data;
    }
}
exports.OperationArrayExpansionPersistence = OperationArrayExpansionPersistence;
//# sourceMappingURL=OperationArrayExpansionPersistence.js.map