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