1/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
2import * as $protobuf from "protobufjs/minimal";
3
4// Common aliases
5const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
6
7// Exported root namespace
8const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
9
10export const chromeos_update_engine = $root.chromeos_update_engine = (() => {
11
12    /**
13     * Namespace chromeos_update_engine.
14     * @exports chromeos_update_engine
15     * @namespace
16     */
17    const chromeos_update_engine = {};
18
19    chromeos_update_engine.Extent = (function() {
20
21        /**
22         * Properties of an Extent.
23         * @memberof chromeos_update_engine
24         * @interface IExtent
25         * @property {number|Long|null} [startBlock] Extent startBlock
26         * @property {number|Long|null} [numBlocks] Extent numBlocks
27         */
28
29        /**
30         * Constructs a new Extent.
31         * @memberof chromeos_update_engine
32         * @classdesc Represents an Extent.
33         * @implements IExtent
34         * @constructor
35         * @param {chromeos_update_engine.IExtent=} [properties] Properties to set
36         */
37        function Extent(properties) {
38            if (properties)
39                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
40                    if (properties[keys[i]] != null)
41                        this[keys[i]] = properties[keys[i]];
42        }
43
44        /**
45         * Extent startBlock.
46         * @member {number|Long} startBlock
47         * @memberof chromeos_update_engine.Extent
48         * @instance
49         */
50        Extent.prototype.startBlock = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
51
52        /**
53         * Extent numBlocks.
54         * @member {number|Long} numBlocks
55         * @memberof chromeos_update_engine.Extent
56         * @instance
57         */
58        Extent.prototype.numBlocks = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
59
60        /**
61         * Creates a new Extent instance using the specified properties.
62         * @function create
63         * @memberof chromeos_update_engine.Extent
64         * @static
65         * @param {chromeos_update_engine.IExtent=} [properties] Properties to set
66         * @returns {chromeos_update_engine.Extent} Extent instance
67         */
68        Extent.create = function create(properties) {
69            return new Extent(properties);
70        };
71
72        /**
73         * Encodes the specified Extent message. Does not implicitly {@link chromeos_update_engine.Extent.verify|verify} messages.
74         * @function encode
75         * @memberof chromeos_update_engine.Extent
76         * @static
77         * @param {chromeos_update_engine.IExtent} message Extent message or plain object to encode
78         * @param {$protobuf.Writer} [writer] Writer to encode to
79         * @returns {$protobuf.Writer} Writer
80         */
81        Extent.encode = function encode(message, writer) {
82            if (!writer)
83                writer = $Writer.create();
84            if (message.startBlock != null && Object.hasOwnProperty.call(message, "startBlock"))
85                writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.startBlock);
86            if (message.numBlocks != null && Object.hasOwnProperty.call(message, "numBlocks"))
87                writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.numBlocks);
88            return writer;
89        };
90
91        /**
92         * Encodes the specified Extent message, length delimited. Does not implicitly {@link chromeos_update_engine.Extent.verify|verify} messages.
93         * @function encodeDelimited
94         * @memberof chromeos_update_engine.Extent
95         * @static
96         * @param {chromeos_update_engine.IExtent} message Extent message or plain object to encode
97         * @param {$protobuf.Writer} [writer] Writer to encode to
98         * @returns {$protobuf.Writer} Writer
99         */
100        Extent.encodeDelimited = function encodeDelimited(message, writer) {
101            return this.encode(message, writer).ldelim();
102        };
103
104        /**
105         * Decodes an Extent message from the specified reader or buffer.
106         * @function decode
107         * @memberof chromeos_update_engine.Extent
108         * @static
109         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
110         * @param {number} [length] Message length if known beforehand
111         * @returns {chromeos_update_engine.Extent} Extent
112         * @throws {Error} If the payload is not a reader or valid buffer
113         * @throws {$protobuf.util.ProtocolError} If required fields are missing
114         */
115        Extent.decode = function decode(reader, length) {
116            if (!(reader instanceof $Reader))
117                reader = $Reader.create(reader);
118            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.chromeos_update_engine.Extent();
119            while (reader.pos < end) {
120                let tag = reader.uint32();
121                switch (tag >>> 3) {
122                case 1:
123                    message.startBlock = reader.uint64();
124                    break;
125                case 2:
126                    message.numBlocks = reader.uint64();
127                    break;
128                default:
129                    reader.skipType(tag & 7);
130                    break;
131                }
132            }
133            return message;
134        };
135
136        /**
137         * Decodes an Extent message from the specified reader or buffer, length delimited.
138         * @function decodeDelimited
139         * @memberof chromeos_update_engine.Extent
140         * @static
141         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
142         * @returns {chromeos_update_engine.Extent} Extent
143         * @throws {Error} If the payload is not a reader or valid buffer
144         * @throws {$protobuf.util.ProtocolError} If required fields are missing
145         */
146        Extent.decodeDelimited = function decodeDelimited(reader) {
147            if (!(reader instanceof $Reader))
148                reader = new $Reader(reader);
149            return this.decode(reader, reader.uint32());
150        };
151
152        /**
153         * Verifies an Extent message.
154         * @function verify
155         * @memberof chromeos_update_engine.Extent
156         * @static
157         * @param {Object.<string,*>} message Plain object to verify
158         * @returns {string|null} `null` if valid, otherwise the reason why it is not
159         */
160        Extent.verify = function verify(message) {
161            if (typeof message !== "object" || message === null)
162                return "object expected";
163            if (message.startBlock != null && message.hasOwnProperty("startBlock"))
164                if (!$util.isInteger(message.startBlock) && !(message.startBlock && $util.isInteger(message.startBlock.low) && $util.isInteger(message.startBlock.high)))
165                    return "startBlock: integer|Long expected";
166            if (message.numBlocks != null && message.hasOwnProperty("numBlocks"))
167                if (!$util.isInteger(message.numBlocks) && !(message.numBlocks && $util.isInteger(message.numBlocks.low) && $util.isInteger(message.numBlocks.high)))
168                    return "numBlocks: integer|Long expected";
169            return null;
170        };
171
172        /**
173         * Creates an Extent message from a plain object. Also converts values to their respective internal types.
174         * @function fromObject
175         * @memberof chromeos_update_engine.Extent
176         * @static
177         * @param {Object.<string,*>} object Plain object
178         * @returns {chromeos_update_engine.Extent} Extent
179         */
180        Extent.fromObject = function fromObject(object) {
181            if (object instanceof $root.chromeos_update_engine.Extent)
182                return object;
183            let message = new $root.chromeos_update_engine.Extent();
184            if (object.startBlock != null)
185                if ($util.Long)
186                    (message.startBlock = $util.Long.fromValue(object.startBlock)).unsigned = true;
187                else if (typeof object.startBlock === "string")
188                    message.startBlock = parseInt(object.startBlock, 10);
189                else if (typeof object.startBlock === "number")
190                    message.startBlock = object.startBlock;
191                else if (typeof object.startBlock === "object")
192                    message.startBlock = new $util.LongBits(object.startBlock.low >>> 0, object.startBlock.high >>> 0).toNumber(true);
193            if (object.numBlocks != null)
194                if ($util.Long)
195                    (message.numBlocks = $util.Long.fromValue(object.numBlocks)).unsigned = true;
196                else if (typeof object.numBlocks === "string")
197                    message.numBlocks = parseInt(object.numBlocks, 10);
198                else if (typeof object.numBlocks === "number")
199                    message.numBlocks = object.numBlocks;
200                else if (typeof object.numBlocks === "object")
201                    message.numBlocks = new $util.LongBits(object.numBlocks.low >>> 0, object.numBlocks.high >>> 0).toNumber(true);
202            return message;
203        };
204
205        /**
206         * Creates a plain object from an Extent message. Also converts values to other types if specified.
207         * @function toObject
208         * @memberof chromeos_update_engine.Extent
209         * @static
210         * @param {chromeos_update_engine.Extent} message Extent
211         * @param {$protobuf.IConversionOptions} [options] Conversion options
212         * @returns {Object.<string,*>} Plain object
213         */
214        Extent.toObject = function toObject(message, options) {
215            if (!options)
216                options = {};
217            let object = {};
218            if (options.defaults) {
219                if ($util.Long) {
220                    let long = new $util.Long(0, 0, true);
221                    object.startBlock = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
222                } else
223                    object.startBlock = options.longs === String ? "0" : 0;
224                if ($util.Long) {
225                    let long = new $util.Long(0, 0, true);
226                    object.numBlocks = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
227                } else
228                    object.numBlocks = options.longs === String ? "0" : 0;
229            }
230            if (message.startBlock != null && message.hasOwnProperty("startBlock"))
231                if (typeof message.startBlock === "number")
232                    object.startBlock = options.longs === String ? String(message.startBlock) : message.startBlock;
233                else
234                    object.startBlock = options.longs === String ? $util.Long.prototype.toString.call(message.startBlock) : options.longs === Number ? new $util.LongBits(message.startBlock.low >>> 0, message.startBlock.high >>> 0).toNumber(true) : message.startBlock;
235            if (message.numBlocks != null && message.hasOwnProperty("numBlocks"))
236                if (typeof message.numBlocks === "number")
237                    object.numBlocks = options.longs === String ? String(message.numBlocks) : message.numBlocks;
238                else
239                    object.numBlocks = options.longs === String ? $util.Long.prototype.toString.call(message.numBlocks) : options.longs === Number ? new $util.LongBits(message.numBlocks.low >>> 0, message.numBlocks.high >>> 0).toNumber(true) : message.numBlocks;
240            return object;
241        };
242
243        /**
244         * Converts this Extent to JSON.
245         * @function toJSON
246         * @memberof chromeos_update_engine.Extent
247         * @instance
248         * @returns {Object.<string,*>} JSON object
249         */
250        Extent.prototype.toJSON = function toJSON() {
251            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
252        };
253
254        return Extent;
255    })();
256
257    chromeos_update_engine.Signatures = (function() {
258
259        /**
260         * Properties of a Signatures.
261         * @memberof chromeos_update_engine
262         * @interface ISignatures
263         * @property {Array.<chromeos_update_engine.Signatures.ISignature>|null} [signatures] Signatures signatures
264         */
265
266        /**
267         * Constructs a new Signatures.
268         * @memberof chromeos_update_engine
269         * @classdesc Represents a Signatures.
270         * @implements ISignatures
271         * @constructor
272         * @param {chromeos_update_engine.ISignatures=} [properties] Properties to set
273         */
274        function Signatures(properties) {
275            this.signatures = [];
276            if (properties)
277                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
278                    if (properties[keys[i]] != null)
279                        this[keys[i]] = properties[keys[i]];
280        }
281
282        /**
283         * Signatures signatures.
284         * @member {Array.<chromeos_update_engine.Signatures.ISignature>} signatures
285         * @memberof chromeos_update_engine.Signatures
286         * @instance
287         */
288        Signatures.prototype.signatures = $util.emptyArray;
289
290        /**
291         * Creates a new Signatures instance using the specified properties.
292         * @function create
293         * @memberof chromeos_update_engine.Signatures
294         * @static
295         * @param {chromeos_update_engine.ISignatures=} [properties] Properties to set
296         * @returns {chromeos_update_engine.Signatures} Signatures instance
297         */
298        Signatures.create = function create(properties) {
299            return new Signatures(properties);
300        };
301
302        /**
303         * Encodes the specified Signatures message. Does not implicitly {@link chromeos_update_engine.Signatures.verify|verify} messages.
304         * @function encode
305         * @memberof chromeos_update_engine.Signatures
306         * @static
307         * @param {chromeos_update_engine.ISignatures} message Signatures message or plain object to encode
308         * @param {$protobuf.Writer} [writer] Writer to encode to
309         * @returns {$protobuf.Writer} Writer
310         */
311        Signatures.encode = function encode(message, writer) {
312            if (!writer)
313                writer = $Writer.create();
314            if (message.signatures != null && message.signatures.length)
315                for (let i = 0; i < message.signatures.length; ++i)
316                    $root.chromeos_update_engine.Signatures.Signature.encode(message.signatures[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
317            return writer;
318        };
319
320        /**
321         * Encodes the specified Signatures message, length delimited. Does not implicitly {@link chromeos_update_engine.Signatures.verify|verify} messages.
322         * @function encodeDelimited
323         * @memberof chromeos_update_engine.Signatures
324         * @static
325         * @param {chromeos_update_engine.ISignatures} message Signatures message or plain object to encode
326         * @param {$protobuf.Writer} [writer] Writer to encode to
327         * @returns {$protobuf.Writer} Writer
328         */
329        Signatures.encodeDelimited = function encodeDelimited(message, writer) {
330            return this.encode(message, writer).ldelim();
331        };
332
333        /**
334         * Decodes a Signatures message from the specified reader or buffer.
335         * @function decode
336         * @memberof chromeos_update_engine.Signatures
337         * @static
338         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
339         * @param {number} [length] Message length if known beforehand
340         * @returns {chromeos_update_engine.Signatures} Signatures
341         * @throws {Error} If the payload is not a reader or valid buffer
342         * @throws {$protobuf.util.ProtocolError} If required fields are missing
343         */
344        Signatures.decode = function decode(reader, length) {
345            if (!(reader instanceof $Reader))
346                reader = $Reader.create(reader);
347            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.chromeos_update_engine.Signatures();
348            while (reader.pos < end) {
349                let tag = reader.uint32();
350                switch (tag >>> 3) {
351                case 1:
352                    if (!(message.signatures && message.signatures.length))
353                        message.signatures = [];
354                    message.signatures.push($root.chromeos_update_engine.Signatures.Signature.decode(reader, reader.uint32()));
355                    break;
356                default:
357                    reader.skipType(tag & 7);
358                    break;
359                }
360            }
361            return message;
362        };
363
364        /**
365         * Decodes a Signatures message from the specified reader or buffer, length delimited.
366         * @function decodeDelimited
367         * @memberof chromeos_update_engine.Signatures
368         * @static
369         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
370         * @returns {chromeos_update_engine.Signatures} Signatures
371         * @throws {Error} If the payload is not a reader or valid buffer
372         * @throws {$protobuf.util.ProtocolError} If required fields are missing
373         */
374        Signatures.decodeDelimited = function decodeDelimited(reader) {
375            if (!(reader instanceof $Reader))
376                reader = new $Reader(reader);
377            return this.decode(reader, reader.uint32());
378        };
379
380        /**
381         * Verifies a Signatures message.
382         * @function verify
383         * @memberof chromeos_update_engine.Signatures
384         * @static
385         * @param {Object.<string,*>} message Plain object to verify
386         * @returns {string|null} `null` if valid, otherwise the reason why it is not
387         */
388        Signatures.verify = function verify(message) {
389            if (typeof message !== "object" || message === null)
390                return "object expected";
391            if (message.signatures != null && message.hasOwnProperty("signatures")) {
392                if (!Array.isArray(message.signatures))
393                    return "signatures: array expected";
394                for (let i = 0; i < message.signatures.length; ++i) {
395                    let error = $root.chromeos_update_engine.Signatures.Signature.verify(message.signatures[i]);
396                    if (error)
397                        return "signatures." + error;
398                }
399            }
400            return null;
401        };
402
403        /**
404         * Creates a Signatures message from a plain object. Also converts values to their respective internal types.
405         * @function fromObject
406         * @memberof chromeos_update_engine.Signatures
407         * @static
408         * @param {Object.<string,*>} object Plain object
409         * @returns {chromeos_update_engine.Signatures} Signatures
410         */
411        Signatures.fromObject = function fromObject(object) {
412            if (object instanceof $root.chromeos_update_engine.Signatures)
413                return object;
414            let message = new $root.chromeos_update_engine.Signatures();
415            if (object.signatures) {
416                if (!Array.isArray(object.signatures))
417                    throw TypeError(".chromeos_update_engine.Signatures.signatures: array expected");
418                message.signatures = [];
419                for (let i = 0; i < object.signatures.length; ++i) {
420                    if (typeof object.signatures[i] !== "object")
421                        throw TypeError(".chromeos_update_engine.Signatures.signatures: object expected");
422                    message.signatures[i] = $root.chromeos_update_engine.Signatures.Signature.fromObject(object.signatures[i]);
423                }
424            }
425            return message;
426        };
427
428        /**
429         * Creates a plain object from a Signatures message. Also converts values to other types if specified.
430         * @function toObject
431         * @memberof chromeos_update_engine.Signatures
432         * @static
433         * @param {chromeos_update_engine.Signatures} message Signatures
434         * @param {$protobuf.IConversionOptions} [options] Conversion options
435         * @returns {Object.<string,*>} Plain object
436         */
437        Signatures.toObject = function toObject(message, options) {
438            if (!options)
439                options = {};
440            let object = {};
441            if (options.arrays || options.defaults)
442                object.signatures = [];
443            if (message.signatures && message.signatures.length) {
444                object.signatures = [];
445                for (let j = 0; j < message.signatures.length; ++j)
446                    object.signatures[j] = $root.chromeos_update_engine.Signatures.Signature.toObject(message.signatures[j], options);
447            }
448            return object;
449        };
450
451        /**
452         * Converts this Signatures to JSON.
453         * @function toJSON
454         * @memberof chromeos_update_engine.Signatures
455         * @instance
456         * @returns {Object.<string,*>} JSON object
457         */
458        Signatures.prototype.toJSON = function toJSON() {
459            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
460        };
461
462        Signatures.Signature = (function() {
463
464            /**
465             * Properties of a Signature.
466             * @memberof chromeos_update_engine.Signatures
467             * @interface ISignature
468             * @property {number|null} [version] Signature version
469             * @property {Uint8Array|null} [data] Signature data
470             * @property {number|null} [unpaddedSignatureSize] Signature unpaddedSignatureSize
471             */
472
473            /**
474             * Constructs a new Signature.
475             * @memberof chromeos_update_engine.Signatures
476             * @classdesc Represents a Signature.
477             * @implements ISignature
478             * @constructor
479             * @param {chromeos_update_engine.Signatures.ISignature=} [properties] Properties to set
480             */
481            function Signature(properties) {
482                if (properties)
483                    for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
484                        if (properties[keys[i]] != null)
485                            this[keys[i]] = properties[keys[i]];
486            }
487
488            /**
489             * Signature version.
490             * @member {number} version
491             * @memberof chromeos_update_engine.Signatures.Signature
492             * @instance
493             */
494            Signature.prototype.version = 0;
495
496            /**
497             * Signature data.
498             * @member {Uint8Array} data
499             * @memberof chromeos_update_engine.Signatures.Signature
500             * @instance
501             */
502            Signature.prototype.data = $util.newBuffer([]);
503
504            /**
505             * Signature unpaddedSignatureSize.
506             * @member {number} unpaddedSignatureSize
507             * @memberof chromeos_update_engine.Signatures.Signature
508             * @instance
509             */
510            Signature.prototype.unpaddedSignatureSize = 0;
511
512            /**
513             * Creates a new Signature instance using the specified properties.
514             * @function create
515             * @memberof chromeos_update_engine.Signatures.Signature
516             * @static
517             * @param {chromeos_update_engine.Signatures.ISignature=} [properties] Properties to set
518             * @returns {chromeos_update_engine.Signatures.Signature} Signature instance
519             */
520            Signature.create = function create(properties) {
521                return new Signature(properties);
522            };
523
524            /**
525             * Encodes the specified Signature message. Does not implicitly {@link chromeos_update_engine.Signatures.Signature.verify|verify} messages.
526             * @function encode
527             * @memberof chromeos_update_engine.Signatures.Signature
528             * @static
529             * @param {chromeos_update_engine.Signatures.ISignature} message Signature message or plain object to encode
530             * @param {$protobuf.Writer} [writer] Writer to encode to
531             * @returns {$protobuf.Writer} Writer
532             */
533            Signature.encode = function encode(message, writer) {
534                if (!writer)
535                    writer = $Writer.create();
536                if (message.version != null && Object.hasOwnProperty.call(message, "version"))
537                    writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.version);
538                if (message.data != null && Object.hasOwnProperty.call(message, "data"))
539                    writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data);
540                if (message.unpaddedSignatureSize != null && Object.hasOwnProperty.call(message, "unpaddedSignatureSize"))
541                    writer.uint32(/* id 3, wireType 5 =*/29).fixed32(message.unpaddedSignatureSize);
542                return writer;
543            };
544
545            /**
546             * Encodes the specified Signature message, length delimited. Does not implicitly {@link chromeos_update_engine.Signatures.Signature.verify|verify} messages.
547             * @function encodeDelimited
548             * @memberof chromeos_update_engine.Signatures.Signature
549             * @static
550             * @param {chromeos_update_engine.Signatures.ISignature} message Signature message or plain object to encode
551             * @param {$protobuf.Writer} [writer] Writer to encode to
552             * @returns {$protobuf.Writer} Writer
553             */
554            Signature.encodeDelimited = function encodeDelimited(message, writer) {
555                return this.encode(message, writer).ldelim();
556            };
557
558            /**
559             * Decodes a Signature message from the specified reader or buffer.
560             * @function decode
561             * @memberof chromeos_update_engine.Signatures.Signature
562             * @static
563             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
564             * @param {number} [length] Message length if known beforehand
565             * @returns {chromeos_update_engine.Signatures.Signature} Signature
566             * @throws {Error} If the payload is not a reader or valid buffer
567             * @throws {$protobuf.util.ProtocolError} If required fields are missing
568             */
569            Signature.decode = function decode(reader, length) {
570                if (!(reader instanceof $Reader))
571                    reader = $Reader.create(reader);
572                let end = length === undefined ? reader.len : reader.pos + length, message = new $root.chromeos_update_engine.Signatures.Signature();
573                while (reader.pos < end) {
574                    let tag = reader.uint32();
575                    switch (tag >>> 3) {
576                    case 1:
577                        message.version = reader.uint32();
578                        break;
579                    case 2:
580                        message.data = reader.bytes();
581                        break;
582                    case 3:
583                        message.unpaddedSignatureSize = reader.fixed32();
584                        break;
585                    default:
586                        reader.skipType(tag & 7);
587                        break;
588                    }
589                }
590                return message;
591            };
592
593            /**
594             * Decodes a Signature message from the specified reader or buffer, length delimited.
595             * @function decodeDelimited
596             * @memberof chromeos_update_engine.Signatures.Signature
597             * @static
598             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
599             * @returns {chromeos_update_engine.Signatures.Signature} Signature
600             * @throws {Error} If the payload is not a reader or valid buffer
601             * @throws {$protobuf.util.ProtocolError} If required fields are missing
602             */
603            Signature.decodeDelimited = function decodeDelimited(reader) {
604                if (!(reader instanceof $Reader))
605                    reader = new $Reader(reader);
606                return this.decode(reader, reader.uint32());
607            };
608
609            /**
610             * Verifies a Signature message.
611             * @function verify
612             * @memberof chromeos_update_engine.Signatures.Signature
613             * @static
614             * @param {Object.<string,*>} message Plain object to verify
615             * @returns {string|null} `null` if valid, otherwise the reason why it is not
616             */
617            Signature.verify = function verify(message) {
618                if (typeof message !== "object" || message === null)
619                    return "object expected";
620                if (message.version != null && message.hasOwnProperty("version"))
621                    if (!$util.isInteger(message.version))
622                        return "version: integer expected";
623                if (message.data != null && message.hasOwnProperty("data"))
624                    if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data)))
625                        return "data: buffer expected";
626                if (message.unpaddedSignatureSize != null && message.hasOwnProperty("unpaddedSignatureSize"))
627                    if (!$util.isInteger(message.unpaddedSignatureSize))
628                        return "unpaddedSignatureSize: integer expected";
629                return null;
630            };
631
632            /**
633             * Creates a Signature message from a plain object. Also converts values to their respective internal types.
634             * @function fromObject
635             * @memberof chromeos_update_engine.Signatures.Signature
636             * @static
637             * @param {Object.<string,*>} object Plain object
638             * @returns {chromeos_update_engine.Signatures.Signature} Signature
639             */
640            Signature.fromObject = function fromObject(object) {
641                if (object instanceof $root.chromeos_update_engine.Signatures.Signature)
642                    return object;
643                let message = new $root.chromeos_update_engine.Signatures.Signature();
644                if (object.version != null)
645                    message.version = object.version >>> 0;
646                if (object.data != null)
647                    if (typeof object.data === "string")
648                        $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0);
649                    else if (object.data.length)
650                        message.data = object.data;
651                if (object.unpaddedSignatureSize != null)
652                    message.unpaddedSignatureSize = object.unpaddedSignatureSize >>> 0;
653                return message;
654            };
655
656            /**
657             * Creates a plain object from a Signature message. Also converts values to other types if specified.
658             * @function toObject
659             * @memberof chromeos_update_engine.Signatures.Signature
660             * @static
661             * @param {chromeos_update_engine.Signatures.Signature} message Signature
662             * @param {$protobuf.IConversionOptions} [options] Conversion options
663             * @returns {Object.<string,*>} Plain object
664             */
665            Signature.toObject = function toObject(message, options) {
666                if (!options)
667                    options = {};
668                let object = {};
669                if (options.defaults) {
670                    object.version = 0;
671                    if (options.bytes === String)
672                        object.data = "";
673                    else {
674                        object.data = [];
675                        if (options.bytes !== Array)
676                            object.data = $util.newBuffer(object.data);
677                    }
678                    object.unpaddedSignatureSize = 0;
679                }
680                if (message.version != null && message.hasOwnProperty("version"))
681                    object.version = message.version;
682                if (message.data != null && message.hasOwnProperty("data"))
683                    object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data;
684                if (message.unpaddedSignatureSize != null && message.hasOwnProperty("unpaddedSignatureSize"))
685                    object.unpaddedSignatureSize = message.unpaddedSignatureSize;
686                return object;
687            };
688
689            /**
690             * Converts this Signature to JSON.
691             * @function toJSON
692             * @memberof chromeos_update_engine.Signatures.Signature
693             * @instance
694             * @returns {Object.<string,*>} JSON object
695             */
696            Signature.prototype.toJSON = function toJSON() {
697                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
698            };
699
700            return Signature;
701        })();
702
703        return Signatures;
704    })();
705
706    chromeos_update_engine.PartitionInfo = (function() {
707
708        /**
709         * Properties of a PartitionInfo.
710         * @memberof chromeos_update_engine
711         * @interface IPartitionInfo
712         * @property {number|Long|null} [size] PartitionInfo size
713         * @property {Uint8Array|null} [hash] PartitionInfo hash
714         */
715
716        /**
717         * Constructs a new PartitionInfo.
718         * @memberof chromeos_update_engine
719         * @classdesc Represents a PartitionInfo.
720         * @implements IPartitionInfo
721         * @constructor
722         * @param {chromeos_update_engine.IPartitionInfo=} [properties] Properties to set
723         */
724        function PartitionInfo(properties) {
725            if (properties)
726                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
727                    if (properties[keys[i]] != null)
728                        this[keys[i]] = properties[keys[i]];
729        }
730
731        /**
732         * PartitionInfo size.
733         * @member {number|Long} size
734         * @memberof chromeos_update_engine.PartitionInfo
735         * @instance
736         */
737        PartitionInfo.prototype.size = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
738
739        /**
740         * PartitionInfo hash.
741         * @member {Uint8Array} hash
742         * @memberof chromeos_update_engine.PartitionInfo
743         * @instance
744         */
745        PartitionInfo.prototype.hash = $util.newBuffer([]);
746
747        /**
748         * Creates a new PartitionInfo instance using the specified properties.
749         * @function create
750         * @memberof chromeos_update_engine.PartitionInfo
751         * @static
752         * @param {chromeos_update_engine.IPartitionInfo=} [properties] Properties to set
753         * @returns {chromeos_update_engine.PartitionInfo} PartitionInfo instance
754         */
755        PartitionInfo.create = function create(properties) {
756            return new PartitionInfo(properties);
757        };
758
759        /**
760         * Encodes the specified PartitionInfo message. Does not implicitly {@link chromeos_update_engine.PartitionInfo.verify|verify} messages.
761         * @function encode
762         * @memberof chromeos_update_engine.PartitionInfo
763         * @static
764         * @param {chromeos_update_engine.IPartitionInfo} message PartitionInfo message or plain object to encode
765         * @param {$protobuf.Writer} [writer] Writer to encode to
766         * @returns {$protobuf.Writer} Writer
767         */
768        PartitionInfo.encode = function encode(message, writer) {
769            if (!writer)
770                writer = $Writer.create();
771            if (message.size != null && Object.hasOwnProperty.call(message, "size"))
772                writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.size);
773            if (message.hash != null && Object.hasOwnProperty.call(message, "hash"))
774                writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hash);
775            return writer;
776        };
777
778        /**
779         * Encodes the specified PartitionInfo message, length delimited. Does not implicitly {@link chromeos_update_engine.PartitionInfo.verify|verify} messages.
780         * @function encodeDelimited
781         * @memberof chromeos_update_engine.PartitionInfo
782         * @static
783         * @param {chromeos_update_engine.IPartitionInfo} message PartitionInfo message or plain object to encode
784         * @param {$protobuf.Writer} [writer] Writer to encode to
785         * @returns {$protobuf.Writer} Writer
786         */
787        PartitionInfo.encodeDelimited = function encodeDelimited(message, writer) {
788            return this.encode(message, writer).ldelim();
789        };
790
791        /**
792         * Decodes a PartitionInfo message from the specified reader or buffer.
793         * @function decode
794         * @memberof chromeos_update_engine.PartitionInfo
795         * @static
796         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
797         * @param {number} [length] Message length if known beforehand
798         * @returns {chromeos_update_engine.PartitionInfo} PartitionInfo
799         * @throws {Error} If the payload is not a reader or valid buffer
800         * @throws {$protobuf.util.ProtocolError} If required fields are missing
801         */
802        PartitionInfo.decode = function decode(reader, length) {
803            if (!(reader instanceof $Reader))
804                reader = $Reader.create(reader);
805            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.chromeos_update_engine.PartitionInfo();
806            while (reader.pos < end) {
807                let tag = reader.uint32();
808                switch (tag >>> 3) {
809                case 1:
810                    message.size = reader.uint64();
811                    break;
812                case 2:
813                    message.hash = reader.bytes();
814                    break;
815                default:
816                    reader.skipType(tag & 7);
817                    break;
818                }
819            }
820            return message;
821        };
822
823        /**
824         * Decodes a PartitionInfo message from the specified reader or buffer, length delimited.
825         * @function decodeDelimited
826         * @memberof chromeos_update_engine.PartitionInfo
827         * @static
828         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
829         * @returns {chromeos_update_engine.PartitionInfo} PartitionInfo
830         * @throws {Error} If the payload is not a reader or valid buffer
831         * @throws {$protobuf.util.ProtocolError} If required fields are missing
832         */
833        PartitionInfo.decodeDelimited = function decodeDelimited(reader) {
834            if (!(reader instanceof $Reader))
835                reader = new $Reader(reader);
836            return this.decode(reader, reader.uint32());
837        };
838
839        /**
840         * Verifies a PartitionInfo message.
841         * @function verify
842         * @memberof chromeos_update_engine.PartitionInfo
843         * @static
844         * @param {Object.<string,*>} message Plain object to verify
845         * @returns {string|null} `null` if valid, otherwise the reason why it is not
846         */
847        PartitionInfo.verify = function verify(message) {
848            if (typeof message !== "object" || message === null)
849                return "object expected";
850            if (message.size != null && message.hasOwnProperty("size"))
851                if (!$util.isInteger(message.size) && !(message.size && $util.isInteger(message.size.low) && $util.isInteger(message.size.high)))
852                    return "size: integer|Long expected";
853            if (message.hash != null && message.hasOwnProperty("hash"))
854                if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash)))
855                    return "hash: buffer expected";
856            return null;
857        };
858
859        /**
860         * Creates a PartitionInfo message from a plain object. Also converts values to their respective internal types.
861         * @function fromObject
862         * @memberof chromeos_update_engine.PartitionInfo
863         * @static
864         * @param {Object.<string,*>} object Plain object
865         * @returns {chromeos_update_engine.PartitionInfo} PartitionInfo
866         */
867        PartitionInfo.fromObject = function fromObject(object) {
868            if (object instanceof $root.chromeos_update_engine.PartitionInfo)
869                return object;
870            let message = new $root.chromeos_update_engine.PartitionInfo();
871            if (object.size != null)
872                if ($util.Long)
873                    (message.size = $util.Long.fromValue(object.size)).unsigned = true;
874                else if (typeof object.size === "string")
875                    message.size = parseInt(object.size, 10);
876                else if (typeof object.size === "number")
877                    message.size = object.size;
878                else if (typeof object.size === "object")
879                    message.size = new $util.LongBits(object.size.low >>> 0, object.size.high >>> 0).toNumber(true);
880            if (object.hash != null)
881                if (typeof object.hash === "string")
882                    $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0);
883                else if (object.hash.length)
884                    message.hash = object.hash;
885            return message;
886        };
887
888        /**
889         * Creates a plain object from a PartitionInfo message. Also converts values to other types if specified.
890         * @function toObject
891         * @memberof chromeos_update_engine.PartitionInfo
892         * @static
893         * @param {chromeos_update_engine.PartitionInfo} message PartitionInfo
894         * @param {$protobuf.IConversionOptions} [options] Conversion options
895         * @returns {Object.<string,*>} Plain object
896         */
897        PartitionInfo.toObject = function toObject(message, options) {
898            if (!options)
899                options = {};
900            let object = {};
901            if (options.defaults) {
902                if ($util.Long) {
903                    let long = new $util.Long(0, 0, true);
904                    object.size = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
905                } else
906                    object.size = options.longs === String ? "0" : 0;
907                if (options.bytes === String)
908                    object.hash = "";
909                else {
910                    object.hash = [];
911                    if (options.bytes !== Array)
912                        object.hash = $util.newBuffer(object.hash);
913                }
914            }
915            if (message.size != null && message.hasOwnProperty("size"))
916                if (typeof message.size === "number")
917                    object.size = options.longs === String ? String(message.size) : message.size;
918                else
919                    object.size = options.longs === String ? $util.Long.prototype.toString.call(message.size) : options.longs === Number ? new $util.LongBits(message.size.low >>> 0, message.size.high >>> 0).toNumber(true) : message.size;
920            if (message.hash != null && message.hasOwnProperty("hash"))
921                object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash;
922            return object;
923        };
924
925        /**
926         * Converts this PartitionInfo to JSON.
927         * @function toJSON
928         * @memberof chromeos_update_engine.PartitionInfo
929         * @instance
930         * @returns {Object.<string,*>} JSON object
931         */
932        PartitionInfo.prototype.toJSON = function toJSON() {
933            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
934        };
935
936        return PartitionInfo;
937    })();
938
939    chromeos_update_engine.ImageInfo = (function() {
940
941        /**
942         * Properties of an ImageInfo.
943         * @memberof chromeos_update_engine
944         * @interface IImageInfo
945         * @property {string|null} [board] ImageInfo board
946         * @property {string|null} [key] ImageInfo key
947         * @property {string|null} [channel] ImageInfo channel
948         * @property {string|null} [version] ImageInfo version
949         * @property {string|null} [buildChannel] ImageInfo buildChannel
950         * @property {string|null} [buildVersion] ImageInfo buildVersion
951         */
952
953        /**
954         * Constructs a new ImageInfo.
955         * @memberof chromeos_update_engine
956         * @classdesc Represents an ImageInfo.
957         * @implements IImageInfo
958         * @constructor
959         * @param {chromeos_update_engine.IImageInfo=} [properties] Properties to set
960         */
961        function ImageInfo(properties) {
962            if (properties)
963                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
964                    if (properties[keys[i]] != null)
965                        this[keys[i]] = properties[keys[i]];
966        }
967
968        /**
969         * ImageInfo board.
970         * @member {string} board
971         * @memberof chromeos_update_engine.ImageInfo
972         * @instance
973         */
974        ImageInfo.prototype.board = "";
975
976        /**
977         * ImageInfo key.
978         * @member {string} key
979         * @memberof chromeos_update_engine.ImageInfo
980         * @instance
981         */
982        ImageInfo.prototype.key = "";
983
984        /**
985         * ImageInfo channel.
986         * @member {string} channel
987         * @memberof chromeos_update_engine.ImageInfo
988         * @instance
989         */
990        ImageInfo.prototype.channel = "";
991
992        /**
993         * ImageInfo version.
994         * @member {string} version
995         * @memberof chromeos_update_engine.ImageInfo
996         * @instance
997         */
998        ImageInfo.prototype.version = "";
999
1000        /**
1001         * ImageInfo buildChannel.
1002         * @member {string} buildChannel
1003         * @memberof chromeos_update_engine.ImageInfo
1004         * @instance
1005         */
1006        ImageInfo.prototype.buildChannel = "";
1007
1008        /**
1009         * ImageInfo buildVersion.
1010         * @member {string} buildVersion
1011         * @memberof chromeos_update_engine.ImageInfo
1012         * @instance
1013         */
1014        ImageInfo.prototype.buildVersion = "";
1015
1016        /**
1017         * Creates a new ImageInfo instance using the specified properties.
1018         * @function create
1019         * @memberof chromeos_update_engine.ImageInfo
1020         * @static
1021         * @param {chromeos_update_engine.IImageInfo=} [properties] Properties to set
1022         * @returns {chromeos_update_engine.ImageInfo} ImageInfo instance
1023         */
1024        ImageInfo.create = function create(properties) {
1025            return new ImageInfo(properties);
1026        };
1027
1028        /**
1029         * Encodes the specified ImageInfo message. Does not implicitly {@link chromeos_update_engine.ImageInfo.verify|verify} messages.
1030         * @function encode
1031         * @memberof chromeos_update_engine.ImageInfo
1032         * @static
1033         * @param {chromeos_update_engine.IImageInfo} message ImageInfo message or plain object to encode
1034         * @param {$protobuf.Writer} [writer] Writer to encode to
1035         * @returns {$protobuf.Writer} Writer
1036         */
1037        ImageInfo.encode = function encode(message, writer) {
1038            if (!writer)
1039                writer = $Writer.create();
1040            if (message.board != null && Object.hasOwnProperty.call(message, "board"))
1041                writer.uint32(/* id 1, wireType 2 =*/10).string(message.board);
1042            if (message.key != null && Object.hasOwnProperty.call(message, "key"))
1043                writer.uint32(/* id 2, wireType 2 =*/18).string(message.key);
1044            if (message.channel != null && Object.hasOwnProperty.call(message, "channel"))
1045                writer.uint32(/* id 3, wireType 2 =*/26).string(message.channel);
1046            if (message.version != null && Object.hasOwnProperty.call(message, "version"))
1047                writer.uint32(/* id 4, wireType 2 =*/34).string(message.version);
1048            if (message.buildChannel != null && Object.hasOwnProperty.call(message, "buildChannel"))
1049                writer.uint32(/* id 5, wireType 2 =*/42).string(message.buildChannel);
1050            if (message.buildVersion != null && Object.hasOwnProperty.call(message, "buildVersion"))
1051                writer.uint32(/* id 6, wireType 2 =*/50).string(message.buildVersion);
1052            return writer;
1053        };
1054
1055        /**
1056         * Encodes the specified ImageInfo message, length delimited. Does not implicitly {@link chromeos_update_engine.ImageInfo.verify|verify} messages.
1057         * @function encodeDelimited
1058         * @memberof chromeos_update_engine.ImageInfo
1059         * @static
1060         * @param {chromeos_update_engine.IImageInfo} message ImageInfo message or plain object to encode
1061         * @param {$protobuf.Writer} [writer] Writer to encode to
1062         * @returns {$protobuf.Writer} Writer
1063         */
1064        ImageInfo.encodeDelimited = function encodeDelimited(message, writer) {
1065            return this.encode(message, writer).ldelim();
1066        };
1067
1068        /**
1069         * Decodes an ImageInfo message from the specified reader or buffer.
1070         * @function decode
1071         * @memberof chromeos_update_engine.ImageInfo
1072         * @static
1073         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1074         * @param {number} [length] Message length if known beforehand
1075         * @returns {chromeos_update_engine.ImageInfo} ImageInfo
1076         * @throws {Error} If the payload is not a reader or valid buffer
1077         * @throws {$protobuf.util.ProtocolError} If required fields are missing
1078         */
1079        ImageInfo.decode = function decode(reader, length) {
1080            if (!(reader instanceof $Reader))
1081                reader = $Reader.create(reader);
1082            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.chromeos_update_engine.ImageInfo();
1083            while (reader.pos < end) {
1084                let tag = reader.uint32();
1085                switch (tag >>> 3) {
1086                case 1:
1087                    message.board = reader.string();
1088                    break;
1089                case 2:
1090                    message.key = reader.string();
1091                    break;
1092                case 3:
1093                    message.channel = reader.string();
1094                    break;
1095                case 4:
1096                    message.version = reader.string();
1097                    break;
1098                case 5:
1099                    message.buildChannel = reader.string();
1100                    break;
1101                case 6:
1102                    message.buildVersion = reader.string();
1103                    break;
1104                default:
1105                    reader.skipType(tag & 7);
1106                    break;
1107                }
1108            }
1109            return message;
1110        };
1111
1112        /**
1113         * Decodes an ImageInfo message from the specified reader or buffer, length delimited.
1114         * @function decodeDelimited
1115         * @memberof chromeos_update_engine.ImageInfo
1116         * @static
1117         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1118         * @returns {chromeos_update_engine.ImageInfo} ImageInfo
1119         * @throws {Error} If the payload is not a reader or valid buffer
1120         * @throws {$protobuf.util.ProtocolError} If required fields are missing
1121         */
1122        ImageInfo.decodeDelimited = function decodeDelimited(reader) {
1123            if (!(reader instanceof $Reader))
1124                reader = new $Reader(reader);
1125            return this.decode(reader, reader.uint32());
1126        };
1127
1128        /**
1129         * Verifies an ImageInfo message.
1130         * @function verify
1131         * @memberof chromeos_update_engine.ImageInfo
1132         * @static
1133         * @param {Object.<string,*>} message Plain object to verify
1134         * @returns {string|null} `null` if valid, otherwise the reason why it is not
1135         */
1136        ImageInfo.verify = function verify(message) {
1137            if (typeof message !== "object" || message === null)
1138                return "object expected";
1139            if (message.board != null && message.hasOwnProperty("board"))
1140                if (!$util.isString(message.board))
1141                    return "board: string expected";
1142            if (message.key != null && message.hasOwnProperty("key"))
1143                if (!$util.isString(message.key))
1144                    return "key: string expected";
1145            if (message.channel != null && message.hasOwnProperty("channel"))
1146                if (!$util.isString(message.channel))
1147                    return "channel: string expected";
1148            if (message.version != null && message.hasOwnProperty("version"))
1149                if (!$util.isString(message.version))
1150                    return "version: string expected";
1151            if (message.buildChannel != null && message.hasOwnProperty("buildChannel"))
1152                if (!$util.isString(message.buildChannel))
1153                    return "buildChannel: string expected";
1154            if (message.buildVersion != null && message.hasOwnProperty("buildVersion"))
1155                if (!$util.isString(message.buildVersion))
1156                    return "buildVersion: string expected";
1157            return null;
1158        };
1159
1160        /**
1161         * Creates an ImageInfo message from a plain object. Also converts values to their respective internal types.
1162         * @function fromObject
1163         * @memberof chromeos_update_engine.ImageInfo
1164         * @static
1165         * @param {Object.<string,*>} object Plain object
1166         * @returns {chromeos_update_engine.ImageInfo} ImageInfo
1167         */
1168        ImageInfo.fromObject = function fromObject(object) {
1169            if (object instanceof $root.chromeos_update_engine.ImageInfo)
1170                return object;
1171            let message = new $root.chromeos_update_engine.ImageInfo();
1172            if (object.board != null)
1173                message.board = String(object.board);
1174            if (object.key != null)
1175                message.key = String(object.key);
1176            if (object.channel != null)
1177                message.channel = String(object.channel);
1178            if (object.version != null)
1179                message.version = String(object.version);
1180            if (object.buildChannel != null)
1181                message.buildChannel = String(object.buildChannel);
1182            if (object.buildVersion != null)
1183                message.buildVersion = String(object.buildVersion);
1184            return message;
1185        };
1186
1187        /**
1188         * Creates a plain object from an ImageInfo message. Also converts values to other types if specified.
1189         * @function toObject
1190         * @memberof chromeos_update_engine.ImageInfo
1191         * @static
1192         * @param {chromeos_update_engine.ImageInfo} message ImageInfo
1193         * @param {$protobuf.IConversionOptions} [options] Conversion options
1194         * @returns {Object.<string,*>} Plain object
1195         */
1196        ImageInfo.toObject = function toObject(message, options) {
1197            if (!options)
1198                options = {};
1199            let object = {};
1200            if (options.defaults) {
1201                object.board = "";
1202                object.key = "";
1203                object.channel = "";
1204                object.version = "";
1205                object.buildChannel = "";
1206                object.buildVersion = "";
1207            }
1208            if (message.board != null && message.hasOwnProperty("board"))
1209                object.board = message.board;
1210            if (message.key != null && message.hasOwnProperty("key"))
1211                object.key = message.key;
1212            if (message.channel != null && message.hasOwnProperty("channel"))
1213                object.channel = message.channel;
1214            if (message.version != null && message.hasOwnProperty("version"))
1215                object.version = message.version;
1216            if (message.buildChannel != null && message.hasOwnProperty("buildChannel"))
1217                object.buildChannel = message.buildChannel;
1218            if (message.buildVersion != null && message.hasOwnProperty("buildVersion"))
1219                object.buildVersion = message.buildVersion;
1220            return object;
1221        };
1222
1223        /**
1224         * Converts this ImageInfo to JSON.
1225         * @function toJSON
1226         * @memberof chromeos_update_engine.ImageInfo
1227         * @instance
1228         * @returns {Object.<string,*>} JSON object
1229         */
1230        ImageInfo.prototype.toJSON = function toJSON() {
1231            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1232        };
1233
1234        return ImageInfo;
1235    })();
1236
1237    chromeos_update_engine.InstallOperation = (function() {
1238
1239        /**
1240         * Properties of an InstallOperation.
1241         * @memberof chromeos_update_engine
1242         * @interface IInstallOperation
1243         * @property {chromeos_update_engine.InstallOperation.Type} type InstallOperation type
1244         * @property {number|Long|null} [dataOffset] InstallOperation dataOffset
1245         * @property {number|Long|null} [dataLength] InstallOperation dataLength
1246         * @property {Array.<chromeos_update_engine.IExtent>|null} [srcExtents] InstallOperation srcExtents
1247         * @property {number|Long|null} [srcLength] InstallOperation srcLength
1248         * @property {Array.<chromeos_update_engine.IExtent>|null} [dstExtents] InstallOperation dstExtents
1249         * @property {number|Long|null} [dstLength] InstallOperation dstLength
1250         * @property {Uint8Array|null} [dataSha256Hash] InstallOperation dataSha256Hash
1251         * @property {Uint8Array|null} [srcSha256Hash] InstallOperation srcSha256Hash
1252         * @property {Object.<string,number>|null} [xorMap] InstallOperation xorMap
1253         */
1254
1255        /**
1256         * Constructs a new InstallOperation.
1257         * @memberof chromeos_update_engine
1258         * @classdesc Represents an InstallOperation.
1259         * @implements IInstallOperation
1260         * @constructor
1261         * @param {chromeos_update_engine.IInstallOperation=} [properties] Properties to set
1262         */
1263        function InstallOperation(properties) {
1264            this.srcExtents = [];
1265            this.dstExtents = [];
1266            this.xorMap = {};
1267            if (properties)
1268                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1269                    if (properties[keys[i]] != null)
1270                        this[keys[i]] = properties[keys[i]];
1271        }
1272
1273        /**
1274         * InstallOperation type.
1275         * @member {chromeos_update_engine.InstallOperation.Type} type
1276         * @memberof chromeos_update_engine.InstallOperation
1277         * @instance
1278         */
1279        InstallOperation.prototype.type = 0;
1280
1281        /**
1282         * InstallOperation dataOffset.
1283         * @member {number|Long} dataOffset
1284         * @memberof chromeos_update_engine.InstallOperation
1285         * @instance
1286         */
1287        InstallOperation.prototype.dataOffset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
1288
1289        /**
1290         * InstallOperation dataLength.
1291         * @member {number|Long} dataLength
1292         * @memberof chromeos_update_engine.InstallOperation
1293         * @instance
1294         */
1295        InstallOperation.prototype.dataLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
1296
1297        /**
1298         * InstallOperation srcExtents.
1299         * @member {Array.<chromeos_update_engine.IExtent>} srcExtents
1300         * @memberof chromeos_update_engine.InstallOperation
1301         * @instance
1302         */
1303        InstallOperation.prototype.srcExtents = $util.emptyArray;
1304
1305        /**
1306         * InstallOperation srcLength.
1307         * @member {number|Long} srcLength
1308         * @memberof chromeos_update_engine.InstallOperation
1309         * @instance
1310         */
1311        InstallOperation.prototype.srcLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
1312
1313        /**
1314         * InstallOperation dstExtents.
1315         * @member {Array.<chromeos_update_engine.IExtent>} dstExtents
1316         * @memberof chromeos_update_engine.InstallOperation
1317         * @instance
1318         */
1319        InstallOperation.prototype.dstExtents = $util.emptyArray;
1320
1321        /**
1322         * InstallOperation dstLength.
1323         * @member {number|Long} dstLength
1324         * @memberof chromeos_update_engine.InstallOperation
1325         * @instance
1326         */
1327        InstallOperation.prototype.dstLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
1328
1329        /**
1330         * InstallOperation dataSha256Hash.
1331         * @member {Uint8Array} dataSha256Hash
1332         * @memberof chromeos_update_engine.InstallOperation
1333         * @instance
1334         */
1335        InstallOperation.prototype.dataSha256Hash = $util.newBuffer([]);
1336
1337        /**
1338         * InstallOperation srcSha256Hash.
1339         * @member {Uint8Array} srcSha256Hash
1340         * @memberof chromeos_update_engine.InstallOperation
1341         * @instance
1342         */
1343        InstallOperation.prototype.srcSha256Hash = $util.newBuffer([]);
1344
1345        /**
1346         * InstallOperation xorMap.
1347         * @member {Object.<string,number>} xorMap
1348         * @memberof chromeos_update_engine.InstallOperation
1349         * @instance
1350         */
1351        InstallOperation.prototype.xorMap = $util.emptyObject;
1352
1353        /**
1354         * Creates a new InstallOperation instance using the specified properties.
1355         * @function create
1356         * @memberof chromeos_update_engine.InstallOperation
1357         * @static
1358         * @param {chromeos_update_engine.IInstallOperation=} [properties] Properties to set
1359         * @returns {chromeos_update_engine.InstallOperation} InstallOperation instance
1360         */
1361        InstallOperation.create = function create(properties) {
1362            return new InstallOperation(properties);
1363        };
1364
1365        /**
1366         * Encodes the specified InstallOperation message. Does not implicitly {@link chromeos_update_engine.InstallOperation.verify|verify} messages.
1367         * @function encode
1368         * @memberof chromeos_update_engine.InstallOperation
1369         * @static
1370         * @param {chromeos_update_engine.IInstallOperation} message InstallOperation message or plain object to encode
1371         * @param {$protobuf.Writer} [writer] Writer to encode to
1372         * @returns {$protobuf.Writer} Writer
1373         */
1374        InstallOperation.encode = function encode(message, writer) {
1375            if (!writer)
1376                writer = $Writer.create();
1377            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
1378            if (message.dataOffset != null && Object.hasOwnProperty.call(message, "dataOffset"))
1379                writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.dataOffset);
1380            if (message.dataLength != null && Object.hasOwnProperty.call(message, "dataLength"))
1381                writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.dataLength);
1382            if (message.srcExtents != null && message.srcExtents.length)
1383                for (let i = 0; i < message.srcExtents.length; ++i)
1384                    $root.chromeos_update_engine.Extent.encode(message.srcExtents[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
1385            if (message.srcLength != null && Object.hasOwnProperty.call(message, "srcLength"))
1386                writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.srcLength);
1387            if (message.dstExtents != null && message.dstExtents.length)
1388                for (let i = 0; i < message.dstExtents.length; ++i)
1389                    $root.chromeos_update_engine.Extent.encode(message.dstExtents[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
1390            if (message.dstLength != null && Object.hasOwnProperty.call(message, "dstLength"))
1391                writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.dstLength);
1392            if (message.dataSha256Hash != null && Object.hasOwnProperty.call(message, "dataSha256Hash"))
1393                writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.dataSha256Hash);
1394            if (message.srcSha256Hash != null && Object.hasOwnProperty.call(message, "srcSha256Hash"))
1395                writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.srcSha256Hash);
1396            if (message.xorMap != null && Object.hasOwnProperty.call(message, "xorMap"))
1397                for (let keys = Object.keys(message.xorMap), i = 0; i < keys.length; ++i)
1398                    writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 0 =*/8).uint32(keys[i]).uint32(/* id 2, wireType 0 =*/16).uint32(message.xorMap[keys[i]]).ldelim();
1399            return writer;
1400        };
1401
1402        /**
1403         * Encodes the specified InstallOperation message, length delimited. Does not implicitly {@link chromeos_update_engine.InstallOperation.verify|verify} messages.
1404         * @function encodeDelimited
1405         * @memberof chromeos_update_engine.InstallOperation
1406         * @static
1407         * @param {chromeos_update_engine.IInstallOperation} message InstallOperation message or plain object to encode
1408         * @param {$protobuf.Writer} [writer] Writer to encode to
1409         * @returns {$protobuf.Writer} Writer
1410         */
1411        InstallOperation.encodeDelimited = function encodeDelimited(message, writer) {
1412            return this.encode(message, writer).ldelim();
1413        };
1414
1415        /**
1416         * Decodes an InstallOperation message from the specified reader or buffer.
1417         * @function decode
1418         * @memberof chromeos_update_engine.InstallOperation
1419         * @static
1420         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1421         * @param {number} [length] Message length if known beforehand
1422         * @returns {chromeos_update_engine.InstallOperation} InstallOperation
1423         * @throws {Error} If the payload is not a reader or valid buffer
1424         * @throws {$protobuf.util.ProtocolError} If required fields are missing
1425         */
1426        InstallOperation.decode = function decode(reader, length) {
1427            if (!(reader instanceof $Reader))
1428                reader = $Reader.create(reader);
1429            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.chromeos_update_engine.InstallOperation(), key, value;
1430            while (reader.pos < end) {
1431                let tag = reader.uint32();
1432                switch (tag >>> 3) {
1433                case 1:
1434                    message.type = reader.int32();
1435                    break;
1436                case 2:
1437                    message.dataOffset = reader.uint64();
1438                    break;
1439                case 3:
1440                    message.dataLength = reader.uint64();
1441                    break;
1442                case 4:
1443                    if (!(message.srcExtents && message.srcExtents.length))
1444                        message.srcExtents = [];
1445                    message.srcExtents.push($root.chromeos_update_engine.Extent.decode(reader, reader.uint32()));
1446                    break;
1447                case 5:
1448                    message.srcLength = reader.uint64();
1449                    break;
1450                case 6:
1451                    if (!(message.dstExtents && message.dstExtents.length))
1452                        message.dstExtents = [];
1453                    message.dstExtents.push($root.chromeos_update_engine.Extent.decode(reader, reader.uint32()));
1454                    break;
1455                case 7:
1456                    message.dstLength = reader.uint64();
1457                    break;
1458                case 8:
1459                    message.dataSha256Hash = reader.bytes();
1460                    break;
1461                case 9:
1462                    message.srcSha256Hash = reader.bytes();
1463                    break;
1464                case 10:
1465                    if (message.xorMap === $util.emptyObject)
1466                        message.xorMap = {};
1467                    let end2 = reader.uint32() + reader.pos;
1468                    key = 0;
1469                    value = 0;
1470                    while (reader.pos < end2) {
1471                        let tag2 = reader.uint32();
1472                        switch (tag2 >>> 3) {
1473                        case 1:
1474                            key = reader.uint32();
1475                            break;
1476                        case 2:
1477                            value = reader.uint32();
1478                            break;
1479                        default:
1480                            reader.skipType(tag2 & 7);
1481                            break;
1482                        }
1483                    }
1484                    message.xorMap[key] = value;
1485                    break;
1486                default:
1487                    reader.skipType(tag & 7);
1488                    break;
1489                }
1490            }
1491            if (!message.hasOwnProperty("type"))
1492                throw $util.ProtocolError("missing required 'type'", { instance: message });
1493            return message;
1494        };
1495
1496        /**
1497         * Decodes an InstallOperation message from the specified reader or buffer, length delimited.
1498         * @function decodeDelimited
1499         * @memberof chromeos_update_engine.InstallOperation
1500         * @static
1501         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1502         * @returns {chromeos_update_engine.InstallOperation} InstallOperation
1503         * @throws {Error} If the payload is not a reader or valid buffer
1504         * @throws {$protobuf.util.ProtocolError} If required fields are missing
1505         */
1506        InstallOperation.decodeDelimited = function decodeDelimited(reader) {
1507            if (!(reader instanceof $Reader))
1508                reader = new $Reader(reader);
1509            return this.decode(reader, reader.uint32());
1510        };
1511
1512        /**
1513         * Verifies an InstallOperation message.
1514         * @function verify
1515         * @memberof chromeos_update_engine.InstallOperation
1516         * @static
1517         * @param {Object.<string,*>} message Plain object to verify
1518         * @returns {string|null} `null` if valid, otherwise the reason why it is not
1519         */
1520        InstallOperation.verify = function verify(message) {
1521            if (typeof message !== "object" || message === null)
1522                return "object expected";
1523            switch (message.type) {
1524            default:
1525                return "type: enum value expected";
1526            case 0:
1527            case 1:
1528            case 2:
1529            case 3:
1530            case 4:
1531            case 5:
1532            case 8:
1533            case 6:
1534            case 7:
1535            case 10:
1536            case 9:
1537                break;
1538            }
1539            if (message.dataOffset != null && message.hasOwnProperty("dataOffset"))
1540                if (!$util.isInteger(message.dataOffset) && !(message.dataOffset && $util.isInteger(message.dataOffset.low) && $util.isInteger(message.dataOffset.high)))
1541                    return "dataOffset: integer|Long expected";
1542            if (message.dataLength != null && message.hasOwnProperty("dataLength"))
1543                if (!$util.isInteger(message.dataLength) && !(message.dataLength && $util.isInteger(message.dataLength.low) && $util.isInteger(message.dataLength.high)))
1544                    return "dataLength: integer|Long expected";
1545            if (message.srcExtents != null && message.hasOwnProperty("srcExtents")) {
1546                if (!Array.isArray(message.srcExtents))
1547                    return "srcExtents: array expected";
1548                for (let i = 0; i < message.srcExtents.length; ++i) {
1549                    let error = $root.chromeos_update_engine.Extent.verify(message.srcExtents[i]);
1550                    if (error)
1551                        return "srcExtents." + error;
1552                }
1553            }
1554            if (message.srcLength != null && message.hasOwnProperty("srcLength"))
1555                if (!$util.isInteger(message.srcLength) && !(message.srcLength && $util.isInteger(message.srcLength.low) && $util.isInteger(message.srcLength.high)))
1556                    return "srcLength: integer|Long expected";
1557            if (message.dstExtents != null && message.hasOwnProperty("dstExtents")) {
1558                if (!Array.isArray(message.dstExtents))
1559                    return "dstExtents: array expected";
1560                for (let i = 0; i < message.dstExtents.length; ++i) {
1561                    let error = $root.chromeos_update_engine.Extent.verify(message.dstExtents[i]);
1562                    if (error)
1563                        return "dstExtents." + error;
1564                }
1565            }
1566            if (message.dstLength != null && message.hasOwnProperty("dstLength"))
1567                if (!$util.isInteger(message.dstLength) && !(message.dstLength && $util.isInteger(message.dstLength.low) && $util.isInteger(message.dstLength.high)))
1568                    return "dstLength: integer|Long expected";
1569            if (message.dataSha256Hash != null && message.hasOwnProperty("dataSha256Hash"))
1570                if (!(message.dataSha256Hash && typeof message.dataSha256Hash.length === "number" || $util.isString(message.dataSha256Hash)))
1571                    return "dataSha256Hash: buffer expected";
1572            if (message.srcSha256Hash != null && message.hasOwnProperty("srcSha256Hash"))
1573                if (!(message.srcSha256Hash && typeof message.srcSha256Hash.length === "number" || $util.isString(message.srcSha256Hash)))
1574                    return "srcSha256Hash: buffer expected";
1575            if (message.xorMap != null && message.hasOwnProperty("xorMap")) {
1576                if (!$util.isObject(message.xorMap))
1577                    return "xorMap: object expected";
1578                let key = Object.keys(message.xorMap);
1579                for (let i = 0; i < key.length; ++i) {
1580                    if (!$util.key32Re.test(key[i]))
1581                        return "xorMap: integer key{k:uint32} expected";
1582                    if (!$util.isInteger(message.xorMap[key[i]]))
1583                        return "xorMap: integer{k:uint32} expected";
1584                }
1585            }
1586            return null;
1587        };
1588
1589        /**
1590         * Creates an InstallOperation message from a plain object. Also converts values to their respective internal types.
1591         * @function fromObject
1592         * @memberof chromeos_update_engine.InstallOperation
1593         * @static
1594         * @param {Object.<string,*>} object Plain object
1595         * @returns {chromeos_update_engine.InstallOperation} InstallOperation
1596         */
1597        InstallOperation.fromObject = function fromObject(object) {
1598            if (object instanceof $root.chromeos_update_engine.InstallOperation)
1599                return object;
1600            let message = new $root.chromeos_update_engine.InstallOperation();
1601            switch (object.type) {
1602            case "REPLACE":
1603            case 0:
1604                message.type = 0;
1605                break;
1606            case "REPLACE_BZ":
1607            case 1:
1608                message.type = 1;
1609                break;
1610            case "MOVE":
1611            case 2:
1612                message.type = 2;
1613                break;
1614            case "BSDIFF":
1615            case 3:
1616                message.type = 3;
1617                break;
1618            case "SOURCE_COPY":
1619            case 4:
1620                message.type = 4;
1621                break;
1622            case "SOURCE_BSDIFF":
1623            case 5:
1624                message.type = 5;
1625                break;
1626            case "REPLACE_XZ":
1627            case 8:
1628                message.type = 8;
1629                break;
1630            case "ZERO":
1631            case 6:
1632                message.type = 6;
1633                break;
1634            case "DISCARD":
1635            case 7:
1636                message.type = 7;
1637                break;
1638            case "BROTLI_BSDIFF":
1639            case 10:
1640                message.type = 10;
1641                break;
1642            case "PUFFDIFF":
1643            case 9:
1644                message.type = 9;
1645                break;
1646            }
1647            if (object.dataOffset != null)
1648                if ($util.Long)
1649                    (message.dataOffset = $util.Long.fromValue(object.dataOffset)).unsigned = true;
1650                else if (typeof object.dataOffset === "string")
1651                    message.dataOffset = parseInt(object.dataOffset, 10);
1652                else if (typeof object.dataOffset === "number")
1653                    message.dataOffset = object.dataOffset;
1654                else if (typeof object.dataOffset === "object")
1655                    message.dataOffset = new $util.LongBits(object.dataOffset.low >>> 0, object.dataOffset.high >>> 0).toNumber(true);
1656            if (object.dataLength != null)
1657                if ($util.Long)
1658                    (message.dataLength = $util.Long.fromValue(object.dataLength)).unsigned = true;
1659                else if (typeof object.dataLength === "string")
1660                    message.dataLength = parseInt(object.dataLength, 10);
1661                else if (typeof object.dataLength === "number")
1662                    message.dataLength = object.dataLength;
1663                else if (typeof object.dataLength === "object")
1664                    message.dataLength = new $util.LongBits(object.dataLength.low >>> 0, object.dataLength.high >>> 0).toNumber(true);
1665            if (object.srcExtents) {
1666                if (!Array.isArray(object.srcExtents))
1667                    throw TypeError(".chromeos_update_engine.InstallOperation.srcExtents: array expected");
1668                message.srcExtents = [];
1669                for (let i = 0; i < object.srcExtents.length; ++i) {
1670                    if (typeof object.srcExtents[i] !== "object")
1671                        throw TypeError(".chromeos_update_engine.InstallOperation.srcExtents: object expected");
1672                    message.srcExtents[i] = $root.chromeos_update_engine.Extent.fromObject(object.srcExtents[i]);
1673                }
1674            }
1675            if (object.srcLength != null)
1676                if ($util.Long)
1677                    (message.srcLength = $util.Long.fromValue(object.srcLength)).unsigned = true;
1678                else if (typeof object.srcLength === "string")
1679                    message.srcLength = parseInt(object.srcLength, 10);
1680                else if (typeof object.srcLength === "number")
1681                    message.srcLength = object.srcLength;
1682                else if (typeof object.srcLength === "object")
1683                    message.srcLength = new $util.LongBits(object.srcLength.low >>> 0, object.srcLength.high >>> 0).toNumber(true);
1684            if (object.dstExtents) {
1685                if (!Array.isArray(object.dstExtents))
1686                    throw TypeError(".chromeos_update_engine.InstallOperation.dstExtents: array expected");
1687                message.dstExtents = [];
1688                for (let i = 0; i < object.dstExtents.length; ++i) {
1689                    if (typeof object.dstExtents[i] !== "object")
1690                        throw TypeError(".chromeos_update_engine.InstallOperation.dstExtents: object expected");
1691                    message.dstExtents[i] = $root.chromeos_update_engine.Extent.fromObject(object.dstExtents[i]);
1692                }
1693            }
1694            if (object.dstLength != null)
1695                if ($util.Long)
1696                    (message.dstLength = $util.Long.fromValue(object.dstLength)).unsigned = true;
1697                else if (typeof object.dstLength === "string")
1698                    message.dstLength = parseInt(object.dstLength, 10);
1699                else if (typeof object.dstLength === "number")
1700                    message.dstLength = object.dstLength;
1701                else if (typeof object.dstLength === "object")
1702                    message.dstLength = new $util.LongBits(object.dstLength.low >>> 0, object.dstLength.high >>> 0).toNumber(true);
1703            if (object.dataSha256Hash != null)
1704                if (typeof object.dataSha256Hash === "string")
1705                    $util.base64.decode(object.dataSha256Hash, message.dataSha256Hash = $util.newBuffer($util.base64.length(object.dataSha256Hash)), 0);
1706                else if (object.dataSha256Hash.length)
1707                    message.dataSha256Hash = object.dataSha256Hash;
1708            if (object.srcSha256Hash != null)
1709                if (typeof object.srcSha256Hash === "string")
1710                    $util.base64.decode(object.srcSha256Hash, message.srcSha256Hash = $util.newBuffer($util.base64.length(object.srcSha256Hash)), 0);
1711                else if (object.srcSha256Hash.length)
1712                    message.srcSha256Hash = object.srcSha256Hash;
1713            if (object.xorMap) {
1714                if (typeof object.xorMap !== "object")
1715                    throw TypeError(".chromeos_update_engine.InstallOperation.xorMap: object expected");
1716                message.xorMap = {};
1717                for (let keys = Object.keys(object.xorMap), i = 0; i < keys.length; ++i)
1718                    message.xorMap[keys[i]] = object.xorMap[keys[i]] >>> 0;
1719            }
1720            return message;
1721        };
1722
1723        /**
1724         * Creates a plain object from an InstallOperation message. Also converts values to other types if specified.
1725         * @function toObject
1726         * @memberof chromeos_update_engine.InstallOperation
1727         * @static
1728         * @param {chromeos_update_engine.InstallOperation} message InstallOperation
1729         * @param {$protobuf.IConversionOptions} [options] Conversion options
1730         * @returns {Object.<string,*>} Plain object
1731         */
1732        InstallOperation.toObject = function toObject(message, options) {
1733            if (!options)
1734                options = {};
1735            let object = {};
1736            if (options.arrays || options.defaults) {
1737                object.srcExtents = [];
1738                object.dstExtents = [];
1739            }
1740            if (options.objects || options.defaults)
1741                object.xorMap = {};
1742            if (options.defaults) {
1743                object.type = options.enums === String ? "REPLACE" : 0;
1744                if ($util.Long) {
1745                    let long = new $util.Long(0, 0, true);
1746                    object.dataOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
1747                } else
1748                    object.dataOffset = options.longs === String ? "0" : 0;
1749                if ($util.Long) {
1750                    let long = new $util.Long(0, 0, true);
1751                    object.dataLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
1752                } else
1753                    object.dataLength = options.longs === String ? "0" : 0;
1754                if ($util.Long) {
1755                    let long = new $util.Long(0, 0, true);
1756                    object.srcLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
1757                } else
1758                    object.srcLength = options.longs === String ? "0" : 0;
1759                if ($util.Long) {
1760                    let long = new $util.Long(0, 0, true);
1761                    object.dstLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
1762                } else
1763                    object.dstLength = options.longs === String ? "0" : 0;
1764                if (options.bytes === String)
1765                    object.dataSha256Hash = "";
1766                else {
1767                    object.dataSha256Hash = [];
1768                    if (options.bytes !== Array)
1769                        object.dataSha256Hash = $util.newBuffer(object.dataSha256Hash);
1770                }
1771                if (options.bytes === String)
1772                    object.srcSha256Hash = "";
1773                else {
1774                    object.srcSha256Hash = [];
1775                    if (options.bytes !== Array)
1776                        object.srcSha256Hash = $util.newBuffer(object.srcSha256Hash);
1777                }
1778            }
1779            if (message.type != null && message.hasOwnProperty("type"))
1780                object.type = options.enums === String ? $root.chromeos_update_engine.InstallOperation.Type[message.type] : message.type;
1781            if (message.dataOffset != null && message.hasOwnProperty("dataOffset"))
1782                if (typeof message.dataOffset === "number")
1783                    object.dataOffset = options.longs === String ? String(message.dataOffset) : message.dataOffset;
1784                else
1785                    object.dataOffset = options.longs === String ? $util.Long.prototype.toString.call(message.dataOffset) : options.longs === Number ? new $util.LongBits(message.dataOffset.low >>> 0, message.dataOffset.high >>> 0).toNumber(true) : message.dataOffset;
1786            if (message.dataLength != null && message.hasOwnProperty("dataLength"))
1787                if (typeof message.dataLength === "number")
1788                    object.dataLength = options.longs === String ? String(message.dataLength) : message.dataLength;
1789                else
1790                    object.dataLength = options.longs === String ? $util.Long.prototype.toString.call(message.dataLength) : options.longs === Number ? new $util.LongBits(message.dataLength.low >>> 0, message.dataLength.high >>> 0).toNumber(true) : message.dataLength;
1791            if (message.srcExtents && message.srcExtents.length) {
1792                object.srcExtents = [];
1793                for (let j = 0; j < message.srcExtents.length; ++j)
1794                    object.srcExtents[j] = $root.chromeos_update_engine.Extent.toObject(message.srcExtents[j], options);
1795            }
1796            if (message.srcLength != null && message.hasOwnProperty("srcLength"))
1797                if (typeof message.srcLength === "number")
1798                    object.srcLength = options.longs === String ? String(message.srcLength) : message.srcLength;
1799                else
1800                    object.srcLength = options.longs === String ? $util.Long.prototype.toString.call(message.srcLength) : options.longs === Number ? new $util.LongBits(message.srcLength.low >>> 0, message.srcLength.high >>> 0).toNumber(true) : message.srcLength;
1801            if (message.dstExtents && message.dstExtents.length) {
1802                object.dstExtents = [];
1803                for (let j = 0; j < message.dstExtents.length; ++j)
1804                    object.dstExtents[j] = $root.chromeos_update_engine.Extent.toObject(message.dstExtents[j], options);
1805            }
1806            if (message.dstLength != null && message.hasOwnProperty("dstLength"))
1807                if (typeof message.dstLength === "number")
1808                    object.dstLength = options.longs === String ? String(message.dstLength) : message.dstLength;
1809                else
1810                    object.dstLength = options.longs === String ? $util.Long.prototype.toString.call(message.dstLength) : options.longs === Number ? new $util.LongBits(message.dstLength.low >>> 0, message.dstLength.high >>> 0).toNumber(true) : message.dstLength;
1811            if (message.dataSha256Hash != null && message.hasOwnProperty("dataSha256Hash"))
1812                object.dataSha256Hash = options.bytes === String ? $util.base64.encode(message.dataSha256Hash, 0, message.dataSha256Hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.dataSha256Hash) : message.dataSha256Hash;
1813            if (message.srcSha256Hash != null && message.hasOwnProperty("srcSha256Hash"))
1814                object.srcSha256Hash = options.bytes === String ? $util.base64.encode(message.srcSha256Hash, 0, message.srcSha256Hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.srcSha256Hash) : message.srcSha256Hash;
1815            let keys2;
1816            if (message.xorMap && (keys2 = Object.keys(message.xorMap)).length) {
1817                object.xorMap = {};
1818                for (let j = 0; j < keys2.length; ++j)
1819                    object.xorMap[keys2[j]] = message.xorMap[keys2[j]];
1820            }
1821            return object;
1822        };
1823
1824        /**
1825         * Converts this InstallOperation to JSON.
1826         * @function toJSON
1827         * @memberof chromeos_update_engine.InstallOperation
1828         * @instance
1829         * @returns {Object.<string,*>} JSON object
1830         */
1831        InstallOperation.prototype.toJSON = function toJSON() {
1832            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1833        };
1834
1835        /**
1836         * Type enum.
1837         * @name chromeos_update_engine.InstallOperation.Type
1838         * @enum {number}
1839         * @property {number} REPLACE=0 REPLACE value
1840         * @property {number} REPLACE_BZ=1 REPLACE_BZ value
1841         * @property {number} MOVE=2 MOVE value
1842         * @property {number} BSDIFF=3 BSDIFF value
1843         * @property {number} SOURCE_COPY=4 SOURCE_COPY value
1844         * @property {number} SOURCE_BSDIFF=5 SOURCE_BSDIFF value
1845         * @property {number} REPLACE_XZ=8 REPLACE_XZ value
1846         * @property {number} ZERO=6 ZERO value
1847         * @property {number} DISCARD=7 DISCARD value
1848         * @property {number} BROTLI_BSDIFF=10 BROTLI_BSDIFF value
1849         * @property {number} PUFFDIFF=9 PUFFDIFF value
1850         */
1851        InstallOperation.Type = (function() {
1852            const valuesById = {}, values = Object.create(valuesById);
1853            values[valuesById[0] = "REPLACE"] = 0;
1854            values[valuesById[1] = "REPLACE_BZ"] = 1;
1855            values[valuesById[2] = "MOVE"] = 2;
1856            values[valuesById[3] = "BSDIFF"] = 3;
1857            values[valuesById[4] = "SOURCE_COPY"] = 4;
1858            values[valuesById[5] = "SOURCE_BSDIFF"] = 5;
1859            values[valuesById[8] = "REPLACE_XZ"] = 8;
1860            values[valuesById[6] = "ZERO"] = 6;
1861            values[valuesById[7] = "DISCARD"] = 7;
1862            values[valuesById[10] = "BROTLI_BSDIFF"] = 10;
1863            values[valuesById[9] = "PUFFDIFF"] = 9;
1864            return values;
1865        })();
1866
1867        return InstallOperation;
1868    })();
1869
1870    chromeos_update_engine.CowMergeOperation = (function() {
1871
1872        /**
1873         * Properties of a CowMergeOperation.
1874         * @memberof chromeos_update_engine
1875         * @interface ICowMergeOperation
1876         * @property {chromeos_update_engine.CowMergeOperation.Type|null} [type] CowMergeOperation type
1877         * @property {chromeos_update_engine.IExtent|null} [srcExtent] CowMergeOperation srcExtent
1878         * @property {chromeos_update_engine.IExtent|null} [dstExtent] CowMergeOperation dstExtent
1879         * @property {number|Long|null} [srcOffset] CowMergeOperation srcOffset
1880         */
1881
1882        /**
1883         * Constructs a new CowMergeOperation.
1884         * @memberof chromeos_update_engine
1885         * @classdesc Represents a CowMergeOperation.
1886         * @implements ICowMergeOperation
1887         * @constructor
1888         * @param {chromeos_update_engine.ICowMergeOperation=} [properties] Properties to set
1889         */
1890        function CowMergeOperation(properties) {
1891            if (properties)
1892                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1893                    if (properties[keys[i]] != null)
1894                        this[keys[i]] = properties[keys[i]];
1895        }
1896
1897        /**
1898         * CowMergeOperation type.
1899         * @member {chromeos_update_engine.CowMergeOperation.Type} type
1900         * @memberof chromeos_update_engine.CowMergeOperation
1901         * @instance
1902         */
1903        CowMergeOperation.prototype.type = 0;
1904
1905        /**
1906         * CowMergeOperation srcExtent.
1907         * @member {chromeos_update_engine.IExtent|null|undefined} srcExtent
1908         * @memberof chromeos_update_engine.CowMergeOperation
1909         * @instance
1910         */
1911        CowMergeOperation.prototype.srcExtent = null;
1912
1913        /**
1914         * CowMergeOperation dstExtent.
1915         * @member {chromeos_update_engine.IExtent|null|undefined} dstExtent
1916         * @memberof chromeos_update_engine.CowMergeOperation
1917         * @instance
1918         */
1919        CowMergeOperation.prototype.dstExtent = null;
1920
1921        /**
1922         * CowMergeOperation srcOffset.
1923         * @member {number|Long} srcOffset
1924         * @memberof chromeos_update_engine.CowMergeOperation
1925         * @instance
1926         */
1927        CowMergeOperation.prototype.srcOffset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
1928
1929        /**
1930         * Creates a new CowMergeOperation instance using the specified properties.
1931         * @function create
1932         * @memberof chromeos_update_engine.CowMergeOperation
1933         * @static
1934         * @param {chromeos_update_engine.ICowMergeOperation=} [properties] Properties to set
1935         * @returns {chromeos_update_engine.CowMergeOperation} CowMergeOperation instance
1936         */
1937        CowMergeOperation.create = function create(properties) {
1938            return new CowMergeOperation(properties);
1939        };
1940
1941        /**
1942         * Encodes the specified CowMergeOperation message. Does not implicitly {@link chromeos_update_engine.CowMergeOperation.verify|verify} messages.
1943         * @function encode
1944         * @memberof chromeos_update_engine.CowMergeOperation
1945         * @static
1946         * @param {chromeos_update_engine.ICowMergeOperation} message CowMergeOperation message or plain object to encode
1947         * @param {$protobuf.Writer} [writer] Writer to encode to
1948         * @returns {$protobuf.Writer} Writer
1949         */
1950        CowMergeOperation.encode = function encode(message, writer) {
1951            if (!writer)
1952                writer = $Writer.create();
1953            if (message.type != null && Object.hasOwnProperty.call(message, "type"))
1954                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
1955            if (message.srcExtent != null && Object.hasOwnProperty.call(message, "srcExtent"))
1956                $root.chromeos_update_engine.Extent.encode(message.srcExtent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
1957            if (message.dstExtent != null && Object.hasOwnProperty.call(message, "dstExtent"))
1958                $root.chromeos_update_engine.Extent.encode(message.dstExtent, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
1959            if (message.srcOffset != null && Object.hasOwnProperty.call(message, "srcOffset"))
1960                writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.srcOffset);
1961            return writer;
1962        };
1963
1964        /**
1965         * Encodes the specified CowMergeOperation message, length delimited. Does not implicitly {@link chromeos_update_engine.CowMergeOperation.verify|verify} messages.
1966         * @function encodeDelimited
1967         * @memberof chromeos_update_engine.CowMergeOperation
1968         * @static
1969         * @param {chromeos_update_engine.ICowMergeOperation} message CowMergeOperation message or plain object to encode
1970         * @param {$protobuf.Writer} [writer] Writer to encode to
1971         * @returns {$protobuf.Writer} Writer
1972         */
1973        CowMergeOperation.encodeDelimited = function encodeDelimited(message, writer) {
1974            return this.encode(message, writer).ldelim();
1975        };
1976
1977        /**
1978         * Decodes a CowMergeOperation message from the specified reader or buffer.
1979         * @function decode
1980         * @memberof chromeos_update_engine.CowMergeOperation
1981         * @static
1982         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1983         * @param {number} [length] Message length if known beforehand
1984         * @returns {chromeos_update_engine.CowMergeOperation} CowMergeOperation
1985         * @throws {Error} If the payload is not a reader or valid buffer
1986         * @throws {$protobuf.util.ProtocolError} If required fields are missing
1987         */
1988        CowMergeOperation.decode = function decode(reader, length) {
1989            if (!(reader instanceof $Reader))
1990                reader = $Reader.create(reader);
1991            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.chromeos_update_engine.CowMergeOperation();
1992            while (reader.pos < end) {
1993                let tag = reader.uint32();
1994                switch (tag >>> 3) {
1995                case 1:
1996                    message.type = reader.int32();
1997                    break;
1998                case 2:
1999                    message.srcExtent = $root.chromeos_update_engine.Extent.decode(reader, reader.uint32());
2000                    break;
2001                case 3:
2002                    message.dstExtent = $root.chromeos_update_engine.Extent.decode(reader, reader.uint32());
2003                    break;
2004                case 4:
2005                    message.srcOffset = reader.uint64();
2006                    break;
2007                default:
2008                    reader.skipType(tag & 7);
2009                    break;
2010                }
2011            }
2012            return message;
2013        };
2014
2015        /**
2016         * Decodes a CowMergeOperation message from the specified reader or buffer, length delimited.
2017         * @function decodeDelimited
2018         * @memberof chromeos_update_engine.CowMergeOperation
2019         * @static
2020         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2021         * @returns {chromeos_update_engine.CowMergeOperation} CowMergeOperation
2022         * @throws {Error} If the payload is not a reader or valid buffer
2023         * @throws {$protobuf.util.ProtocolError} If required fields are missing
2024         */
2025        CowMergeOperation.decodeDelimited = function decodeDelimited(reader) {
2026            if (!(reader instanceof $Reader))
2027                reader = new $Reader(reader);
2028            return this.decode(reader, reader.uint32());
2029        };
2030
2031        /**
2032         * Verifies a CowMergeOperation message.
2033         * @function verify
2034         * @memberof chromeos_update_engine.CowMergeOperation
2035         * @static
2036         * @param {Object.<string,*>} message Plain object to verify
2037         * @returns {string|null} `null` if valid, otherwise the reason why it is not
2038         */
2039        CowMergeOperation.verify = function verify(message) {
2040            if (typeof message !== "object" || message === null)
2041                return "object expected";
2042            if (message.type != null && message.hasOwnProperty("type"))
2043                switch (message.type) {
2044                default:
2045                    return "type: enum value expected";
2046                case 0:
2047                case 1:
2048                case 2:
2049                    break;
2050                }
2051            if (message.srcExtent != null && message.hasOwnProperty("srcExtent")) {
2052                let error = $root.chromeos_update_engine.Extent.verify(message.srcExtent);
2053                if (error)
2054                    return "srcExtent." + error;
2055            }
2056            if (message.dstExtent != null && message.hasOwnProperty("dstExtent")) {
2057                let error = $root.chromeos_update_engine.Extent.verify(message.dstExtent);
2058                if (error)
2059                    return "dstExtent." + error;
2060            }
2061            if (message.srcOffset != null && message.hasOwnProperty("srcOffset"))
2062                if (!$util.isInteger(message.srcOffset) && !(message.srcOffset && $util.isInteger(message.srcOffset.low) && $util.isInteger(message.srcOffset.high)))
2063                    return "srcOffset: integer|Long expected";
2064            return null;
2065        };
2066
2067        /**
2068         * Creates a CowMergeOperation message from a plain object. Also converts values to their respective internal types.
2069         * @function fromObject
2070         * @memberof chromeos_update_engine.CowMergeOperation
2071         * @static
2072         * @param {Object.<string,*>} object Plain object
2073         * @returns {chromeos_update_engine.CowMergeOperation} CowMergeOperation
2074         */
2075        CowMergeOperation.fromObject = function fromObject(object) {
2076            if (object instanceof $root.chromeos_update_engine.CowMergeOperation)
2077                return object;
2078            let message = new $root.chromeos_update_engine.CowMergeOperation();
2079            switch (object.type) {
2080            case "COW_COPY":
2081            case 0:
2082                message.type = 0;
2083                break;
2084            case "COW_XOR":
2085            case 1:
2086                message.type = 1;
2087                break;
2088            case "COW_REPLACE":
2089            case 2:
2090                message.type = 2;
2091                break;
2092            }
2093            if (object.srcExtent != null) {
2094                if (typeof object.srcExtent !== "object")
2095                    throw TypeError(".chromeos_update_engine.CowMergeOperation.srcExtent: object expected");
2096                message.srcExtent = $root.chromeos_update_engine.Extent.fromObject(object.srcExtent);
2097            }
2098            if (object.dstExtent != null) {
2099                if (typeof object.dstExtent !== "object")
2100                    throw TypeError(".chromeos_update_engine.CowMergeOperation.dstExtent: object expected");
2101                message.dstExtent = $root.chromeos_update_engine.Extent.fromObject(object.dstExtent);
2102            }
2103            if (object.srcOffset != null)
2104                if ($util.Long)
2105                    (message.srcOffset = $util.Long.fromValue(object.srcOffset)).unsigned = true;
2106                else if (typeof object.srcOffset === "string")
2107                    message.srcOffset = parseInt(object.srcOffset, 10);
2108                else if (typeof object.srcOffset === "number")
2109                    message.srcOffset = object.srcOffset;
2110                else if (typeof object.srcOffset === "object")
2111                    message.srcOffset = new $util.LongBits(object.srcOffset.low >>> 0, object.srcOffset.high >>> 0).toNumber(true);
2112            return message;
2113        };
2114
2115        /**
2116         * Creates a plain object from a CowMergeOperation message. Also converts values to other types if specified.
2117         * @function toObject
2118         * @memberof chromeos_update_engine.CowMergeOperation
2119         * @static
2120         * @param {chromeos_update_engine.CowMergeOperation} message CowMergeOperation
2121         * @param {$protobuf.IConversionOptions} [options] Conversion options
2122         * @returns {Object.<string,*>} Plain object
2123         */
2124        CowMergeOperation.toObject = function toObject(message, options) {
2125            if (!options)
2126                options = {};
2127            let object = {};
2128            if (options.defaults) {
2129                object.type = options.enums === String ? "COW_COPY" : 0;
2130                object.srcExtent = null;
2131                object.dstExtent = null;
2132                if ($util.Long) {
2133                    let long = new $util.Long(0, 0, true);
2134                    object.srcOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
2135                } else
2136                    object.srcOffset = options.longs === String ? "0" : 0;
2137            }
2138            if (message.type != null && message.hasOwnProperty("type"))
2139                object.type = options.enums === String ? $root.chromeos_update_engine.CowMergeOperation.Type[message.type] : message.type;
2140            if (message.srcExtent != null && message.hasOwnProperty("srcExtent"))
2141                object.srcExtent = $root.chromeos_update_engine.Extent.toObject(message.srcExtent, options);
2142            if (message.dstExtent != null && message.hasOwnProperty("dstExtent"))
2143                object.dstExtent = $root.chromeos_update_engine.Extent.toObject(message.dstExtent, options);
2144            if (message.srcOffset != null && message.hasOwnProperty("srcOffset"))
2145                if (typeof message.srcOffset === "number")
2146                    object.srcOffset = options.longs === String ? String(message.srcOffset) : message.srcOffset;
2147                else
2148                    object.srcOffset = options.longs === String ? $util.Long.prototype.toString.call(message.srcOffset) : options.longs === Number ? new $util.LongBits(message.srcOffset.low >>> 0, message.srcOffset.high >>> 0).toNumber(true) : message.srcOffset;
2149            return object;
2150        };
2151
2152        /**
2153         * Converts this CowMergeOperation to JSON.
2154         * @function toJSON
2155         * @memberof chromeos_update_engine.CowMergeOperation
2156         * @instance
2157         * @returns {Object.<string,*>} JSON object
2158         */
2159        CowMergeOperation.prototype.toJSON = function toJSON() {
2160            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2161        };
2162
2163        /**
2164         * Type enum.
2165         * @name chromeos_update_engine.CowMergeOperation.Type
2166         * @enum {number}
2167         * @property {number} COW_COPY=0 COW_COPY value
2168         * @property {number} COW_XOR=1 COW_XOR value
2169         * @property {number} COW_REPLACE=2 COW_REPLACE value
2170         */
2171        CowMergeOperation.Type = (function() {
2172            const valuesById = {}, values = Object.create(valuesById);
2173            values[valuesById[0] = "COW_COPY"] = 0;
2174            values[valuesById[1] = "COW_XOR"] = 1;
2175            values[valuesById[2] = "COW_REPLACE"] = 2;
2176            return values;
2177        })();
2178
2179        return CowMergeOperation;
2180    })();
2181
2182    chromeos_update_engine.PartitionUpdate = (function() {
2183
2184        /**
2185         * Properties of a PartitionUpdate.
2186         * @memberof chromeos_update_engine
2187         * @interface IPartitionUpdate
2188         * @property {string} partitionName PartitionUpdate partitionName
2189         * @property {boolean|null} [runPostinstall] PartitionUpdate runPostinstall
2190         * @property {string|null} [postinstallPath] PartitionUpdate postinstallPath
2191         * @property {string|null} [filesystemType] PartitionUpdate filesystemType
2192         * @property {Array.<chromeos_update_engine.Signatures.ISignature>|null} [newPartitionSignature] PartitionUpdate newPartitionSignature
2193         * @property {chromeos_update_engine.IPartitionInfo|null} [oldPartitionInfo] PartitionUpdate oldPartitionInfo
2194         * @property {chromeos_update_engine.IPartitionInfo|null} [newPartitionInfo] PartitionUpdate newPartitionInfo
2195         * @property {Array.<chromeos_update_engine.IInstallOperation>|null} [operations] PartitionUpdate operations
2196         * @property {boolean|null} [postinstallOptional] PartitionUpdate postinstallOptional
2197         * @property {chromeos_update_engine.IExtent|null} [hashTreeDataExtent] PartitionUpdate hashTreeDataExtent
2198         * @property {chromeos_update_engine.IExtent|null} [hashTreeExtent] PartitionUpdate hashTreeExtent
2199         * @property {string|null} [hashTreeAlgorithm] PartitionUpdate hashTreeAlgorithm
2200         * @property {Uint8Array|null} [hashTreeSalt] PartitionUpdate hashTreeSalt
2201         * @property {chromeos_update_engine.IExtent|null} [fecDataExtent] PartitionUpdate fecDataExtent
2202         * @property {chromeos_update_engine.IExtent|null} [fecExtent] PartitionUpdate fecExtent
2203         * @property {number|null} [fecRoots] PartitionUpdate fecRoots
2204         * @property {string|null} [version] PartitionUpdate version
2205         * @property {Array.<chromeos_update_engine.ICowMergeOperation>|null} [mergeOperations] PartitionUpdate mergeOperations
2206         * @property {number|Long|null} [estimateCowSize] PartitionUpdate estimateCowSize
2207         */
2208
2209        /**
2210         * Constructs a new PartitionUpdate.
2211         * @memberof chromeos_update_engine
2212         * @classdesc Represents a PartitionUpdate.
2213         * @implements IPartitionUpdate
2214         * @constructor
2215         * @param {chromeos_update_engine.IPartitionUpdate=} [properties] Properties to set
2216         */
2217        function PartitionUpdate(properties) {
2218            this.newPartitionSignature = [];
2219            this.operations = [];
2220            this.mergeOperations = [];
2221            if (properties)
2222                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2223                    if (properties[keys[i]] != null)
2224                        this[keys[i]] = properties[keys[i]];
2225        }
2226
2227        /**
2228         * PartitionUpdate partitionName.
2229         * @member {string} partitionName
2230         * @memberof chromeos_update_engine.PartitionUpdate
2231         * @instance
2232         */
2233        PartitionUpdate.prototype.partitionName = "";
2234
2235        /**
2236         * PartitionUpdate runPostinstall.
2237         * @member {boolean} runPostinstall
2238         * @memberof chromeos_update_engine.PartitionUpdate
2239         * @instance
2240         */
2241        PartitionUpdate.prototype.runPostinstall = false;
2242
2243        /**
2244         * PartitionUpdate postinstallPath.
2245         * @member {string} postinstallPath
2246         * @memberof chromeos_update_engine.PartitionUpdate
2247         * @instance
2248         */
2249        PartitionUpdate.prototype.postinstallPath = "";
2250
2251        /**
2252         * PartitionUpdate filesystemType.
2253         * @member {string} filesystemType
2254         * @memberof chromeos_update_engine.PartitionUpdate
2255         * @instance
2256         */
2257        PartitionUpdate.prototype.filesystemType = "";
2258
2259        /**
2260         * PartitionUpdate newPartitionSignature.
2261         * @member {Array.<chromeos_update_engine.Signatures.ISignature>} newPartitionSignature
2262         * @memberof chromeos_update_engine.PartitionUpdate
2263         * @instance
2264         */
2265        PartitionUpdate.prototype.newPartitionSignature = $util.emptyArray;
2266
2267        /**
2268         * PartitionUpdate oldPartitionInfo.
2269         * @member {chromeos_update_engine.IPartitionInfo|null|undefined} oldPartitionInfo
2270         * @memberof chromeos_update_engine.PartitionUpdate
2271         * @instance
2272         */
2273        PartitionUpdate.prototype.oldPartitionInfo = null;
2274
2275        /**
2276         * PartitionUpdate newPartitionInfo.
2277         * @member {chromeos_update_engine.IPartitionInfo|null|undefined} newPartitionInfo
2278         * @memberof chromeos_update_engine.PartitionUpdate
2279         * @instance
2280         */
2281        PartitionUpdate.prototype.newPartitionInfo = null;
2282
2283        /**
2284         * PartitionUpdate operations.
2285         * @member {Array.<chromeos_update_engine.IInstallOperation>} operations
2286         * @memberof chromeos_update_engine.PartitionUpdate
2287         * @instance
2288         */
2289        PartitionUpdate.prototype.operations = $util.emptyArray;
2290
2291        /**
2292         * PartitionUpdate postinstallOptional.
2293         * @member {boolean} postinstallOptional
2294         * @memberof chromeos_update_engine.PartitionUpdate
2295         * @instance
2296         */
2297        PartitionUpdate.prototype.postinstallOptional = false;
2298
2299        /**
2300         * PartitionUpdate hashTreeDataExtent.
2301         * @member {chromeos_update_engine.IExtent|null|undefined} hashTreeDataExtent
2302         * @memberof chromeos_update_engine.PartitionUpdate
2303         * @instance
2304         */
2305        PartitionUpdate.prototype.hashTreeDataExtent = null;
2306
2307        /**
2308         * PartitionUpdate hashTreeExtent.
2309         * @member {chromeos_update_engine.IExtent|null|undefined} hashTreeExtent
2310         * @memberof chromeos_update_engine.PartitionUpdate
2311         * @instance
2312         */
2313        PartitionUpdate.prototype.hashTreeExtent = null;
2314
2315        /**
2316         * PartitionUpdate hashTreeAlgorithm.
2317         * @member {string} hashTreeAlgorithm
2318         * @memberof chromeos_update_engine.PartitionUpdate
2319         * @instance
2320         */
2321        PartitionUpdate.prototype.hashTreeAlgorithm = "";
2322
2323        /**
2324         * PartitionUpdate hashTreeSalt.
2325         * @member {Uint8Array} hashTreeSalt
2326         * @memberof chromeos_update_engine.PartitionUpdate
2327         * @instance
2328         */
2329        PartitionUpdate.prototype.hashTreeSalt = $util.newBuffer([]);
2330
2331        /**
2332         * PartitionUpdate fecDataExtent.
2333         * @member {chromeos_update_engine.IExtent|null|undefined} fecDataExtent
2334         * @memberof chromeos_update_engine.PartitionUpdate
2335         * @instance
2336         */
2337        PartitionUpdate.prototype.fecDataExtent = null;
2338
2339        /**
2340         * PartitionUpdate fecExtent.
2341         * @member {chromeos_update_engine.IExtent|null|undefined} fecExtent
2342         * @memberof chromeos_update_engine.PartitionUpdate
2343         * @instance
2344         */
2345        PartitionUpdate.prototype.fecExtent = null;
2346
2347        /**
2348         * PartitionUpdate fecRoots.
2349         * @member {number} fecRoots
2350         * @memberof chromeos_update_engine.PartitionUpdate
2351         * @instance
2352         */
2353        PartitionUpdate.prototype.fecRoots = 2;
2354
2355        /**
2356         * PartitionUpdate version.
2357         * @member {string} version
2358         * @memberof chromeos_update_engine.PartitionUpdate
2359         * @instance
2360         */
2361        PartitionUpdate.prototype.version = "";
2362
2363        /**
2364         * PartitionUpdate mergeOperations.
2365         * @member {Array.<chromeos_update_engine.ICowMergeOperation>} mergeOperations
2366         * @memberof chromeos_update_engine.PartitionUpdate
2367         * @instance
2368         */
2369        PartitionUpdate.prototype.mergeOperations = $util.emptyArray;
2370
2371        /**
2372         * PartitionUpdate estimateCowSize.
2373         * @member {number|Long} estimateCowSize
2374         * @memberof chromeos_update_engine.PartitionUpdate
2375         * @instance
2376         */
2377        PartitionUpdate.prototype.estimateCowSize = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
2378
2379        /**
2380         * Creates a new PartitionUpdate instance using the specified properties.
2381         * @function create
2382         * @memberof chromeos_update_engine.PartitionUpdate
2383         * @static
2384         * @param {chromeos_update_engine.IPartitionUpdate=} [properties] Properties to set
2385         * @returns {chromeos_update_engine.PartitionUpdate} PartitionUpdate instance
2386         */
2387        PartitionUpdate.create = function create(properties) {
2388            return new PartitionUpdate(properties);
2389        };
2390
2391        /**
2392         * Encodes the specified PartitionUpdate message. Does not implicitly {@link chromeos_update_engine.PartitionUpdate.verify|verify} messages.
2393         * @function encode
2394         * @memberof chromeos_update_engine.PartitionUpdate
2395         * @static
2396         * @param {chromeos_update_engine.IPartitionUpdate} message PartitionUpdate message or plain object to encode
2397         * @param {$protobuf.Writer} [writer] Writer to encode to
2398         * @returns {$protobuf.Writer} Writer
2399         */
2400        PartitionUpdate.encode = function encode(message, writer) {
2401            if (!writer)
2402                writer = $Writer.create();
2403            writer.uint32(/* id 1, wireType 2 =*/10).string(message.partitionName);
2404            if (message.runPostinstall != null && Object.hasOwnProperty.call(message, "runPostinstall"))
2405                writer.uint32(/* id 2, wireType 0 =*/16).bool(message.runPostinstall);
2406            if (message.postinstallPath != null && Object.hasOwnProperty.call(message, "postinstallPath"))
2407                writer.uint32(/* id 3, wireType 2 =*/26).string(message.postinstallPath);
2408            if (message.filesystemType != null && Object.hasOwnProperty.call(message, "filesystemType"))
2409                writer.uint32(/* id 4, wireType 2 =*/34).string(message.filesystemType);
2410            if (message.newPartitionSignature != null && message.newPartitionSignature.length)
2411                for (let i = 0; i < message.newPartitionSignature.length; ++i)
2412                    $root.chromeos_update_engine.Signatures.Signature.encode(message.newPartitionSignature[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
2413            if (message.oldPartitionInfo != null && Object.hasOwnProperty.call(message, "oldPartitionInfo"))
2414                $root.chromeos_update_engine.PartitionInfo.encode(message.oldPartitionInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
2415            if (message.newPartitionInfo != null && Object.hasOwnProperty.call(message, "newPartitionInfo"))
2416                $root.chromeos_update_engine.PartitionInfo.encode(message.newPartitionInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
2417            if (message.operations != null && message.operations.length)
2418                for (let i = 0; i < message.operations.length; ++i)
2419                    $root.chromeos_update_engine.InstallOperation.encode(message.operations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
2420            if (message.postinstallOptional != null && Object.hasOwnProperty.call(message, "postinstallOptional"))
2421                writer.uint32(/* id 9, wireType 0 =*/72).bool(message.postinstallOptional);
2422            if (message.hashTreeDataExtent != null && Object.hasOwnProperty.call(message, "hashTreeDataExtent"))
2423                $root.chromeos_update_engine.Extent.encode(message.hashTreeDataExtent, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
2424            if (message.hashTreeExtent != null && Object.hasOwnProperty.call(message, "hashTreeExtent"))
2425                $root.chromeos_update_engine.Extent.encode(message.hashTreeExtent, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
2426            if (message.hashTreeAlgorithm != null && Object.hasOwnProperty.call(message, "hashTreeAlgorithm"))
2427                writer.uint32(/* id 12, wireType 2 =*/98).string(message.hashTreeAlgorithm);
2428            if (message.hashTreeSalt != null && Object.hasOwnProperty.call(message, "hashTreeSalt"))
2429                writer.uint32(/* id 13, wireType 2 =*/106).bytes(message.hashTreeSalt);
2430            if (message.fecDataExtent != null && Object.hasOwnProperty.call(message, "fecDataExtent"))
2431                $root.chromeos_update_engine.Extent.encode(message.fecDataExtent, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
2432            if (message.fecExtent != null && Object.hasOwnProperty.call(message, "fecExtent"))
2433                $root.chromeos_update_engine.Extent.encode(message.fecExtent, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
2434            if (message.fecRoots != null && Object.hasOwnProperty.call(message, "fecRoots"))
2435                writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.fecRoots);
2436            if (message.version != null && Object.hasOwnProperty.call(message, "version"))
2437                writer.uint32(/* id 17, wireType 2 =*/138).string(message.version);
2438            if (message.mergeOperations != null && message.mergeOperations.length)
2439                for (let i = 0; i < message.mergeOperations.length; ++i)
2440                    $root.chromeos_update_engine.CowMergeOperation.encode(message.mergeOperations[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
2441            if (message.estimateCowSize != null && Object.hasOwnProperty.call(message, "estimateCowSize"))
2442                writer.uint32(/* id 19, wireType 0 =*/152).uint64(message.estimateCowSize);
2443            return writer;
2444        };
2445
2446        /**
2447         * Encodes the specified PartitionUpdate message, length delimited. Does not implicitly {@link chromeos_update_engine.PartitionUpdate.verify|verify} messages.
2448         * @function encodeDelimited
2449         * @memberof chromeos_update_engine.PartitionUpdate
2450         * @static
2451         * @param {chromeos_update_engine.IPartitionUpdate} message PartitionUpdate message or plain object to encode
2452         * @param {$protobuf.Writer} [writer] Writer to encode to
2453         * @returns {$protobuf.Writer} Writer
2454         */
2455        PartitionUpdate.encodeDelimited = function encodeDelimited(message, writer) {
2456            return this.encode(message, writer).ldelim();
2457        };
2458
2459        /**
2460         * Decodes a PartitionUpdate message from the specified reader or buffer.
2461         * @function decode
2462         * @memberof chromeos_update_engine.PartitionUpdate
2463         * @static
2464         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2465         * @param {number} [length] Message length if known beforehand
2466         * @returns {chromeos_update_engine.PartitionUpdate} PartitionUpdate
2467         * @throws {Error} If the payload is not a reader or valid buffer
2468         * @throws {$protobuf.util.ProtocolError} If required fields are missing
2469         */
2470        PartitionUpdate.decode = function decode(reader, length) {
2471            if (!(reader instanceof $Reader))
2472                reader = $Reader.create(reader);
2473            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.chromeos_update_engine.PartitionUpdate();
2474            while (reader.pos < end) {
2475                let tag = reader.uint32();
2476                switch (tag >>> 3) {
2477                case 1:
2478                    message.partitionName = reader.string();
2479                    break;
2480                case 2:
2481                    message.runPostinstall = reader.bool();
2482                    break;
2483                case 3:
2484                    message.postinstallPath = reader.string();
2485                    break;
2486                case 4:
2487                    message.filesystemType = reader.string();
2488                    break;
2489                case 5:
2490                    if (!(message.newPartitionSignature && message.newPartitionSignature.length))
2491                        message.newPartitionSignature = [];
2492                    message.newPartitionSignature.push($root.chromeos_update_engine.Signatures.Signature.decode(reader, reader.uint32()));
2493                    break;
2494                case 6:
2495                    message.oldPartitionInfo = $root.chromeos_update_engine.PartitionInfo.decode(reader, reader.uint32());
2496                    break;
2497                case 7:
2498                    message.newPartitionInfo = $root.chromeos_update_engine.PartitionInfo.decode(reader, reader.uint32());
2499                    break;
2500                case 8:
2501                    if (!(message.operations && message.operations.length))
2502                        message.operations = [];
2503                    message.operations.push($root.chromeos_update_engine.InstallOperation.decode(reader, reader.uint32()));
2504                    break;
2505                case 9:
2506                    message.postinstallOptional = reader.bool();
2507                    break;
2508                case 10:
2509                    message.hashTreeDataExtent = $root.chromeos_update_engine.Extent.decode(reader, reader.uint32());
2510                    break;
2511                case 11:
2512                    message.hashTreeExtent = $root.chromeos_update_engine.Extent.decode(reader, reader.uint32());
2513                    break;
2514                case 12:
2515                    message.hashTreeAlgorithm = reader.string();
2516                    break;
2517                case 13:
2518                    message.hashTreeSalt = reader.bytes();
2519                    break;
2520                case 14:
2521                    message.fecDataExtent = $root.chromeos_update_engine.Extent.decode(reader, reader.uint32());
2522                    break;
2523                case 15:
2524                    message.fecExtent = $root.chromeos_update_engine.Extent.decode(reader, reader.uint32());
2525                    break;
2526                case 16:
2527                    message.fecRoots = reader.uint32();
2528                    break;
2529                case 17:
2530                    message.version = reader.string();
2531                    break;
2532                case 18:
2533                    if (!(message.mergeOperations && message.mergeOperations.length))
2534                        message.mergeOperations = [];
2535                    message.mergeOperations.push($root.chromeos_update_engine.CowMergeOperation.decode(reader, reader.uint32()));
2536                    break;
2537                case 19:
2538                    message.estimateCowSize = reader.uint64();
2539                    break;
2540                default:
2541                    reader.skipType(tag & 7);
2542                    break;
2543                }
2544            }
2545            if (!message.hasOwnProperty("partitionName"))
2546                throw $util.ProtocolError("missing required 'partitionName'", { instance: message });
2547            return message;
2548        };
2549
2550        /**
2551         * Decodes a PartitionUpdate message from the specified reader or buffer, length delimited.
2552         * @function decodeDelimited
2553         * @memberof chromeos_update_engine.PartitionUpdate
2554         * @static
2555         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2556         * @returns {chromeos_update_engine.PartitionUpdate} PartitionUpdate
2557         * @throws {Error} If the payload is not a reader or valid buffer
2558         * @throws {$protobuf.util.ProtocolError} If required fields are missing
2559         */
2560        PartitionUpdate.decodeDelimited = function decodeDelimited(reader) {
2561            if (!(reader instanceof $Reader))
2562                reader = new $Reader(reader);
2563            return this.decode(reader, reader.uint32());
2564        };
2565
2566        /**
2567         * Verifies a PartitionUpdate message.
2568         * @function verify
2569         * @memberof chromeos_update_engine.PartitionUpdate
2570         * @static
2571         * @param {Object.<string,*>} message Plain object to verify
2572         * @returns {string|null} `null` if valid, otherwise the reason why it is not
2573         */
2574        PartitionUpdate.verify = function verify(message) {
2575            if (typeof message !== "object" || message === null)
2576                return "object expected";
2577            if (!$util.isString(message.partitionName))
2578                return "partitionName: string expected";
2579            if (message.runPostinstall != null && message.hasOwnProperty("runPostinstall"))
2580                if (typeof message.runPostinstall !== "boolean")
2581                    return "runPostinstall: boolean expected";
2582            if (message.postinstallPath != null && message.hasOwnProperty("postinstallPath"))
2583                if (!$util.isString(message.postinstallPath))
2584                    return "postinstallPath: string expected";
2585            if (message.filesystemType != null && message.hasOwnProperty("filesystemType"))
2586                if (!$util.isString(message.filesystemType))
2587                    return "filesystemType: string expected";
2588            if (message.newPartitionSignature != null && message.hasOwnProperty("newPartitionSignature")) {
2589                if (!Array.isArray(message.newPartitionSignature))
2590                    return "newPartitionSignature: array expected";
2591                for (let i = 0; i < message.newPartitionSignature.length; ++i) {
2592                    let error = $root.chromeos_update_engine.Signatures.Signature.verify(message.newPartitionSignature[i]);
2593                    if (error)
2594                        return "newPartitionSignature." + error;
2595                }
2596            }
2597            if (message.oldPartitionInfo != null && message.hasOwnProperty("oldPartitionInfo")) {
2598                let error = $root.chromeos_update_engine.PartitionInfo.verify(message.oldPartitionInfo);
2599                if (error)
2600                    return "oldPartitionInfo." + error;
2601            }
2602            if (message.newPartitionInfo != null && message.hasOwnProperty("newPartitionInfo")) {
2603                let error = $root.chromeos_update_engine.PartitionInfo.verify(message.newPartitionInfo);
2604                if (error)
2605                    return "newPartitionInfo." + error;
2606            }
2607            if (message.operations != null && message.hasOwnProperty("operations")) {
2608                if (!Array.isArray(message.operations))
2609                    return "operations: array expected";
2610                for (let i = 0; i < message.operations.length; ++i) {
2611                    let error = $root.chromeos_update_engine.InstallOperation.verify(message.operations[i]);
2612                    if (error)
2613                        return "operations." + error;
2614                }
2615            }
2616            if (message.postinstallOptional != null && message.hasOwnProperty("postinstallOptional"))
2617                if (typeof message.postinstallOptional !== "boolean")
2618                    return "postinstallOptional: boolean expected";
2619            if (message.hashTreeDataExtent != null && message.hasOwnProperty("hashTreeDataExtent")) {
2620                let error = $root.chromeos_update_engine.Extent.verify(message.hashTreeDataExtent);
2621                if (error)
2622                    return "hashTreeDataExtent." + error;
2623            }
2624            if (message.hashTreeExtent != null && message.hasOwnProperty("hashTreeExtent")) {
2625                let error = $root.chromeos_update_engine.Extent.verify(message.hashTreeExtent);
2626                if (error)
2627                    return "hashTreeExtent." + error;
2628            }
2629            if (message.hashTreeAlgorithm != null && message.hasOwnProperty("hashTreeAlgorithm"))
2630                if (!$util.isString(message.hashTreeAlgorithm))
2631                    return "hashTreeAlgorithm: string expected";
2632            if (message.hashTreeSalt != null && message.hasOwnProperty("hashTreeSalt"))
2633                if (!(message.hashTreeSalt && typeof message.hashTreeSalt.length === "number" || $util.isString(message.hashTreeSalt)))
2634                    return "hashTreeSalt: buffer expected";
2635            if (message.fecDataExtent != null && message.hasOwnProperty("fecDataExtent")) {
2636                let error = $root.chromeos_update_engine.Extent.verify(message.fecDataExtent);
2637                if (error)
2638                    return "fecDataExtent." + error;
2639            }
2640            if (message.fecExtent != null && message.hasOwnProperty("fecExtent")) {
2641                let error = $root.chromeos_update_engine.Extent.verify(message.fecExtent);
2642                if (error)
2643                    return "fecExtent." + error;
2644            }
2645            if (message.fecRoots != null && message.hasOwnProperty("fecRoots"))
2646                if (!$util.isInteger(message.fecRoots))
2647                    return "fecRoots: integer expected";
2648            if (message.version != null && message.hasOwnProperty("version"))
2649                if (!$util.isString(message.version))
2650                    return "version: string expected";
2651            if (message.mergeOperations != null && message.hasOwnProperty("mergeOperations")) {
2652                if (!Array.isArray(message.mergeOperations))
2653                    return "mergeOperations: array expected";
2654                for (let i = 0; i < message.mergeOperations.length; ++i) {
2655                    let error = $root.chromeos_update_engine.CowMergeOperation.verify(message.mergeOperations[i]);
2656                    if (error)
2657                        return "mergeOperations." + error;
2658                }
2659            }
2660            if (message.estimateCowSize != null && message.hasOwnProperty("estimateCowSize"))
2661                if (!$util.isInteger(message.estimateCowSize) && !(message.estimateCowSize && $util.isInteger(message.estimateCowSize.low) && $util.isInteger(message.estimateCowSize.high)))
2662                    return "estimateCowSize: integer|Long expected";
2663            return null;
2664        };
2665
2666        /**
2667         * Creates a PartitionUpdate message from a plain object. Also converts values to their respective internal types.
2668         * @function fromObject
2669         * @memberof chromeos_update_engine.PartitionUpdate
2670         * @static
2671         * @param {Object.<string,*>} object Plain object
2672         * @returns {chromeos_update_engine.PartitionUpdate} PartitionUpdate
2673         */
2674        PartitionUpdate.fromObject = function fromObject(object) {
2675            if (object instanceof $root.chromeos_update_engine.PartitionUpdate)
2676                return object;
2677            let message = new $root.chromeos_update_engine.PartitionUpdate();
2678            if (object.partitionName != null)
2679                message.partitionName = String(object.partitionName);
2680            if (object.runPostinstall != null)
2681                message.runPostinstall = Boolean(object.runPostinstall);
2682            if (object.postinstallPath != null)
2683                message.postinstallPath = String(object.postinstallPath);
2684            if (object.filesystemType != null)
2685                message.filesystemType = String(object.filesystemType);
2686            if (object.newPartitionSignature) {
2687                if (!Array.isArray(object.newPartitionSignature))
2688                    throw TypeError(".chromeos_update_engine.PartitionUpdate.newPartitionSignature: array expected");
2689                message.newPartitionSignature = [];
2690                for (let i = 0; i < object.newPartitionSignature.length; ++i) {
2691                    if (typeof object.newPartitionSignature[i] !== "object")
2692                        throw TypeError(".chromeos_update_engine.PartitionUpdate.newPartitionSignature: object expected");
2693                    message.newPartitionSignature[i] = $root.chromeos_update_engine.Signatures.Signature.fromObject(object.newPartitionSignature[i]);
2694                }
2695            }
2696            if (object.oldPartitionInfo != null) {
2697                if (typeof object.oldPartitionInfo !== "object")
2698                    throw TypeError(".chromeos_update_engine.PartitionUpdate.oldPartitionInfo: object expected");
2699                message.oldPartitionInfo = $root.chromeos_update_engine.PartitionInfo.fromObject(object.oldPartitionInfo);
2700            }
2701            if (object.newPartitionInfo != null) {
2702                if (typeof object.newPartitionInfo !== "object")
2703                    throw TypeError(".chromeos_update_engine.PartitionUpdate.newPartitionInfo: object expected");
2704                message.newPartitionInfo = $root.chromeos_update_engine.PartitionInfo.fromObject(object.newPartitionInfo);
2705            }
2706            if (object.operations) {
2707                if (!Array.isArray(object.operations))
2708                    throw TypeError(".chromeos_update_engine.PartitionUpdate.operations: array expected");
2709                message.operations = [];
2710                for (let i = 0; i < object.operations.length; ++i) {
2711                    if (typeof object.operations[i] !== "object")
2712                        throw TypeError(".chromeos_update_engine.PartitionUpdate.operations: object expected");
2713                    message.operations[i] = $root.chromeos_update_engine.InstallOperation.fromObject(object.operations[i]);
2714                }
2715            }
2716            if (object.postinstallOptional != null)
2717                message.postinstallOptional = Boolean(object.postinstallOptional);
2718            if (object.hashTreeDataExtent != null) {
2719                if (typeof object.hashTreeDataExtent !== "object")
2720                    throw TypeError(".chromeos_update_engine.PartitionUpdate.hashTreeDataExtent: object expected");
2721                message.hashTreeDataExtent = $root.chromeos_update_engine.Extent.fromObject(object.hashTreeDataExtent);
2722            }
2723            if (object.hashTreeExtent != null) {
2724                if (typeof object.hashTreeExtent !== "object")
2725                    throw TypeError(".chromeos_update_engine.PartitionUpdate.hashTreeExtent: object expected");
2726                message.hashTreeExtent = $root.chromeos_update_engine.Extent.fromObject(object.hashTreeExtent);
2727            }
2728            if (object.hashTreeAlgorithm != null)
2729                message.hashTreeAlgorithm = String(object.hashTreeAlgorithm);
2730            if (object.hashTreeSalt != null)
2731                if (typeof object.hashTreeSalt === "string")
2732                    $util.base64.decode(object.hashTreeSalt, message.hashTreeSalt = $util.newBuffer($util.base64.length(object.hashTreeSalt)), 0);
2733                else if (object.hashTreeSalt.length)
2734                    message.hashTreeSalt = object.hashTreeSalt;
2735            if (object.fecDataExtent != null) {
2736                if (typeof object.fecDataExtent !== "object")
2737                    throw TypeError(".chromeos_update_engine.PartitionUpdate.fecDataExtent: object expected");
2738                message.fecDataExtent = $root.chromeos_update_engine.Extent.fromObject(object.fecDataExtent);
2739            }
2740            if (object.fecExtent != null) {
2741                if (typeof object.fecExtent !== "object")
2742                    throw TypeError(".chromeos_update_engine.PartitionUpdate.fecExtent: object expected");
2743                message.fecExtent = $root.chromeos_update_engine.Extent.fromObject(object.fecExtent);
2744            }
2745            if (object.fecRoots != null)
2746                message.fecRoots = object.fecRoots >>> 0;
2747            if (object.version != null)
2748                message.version = String(object.version);
2749            if (object.mergeOperations) {
2750                if (!Array.isArray(object.mergeOperations))
2751                    throw TypeError(".chromeos_update_engine.PartitionUpdate.mergeOperations: array expected");
2752                message.mergeOperations = [];
2753                for (let i = 0; i < object.mergeOperations.length; ++i) {
2754                    if (typeof object.mergeOperations[i] !== "object")
2755                        throw TypeError(".chromeos_update_engine.PartitionUpdate.mergeOperations: object expected");
2756                    message.mergeOperations[i] = $root.chromeos_update_engine.CowMergeOperation.fromObject(object.mergeOperations[i]);
2757                }
2758            }
2759            if (object.estimateCowSize != null)
2760                if ($util.Long)
2761                    (message.estimateCowSize = $util.Long.fromValue(object.estimateCowSize)).unsigned = true;
2762                else if (typeof object.estimateCowSize === "string")
2763                    message.estimateCowSize = parseInt(object.estimateCowSize, 10);
2764                else if (typeof object.estimateCowSize === "number")
2765                    message.estimateCowSize = object.estimateCowSize;
2766                else if (typeof object.estimateCowSize === "object")
2767                    message.estimateCowSize = new $util.LongBits(object.estimateCowSize.low >>> 0, object.estimateCowSize.high >>> 0).toNumber(true);
2768            return message;
2769        };
2770
2771        /**
2772         * Creates a plain object from a PartitionUpdate message. Also converts values to other types if specified.
2773         * @function toObject
2774         * @memberof chromeos_update_engine.PartitionUpdate
2775         * @static
2776         * @param {chromeos_update_engine.PartitionUpdate} message PartitionUpdate
2777         * @param {$protobuf.IConversionOptions} [options] Conversion options
2778         * @returns {Object.<string,*>} Plain object
2779         */
2780        PartitionUpdate.toObject = function toObject(message, options) {
2781            if (!options)
2782                options = {};
2783            let object = {};
2784            if (options.arrays || options.defaults) {
2785                object.newPartitionSignature = [];
2786                object.operations = [];
2787                object.mergeOperations = [];
2788            }
2789            if (options.defaults) {
2790                object.partitionName = "";
2791                object.runPostinstall = false;
2792                object.postinstallPath = "";
2793                object.filesystemType = "";
2794                object.oldPartitionInfo = null;
2795                object.newPartitionInfo = null;
2796                object.postinstallOptional = false;
2797                object.hashTreeDataExtent = null;
2798                object.hashTreeExtent = null;
2799                object.hashTreeAlgorithm = "";
2800                if (options.bytes === String)
2801                    object.hashTreeSalt = "";
2802                else {
2803                    object.hashTreeSalt = [];
2804                    if (options.bytes !== Array)
2805                        object.hashTreeSalt = $util.newBuffer(object.hashTreeSalt);
2806                }
2807                object.fecDataExtent = null;
2808                object.fecExtent = null;
2809                object.fecRoots = 2;
2810                object.version = "";
2811                if ($util.Long) {
2812                    let long = new $util.Long(0, 0, true);
2813                    object.estimateCowSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
2814                } else
2815                    object.estimateCowSize = options.longs === String ? "0" : 0;
2816            }
2817            if (message.partitionName != null && message.hasOwnProperty("partitionName"))
2818                object.partitionName = message.partitionName;
2819            if (message.runPostinstall != null && message.hasOwnProperty("runPostinstall"))
2820                object.runPostinstall = message.runPostinstall;
2821            if (message.postinstallPath != null && message.hasOwnProperty("postinstallPath"))
2822                object.postinstallPath = message.postinstallPath;
2823            if (message.filesystemType != null && message.hasOwnProperty("filesystemType"))
2824                object.filesystemType = message.filesystemType;
2825            if (message.newPartitionSignature && message.newPartitionSignature.length) {
2826                object.newPartitionSignature = [];
2827                for (let j = 0; j < message.newPartitionSignature.length; ++j)
2828                    object.newPartitionSignature[j] = $root.chromeos_update_engine.Signatures.Signature.toObject(message.newPartitionSignature[j], options);
2829            }
2830            if (message.oldPartitionInfo != null && message.hasOwnProperty("oldPartitionInfo"))
2831                object.oldPartitionInfo = $root.chromeos_update_engine.PartitionInfo.toObject(message.oldPartitionInfo, options);
2832            if (message.newPartitionInfo != null && message.hasOwnProperty("newPartitionInfo"))
2833                object.newPartitionInfo = $root.chromeos_update_engine.PartitionInfo.toObject(message.newPartitionInfo, options);
2834            if (message.operations && message.operations.length) {
2835                object.operations = [];
2836                for (let j = 0; j < message.operations.length; ++j)
2837                    object.operations[j] = $root.chromeos_update_engine.InstallOperation.toObject(message.operations[j], options);
2838            }
2839            if (message.postinstallOptional != null && message.hasOwnProperty("postinstallOptional"))
2840                object.postinstallOptional = message.postinstallOptional;
2841            if (message.hashTreeDataExtent != null && message.hasOwnProperty("hashTreeDataExtent"))
2842                object.hashTreeDataExtent = $root.chromeos_update_engine.Extent.toObject(message.hashTreeDataExtent, options);
2843            if (message.hashTreeExtent != null && message.hasOwnProperty("hashTreeExtent"))
2844                object.hashTreeExtent = $root.chromeos_update_engine.Extent.toObject(message.hashTreeExtent, options);
2845            if (message.hashTreeAlgorithm != null && message.hasOwnProperty("hashTreeAlgorithm"))
2846                object.hashTreeAlgorithm = message.hashTreeAlgorithm;
2847            if (message.hashTreeSalt != null && message.hasOwnProperty("hashTreeSalt"))
2848                object.hashTreeSalt = options.bytes === String ? $util.base64.encode(message.hashTreeSalt, 0, message.hashTreeSalt.length) : options.bytes === Array ? Array.prototype.slice.call(message.hashTreeSalt) : message.hashTreeSalt;
2849            if (message.fecDataExtent != null && message.hasOwnProperty("fecDataExtent"))
2850                object.fecDataExtent = $root.chromeos_update_engine.Extent.toObject(message.fecDataExtent, options);
2851            if (message.fecExtent != null && message.hasOwnProperty("fecExtent"))
2852                object.fecExtent = $root.chromeos_update_engine.Extent.toObject(message.fecExtent, options);
2853            if (message.fecRoots != null && message.hasOwnProperty("fecRoots"))
2854                object.fecRoots = message.fecRoots;
2855            if (message.version != null && message.hasOwnProperty("version"))
2856                object.version = message.version;
2857            if (message.mergeOperations && message.mergeOperations.length) {
2858                object.mergeOperations = [];
2859                for (let j = 0; j < message.mergeOperations.length; ++j)
2860                    object.mergeOperations[j] = $root.chromeos_update_engine.CowMergeOperation.toObject(message.mergeOperations[j], options);
2861            }
2862            if (message.estimateCowSize != null && message.hasOwnProperty("estimateCowSize"))
2863                if (typeof message.estimateCowSize === "number")
2864                    object.estimateCowSize = options.longs === String ? String(message.estimateCowSize) : message.estimateCowSize;
2865                else
2866                    object.estimateCowSize = options.longs === String ? $util.Long.prototype.toString.call(message.estimateCowSize) : options.longs === Number ? new $util.LongBits(message.estimateCowSize.low >>> 0, message.estimateCowSize.high >>> 0).toNumber(true) : message.estimateCowSize;
2867            return object;
2868        };
2869
2870        /**
2871         * Converts this PartitionUpdate to JSON.
2872         * @function toJSON
2873         * @memberof chromeos_update_engine.PartitionUpdate
2874         * @instance
2875         * @returns {Object.<string,*>} JSON object
2876         */
2877        PartitionUpdate.prototype.toJSON = function toJSON() {
2878            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2879        };
2880
2881        return PartitionUpdate;
2882    })();
2883
2884    chromeos_update_engine.DynamicPartitionGroup = (function() {
2885
2886        /**
2887         * Properties of a DynamicPartitionGroup.
2888         * @memberof chromeos_update_engine
2889         * @interface IDynamicPartitionGroup
2890         * @property {string} name DynamicPartitionGroup name
2891         * @property {number|Long|null} [size] DynamicPartitionGroup size
2892         * @property {Array.<string>|null} [partitionNames] DynamicPartitionGroup partitionNames
2893         */
2894
2895        /**
2896         * Constructs a new DynamicPartitionGroup.
2897         * @memberof chromeos_update_engine
2898         * @classdesc Represents a DynamicPartitionGroup.
2899         * @implements IDynamicPartitionGroup
2900         * @constructor
2901         * @param {chromeos_update_engine.IDynamicPartitionGroup=} [properties] Properties to set
2902         */
2903        function DynamicPartitionGroup(properties) {
2904            this.partitionNames = [];
2905            if (properties)
2906                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2907                    if (properties[keys[i]] != null)
2908                        this[keys[i]] = properties[keys[i]];
2909        }
2910
2911        /**
2912         * DynamicPartitionGroup name.
2913         * @member {string} name
2914         * @memberof chromeos_update_engine.DynamicPartitionGroup
2915         * @instance
2916         */
2917        DynamicPartitionGroup.prototype.name = "";
2918
2919        /**
2920         * DynamicPartitionGroup size.
2921         * @member {number|Long} size
2922         * @memberof chromeos_update_engine.DynamicPartitionGroup
2923         * @instance
2924         */
2925        DynamicPartitionGroup.prototype.size = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
2926
2927        /**
2928         * DynamicPartitionGroup partitionNames.
2929         * @member {Array.<string>} partitionNames
2930         * @memberof chromeos_update_engine.DynamicPartitionGroup
2931         * @instance
2932         */
2933        DynamicPartitionGroup.prototype.partitionNames = $util.emptyArray;
2934
2935        /**
2936         * Creates a new DynamicPartitionGroup instance using the specified properties.
2937         * @function create
2938         * @memberof chromeos_update_engine.DynamicPartitionGroup
2939         * @static
2940         * @param {chromeos_update_engine.IDynamicPartitionGroup=} [properties] Properties to set
2941         * @returns {chromeos_update_engine.DynamicPartitionGroup} DynamicPartitionGroup instance
2942         */
2943        DynamicPartitionGroup.create = function create(properties) {
2944            return new DynamicPartitionGroup(properties);
2945        };
2946
2947        /**
2948         * Encodes the specified DynamicPartitionGroup message. Does not implicitly {@link chromeos_update_engine.DynamicPartitionGroup.verify|verify} messages.
2949         * @function encode
2950         * @memberof chromeos_update_engine.DynamicPartitionGroup
2951         * @static
2952         * @param {chromeos_update_engine.IDynamicPartitionGroup} message DynamicPartitionGroup message or plain object to encode
2953         * @param {$protobuf.Writer} [writer] Writer to encode to
2954         * @returns {$protobuf.Writer} Writer
2955         */
2956        DynamicPartitionGroup.encode = function encode(message, writer) {
2957            if (!writer)
2958                writer = $Writer.create();
2959            writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
2960            if (message.size != null && Object.hasOwnProperty.call(message, "size"))
2961                writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.size);
2962            if (message.partitionNames != null && message.partitionNames.length)
2963                for (let i = 0; i < message.partitionNames.length; ++i)
2964                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.partitionNames[i]);
2965            return writer;
2966        };
2967
2968        /**
2969         * Encodes the specified DynamicPartitionGroup message, length delimited. Does not implicitly {@link chromeos_update_engine.DynamicPartitionGroup.verify|verify} messages.
2970         * @function encodeDelimited
2971         * @memberof chromeos_update_engine.DynamicPartitionGroup
2972         * @static
2973         * @param {chromeos_update_engine.IDynamicPartitionGroup} message DynamicPartitionGroup message or plain object to encode
2974         * @param {$protobuf.Writer} [writer] Writer to encode to
2975         * @returns {$protobuf.Writer} Writer
2976         */
2977        DynamicPartitionGroup.encodeDelimited = function encodeDelimited(message, writer) {
2978            return this.encode(message, writer).ldelim();
2979        };
2980
2981        /**
2982         * Decodes a DynamicPartitionGroup message from the specified reader or buffer.
2983         * @function decode
2984         * @memberof chromeos_update_engine.DynamicPartitionGroup
2985         * @static
2986         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2987         * @param {number} [length] Message length if known beforehand
2988         * @returns {chromeos_update_engine.DynamicPartitionGroup} DynamicPartitionGroup
2989         * @throws {Error} If the payload is not a reader or valid buffer
2990         * @throws {$protobuf.util.ProtocolError} If required fields are missing
2991         */
2992        DynamicPartitionGroup.decode = function decode(reader, length) {
2993            if (!(reader instanceof $Reader))
2994                reader = $Reader.create(reader);
2995            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.chromeos_update_engine.DynamicPartitionGroup();
2996            while (reader.pos < end) {
2997                let tag = reader.uint32();
2998                switch (tag >>> 3) {
2999                case 1:
3000                    message.name = reader.string();
3001                    break;
3002                case 2:
3003                    message.size = reader.uint64();
3004                    break;
3005                case 3:
3006                    if (!(message.partitionNames && message.partitionNames.length))
3007                        message.partitionNames = [];
3008                    message.partitionNames.push(reader.string());
3009                    break;
3010                default:
3011                    reader.skipType(tag & 7);
3012                    break;
3013                }
3014            }
3015            if (!message.hasOwnProperty("name"))
3016                throw $util.ProtocolError("missing required 'name'", { instance: message });
3017            return message;
3018        };
3019
3020        /**
3021         * Decodes a DynamicPartitionGroup message from the specified reader or buffer, length delimited.
3022         * @function decodeDelimited
3023         * @memberof chromeos_update_engine.DynamicPartitionGroup
3024         * @static
3025         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3026         * @returns {chromeos_update_engine.DynamicPartitionGroup} DynamicPartitionGroup
3027         * @throws {Error} If the payload is not a reader or valid buffer
3028         * @throws {$protobuf.util.ProtocolError} If required fields are missing
3029         */
3030        DynamicPartitionGroup.decodeDelimited = function decodeDelimited(reader) {
3031            if (!(reader instanceof $Reader))
3032                reader = new $Reader(reader);
3033            return this.decode(reader, reader.uint32());
3034        };
3035
3036        /**
3037         * Verifies a DynamicPartitionGroup message.
3038         * @function verify
3039         * @memberof chromeos_update_engine.DynamicPartitionGroup
3040         * @static
3041         * @param {Object.<string,*>} message Plain object to verify
3042         * @returns {string|null} `null` if valid, otherwise the reason why it is not
3043         */
3044        DynamicPartitionGroup.verify = function verify(message) {
3045            if (typeof message !== "object" || message === null)
3046                return "object expected";
3047            if (!$util.isString(message.name))
3048                return "name: string expected";
3049            if (message.size != null && message.hasOwnProperty("size"))
3050                if (!$util.isInteger(message.size) && !(message.size && $util.isInteger(message.size.low) && $util.isInteger(message.size.high)))
3051                    return "size: integer|Long expected";
3052            if (message.partitionNames != null && message.hasOwnProperty("partitionNames")) {
3053                if (!Array.isArray(message.partitionNames))
3054                    return "partitionNames: array expected";
3055                for (let i = 0; i < message.partitionNames.length; ++i)
3056                    if (!$util.isString(message.partitionNames[i]))
3057                        return "partitionNames: string[] expected";
3058            }
3059            return null;
3060        };
3061
3062        /**
3063         * Creates a DynamicPartitionGroup message from a plain object. Also converts values to their respective internal types.
3064         * @function fromObject
3065         * @memberof chromeos_update_engine.DynamicPartitionGroup
3066         * @static
3067         * @param {Object.<string,*>} object Plain object
3068         * @returns {chromeos_update_engine.DynamicPartitionGroup} DynamicPartitionGroup
3069         */
3070        DynamicPartitionGroup.fromObject = function fromObject(object) {
3071            if (object instanceof $root.chromeos_update_engine.DynamicPartitionGroup)
3072                return object;
3073            let message = new $root.chromeos_update_engine.DynamicPartitionGroup();
3074            if (object.name != null)
3075                message.name = String(object.name);
3076            if (object.size != null)
3077                if ($util.Long)
3078                    (message.size = $util.Long.fromValue(object.size)).unsigned = true;
3079                else if (typeof object.size === "string")
3080                    message.size = parseInt(object.size, 10);
3081                else if (typeof object.size === "number")
3082                    message.size = object.size;
3083                else if (typeof object.size === "object")
3084                    message.size = new $util.LongBits(object.size.low >>> 0, object.size.high >>> 0).toNumber(true);
3085            if (object.partitionNames) {
3086                if (!Array.isArray(object.partitionNames))
3087                    throw TypeError(".chromeos_update_engine.DynamicPartitionGroup.partitionNames: array expected");
3088                message.partitionNames = [];
3089                for (let i = 0; i < object.partitionNames.length; ++i)
3090                    message.partitionNames[i] = String(object.partitionNames[i]);
3091            }
3092            return message;
3093        };
3094
3095        /**
3096         * Creates a plain object from a DynamicPartitionGroup message. Also converts values to other types if specified.
3097         * @function toObject
3098         * @memberof chromeos_update_engine.DynamicPartitionGroup
3099         * @static
3100         * @param {chromeos_update_engine.DynamicPartitionGroup} message DynamicPartitionGroup
3101         * @param {$protobuf.IConversionOptions} [options] Conversion options
3102         * @returns {Object.<string,*>} Plain object
3103         */
3104        DynamicPartitionGroup.toObject = function toObject(message, options) {
3105            if (!options)
3106                options = {};
3107            let object = {};
3108            if (options.arrays || options.defaults)
3109                object.partitionNames = [];
3110            if (options.defaults) {
3111                object.name = "";
3112                if ($util.Long) {
3113                    let long = new $util.Long(0, 0, true);
3114                    object.size = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
3115                } else
3116                    object.size = options.longs === String ? "0" : 0;
3117            }
3118            if (message.name != null && message.hasOwnProperty("name"))
3119                object.name = message.name;
3120            if (message.size != null && message.hasOwnProperty("size"))
3121                if (typeof message.size === "number")
3122                    object.size = options.longs === String ? String(message.size) : message.size;
3123                else
3124                    object.size = options.longs === String ? $util.Long.prototype.toString.call(message.size) : options.longs === Number ? new $util.LongBits(message.size.low >>> 0, message.size.high >>> 0).toNumber(true) : message.size;
3125            if (message.partitionNames && message.partitionNames.length) {
3126                object.partitionNames = [];
3127                for (let j = 0; j < message.partitionNames.length; ++j)
3128                    object.partitionNames[j] = message.partitionNames[j];
3129            }
3130            return object;
3131        };
3132
3133        /**
3134         * Converts this DynamicPartitionGroup to JSON.
3135         * @function toJSON
3136         * @memberof chromeos_update_engine.DynamicPartitionGroup
3137         * @instance
3138         * @returns {Object.<string,*>} JSON object
3139         */
3140        DynamicPartitionGroup.prototype.toJSON = function toJSON() {
3141            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3142        };
3143
3144        return DynamicPartitionGroup;
3145    })();
3146
3147    chromeos_update_engine.DynamicPartitionMetadata = (function() {
3148
3149        /**
3150         * Properties of a DynamicPartitionMetadata.
3151         * @memberof chromeos_update_engine
3152         * @interface IDynamicPartitionMetadata
3153         * @property {Array.<chromeos_update_engine.IDynamicPartitionGroup>|null} [groups] DynamicPartitionMetadata groups
3154         * @property {boolean|null} [snapshotEnabled] DynamicPartitionMetadata snapshotEnabled
3155         * @property {boolean|null} [vabcEnabled] DynamicPartitionMetadata vabcEnabled
3156         * @property {string|null} [vabcCompressionParam] DynamicPartitionMetadata vabcCompressionParam
3157         * @property {number|null} [cowVersion] DynamicPartitionMetadata cowVersion
3158         */
3159
3160        /**
3161         * Constructs a new DynamicPartitionMetadata.
3162         * @memberof chromeos_update_engine
3163         * @classdesc Represents a DynamicPartitionMetadata.
3164         * @implements IDynamicPartitionMetadata
3165         * @constructor
3166         * @param {chromeos_update_engine.IDynamicPartitionMetadata=} [properties] Properties to set
3167         */
3168        function DynamicPartitionMetadata(properties) {
3169            this.groups = [];
3170            if (properties)
3171                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3172                    if (properties[keys[i]] != null)
3173                        this[keys[i]] = properties[keys[i]];
3174        }
3175
3176        /**
3177         * DynamicPartitionMetadata groups.
3178         * @member {Array.<chromeos_update_engine.IDynamicPartitionGroup>} groups
3179         * @memberof chromeos_update_engine.DynamicPartitionMetadata
3180         * @instance
3181         */
3182        DynamicPartitionMetadata.prototype.groups = $util.emptyArray;
3183
3184        /**
3185         * DynamicPartitionMetadata snapshotEnabled.
3186         * @member {boolean} snapshotEnabled
3187         * @memberof chromeos_update_engine.DynamicPartitionMetadata
3188         * @instance
3189         */
3190        DynamicPartitionMetadata.prototype.snapshotEnabled = false;
3191
3192        /**
3193         * DynamicPartitionMetadata vabcEnabled.
3194         * @member {boolean} vabcEnabled
3195         * @memberof chromeos_update_engine.DynamicPartitionMetadata
3196         * @instance
3197         */
3198        DynamicPartitionMetadata.prototype.vabcEnabled = false;
3199
3200        /**
3201         * DynamicPartitionMetadata vabcCompressionParam.
3202         * @member {string} vabcCompressionParam
3203         * @memberof chromeos_update_engine.DynamicPartitionMetadata
3204         * @instance
3205         */
3206        DynamicPartitionMetadata.prototype.vabcCompressionParam = "";
3207
3208        /**
3209         * DynamicPartitionMetadata cowVersion.
3210         * @member {number} cowVersion
3211         * @memberof chromeos_update_engine.DynamicPartitionMetadata
3212         * @instance
3213         */
3214        DynamicPartitionMetadata.prototype.cowVersion = 0;
3215
3216        /**
3217         * Creates a new DynamicPartitionMetadata instance using the specified properties.
3218         * @function create
3219         * @memberof chromeos_update_engine.DynamicPartitionMetadata
3220         * @static
3221         * @param {chromeos_update_engine.IDynamicPartitionMetadata=} [properties] Properties to set
3222         * @returns {chromeos_update_engine.DynamicPartitionMetadata} DynamicPartitionMetadata instance
3223         */
3224        DynamicPartitionMetadata.create = function create(properties) {
3225            return new DynamicPartitionMetadata(properties);
3226        };
3227
3228        /**
3229         * Encodes the specified DynamicPartitionMetadata message. Does not implicitly {@link chromeos_update_engine.DynamicPartitionMetadata.verify|verify} messages.
3230         * @function encode
3231         * @memberof chromeos_update_engine.DynamicPartitionMetadata
3232         * @static
3233         * @param {chromeos_update_engine.IDynamicPartitionMetadata} message DynamicPartitionMetadata message or plain object to encode
3234         * @param {$protobuf.Writer} [writer] Writer to encode to
3235         * @returns {$protobuf.Writer} Writer
3236         */
3237        DynamicPartitionMetadata.encode = function encode(message, writer) {
3238            if (!writer)
3239                writer = $Writer.create();
3240            if (message.groups != null && message.groups.length)
3241                for (let i = 0; i < message.groups.length; ++i)
3242                    $root.chromeos_update_engine.DynamicPartitionGroup.encode(message.groups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
3243            if (message.snapshotEnabled != null && Object.hasOwnProperty.call(message, "snapshotEnabled"))
3244                writer.uint32(/* id 2, wireType 0 =*/16).bool(message.snapshotEnabled);
3245            if (message.vabcEnabled != null && Object.hasOwnProperty.call(message, "vabcEnabled"))
3246                writer.uint32(/* id 3, wireType 0 =*/24).bool(message.vabcEnabled);
3247            if (message.vabcCompressionParam != null && Object.hasOwnProperty.call(message, "vabcCompressionParam"))
3248                writer.uint32(/* id 4, wireType 2 =*/34).string(message.vabcCompressionParam);
3249            if (message.cowVersion != null && Object.hasOwnProperty.call(message, "cowVersion"))
3250                writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.cowVersion);
3251            return writer;
3252        };
3253
3254        /**
3255         * Encodes the specified DynamicPartitionMetadata message, length delimited. Does not implicitly {@link chromeos_update_engine.DynamicPartitionMetadata.verify|verify} messages.
3256         * @function encodeDelimited
3257         * @memberof chromeos_update_engine.DynamicPartitionMetadata
3258         * @static
3259         * @param {chromeos_update_engine.IDynamicPartitionMetadata} message DynamicPartitionMetadata message or plain object to encode
3260         * @param {$protobuf.Writer} [writer] Writer to encode to
3261         * @returns {$protobuf.Writer} Writer
3262         */
3263        DynamicPartitionMetadata.encodeDelimited = function encodeDelimited(message, writer) {
3264            return this.encode(message, writer).ldelim();
3265        };
3266
3267        /**
3268         * Decodes a DynamicPartitionMetadata message from the specified reader or buffer.
3269         * @function decode
3270         * @memberof chromeos_update_engine.DynamicPartitionMetadata
3271         * @static
3272         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3273         * @param {number} [length] Message length if known beforehand
3274         * @returns {chromeos_update_engine.DynamicPartitionMetadata} DynamicPartitionMetadata
3275         * @throws {Error} If the payload is not a reader or valid buffer
3276         * @throws {$protobuf.util.ProtocolError} If required fields are missing
3277         */
3278        DynamicPartitionMetadata.decode = function decode(reader, length) {
3279            if (!(reader instanceof $Reader))
3280                reader = $Reader.create(reader);
3281            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.chromeos_update_engine.DynamicPartitionMetadata();
3282            while (reader.pos < end) {
3283                let tag = reader.uint32();
3284                switch (tag >>> 3) {
3285                case 1:
3286                    if (!(message.groups && message.groups.length))
3287                        message.groups = [];
3288                    message.groups.push($root.chromeos_update_engine.DynamicPartitionGroup.decode(reader, reader.uint32()));
3289                    break;
3290                case 2:
3291                    message.snapshotEnabled = reader.bool();
3292                    break;
3293                case 3:
3294                    message.vabcEnabled = reader.bool();
3295                    break;
3296                case 4:
3297                    message.vabcCompressionParam = reader.string();
3298                    break;
3299                case 5:
3300                    message.cowVersion = reader.uint32();
3301                    break;
3302                default:
3303                    reader.skipType(tag & 7);
3304                    break;
3305                }
3306            }
3307            return message;
3308        };
3309
3310        /**
3311         * Decodes a DynamicPartitionMetadata message from the specified reader or buffer, length delimited.
3312         * @function decodeDelimited
3313         * @memberof chromeos_update_engine.DynamicPartitionMetadata
3314         * @static
3315         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3316         * @returns {chromeos_update_engine.DynamicPartitionMetadata} DynamicPartitionMetadata
3317         * @throws {Error} If the payload is not a reader or valid buffer
3318         * @throws {$protobuf.util.ProtocolError} If required fields are missing
3319         */
3320        DynamicPartitionMetadata.decodeDelimited = function decodeDelimited(reader) {
3321            if (!(reader instanceof $Reader))
3322                reader = new $Reader(reader);
3323            return this.decode(reader, reader.uint32());
3324        };
3325
3326        /**
3327         * Verifies a DynamicPartitionMetadata message.
3328         * @function verify
3329         * @memberof chromeos_update_engine.DynamicPartitionMetadata
3330         * @static
3331         * @param {Object.<string,*>} message Plain object to verify
3332         * @returns {string|null} `null` if valid, otherwise the reason why it is not
3333         */
3334        DynamicPartitionMetadata.verify = function verify(message) {
3335            if (typeof message !== "object" || message === null)
3336                return "object expected";
3337            if (message.groups != null && message.hasOwnProperty("groups")) {
3338                if (!Array.isArray(message.groups))
3339                    return "groups: array expected";
3340                for (let i = 0; i < message.groups.length; ++i) {
3341                    let error = $root.chromeos_update_engine.DynamicPartitionGroup.verify(message.groups[i]);
3342                    if (error)
3343                        return "groups." + error;
3344                }
3345            }
3346            if (message.snapshotEnabled != null && message.hasOwnProperty("snapshotEnabled"))
3347                if (typeof message.snapshotEnabled !== "boolean")
3348                    return "snapshotEnabled: boolean expected";
3349            if (message.vabcEnabled != null && message.hasOwnProperty("vabcEnabled"))
3350                if (typeof message.vabcEnabled !== "boolean")
3351                    return "vabcEnabled: boolean expected";
3352            if (message.vabcCompressionParam != null && message.hasOwnProperty("vabcCompressionParam"))
3353                if (!$util.isString(message.vabcCompressionParam))
3354                    return "vabcCompressionParam: string expected";
3355            if (message.cowVersion != null && message.hasOwnProperty("cowVersion"))
3356                if (!$util.isInteger(message.cowVersion))
3357                    return "cowVersion: integer expected";
3358            return null;
3359        };
3360
3361        /**
3362         * Creates a DynamicPartitionMetadata message from a plain object. Also converts values to their respective internal types.
3363         * @function fromObject
3364         * @memberof chromeos_update_engine.DynamicPartitionMetadata
3365         * @static
3366         * @param {Object.<string,*>} object Plain object
3367         * @returns {chromeos_update_engine.DynamicPartitionMetadata} DynamicPartitionMetadata
3368         */
3369        DynamicPartitionMetadata.fromObject = function fromObject(object) {
3370            if (object instanceof $root.chromeos_update_engine.DynamicPartitionMetadata)
3371                return object;
3372            let message = new $root.chromeos_update_engine.DynamicPartitionMetadata();
3373            if (object.groups) {
3374                if (!Array.isArray(object.groups))
3375                    throw TypeError(".chromeos_update_engine.DynamicPartitionMetadata.groups: array expected");
3376                message.groups = [];
3377                for (let i = 0; i < object.groups.length; ++i) {
3378                    if (typeof object.groups[i] !== "object")
3379                        throw TypeError(".chromeos_update_engine.DynamicPartitionMetadata.groups: object expected");
3380                    message.groups[i] = $root.chromeos_update_engine.DynamicPartitionGroup.fromObject(object.groups[i]);
3381                }
3382            }
3383            if (object.snapshotEnabled != null)
3384                message.snapshotEnabled = Boolean(object.snapshotEnabled);
3385            if (object.vabcEnabled != null)
3386                message.vabcEnabled = Boolean(object.vabcEnabled);
3387            if (object.vabcCompressionParam != null)
3388                message.vabcCompressionParam = String(object.vabcCompressionParam);
3389            if (object.cowVersion != null)
3390                message.cowVersion = object.cowVersion >>> 0;
3391            return message;
3392        };
3393
3394        /**
3395         * Creates a plain object from a DynamicPartitionMetadata message. Also converts values to other types if specified.
3396         * @function toObject
3397         * @memberof chromeos_update_engine.DynamicPartitionMetadata
3398         * @static
3399         * @param {chromeos_update_engine.DynamicPartitionMetadata} message DynamicPartitionMetadata
3400         * @param {$protobuf.IConversionOptions} [options] Conversion options
3401         * @returns {Object.<string,*>} Plain object
3402         */
3403        DynamicPartitionMetadata.toObject = function toObject(message, options) {
3404            if (!options)
3405                options = {};
3406            let object = {};
3407            if (options.arrays || options.defaults)
3408                object.groups = [];
3409            if (options.defaults) {
3410                object.snapshotEnabled = false;
3411                object.vabcEnabled = false;
3412                object.vabcCompressionParam = "";
3413                object.cowVersion = 0;
3414            }
3415            if (message.groups && message.groups.length) {
3416                object.groups = [];
3417                for (let j = 0; j < message.groups.length; ++j)
3418                    object.groups[j] = $root.chromeos_update_engine.DynamicPartitionGroup.toObject(message.groups[j], options);
3419            }
3420            if (message.snapshotEnabled != null && message.hasOwnProperty("snapshotEnabled"))
3421                object.snapshotEnabled = message.snapshotEnabled;
3422            if (message.vabcEnabled != null && message.hasOwnProperty("vabcEnabled"))
3423                object.vabcEnabled = message.vabcEnabled;
3424            if (message.vabcCompressionParam != null && message.hasOwnProperty("vabcCompressionParam"))
3425                object.vabcCompressionParam = message.vabcCompressionParam;
3426            if (message.cowVersion != null && message.hasOwnProperty("cowVersion"))
3427                object.cowVersion = message.cowVersion;
3428            return object;
3429        };
3430
3431        /**
3432         * Converts this DynamicPartitionMetadata to JSON.
3433         * @function toJSON
3434         * @memberof chromeos_update_engine.DynamicPartitionMetadata
3435         * @instance
3436         * @returns {Object.<string,*>} JSON object
3437         */
3438        DynamicPartitionMetadata.prototype.toJSON = function toJSON() {
3439            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3440        };
3441
3442        return DynamicPartitionMetadata;
3443    })();
3444
3445    chromeos_update_engine.ApexInfo = (function() {
3446
3447        /**
3448         * Properties of an ApexInfo.
3449         * @memberof chromeos_update_engine
3450         * @interface IApexInfo
3451         * @property {string|null} [packageName] ApexInfo packageName
3452         * @property {number|Long|null} [version] ApexInfo version
3453         * @property {boolean|null} [isCompressed] ApexInfo isCompressed
3454         * @property {number|Long|null} [decompressedSize] ApexInfo decompressedSize
3455         */
3456
3457        /**
3458         * Constructs a new ApexInfo.
3459         * @memberof chromeos_update_engine
3460         * @classdesc Represents an ApexInfo.
3461         * @implements IApexInfo
3462         * @constructor
3463         * @param {chromeos_update_engine.IApexInfo=} [properties] Properties to set
3464         */
3465        function ApexInfo(properties) {
3466            if (properties)
3467                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3468                    if (properties[keys[i]] != null)
3469                        this[keys[i]] = properties[keys[i]];
3470        }
3471
3472        /**
3473         * ApexInfo packageName.
3474         * @member {string} packageName
3475         * @memberof chromeos_update_engine.ApexInfo
3476         * @instance
3477         */
3478        ApexInfo.prototype.packageName = "";
3479
3480        /**
3481         * ApexInfo version.
3482         * @member {number|Long} version
3483         * @memberof chromeos_update_engine.ApexInfo
3484         * @instance
3485         */
3486        ApexInfo.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
3487
3488        /**
3489         * ApexInfo isCompressed.
3490         * @member {boolean} isCompressed
3491         * @memberof chromeos_update_engine.ApexInfo
3492         * @instance
3493         */
3494        ApexInfo.prototype.isCompressed = false;
3495
3496        /**
3497         * ApexInfo decompressedSize.
3498         * @member {number|Long} decompressedSize
3499         * @memberof chromeos_update_engine.ApexInfo
3500         * @instance
3501         */
3502        ApexInfo.prototype.decompressedSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
3503
3504        /**
3505         * Creates a new ApexInfo instance using the specified properties.
3506         * @function create
3507         * @memberof chromeos_update_engine.ApexInfo
3508         * @static
3509         * @param {chromeos_update_engine.IApexInfo=} [properties] Properties to set
3510         * @returns {chromeos_update_engine.ApexInfo} ApexInfo instance
3511         */
3512        ApexInfo.create = function create(properties) {
3513            return new ApexInfo(properties);
3514        };
3515
3516        /**
3517         * Encodes the specified ApexInfo message. Does not implicitly {@link chromeos_update_engine.ApexInfo.verify|verify} messages.
3518         * @function encode
3519         * @memberof chromeos_update_engine.ApexInfo
3520         * @static
3521         * @param {chromeos_update_engine.IApexInfo} message ApexInfo message or plain object to encode
3522         * @param {$protobuf.Writer} [writer] Writer to encode to
3523         * @returns {$protobuf.Writer} Writer
3524         */
3525        ApexInfo.encode = function encode(message, writer) {
3526            if (!writer)
3527                writer = $Writer.create();
3528            if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName"))
3529                writer.uint32(/* id 1, wireType 2 =*/10).string(message.packageName);
3530            if (message.version != null && Object.hasOwnProperty.call(message, "version"))
3531                writer.uint32(/* id 2, wireType 0 =*/16).int64(message.version);
3532            if (message.isCompressed != null && Object.hasOwnProperty.call(message, "isCompressed"))
3533                writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isCompressed);
3534            if (message.decompressedSize != null && Object.hasOwnProperty.call(message, "decompressedSize"))
3535                writer.uint32(/* id 4, wireType 0 =*/32).int64(message.decompressedSize);
3536            return writer;
3537        };
3538
3539        /**
3540         * Encodes the specified ApexInfo message, length delimited. Does not implicitly {@link chromeos_update_engine.ApexInfo.verify|verify} messages.
3541         * @function encodeDelimited
3542         * @memberof chromeos_update_engine.ApexInfo
3543         * @static
3544         * @param {chromeos_update_engine.IApexInfo} message ApexInfo message or plain object to encode
3545         * @param {$protobuf.Writer} [writer] Writer to encode to
3546         * @returns {$protobuf.Writer} Writer
3547         */
3548        ApexInfo.encodeDelimited = function encodeDelimited(message, writer) {
3549            return this.encode(message, writer).ldelim();
3550        };
3551
3552        /**
3553         * Decodes an ApexInfo message from the specified reader or buffer.
3554         * @function decode
3555         * @memberof chromeos_update_engine.ApexInfo
3556         * @static
3557         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3558         * @param {number} [length] Message length if known beforehand
3559         * @returns {chromeos_update_engine.ApexInfo} ApexInfo
3560         * @throws {Error} If the payload is not a reader or valid buffer
3561         * @throws {$protobuf.util.ProtocolError} If required fields are missing
3562         */
3563        ApexInfo.decode = function decode(reader, length) {
3564            if (!(reader instanceof $Reader))
3565                reader = $Reader.create(reader);
3566            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.chromeos_update_engine.ApexInfo();
3567            while (reader.pos < end) {
3568                let tag = reader.uint32();
3569                switch (tag >>> 3) {
3570                case 1:
3571                    message.packageName = reader.string();
3572                    break;
3573                case 2:
3574                    message.version = reader.int64();
3575                    break;
3576                case 3:
3577                    message.isCompressed = reader.bool();
3578                    break;
3579                case 4:
3580                    message.decompressedSize = reader.int64();
3581                    break;
3582                default:
3583                    reader.skipType(tag & 7);
3584                    break;
3585                }
3586            }
3587            return message;
3588        };
3589
3590        /**
3591         * Decodes an ApexInfo message from the specified reader or buffer, length delimited.
3592         * @function decodeDelimited
3593         * @memberof chromeos_update_engine.ApexInfo
3594         * @static
3595         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3596         * @returns {chromeos_update_engine.ApexInfo} ApexInfo
3597         * @throws {Error} If the payload is not a reader or valid buffer
3598         * @throws {$protobuf.util.ProtocolError} If required fields are missing
3599         */
3600        ApexInfo.decodeDelimited = function decodeDelimited(reader) {
3601            if (!(reader instanceof $Reader))
3602                reader = new $Reader(reader);
3603            return this.decode(reader, reader.uint32());
3604        };
3605
3606        /**
3607         * Verifies an ApexInfo message.
3608         * @function verify
3609         * @memberof chromeos_update_engine.ApexInfo
3610         * @static
3611         * @param {Object.<string,*>} message Plain object to verify
3612         * @returns {string|null} `null` if valid, otherwise the reason why it is not
3613         */
3614        ApexInfo.verify = function verify(message) {
3615            if (typeof message !== "object" || message === null)
3616                return "object expected";
3617            if (message.packageName != null && message.hasOwnProperty("packageName"))
3618                if (!$util.isString(message.packageName))
3619                    return "packageName: string expected";
3620            if (message.version != null && message.hasOwnProperty("version"))
3621                if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high)))
3622                    return "version: integer|Long expected";
3623            if (message.isCompressed != null && message.hasOwnProperty("isCompressed"))
3624                if (typeof message.isCompressed !== "boolean")
3625                    return "isCompressed: boolean expected";
3626            if (message.decompressedSize != null && message.hasOwnProperty("decompressedSize"))
3627                if (!$util.isInteger(message.decompressedSize) && !(message.decompressedSize && $util.isInteger(message.decompressedSize.low) && $util.isInteger(message.decompressedSize.high)))
3628                    return "decompressedSize: integer|Long expected";
3629            return null;
3630        };
3631
3632        /**
3633         * Creates an ApexInfo message from a plain object. Also converts values to their respective internal types.
3634         * @function fromObject
3635         * @memberof chromeos_update_engine.ApexInfo
3636         * @static
3637         * @param {Object.<string,*>} object Plain object
3638         * @returns {chromeos_update_engine.ApexInfo} ApexInfo
3639         */
3640        ApexInfo.fromObject = function fromObject(object) {
3641            if (object instanceof $root.chromeos_update_engine.ApexInfo)
3642                return object;
3643            let message = new $root.chromeos_update_engine.ApexInfo();
3644            if (object.packageName != null)
3645                message.packageName = String(object.packageName);
3646            if (object.version != null)
3647                if ($util.Long)
3648                    (message.version = $util.Long.fromValue(object.version)).unsigned = false;
3649                else if (typeof object.version === "string")
3650                    message.version = parseInt(object.version, 10);
3651                else if (typeof object.version === "number")
3652                    message.version = object.version;
3653                else if (typeof object.version === "object")
3654                    message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber();
3655            if (object.isCompressed != null)
3656                message.isCompressed = Boolean(object.isCompressed);
3657            if (object.decompressedSize != null)
3658                if ($util.Long)
3659                    (message.decompressedSize = $util.Long.fromValue(object.decompressedSize)).unsigned = false;
3660                else if (typeof object.decompressedSize === "string")
3661                    message.decompressedSize = parseInt(object.decompressedSize, 10);
3662                else if (typeof object.decompressedSize === "number")
3663                    message.decompressedSize = object.decompressedSize;
3664                else if (typeof object.decompressedSize === "object")
3665                    message.decompressedSize = new $util.LongBits(object.decompressedSize.low >>> 0, object.decompressedSize.high >>> 0).toNumber();
3666            return message;
3667        };
3668
3669        /**
3670         * Creates a plain object from an ApexInfo message. Also converts values to other types if specified.
3671         * @function toObject
3672         * @memberof chromeos_update_engine.ApexInfo
3673         * @static
3674         * @param {chromeos_update_engine.ApexInfo} message ApexInfo
3675         * @param {$protobuf.IConversionOptions} [options] Conversion options
3676         * @returns {Object.<string,*>} Plain object
3677         */
3678        ApexInfo.toObject = function toObject(message, options) {
3679            if (!options)
3680                options = {};
3681            let object = {};
3682            if (options.defaults) {
3683                object.packageName = "";
3684                if ($util.Long) {
3685                    let long = new $util.Long(0, 0, false);
3686                    object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
3687                } else
3688                    object.version = options.longs === String ? "0" : 0;
3689                object.isCompressed = false;
3690                if ($util.Long) {
3691                    let long = new $util.Long(0, 0, false);
3692                    object.decompressedSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
3693                } else
3694                    object.decompressedSize = options.longs === String ? "0" : 0;
3695            }
3696            if (message.packageName != null && message.hasOwnProperty("packageName"))
3697                object.packageName = message.packageName;
3698            if (message.version != null && message.hasOwnProperty("version"))
3699                if (typeof message.version === "number")
3700                    object.version = options.longs === String ? String(message.version) : message.version;
3701                else
3702                    object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version;
3703            if (message.isCompressed != null && message.hasOwnProperty("isCompressed"))
3704                object.isCompressed = message.isCompressed;
3705            if (message.decompressedSize != null && message.hasOwnProperty("decompressedSize"))
3706                if (typeof message.decompressedSize === "number")
3707                    object.decompressedSize = options.longs === String ? String(message.decompressedSize) : message.decompressedSize;
3708                else
3709                    object.decompressedSize = options.longs === String ? $util.Long.prototype.toString.call(message.decompressedSize) : options.longs === Number ? new $util.LongBits(message.decompressedSize.low >>> 0, message.decompressedSize.high >>> 0).toNumber() : message.decompressedSize;
3710            return object;
3711        };
3712
3713        /**
3714         * Converts this ApexInfo to JSON.
3715         * @function toJSON
3716         * @memberof chromeos_update_engine.ApexInfo
3717         * @instance
3718         * @returns {Object.<string,*>} JSON object
3719         */
3720        ApexInfo.prototype.toJSON = function toJSON() {
3721            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3722        };
3723
3724        return ApexInfo;
3725    })();
3726
3727    chromeos_update_engine.ApexMetadata = (function() {
3728
3729        /**
3730         * Properties of an ApexMetadata.
3731         * @memberof chromeos_update_engine
3732         * @interface IApexMetadata
3733         * @property {Array.<chromeos_update_engine.IApexInfo>|null} [apexInfo] ApexMetadata apexInfo
3734         */
3735
3736        /**
3737         * Constructs a new ApexMetadata.
3738         * @memberof chromeos_update_engine
3739         * @classdesc Represents an ApexMetadata.
3740         * @implements IApexMetadata
3741         * @constructor
3742         * @param {chromeos_update_engine.IApexMetadata=} [properties] Properties to set
3743         */
3744        function ApexMetadata(properties) {
3745            this.apexInfo = [];
3746            if (properties)
3747                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3748                    if (properties[keys[i]] != null)
3749                        this[keys[i]] = properties[keys[i]];
3750        }
3751
3752        /**
3753         * ApexMetadata apexInfo.
3754         * @member {Array.<chromeos_update_engine.IApexInfo>} apexInfo
3755         * @memberof chromeos_update_engine.ApexMetadata
3756         * @instance
3757         */
3758        ApexMetadata.prototype.apexInfo = $util.emptyArray;
3759
3760        /**
3761         * Creates a new ApexMetadata instance using the specified properties.
3762         * @function create
3763         * @memberof chromeos_update_engine.ApexMetadata
3764         * @static
3765         * @param {chromeos_update_engine.IApexMetadata=} [properties] Properties to set
3766         * @returns {chromeos_update_engine.ApexMetadata} ApexMetadata instance
3767         */
3768        ApexMetadata.create = function create(properties) {
3769            return new ApexMetadata(properties);
3770        };
3771
3772        /**
3773         * Encodes the specified ApexMetadata message. Does not implicitly {@link chromeos_update_engine.ApexMetadata.verify|verify} messages.
3774         * @function encode
3775         * @memberof chromeos_update_engine.ApexMetadata
3776         * @static
3777         * @param {chromeos_update_engine.IApexMetadata} message ApexMetadata message or plain object to encode
3778         * @param {$protobuf.Writer} [writer] Writer to encode to
3779         * @returns {$protobuf.Writer} Writer
3780         */
3781        ApexMetadata.encode = function encode(message, writer) {
3782            if (!writer)
3783                writer = $Writer.create();
3784            if (message.apexInfo != null && message.apexInfo.length)
3785                for (let i = 0; i < message.apexInfo.length; ++i)
3786                    $root.chromeos_update_engine.ApexInfo.encode(message.apexInfo[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
3787            return writer;
3788        };
3789
3790        /**
3791         * Encodes the specified ApexMetadata message, length delimited. Does not implicitly {@link chromeos_update_engine.ApexMetadata.verify|verify} messages.
3792         * @function encodeDelimited
3793         * @memberof chromeos_update_engine.ApexMetadata
3794         * @static
3795         * @param {chromeos_update_engine.IApexMetadata} message ApexMetadata message or plain object to encode
3796         * @param {$protobuf.Writer} [writer] Writer to encode to
3797         * @returns {$protobuf.Writer} Writer
3798         */
3799        ApexMetadata.encodeDelimited = function encodeDelimited(message, writer) {
3800            return this.encode(message, writer).ldelim();
3801        };
3802
3803        /**
3804         * Decodes an ApexMetadata message from the specified reader or buffer.
3805         * @function decode
3806         * @memberof chromeos_update_engine.ApexMetadata
3807         * @static
3808         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3809         * @param {number} [length] Message length if known beforehand
3810         * @returns {chromeos_update_engine.ApexMetadata} ApexMetadata
3811         * @throws {Error} If the payload is not a reader or valid buffer
3812         * @throws {$protobuf.util.ProtocolError} If required fields are missing
3813         */
3814        ApexMetadata.decode = function decode(reader, length) {
3815            if (!(reader instanceof $Reader))
3816                reader = $Reader.create(reader);
3817            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.chromeos_update_engine.ApexMetadata();
3818            while (reader.pos < end) {
3819                let tag = reader.uint32();
3820                switch (tag >>> 3) {
3821                case 1:
3822                    if (!(message.apexInfo && message.apexInfo.length))
3823                        message.apexInfo = [];
3824                    message.apexInfo.push($root.chromeos_update_engine.ApexInfo.decode(reader, reader.uint32()));
3825                    break;
3826                default:
3827                    reader.skipType(tag & 7);
3828                    break;
3829                }
3830            }
3831            return message;
3832        };
3833
3834        /**
3835         * Decodes an ApexMetadata message from the specified reader or buffer, length delimited.
3836         * @function decodeDelimited
3837         * @memberof chromeos_update_engine.ApexMetadata
3838         * @static
3839         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3840         * @returns {chromeos_update_engine.ApexMetadata} ApexMetadata
3841         * @throws {Error} If the payload is not a reader or valid buffer
3842         * @throws {$protobuf.util.ProtocolError} If required fields are missing
3843         */
3844        ApexMetadata.decodeDelimited = function decodeDelimited(reader) {
3845            if (!(reader instanceof $Reader))
3846                reader = new $Reader(reader);
3847            return this.decode(reader, reader.uint32());
3848        };
3849
3850        /**
3851         * Verifies an ApexMetadata message.
3852         * @function verify
3853         * @memberof chromeos_update_engine.ApexMetadata
3854         * @static
3855         * @param {Object.<string,*>} message Plain object to verify
3856         * @returns {string|null} `null` if valid, otherwise the reason why it is not
3857         */
3858        ApexMetadata.verify = function verify(message) {
3859            if (typeof message !== "object" || message === null)
3860                return "object expected";
3861            if (message.apexInfo != null && message.hasOwnProperty("apexInfo")) {
3862                if (!Array.isArray(message.apexInfo))
3863                    return "apexInfo: array expected";
3864                for (let i = 0; i < message.apexInfo.length; ++i) {
3865                    let error = $root.chromeos_update_engine.ApexInfo.verify(message.apexInfo[i]);
3866                    if (error)
3867                        return "apexInfo." + error;
3868                }
3869            }
3870            return null;
3871        };
3872
3873        /**
3874         * Creates an ApexMetadata message from a plain object. Also converts values to their respective internal types.
3875         * @function fromObject
3876         * @memberof chromeos_update_engine.ApexMetadata
3877         * @static
3878         * @param {Object.<string,*>} object Plain object
3879         * @returns {chromeos_update_engine.ApexMetadata} ApexMetadata
3880         */
3881        ApexMetadata.fromObject = function fromObject(object) {
3882            if (object instanceof $root.chromeos_update_engine.ApexMetadata)
3883                return object;
3884            let message = new $root.chromeos_update_engine.ApexMetadata();
3885            if (object.apexInfo) {
3886                if (!Array.isArray(object.apexInfo))
3887                    throw TypeError(".chromeos_update_engine.ApexMetadata.apexInfo: array expected");
3888                message.apexInfo = [];
3889                for (let i = 0; i < object.apexInfo.length; ++i) {
3890                    if (typeof object.apexInfo[i] !== "object")
3891                        throw TypeError(".chromeos_update_engine.ApexMetadata.apexInfo: object expected");
3892                    message.apexInfo[i] = $root.chromeos_update_engine.ApexInfo.fromObject(object.apexInfo[i]);
3893                }
3894            }
3895            return message;
3896        };
3897
3898        /**
3899         * Creates a plain object from an ApexMetadata message. Also converts values to other types if specified.
3900         * @function toObject
3901         * @memberof chromeos_update_engine.ApexMetadata
3902         * @static
3903         * @param {chromeos_update_engine.ApexMetadata} message ApexMetadata
3904         * @param {$protobuf.IConversionOptions} [options] Conversion options
3905         * @returns {Object.<string,*>} Plain object
3906         */
3907        ApexMetadata.toObject = function toObject(message, options) {
3908            if (!options)
3909                options = {};
3910            let object = {};
3911            if (options.arrays || options.defaults)
3912                object.apexInfo = [];
3913            if (message.apexInfo && message.apexInfo.length) {
3914                object.apexInfo = [];
3915                for (let j = 0; j < message.apexInfo.length; ++j)
3916                    object.apexInfo[j] = $root.chromeos_update_engine.ApexInfo.toObject(message.apexInfo[j], options);
3917            }
3918            return object;
3919        };
3920
3921        /**
3922         * Converts this ApexMetadata to JSON.
3923         * @function toJSON
3924         * @memberof chromeos_update_engine.ApexMetadata
3925         * @instance
3926         * @returns {Object.<string,*>} JSON object
3927         */
3928        ApexMetadata.prototype.toJSON = function toJSON() {
3929            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3930        };
3931
3932        return ApexMetadata;
3933    })();
3934
3935    chromeos_update_engine.DeltaArchiveManifest = (function() {
3936
3937        /**
3938         * Properties of a DeltaArchiveManifest.
3939         * @memberof chromeos_update_engine
3940         * @interface IDeltaArchiveManifest
3941         * @property {Array.<chromeos_update_engine.IInstallOperation>|null} [installOperations] DeltaArchiveManifest installOperations
3942         * @property {Array.<chromeos_update_engine.IInstallOperation>|null} [kernelInstallOperations] DeltaArchiveManifest kernelInstallOperations
3943         * @property {number|null} [blockSize] DeltaArchiveManifest blockSize
3944         * @property {number|Long|null} [signaturesOffset] DeltaArchiveManifest signaturesOffset
3945         * @property {number|Long|null} [signaturesSize] DeltaArchiveManifest signaturesSize
3946         * @property {chromeos_update_engine.IPartitionInfo|null} [oldKernelInfo] DeltaArchiveManifest oldKernelInfo
3947         * @property {chromeos_update_engine.IPartitionInfo|null} [newKernelInfo] DeltaArchiveManifest newKernelInfo
3948         * @property {chromeos_update_engine.IPartitionInfo|null} [oldRootfsInfo] DeltaArchiveManifest oldRootfsInfo
3949         * @property {chromeos_update_engine.IPartitionInfo|null} [newRootfsInfo] DeltaArchiveManifest newRootfsInfo
3950         * @property {chromeos_update_engine.IImageInfo|null} [oldImageInfo] DeltaArchiveManifest oldImageInfo
3951         * @property {chromeos_update_engine.IImageInfo|null} [newImageInfo] DeltaArchiveManifest newImageInfo
3952         * @property {number|null} [minorVersion] DeltaArchiveManifest minorVersion
3953         * @property {Array.<chromeos_update_engine.IPartitionUpdate>|null} [partitions] DeltaArchiveManifest partitions
3954         * @property {number|Long|null} [maxTimestamp] DeltaArchiveManifest maxTimestamp
3955         * @property {chromeos_update_engine.IDynamicPartitionMetadata|null} [dynamicPartitionMetadata] DeltaArchiveManifest dynamicPartitionMetadata
3956         * @property {boolean|null} [partialUpdate] DeltaArchiveManifest partialUpdate
3957         * @property {Array.<chromeos_update_engine.IApexInfo>|null} [apexInfo] DeltaArchiveManifest apexInfo
3958         */
3959
3960        /**
3961         * Constructs a new DeltaArchiveManifest.
3962         * @memberof chromeos_update_engine
3963         * @classdesc Represents a DeltaArchiveManifest.
3964         * @implements IDeltaArchiveManifest
3965         * @constructor
3966         * @param {chromeos_update_engine.IDeltaArchiveManifest=} [properties] Properties to set
3967         */
3968        function DeltaArchiveManifest(properties) {
3969            this.installOperations = [];
3970            this.kernelInstallOperations = [];
3971            this.partitions = [];
3972            this.apexInfo = [];
3973            if (properties)
3974                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3975                    if (properties[keys[i]] != null)
3976                        this[keys[i]] = properties[keys[i]];
3977        }
3978
3979        /**
3980         * DeltaArchiveManifest installOperations.
3981         * @member {Array.<chromeos_update_engine.IInstallOperation>} installOperations
3982         * @memberof chromeos_update_engine.DeltaArchiveManifest
3983         * @instance
3984         */
3985        DeltaArchiveManifest.prototype.installOperations = $util.emptyArray;
3986
3987        /**
3988         * DeltaArchiveManifest kernelInstallOperations.
3989         * @member {Array.<chromeos_update_engine.IInstallOperation>} kernelInstallOperations
3990         * @memberof chromeos_update_engine.DeltaArchiveManifest
3991         * @instance
3992         */
3993        DeltaArchiveManifest.prototype.kernelInstallOperations = $util.emptyArray;
3994
3995        /**
3996         * DeltaArchiveManifest blockSize.
3997         * @member {number} blockSize
3998         * @memberof chromeos_update_engine.DeltaArchiveManifest
3999         * @instance
4000         */
4001        DeltaArchiveManifest.prototype.blockSize = 4096;
4002
4003        /**
4004         * DeltaArchiveManifest signaturesOffset.
4005         * @member {number|Long} signaturesOffset
4006         * @memberof chromeos_update_engine.DeltaArchiveManifest
4007         * @instance
4008         */
4009        DeltaArchiveManifest.prototype.signaturesOffset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
4010
4011        /**
4012         * DeltaArchiveManifest signaturesSize.
4013         * @member {number|Long} signaturesSize
4014         * @memberof chromeos_update_engine.DeltaArchiveManifest
4015         * @instance
4016         */
4017        DeltaArchiveManifest.prototype.signaturesSize = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
4018
4019        /**
4020         * DeltaArchiveManifest oldKernelInfo.
4021         * @member {chromeos_update_engine.IPartitionInfo|null|undefined} oldKernelInfo
4022         * @memberof chromeos_update_engine.DeltaArchiveManifest
4023         * @instance
4024         */
4025        DeltaArchiveManifest.prototype.oldKernelInfo = null;
4026
4027        /**
4028         * DeltaArchiveManifest newKernelInfo.
4029         * @member {chromeos_update_engine.IPartitionInfo|null|undefined} newKernelInfo
4030         * @memberof chromeos_update_engine.DeltaArchiveManifest
4031         * @instance
4032         */
4033        DeltaArchiveManifest.prototype.newKernelInfo = null;
4034
4035        /**
4036         * DeltaArchiveManifest oldRootfsInfo.
4037         * @member {chromeos_update_engine.IPartitionInfo|null|undefined} oldRootfsInfo
4038         * @memberof chromeos_update_engine.DeltaArchiveManifest
4039         * @instance
4040         */
4041        DeltaArchiveManifest.prototype.oldRootfsInfo = null;
4042
4043        /**
4044         * DeltaArchiveManifest newRootfsInfo.
4045         * @member {chromeos_update_engine.IPartitionInfo|null|undefined} newRootfsInfo
4046         * @memberof chromeos_update_engine.DeltaArchiveManifest
4047         * @instance
4048         */
4049        DeltaArchiveManifest.prototype.newRootfsInfo = null;
4050
4051        /**
4052         * DeltaArchiveManifest oldImageInfo.
4053         * @member {chromeos_update_engine.IImageInfo|null|undefined} oldImageInfo
4054         * @memberof chromeos_update_engine.DeltaArchiveManifest
4055         * @instance
4056         */
4057        DeltaArchiveManifest.prototype.oldImageInfo = null;
4058
4059        /**
4060         * DeltaArchiveManifest newImageInfo.
4061         * @member {chromeos_update_engine.IImageInfo|null|undefined} newImageInfo
4062         * @memberof chromeos_update_engine.DeltaArchiveManifest
4063         * @instance
4064         */
4065        DeltaArchiveManifest.prototype.newImageInfo = null;
4066
4067        /**
4068         * DeltaArchiveManifest minorVersion.
4069         * @member {number} minorVersion
4070         * @memberof chromeos_update_engine.DeltaArchiveManifest
4071         * @instance
4072         */
4073        DeltaArchiveManifest.prototype.minorVersion = 0;
4074
4075        /**
4076         * DeltaArchiveManifest partitions.
4077         * @member {Array.<chromeos_update_engine.IPartitionUpdate>} partitions
4078         * @memberof chromeos_update_engine.DeltaArchiveManifest
4079         * @instance
4080         */
4081        DeltaArchiveManifest.prototype.partitions = $util.emptyArray;
4082
4083        /**
4084         * DeltaArchiveManifest maxTimestamp.
4085         * @member {number|Long} maxTimestamp
4086         * @memberof chromeos_update_engine.DeltaArchiveManifest
4087         * @instance
4088         */
4089        DeltaArchiveManifest.prototype.maxTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
4090
4091        /**
4092         * DeltaArchiveManifest dynamicPartitionMetadata.
4093         * @member {chromeos_update_engine.IDynamicPartitionMetadata|null|undefined} dynamicPartitionMetadata
4094         * @memberof chromeos_update_engine.DeltaArchiveManifest
4095         * @instance
4096         */
4097        DeltaArchiveManifest.prototype.dynamicPartitionMetadata = null;
4098
4099        /**
4100         * DeltaArchiveManifest partialUpdate.
4101         * @member {boolean} partialUpdate
4102         * @memberof chromeos_update_engine.DeltaArchiveManifest
4103         * @instance
4104         */
4105        DeltaArchiveManifest.prototype.partialUpdate = false;
4106
4107        /**
4108         * DeltaArchiveManifest apexInfo.
4109         * @member {Array.<chromeos_update_engine.IApexInfo>} apexInfo
4110         * @memberof chromeos_update_engine.DeltaArchiveManifest
4111         * @instance
4112         */
4113        DeltaArchiveManifest.prototype.apexInfo = $util.emptyArray;
4114
4115        /**
4116         * Creates a new DeltaArchiveManifest instance using the specified properties.
4117         * @function create
4118         * @memberof chromeos_update_engine.DeltaArchiveManifest
4119         * @static
4120         * @param {chromeos_update_engine.IDeltaArchiveManifest=} [properties] Properties to set
4121         * @returns {chromeos_update_engine.DeltaArchiveManifest} DeltaArchiveManifest instance
4122         */
4123        DeltaArchiveManifest.create = function create(properties) {
4124            return new DeltaArchiveManifest(properties);
4125        };
4126
4127        /**
4128         * Encodes the specified DeltaArchiveManifest message. Does not implicitly {@link chromeos_update_engine.DeltaArchiveManifest.verify|verify} messages.
4129         * @function encode
4130         * @memberof chromeos_update_engine.DeltaArchiveManifest
4131         * @static
4132         * @param {chromeos_update_engine.IDeltaArchiveManifest} message DeltaArchiveManifest message or plain object to encode
4133         * @param {$protobuf.Writer} [writer] Writer to encode to
4134         * @returns {$protobuf.Writer} Writer
4135         */
4136        DeltaArchiveManifest.encode = function encode(message, writer) {
4137            if (!writer)
4138                writer = $Writer.create();
4139            if (message.installOperations != null && message.installOperations.length)
4140                for (let i = 0; i < message.installOperations.length; ++i)
4141                    $root.chromeos_update_engine.InstallOperation.encode(message.installOperations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
4142            if (message.kernelInstallOperations != null && message.kernelInstallOperations.length)
4143                for (let i = 0; i < message.kernelInstallOperations.length; ++i)
4144                    $root.chromeos_update_engine.InstallOperation.encode(message.kernelInstallOperations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
4145            if (message.blockSize != null && Object.hasOwnProperty.call(message, "blockSize"))
4146                writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.blockSize);
4147            if (message.signaturesOffset != null && Object.hasOwnProperty.call(message, "signaturesOffset"))
4148                writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.signaturesOffset);
4149            if (message.signaturesSize != null && Object.hasOwnProperty.call(message, "signaturesSize"))
4150                writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.signaturesSize);
4151            if (message.oldKernelInfo != null && Object.hasOwnProperty.call(message, "oldKernelInfo"))
4152                $root.chromeos_update_engine.PartitionInfo.encode(message.oldKernelInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
4153            if (message.newKernelInfo != null && Object.hasOwnProperty.call(message, "newKernelInfo"))
4154                $root.chromeos_update_engine.PartitionInfo.encode(message.newKernelInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
4155            if (message.oldRootfsInfo != null && Object.hasOwnProperty.call(message, "oldRootfsInfo"))
4156                $root.chromeos_update_engine.PartitionInfo.encode(message.oldRootfsInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
4157            if (message.newRootfsInfo != null && Object.hasOwnProperty.call(message, "newRootfsInfo"))
4158                $root.chromeos_update_engine.PartitionInfo.encode(message.newRootfsInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
4159            if (message.oldImageInfo != null && Object.hasOwnProperty.call(message, "oldImageInfo"))
4160                $root.chromeos_update_engine.ImageInfo.encode(message.oldImageInfo, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
4161            if (message.newImageInfo != null && Object.hasOwnProperty.call(message, "newImageInfo"))
4162                $root.chromeos_update_engine.ImageInfo.encode(message.newImageInfo, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
4163            if (message.minorVersion != null && Object.hasOwnProperty.call(message, "minorVersion"))
4164                writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.minorVersion);
4165            if (message.partitions != null && message.partitions.length)
4166                for (let i = 0; i < message.partitions.length; ++i)
4167                    $root.chromeos_update_engine.PartitionUpdate.encode(message.partitions[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
4168            if (message.maxTimestamp != null && Object.hasOwnProperty.call(message, "maxTimestamp"))
4169                writer.uint32(/* id 14, wireType 0 =*/112).int64(message.maxTimestamp);
4170            if (message.dynamicPartitionMetadata != null && Object.hasOwnProperty.call(message, "dynamicPartitionMetadata"))
4171                $root.chromeos_update_engine.DynamicPartitionMetadata.encode(message.dynamicPartitionMetadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
4172            if (message.partialUpdate != null && Object.hasOwnProperty.call(message, "partialUpdate"))
4173                writer.uint32(/* id 16, wireType 0 =*/128).bool(message.partialUpdate);
4174            if (message.apexInfo != null && message.apexInfo.length)
4175                for (let i = 0; i < message.apexInfo.length; ++i)
4176                    $root.chromeos_update_engine.ApexInfo.encode(message.apexInfo[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
4177            return writer;
4178        };
4179
4180        /**
4181         * Encodes the specified DeltaArchiveManifest message, length delimited. Does not implicitly {@link chromeos_update_engine.DeltaArchiveManifest.verify|verify} messages.
4182         * @function encodeDelimited
4183         * @memberof chromeos_update_engine.DeltaArchiveManifest
4184         * @static
4185         * @param {chromeos_update_engine.IDeltaArchiveManifest} message DeltaArchiveManifest message or plain object to encode
4186         * @param {$protobuf.Writer} [writer] Writer to encode to
4187         * @returns {$protobuf.Writer} Writer
4188         */
4189        DeltaArchiveManifest.encodeDelimited = function encodeDelimited(message, writer) {
4190            return this.encode(message, writer).ldelim();
4191        };
4192
4193        /**
4194         * Decodes a DeltaArchiveManifest message from the specified reader or buffer.
4195         * @function decode
4196         * @memberof chromeos_update_engine.DeltaArchiveManifest
4197         * @static
4198         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4199         * @param {number} [length] Message length if known beforehand
4200         * @returns {chromeos_update_engine.DeltaArchiveManifest} DeltaArchiveManifest
4201         * @throws {Error} If the payload is not a reader or valid buffer
4202         * @throws {$protobuf.util.ProtocolError} If required fields are missing
4203         */
4204        DeltaArchiveManifest.decode = function decode(reader, length) {
4205            if (!(reader instanceof $Reader))
4206                reader = $Reader.create(reader);
4207            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.chromeos_update_engine.DeltaArchiveManifest();
4208            while (reader.pos < end) {
4209                let tag = reader.uint32();
4210                switch (tag >>> 3) {
4211                case 1:
4212                    if (!(message.installOperations && message.installOperations.length))
4213                        message.installOperations = [];
4214                    message.installOperations.push($root.chromeos_update_engine.InstallOperation.decode(reader, reader.uint32()));
4215                    break;
4216                case 2:
4217                    if (!(message.kernelInstallOperations && message.kernelInstallOperations.length))
4218                        message.kernelInstallOperations = [];
4219                    message.kernelInstallOperations.push($root.chromeos_update_engine.InstallOperation.decode(reader, reader.uint32()));
4220                    break;
4221                case 3:
4222                    message.blockSize = reader.uint32();
4223                    break;
4224                case 4:
4225                    message.signaturesOffset = reader.uint64();
4226                    break;
4227                case 5:
4228                    message.signaturesSize = reader.uint64();
4229                    break;
4230                case 6:
4231                    message.oldKernelInfo = $root.chromeos_update_engine.PartitionInfo.decode(reader, reader.uint32());
4232                    break;
4233                case 7:
4234                    message.newKernelInfo = $root.chromeos_update_engine.PartitionInfo.decode(reader, reader.uint32());
4235                    break;
4236                case 8:
4237                    message.oldRootfsInfo = $root.chromeos_update_engine.PartitionInfo.decode(reader, reader.uint32());
4238                    break;
4239                case 9:
4240                    message.newRootfsInfo = $root.chromeos_update_engine.PartitionInfo.decode(reader, reader.uint32());
4241                    break;
4242                case 10:
4243                    message.oldImageInfo = $root.chromeos_update_engine.ImageInfo.decode(reader, reader.uint32());
4244                    break;
4245                case 11:
4246                    message.newImageInfo = $root.chromeos_update_engine.ImageInfo.decode(reader, reader.uint32());
4247                    break;
4248                case 12:
4249                    message.minorVersion = reader.uint32();
4250                    break;
4251                case 13:
4252                    if (!(message.partitions && message.partitions.length))
4253                        message.partitions = [];
4254                    message.partitions.push($root.chromeos_update_engine.PartitionUpdate.decode(reader, reader.uint32()));
4255                    break;
4256                case 14:
4257                    message.maxTimestamp = reader.int64();
4258                    break;
4259                case 15:
4260                    message.dynamicPartitionMetadata = $root.chromeos_update_engine.DynamicPartitionMetadata.decode(reader, reader.uint32());
4261                    break;
4262                case 16:
4263                    message.partialUpdate = reader.bool();
4264                    break;
4265                case 17:
4266                    if (!(message.apexInfo && message.apexInfo.length))
4267                        message.apexInfo = [];
4268                    message.apexInfo.push($root.chromeos_update_engine.ApexInfo.decode(reader, reader.uint32()));
4269                    break;
4270                default:
4271                    reader.skipType(tag & 7);
4272                    break;
4273                }
4274            }
4275            return message;
4276        };
4277
4278        /**
4279         * Decodes a DeltaArchiveManifest message from the specified reader or buffer, length delimited.
4280         * @function decodeDelimited
4281         * @memberof chromeos_update_engine.DeltaArchiveManifest
4282         * @static
4283         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4284         * @returns {chromeos_update_engine.DeltaArchiveManifest} DeltaArchiveManifest
4285         * @throws {Error} If the payload is not a reader or valid buffer
4286         * @throws {$protobuf.util.ProtocolError} If required fields are missing
4287         */
4288        DeltaArchiveManifest.decodeDelimited = function decodeDelimited(reader) {
4289            if (!(reader instanceof $Reader))
4290                reader = new $Reader(reader);
4291            return this.decode(reader, reader.uint32());
4292        };
4293
4294        /**
4295         * Verifies a DeltaArchiveManifest message.
4296         * @function verify
4297         * @memberof chromeos_update_engine.DeltaArchiveManifest
4298         * @static
4299         * @param {Object.<string,*>} message Plain object to verify
4300         * @returns {string|null} `null` if valid, otherwise the reason why it is not
4301         */
4302        DeltaArchiveManifest.verify = function verify(message) {
4303            if (typeof message !== "object" || message === null)
4304                return "object expected";
4305            if (message.installOperations != null && message.hasOwnProperty("installOperations")) {
4306                if (!Array.isArray(message.installOperations))
4307                    return "installOperations: array expected";
4308                for (let i = 0; i < message.installOperations.length; ++i) {
4309                    let error = $root.chromeos_update_engine.InstallOperation.verify(message.installOperations[i]);
4310                    if (error)
4311                        return "installOperations." + error;
4312                }
4313            }
4314            if (message.kernelInstallOperations != null && message.hasOwnProperty("kernelInstallOperations")) {
4315                if (!Array.isArray(message.kernelInstallOperations))
4316                    return "kernelInstallOperations: array expected";
4317                for (let i = 0; i < message.kernelInstallOperations.length; ++i) {
4318                    let error = $root.chromeos_update_engine.InstallOperation.verify(message.kernelInstallOperations[i]);
4319                    if (error)
4320                        return "kernelInstallOperations." + error;
4321                }
4322            }
4323            if (message.blockSize != null && message.hasOwnProperty("blockSize"))
4324                if (!$util.isInteger(message.blockSize))
4325                    return "blockSize: integer expected";
4326            if (message.signaturesOffset != null && message.hasOwnProperty("signaturesOffset"))
4327                if (!$util.isInteger(message.signaturesOffset) && !(message.signaturesOffset && $util.isInteger(message.signaturesOffset.low) && $util.isInteger(message.signaturesOffset.high)))
4328                    return "signaturesOffset: integer|Long expected";
4329            if (message.signaturesSize != null && message.hasOwnProperty("signaturesSize"))
4330                if (!$util.isInteger(message.signaturesSize) && !(message.signaturesSize && $util.isInteger(message.signaturesSize.low) && $util.isInteger(message.signaturesSize.high)))
4331                    return "signaturesSize: integer|Long expected";
4332            if (message.oldKernelInfo != null && message.hasOwnProperty("oldKernelInfo")) {
4333                let error = $root.chromeos_update_engine.PartitionInfo.verify(message.oldKernelInfo);
4334                if (error)
4335                    return "oldKernelInfo." + error;
4336            }
4337            if (message.newKernelInfo != null && message.hasOwnProperty("newKernelInfo")) {
4338                let error = $root.chromeos_update_engine.PartitionInfo.verify(message.newKernelInfo);
4339                if (error)
4340                    return "newKernelInfo." + error;
4341            }
4342            if (message.oldRootfsInfo != null && message.hasOwnProperty("oldRootfsInfo")) {
4343                let error = $root.chromeos_update_engine.PartitionInfo.verify(message.oldRootfsInfo);
4344                if (error)
4345                    return "oldRootfsInfo." + error;
4346            }
4347            if (message.newRootfsInfo != null && message.hasOwnProperty("newRootfsInfo")) {
4348                let error = $root.chromeos_update_engine.PartitionInfo.verify(message.newRootfsInfo);
4349                if (error)
4350                    return "newRootfsInfo." + error;
4351            }
4352            if (message.oldImageInfo != null && message.hasOwnProperty("oldImageInfo")) {
4353                let error = $root.chromeos_update_engine.ImageInfo.verify(message.oldImageInfo);
4354                if (error)
4355                    return "oldImageInfo." + error;
4356            }
4357            if (message.newImageInfo != null && message.hasOwnProperty("newImageInfo")) {
4358                let error = $root.chromeos_update_engine.ImageInfo.verify(message.newImageInfo);
4359                if (error)
4360                    return "newImageInfo." + error;
4361            }
4362            if (message.minorVersion != null && message.hasOwnProperty("minorVersion"))
4363                if (!$util.isInteger(message.minorVersion))
4364                    return "minorVersion: integer expected";
4365            if (message.partitions != null && message.hasOwnProperty("partitions")) {
4366                if (!Array.isArray(message.partitions))
4367                    return "partitions: array expected";
4368                for (let i = 0; i < message.partitions.length; ++i) {
4369                    let error = $root.chromeos_update_engine.PartitionUpdate.verify(message.partitions[i]);
4370                    if (error)
4371                        return "partitions." + error;
4372                }
4373            }
4374            if (message.maxTimestamp != null && message.hasOwnProperty("maxTimestamp"))
4375                if (!$util.isInteger(message.maxTimestamp) && !(message.maxTimestamp && $util.isInteger(message.maxTimestamp.low) && $util.isInteger(message.maxTimestamp.high)))
4376                    return "maxTimestamp: integer|Long expected";
4377            if (message.dynamicPartitionMetadata != null && message.hasOwnProperty("dynamicPartitionMetadata")) {
4378                let error = $root.chromeos_update_engine.DynamicPartitionMetadata.verify(message.dynamicPartitionMetadata);
4379                if (error)
4380                    return "dynamicPartitionMetadata." + error;
4381            }
4382            if (message.partialUpdate != null && message.hasOwnProperty("partialUpdate"))
4383                if (typeof message.partialUpdate !== "boolean")
4384                    return "partialUpdate: boolean expected";
4385            if (message.apexInfo != null && message.hasOwnProperty("apexInfo")) {
4386                if (!Array.isArray(message.apexInfo))
4387                    return "apexInfo: array expected";
4388                for (let i = 0; i < message.apexInfo.length; ++i) {
4389                    let error = $root.chromeos_update_engine.ApexInfo.verify(message.apexInfo[i]);
4390                    if (error)
4391                        return "apexInfo." + error;
4392                }
4393            }
4394            return null;
4395        };
4396
4397        /**
4398         * Creates a DeltaArchiveManifest message from a plain object. Also converts values to their respective internal types.
4399         * @function fromObject
4400         * @memberof chromeos_update_engine.DeltaArchiveManifest
4401         * @static
4402         * @param {Object.<string,*>} object Plain object
4403         * @returns {chromeos_update_engine.DeltaArchiveManifest} DeltaArchiveManifest
4404         */
4405        DeltaArchiveManifest.fromObject = function fromObject(object) {
4406            if (object instanceof $root.chromeos_update_engine.DeltaArchiveManifest)
4407                return object;
4408            let message = new $root.chromeos_update_engine.DeltaArchiveManifest();
4409            if (object.installOperations) {
4410                if (!Array.isArray(object.installOperations))
4411                    throw TypeError(".chromeos_update_engine.DeltaArchiveManifest.installOperations: array expected");
4412                message.installOperations = [];
4413                for (let i = 0; i < object.installOperations.length; ++i) {
4414                    if (typeof object.installOperations[i] !== "object")
4415                        throw TypeError(".chromeos_update_engine.DeltaArchiveManifest.installOperations: object expected");
4416                    message.installOperations[i] = $root.chromeos_update_engine.InstallOperation.fromObject(object.installOperations[i]);
4417                }
4418            }
4419            if (object.kernelInstallOperations) {
4420                if (!Array.isArray(object.kernelInstallOperations))
4421                    throw TypeError(".chromeos_update_engine.DeltaArchiveManifest.kernelInstallOperations: array expected");
4422                message.kernelInstallOperations = [];
4423                for (let i = 0; i < object.kernelInstallOperations.length; ++i) {
4424                    if (typeof object.kernelInstallOperations[i] !== "object")
4425                        throw TypeError(".chromeos_update_engine.DeltaArchiveManifest.kernelInstallOperations: object expected");
4426                    message.kernelInstallOperations[i] = $root.chromeos_update_engine.InstallOperation.fromObject(object.kernelInstallOperations[i]);
4427                }
4428            }
4429            if (object.blockSize != null)
4430                message.blockSize = object.blockSize >>> 0;
4431            if (object.signaturesOffset != null)
4432                if ($util.Long)
4433                    (message.signaturesOffset = $util.Long.fromValue(object.signaturesOffset)).unsigned = true;
4434                else if (typeof object.signaturesOffset === "string")
4435                    message.signaturesOffset = parseInt(object.signaturesOffset, 10);
4436                else if (typeof object.signaturesOffset === "number")
4437                    message.signaturesOffset = object.signaturesOffset;
4438                else if (typeof object.signaturesOffset === "object")
4439                    message.signaturesOffset = new $util.LongBits(object.signaturesOffset.low >>> 0, object.signaturesOffset.high >>> 0).toNumber(true);
4440            if (object.signaturesSize != null)
4441                if ($util.Long)
4442                    (message.signaturesSize = $util.Long.fromValue(object.signaturesSize)).unsigned = true;
4443                else if (typeof object.signaturesSize === "string")
4444                    message.signaturesSize = parseInt(object.signaturesSize, 10);
4445                else if (typeof object.signaturesSize === "number")
4446                    message.signaturesSize = object.signaturesSize;
4447                else if (typeof object.signaturesSize === "object")
4448                    message.signaturesSize = new $util.LongBits(object.signaturesSize.low >>> 0, object.signaturesSize.high >>> 0).toNumber(true);
4449            if (object.oldKernelInfo != null) {
4450                if (typeof object.oldKernelInfo !== "object")
4451                    throw TypeError(".chromeos_update_engine.DeltaArchiveManifest.oldKernelInfo: object expected");
4452                message.oldKernelInfo = $root.chromeos_update_engine.PartitionInfo.fromObject(object.oldKernelInfo);
4453            }
4454            if (object.newKernelInfo != null) {
4455                if (typeof object.newKernelInfo !== "object")
4456                    throw TypeError(".chromeos_update_engine.DeltaArchiveManifest.newKernelInfo: object expected");
4457                message.newKernelInfo = $root.chromeos_update_engine.PartitionInfo.fromObject(object.newKernelInfo);
4458            }
4459            if (object.oldRootfsInfo != null) {
4460                if (typeof object.oldRootfsInfo !== "object")
4461                    throw TypeError(".chromeos_update_engine.DeltaArchiveManifest.oldRootfsInfo: object expected");
4462                message.oldRootfsInfo = $root.chromeos_update_engine.PartitionInfo.fromObject(object.oldRootfsInfo);
4463            }
4464            if (object.newRootfsInfo != null) {
4465                if (typeof object.newRootfsInfo !== "object")
4466                    throw TypeError(".chromeos_update_engine.DeltaArchiveManifest.newRootfsInfo: object expected");
4467                message.newRootfsInfo = $root.chromeos_update_engine.PartitionInfo.fromObject(object.newRootfsInfo);
4468            }
4469            if (object.oldImageInfo != null) {
4470                if (typeof object.oldImageInfo !== "object")
4471                    throw TypeError(".chromeos_update_engine.DeltaArchiveManifest.oldImageInfo: object expected");
4472                message.oldImageInfo = $root.chromeos_update_engine.ImageInfo.fromObject(object.oldImageInfo);
4473            }
4474            if (object.newImageInfo != null) {
4475                if (typeof object.newImageInfo !== "object")
4476                    throw TypeError(".chromeos_update_engine.DeltaArchiveManifest.newImageInfo: object expected");
4477                message.newImageInfo = $root.chromeos_update_engine.ImageInfo.fromObject(object.newImageInfo);
4478            }
4479            if (object.minorVersion != null)
4480                message.minorVersion = object.minorVersion >>> 0;
4481            if (object.partitions) {
4482                if (!Array.isArray(object.partitions))
4483                    throw TypeError(".chromeos_update_engine.DeltaArchiveManifest.partitions: array expected");
4484                message.partitions = [];
4485                for (let i = 0; i < object.partitions.length; ++i) {
4486                    if (typeof object.partitions[i] !== "object")
4487                        throw TypeError(".chromeos_update_engine.DeltaArchiveManifest.partitions: object expected");
4488                    message.partitions[i] = $root.chromeos_update_engine.PartitionUpdate.fromObject(object.partitions[i]);
4489                }
4490            }
4491            if (object.maxTimestamp != null)
4492                if ($util.Long)
4493                    (message.maxTimestamp = $util.Long.fromValue(object.maxTimestamp)).unsigned = false;
4494                else if (typeof object.maxTimestamp === "string")
4495                    message.maxTimestamp = parseInt(object.maxTimestamp, 10);
4496                else if (typeof object.maxTimestamp === "number")
4497                    message.maxTimestamp = object.maxTimestamp;
4498                else if (typeof object.maxTimestamp === "object")
4499                    message.maxTimestamp = new $util.LongBits(object.maxTimestamp.low >>> 0, object.maxTimestamp.high >>> 0).toNumber();
4500            if (object.dynamicPartitionMetadata != null) {
4501                if (typeof object.dynamicPartitionMetadata !== "object")
4502                    throw TypeError(".chromeos_update_engine.DeltaArchiveManifest.dynamicPartitionMetadata: object expected");
4503                message.dynamicPartitionMetadata = $root.chromeos_update_engine.DynamicPartitionMetadata.fromObject(object.dynamicPartitionMetadata);
4504            }
4505            if (object.partialUpdate != null)
4506                message.partialUpdate = Boolean(object.partialUpdate);
4507            if (object.apexInfo) {
4508                if (!Array.isArray(object.apexInfo))
4509                    throw TypeError(".chromeos_update_engine.DeltaArchiveManifest.apexInfo: array expected");
4510                message.apexInfo = [];
4511                for (let i = 0; i < object.apexInfo.length; ++i) {
4512                    if (typeof object.apexInfo[i] !== "object")
4513                        throw TypeError(".chromeos_update_engine.DeltaArchiveManifest.apexInfo: object expected");
4514                    message.apexInfo[i] = $root.chromeos_update_engine.ApexInfo.fromObject(object.apexInfo[i]);
4515                }
4516            }
4517            return message;
4518        };
4519
4520        /**
4521         * Creates a plain object from a DeltaArchiveManifest message. Also converts values to other types if specified.
4522         * @function toObject
4523         * @memberof chromeos_update_engine.DeltaArchiveManifest
4524         * @static
4525         * @param {chromeos_update_engine.DeltaArchiveManifest} message DeltaArchiveManifest
4526         * @param {$protobuf.IConversionOptions} [options] Conversion options
4527         * @returns {Object.<string,*>} Plain object
4528         */
4529        DeltaArchiveManifest.toObject = function toObject(message, options) {
4530            if (!options)
4531                options = {};
4532            let object = {};
4533            if (options.arrays || options.defaults) {
4534                object.installOperations = [];
4535                object.kernelInstallOperations = [];
4536                object.partitions = [];
4537                object.apexInfo = [];
4538            }
4539            if (options.defaults) {
4540                object.blockSize = 4096;
4541                if ($util.Long) {
4542                    let long = new $util.Long(0, 0, true);
4543                    object.signaturesOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
4544                } else
4545                    object.signaturesOffset = options.longs === String ? "0" : 0;
4546                if ($util.Long) {
4547                    let long = new $util.Long(0, 0, true);
4548                    object.signaturesSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
4549                } else
4550                    object.signaturesSize = options.longs === String ? "0" : 0;
4551                object.oldKernelInfo = null;
4552                object.newKernelInfo = null;
4553                object.oldRootfsInfo = null;
4554                object.newRootfsInfo = null;
4555                object.oldImageInfo = null;
4556                object.newImageInfo = null;
4557                object.minorVersion = 0;
4558                if ($util.Long) {
4559                    let long = new $util.Long(0, 0, false);
4560                    object.maxTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
4561                } else
4562                    object.maxTimestamp = options.longs === String ? "0" : 0;
4563                object.dynamicPartitionMetadata = null;
4564                object.partialUpdate = false;
4565            }
4566            if (message.installOperations && message.installOperations.length) {
4567                object.installOperations = [];
4568                for (let j = 0; j < message.installOperations.length; ++j)
4569                    object.installOperations[j] = $root.chromeos_update_engine.InstallOperation.toObject(message.installOperations[j], options);
4570            }
4571            if (message.kernelInstallOperations && message.kernelInstallOperations.length) {
4572                object.kernelInstallOperations = [];
4573                for (let j = 0; j < message.kernelInstallOperations.length; ++j)
4574                    object.kernelInstallOperations[j] = $root.chromeos_update_engine.InstallOperation.toObject(message.kernelInstallOperations[j], options);
4575            }
4576            if (message.blockSize != null && message.hasOwnProperty("blockSize"))
4577                object.blockSize = message.blockSize;
4578            if (message.signaturesOffset != null && message.hasOwnProperty("signaturesOffset"))
4579                if (typeof message.signaturesOffset === "number")
4580                    object.signaturesOffset = options.longs === String ? String(message.signaturesOffset) : message.signaturesOffset;
4581                else
4582                    object.signaturesOffset = options.longs === String ? $util.Long.prototype.toString.call(message.signaturesOffset) : options.longs === Number ? new $util.LongBits(message.signaturesOffset.low >>> 0, message.signaturesOffset.high >>> 0).toNumber(true) : message.signaturesOffset;
4583            if (message.signaturesSize != null && message.hasOwnProperty("signaturesSize"))
4584                if (typeof message.signaturesSize === "number")
4585                    object.signaturesSize = options.longs === String ? String(message.signaturesSize) : message.signaturesSize;
4586                else
4587                    object.signaturesSize = options.longs === String ? $util.Long.prototype.toString.call(message.signaturesSize) : options.longs === Number ? new $util.LongBits(message.signaturesSize.low >>> 0, message.signaturesSize.high >>> 0).toNumber(true) : message.signaturesSize;
4588            if (message.oldKernelInfo != null && message.hasOwnProperty("oldKernelInfo"))
4589                object.oldKernelInfo = $root.chromeos_update_engine.PartitionInfo.toObject(message.oldKernelInfo, options);
4590            if (message.newKernelInfo != null && message.hasOwnProperty("newKernelInfo"))
4591                object.newKernelInfo = $root.chromeos_update_engine.PartitionInfo.toObject(message.newKernelInfo, options);
4592            if (message.oldRootfsInfo != null && message.hasOwnProperty("oldRootfsInfo"))
4593                object.oldRootfsInfo = $root.chromeos_update_engine.PartitionInfo.toObject(message.oldRootfsInfo, options);
4594            if (message.newRootfsInfo != null && message.hasOwnProperty("newRootfsInfo"))
4595                object.newRootfsInfo = $root.chromeos_update_engine.PartitionInfo.toObject(message.newRootfsInfo, options);
4596            if (message.oldImageInfo != null && message.hasOwnProperty("oldImageInfo"))
4597                object.oldImageInfo = $root.chromeos_update_engine.ImageInfo.toObject(message.oldImageInfo, options);
4598            if (message.newImageInfo != null && message.hasOwnProperty("newImageInfo"))
4599                object.newImageInfo = $root.chromeos_update_engine.ImageInfo.toObject(message.newImageInfo, options);
4600            if (message.minorVersion != null && message.hasOwnProperty("minorVersion"))
4601                object.minorVersion = message.minorVersion;
4602            if (message.partitions && message.partitions.length) {
4603                object.partitions = [];
4604                for (let j = 0; j < message.partitions.length; ++j)
4605                    object.partitions[j] = $root.chromeos_update_engine.PartitionUpdate.toObject(message.partitions[j], options);
4606            }
4607            if (message.maxTimestamp != null && message.hasOwnProperty("maxTimestamp"))
4608                if (typeof message.maxTimestamp === "number")
4609                    object.maxTimestamp = options.longs === String ? String(message.maxTimestamp) : message.maxTimestamp;
4610                else
4611                    object.maxTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.maxTimestamp) : options.longs === Number ? new $util.LongBits(message.maxTimestamp.low >>> 0, message.maxTimestamp.high >>> 0).toNumber() : message.maxTimestamp;
4612            if (message.dynamicPartitionMetadata != null && message.hasOwnProperty("dynamicPartitionMetadata"))
4613                object.dynamicPartitionMetadata = $root.chromeos_update_engine.DynamicPartitionMetadata.toObject(message.dynamicPartitionMetadata, options);
4614            if (message.partialUpdate != null && message.hasOwnProperty("partialUpdate"))
4615                object.partialUpdate = message.partialUpdate;
4616            if (message.apexInfo && message.apexInfo.length) {
4617                object.apexInfo = [];
4618                for (let j = 0; j < message.apexInfo.length; ++j)
4619                    object.apexInfo[j] = $root.chromeos_update_engine.ApexInfo.toObject(message.apexInfo[j], options);
4620            }
4621            return object;
4622        };
4623
4624        /**
4625         * Converts this DeltaArchiveManifest to JSON.
4626         * @function toJSON
4627         * @memberof chromeos_update_engine.DeltaArchiveManifest
4628         * @instance
4629         * @returns {Object.<string,*>} JSON object
4630         */
4631        DeltaArchiveManifest.prototype.toJSON = function toJSON() {
4632            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4633        };
4634
4635        return DeltaArchiveManifest;
4636    })();
4637
4638    return chromeos_update_engine;
4639})();
4640
4641export { $root as default };
4642