UNPKG

bifcore-sdk-nodejs-bop

Version:
1,616 lines (1,377 loc) 182 kB
/* eslint-disable */ /** * @fileoverview * @enhanceable * @public */ // GENERATED CODE -- DO NOT EDIT! var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); var chain_pb = require('./chain_pb.js'); var common_pb = require('./common_pb.js'); goog.exportSymbol('proto.monitor.Authorization', null, global); goog.exportSymbol('proto.monitor.BroadcastTx', null, global); goog.exportSymbol('proto.monitor.Cert', null, global); goog.exportSymbol('proto.monitor.CertExtension', null, global); goog.exportSymbol('proto.monitor.CertExtensions', null, global); goog.exportSymbol('proto.monitor.CertPublic', null, global); goog.exportSymbol('proto.monitor.CertSign', null, global); goog.exportSymbol('proto.monitor.ChainStatus', null, global); goog.exportSymbol('proto.monitor.Disc', null, global); goog.exportSymbol('proto.monitor.Hello', null, global); goog.exportSymbol('proto.monitor.License', null, global); goog.exportSymbol('proto.monitor.LicenseMessage', null, global); goog.exportSymbol('proto.monitor.ListenAddresses', null, global); goog.exportSymbol('proto.monitor.MONITOR_MESSAGE_TYPE', null, global); goog.exportSymbol('proto.monitor.NodeInfo', null, global); goog.exportSymbol('proto.monitor.P2PConnection', null, global); goog.exportSymbol('proto.monitor.Peer', null, global); goog.exportSymbol('proto.monitor.Register', null, global); goog.exportSymbol('proto.monitor.SignAlgorithm', null, global); goog.exportSymbol('proto.monitor.SystemInfo', null, global); goog.exportSymbol('proto.monitor.SystemResource', null, global); goog.exportSymbol('proto.monitor.SystemStatus', null, global); goog.exportSymbol('proto.monitor.Validity', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.monitor.Hello = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.monitor.Hello, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.monitor.Hello.displayName = 'proto.monitor.Hello'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.monitor.Hello.prototype.toObject = function (opt_includeInstance) { return proto.monitor.Hello.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.monitor.Hello} msg The msg instance to transform. * @return {!Object} */ proto.monitor.Hello.toObject = function (includeInstance, msg) { var f, obj = { serviceVersion: msg.getServiceVersion(), connectionTimeout: msg.getConnectionTimeout(), timestamp: msg.getTimestamp() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.monitor.Hello} */ proto.monitor.Hello.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.monitor.Hello; return proto.monitor.Hello.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.monitor.Hello} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.monitor.Hello} */ proto.monitor.Hello.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); msg.setServiceVersion(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setConnectionTimeout(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setTimestamp(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.monitor.Hello} message * @param {!jspb.BinaryWriter} writer */ proto.monitor.Hello.serializeBinaryToWriter = function (message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.monitor.Hello.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.monitor.Hello.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getServiceVersion(); if (f !== 0) { writer.writeInt64( 1, f ); } f = this.getConnectionTimeout(); if (f !== 0) { writer.writeInt64( 2, f ); } f = this.getTimestamp(); if (f !== 0) { writer.writeInt64( 3, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.monitor.Hello} The clone. */ proto.monitor.Hello.prototype.cloneMessage = function () { return /** @type {!proto.monitor.Hello} */ (jspb.Message.cloneMessage(this)); }; /** * optional int64 service_version = 1; * @return {number} */ proto.monitor.Hello.prototype.getServiceVersion = function () { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.monitor.Hello.prototype.setServiceVersion = function (value) { jspb.Message.setField(this, 1, value); }; /** * optional int64 connection_timeout = 2; * @return {number} */ proto.monitor.Hello.prototype.getConnectionTimeout = function () { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0)); }; /** @param {number} value */ proto.monitor.Hello.prototype.setConnectionTimeout = function (value) { jspb.Message.setField(this, 2, value); }; /** * optional int64 timestamp = 3; * @return {number} */ proto.monitor.Hello.prototype.getTimestamp = function () { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0)); }; /** @param {number} value */ proto.monitor.Hello.prototype.setTimestamp = function (value) { jspb.Message.setField(this, 3, value); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.monitor.SystemInfo = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.monitor.SystemInfo.repeatedFields_, null); }; goog.inherits(proto.monitor.SystemInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.monitor.SystemInfo.displayName = 'proto.monitor.SystemInfo'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.monitor.SystemInfo.repeatedFields_ = [6]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.monitor.SystemInfo.prototype.toObject = function (opt_includeInstance) { return proto.monitor.SystemInfo.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.monitor.SystemInfo} msg The msg instance to transform. * @return {!Object} */ proto.monitor.SystemInfo.toObject = function (includeInstance, msg) { var f, obj = { hostName: msg.getHostName(), osVersion: msg.getOsVersion(), osBit: msg.getOsBit(), systemUptime: msg.getSystemUptime(), cpuId: msg.getCpuId(), macAddressesList: jspb.Message.getField(msg, 6) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.monitor.SystemInfo} */ proto.monitor.SystemInfo.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.monitor.SystemInfo; return proto.monitor.SystemInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.monitor.SystemInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.monitor.SystemInfo} */ proto.monitor.SystemInfo.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setHostName(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setOsVersion(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setOsBit(value); break; case 4: var value = /** @type {number} */ (reader.readInt64()); msg.setSystemUptime(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setCpuId(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.getMacAddressesList().push(value); msg.setMacAddressesList(msg.getMacAddressesList()); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.monitor.SystemInfo} message * @param {!jspb.BinaryWriter} writer */ proto.monitor.SystemInfo.serializeBinaryToWriter = function (message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.monitor.SystemInfo.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.monitor.SystemInfo.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getHostName(); if (f.length > 0) { writer.writeString( 1, f ); } f = this.getOsVersion(); if (f.length > 0) { writer.writeString( 2, f ); } f = this.getOsBit(); if (f.length > 0) { writer.writeString( 3, f ); } f = this.getSystemUptime(); if (f !== 0) { writer.writeInt64( 4, f ); } f = this.getCpuId(); if (f.length > 0) { writer.writeString( 5, f ); } f = this.getMacAddressesList(); if (f.length > 0) { writer.writeRepeatedString( 6, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.monitor.SystemInfo} The clone. */ proto.monitor.SystemInfo.prototype.cloneMessage = function () { return /** @type {!proto.monitor.SystemInfo} */ (jspb.Message.cloneMessage(this)); }; /** * optional string host_name = 1; * @return {string} */ proto.monitor.SystemInfo.prototype.getHostName = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** @param {string} value */ proto.monitor.SystemInfo.prototype.setHostName = function (value) { jspb.Message.setField(this, 1, value); }; /** * optional string os_version = 2; * @return {string} */ proto.monitor.SystemInfo.prototype.getOsVersion = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, "")); }; /** @param {string} value */ proto.monitor.SystemInfo.prototype.setOsVersion = function (value) { jspb.Message.setField(this, 2, value); }; /** * optional string os_bit = 3; * @return {string} */ proto.monitor.SystemInfo.prototype.getOsBit = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, "")); }; /** @param {string} value */ proto.monitor.SystemInfo.prototype.setOsBit = function (value) { jspb.Message.setField(this, 3, value); }; /** * optional int64 system_uptime = 4; * @return {number} */ proto.monitor.SystemInfo.prototype.getSystemUptime = function () { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 4, 0)); }; /** @param {number} value */ proto.monitor.SystemInfo.prototype.setSystemUptime = function (value) { jspb.Message.setField(this, 4, value); }; /** * optional string cpu_id = 5; * @return {string} */ proto.monitor.SystemInfo.prototype.getCpuId = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 5, "")); }; /** @param {string} value */ proto.monitor.SystemInfo.prototype.setCpuId = function (value) { jspb.Message.setField(this, 5, value); }; /** * repeated string mac_addresses = 6; * If you change this array by adding, removing or replacing elements, or if you * replace the array itself, then you must call the setter to update it. * @return {!Array.<string>} */ proto.monitor.SystemInfo.prototype.getMacAddressesList = function () { return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 6)); }; /** @param {Array.<string>} value */ proto.monitor.SystemInfo.prototype.setMacAddressesList = function (value) { jspb.Message.setField(this, 6, value || []); }; proto.monitor.SystemInfo.prototype.clearMacAddressesList = function () { jspb.Message.setField(this, 6, []); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.monitor.Register = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.monitor.Register, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.monitor.Register.displayName = 'proto.monitor.Register'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.monitor.Register.prototype.toObject = function (opt_includeInstance) { return proto.monitor.Register.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.monitor.Register} msg The msg instance to transform. * @return {!Object} */ proto.monitor.Register.toObject = function (includeInstance, msg) { var f, obj = { id: msg.getId(), blockchainVersion: msg.getBlockchainVersion(), agentVersion: msg.getAgentVersion(), networkId: msg.getNetworkId(), nodeAddress: msg.getNodeAddress(), validatorAddress: msg.getValidatorAddress(), processUptime: msg.getProcessUptime(), ledgerHeader: (f = msg.getLedgerHeader()) && chain_pb.LedgerHeader.toObject(includeInstance, f), system: (f = msg.getSystem()) && proto.monitor.SystemInfo.toObject(includeInstance, f), timestamp: msg.getTimestamp(), binPath: msg.getBinPath() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.monitor.Register} */ proto.monitor.Register.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.monitor.Register; return proto.monitor.Register.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.monitor.Register} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.monitor.Register} */ proto.monitor.Register.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setBlockchainVersion(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setAgentVersion(value); break; case 4: var value = /** @type {number} */ (reader.readInt64()); msg.setNetworkId(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setNodeAddress(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setValidatorAddress(value); break; case 7: var value = /** @type {number} */ (reader.readInt64()); msg.setProcessUptime(value); break; case 8: var value = new chain_pb.LedgerHeader; reader.readMessage(value, chain_pb.LedgerHeader.deserializeBinaryFromReader); msg.setLedgerHeader(value); break; case 9: var value = new proto.monitor.SystemInfo; reader.readMessage(value, proto.monitor.SystemInfo.deserializeBinaryFromReader); msg.setSystem(value); break; case 10: var value = /** @type {number} */ (reader.readInt64()); msg.setTimestamp(value); break; case 11: var value = /** @type {string} */ (reader.readString()); msg.setBinPath(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.monitor.Register} message * @param {!jspb.BinaryWriter} writer */ proto.monitor.Register.serializeBinaryToWriter = function (message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.monitor.Register.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.monitor.Register.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getId(); if (f.length > 0) { writer.writeString( 1, f ); } f = this.getBlockchainVersion(); if (f.length > 0) { writer.writeString( 2, f ); } f = this.getAgentVersion(); if (f !== 0) { writer.writeInt64( 3, f ); } f = this.getNetworkId(); if (f !== 0) { writer.writeInt64( 4, f ); } f = this.getNodeAddress(); if (f.length > 0) { writer.writeString( 5, f ); } f = this.getValidatorAddress(); if (f.length > 0) { writer.writeString( 6, f ); } f = this.getProcessUptime(); if (f !== 0) { writer.writeInt64( 7, f ); } f = this.getLedgerHeader(); if (f != null) { writer.writeMessage( 8, f, chain_pb.LedgerHeader.serializeBinaryToWriter ); } f = this.getSystem(); if (f != null) { writer.writeMessage( 9, f, proto.monitor.SystemInfo.serializeBinaryToWriter ); } f = this.getTimestamp(); if (f !== 0) { writer.writeInt64( 10, f ); } f = this.getBinPath(); if (f.length > 0) { writer.writeString( 11, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.monitor.Register} The clone. */ proto.monitor.Register.prototype.cloneMessage = function () { return /** @type {!proto.monitor.Register} */ (jspb.Message.cloneMessage(this)); }; /** * optional string id = 1; * @return {string} */ proto.monitor.Register.prototype.getId = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** @param {string} value */ proto.monitor.Register.prototype.setId = function (value) { jspb.Message.setField(this, 1, value); }; /** * optional string blockchain_version = 2; * @return {string} */ proto.monitor.Register.prototype.getBlockchainVersion = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, "")); }; /** @param {string} value */ proto.monitor.Register.prototype.setBlockchainVersion = function (value) { jspb.Message.setField(this, 2, value); }; /** * optional int64 agent_version = 3; * @return {number} */ proto.monitor.Register.prototype.getAgentVersion = function () { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0)); }; /** @param {number} value */ proto.monitor.Register.prototype.setAgentVersion = function (value) { jspb.Message.setField(this, 3, value); }; /** * optional int64 network_id = 4; * @return {number} */ proto.monitor.Register.prototype.getNetworkId = function () { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 4, 0)); }; /** @param {number} value */ proto.monitor.Register.prototype.setNetworkId = function (value) { jspb.Message.setField(this, 4, value); }; /** * optional string node_address = 5; * @return {string} */ proto.monitor.Register.prototype.getNodeAddress = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 5, "")); }; /** @param {string} value */ proto.monitor.Register.prototype.setNodeAddress = function (value) { jspb.Message.setField(this, 5, value); }; /** * optional string validator_address = 6; * @return {string} */ proto.monitor.Register.prototype.getValidatorAddress = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 6, "")); }; /** @param {string} value */ proto.monitor.Register.prototype.setValidatorAddress = function (value) { jspb.Message.setField(this, 6, value); }; /** * optional int64 process_uptime = 7; * @return {number} */ proto.monitor.Register.prototype.getProcessUptime = function () { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 7, 0)); }; /** @param {number} value */ proto.monitor.Register.prototype.setProcessUptime = function (value) { jspb.Message.setField(this, 7, value); }; /** * optional protocol.LedgerHeader ledger_header = 8; * @return {proto.protocol.LedgerHeader} */ proto.monitor.Register.prototype.getLedgerHeader = function () { return /** @type{proto.protocol.LedgerHeader} */ ( jspb.Message.getWrapperField(this, chain_pb.LedgerHeader, 8)); }; /** @param {proto.protocol.LedgerHeader|undefined} value */ proto.monitor.Register.prototype.setLedgerHeader = function (value) { jspb.Message.setWrapperField(this, 8, value); }; proto.monitor.Register.prototype.clearLedgerHeader = function () { this.setLedgerHeader(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.monitor.Register.prototype.hasLedgerHeader = function () { return jspb.Message.getField(this, 8) != null; }; /** * optional SystemInfo system = 9; * @return {proto.monitor.SystemInfo} */ proto.monitor.Register.prototype.getSystem = function () { return /** @type{proto.monitor.SystemInfo} */ ( jspb.Message.getWrapperField(this, proto.monitor.SystemInfo, 9)); }; /** @param {proto.monitor.SystemInfo|undefined} value */ proto.monitor.Register.prototype.setSystem = function (value) { jspb.Message.setWrapperField(this, 9, value); }; proto.monitor.Register.prototype.clearSystem = function () { this.setSystem(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.monitor.Register.prototype.hasSystem = function () { return jspb.Message.getField(this, 9) != null; }; /** * optional int64 timestamp = 10; * @return {number} */ proto.monitor.Register.prototype.getTimestamp = function () { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 10, 0)); }; /** @param {number} value */ proto.monitor.Register.prototype.setTimestamp = function (value) { jspb.Message.setField(this, 10, value); }; /** * optional string bin_path = 11; * @return {string} */ proto.monitor.Register.prototype.getBinPath = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 11, "")); }; /** @param {string} value */ proto.monitor.Register.prototype.setBinPath = function (value) { jspb.Message.setField(this, 11, value); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.monitor.Peer = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.monitor.Peer, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.monitor.Peer.displayName = 'proto.monitor.Peer'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.monitor.Peer.prototype.toObject = function (opt_includeInstance) { return proto.monitor.Peer.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.monitor.Peer} msg The msg instance to transform. * @return {!Object} */ proto.monitor.Peer.toObject = function (includeInstance, msg) { var f, obj = { nodeAddress: msg.getNodeAddress(), delay: msg.getDelay(), active: msg.getActive(), ipAddress: msg.getIpAddress(), activeTime: msg.getActiveTime(), inBound: msg.getInBound() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.monitor.Peer} */ proto.monitor.Peer.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.monitor.Peer; return proto.monitor.Peer.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.monitor.Peer} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.monitor.Peer} */ proto.monitor.Peer.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setNodeAddress(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setDelay(value); break; case 3: var value = /** @type {boolean} */ (reader.readBool()); msg.setActive(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setIpAddress(value); break; case 5: var value = /** @type {number} */ (reader.readInt64()); msg.setActiveTime(value); break; case 6: var value = /** @type {boolean} */ (reader.readBool()); msg.setInBound(value); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.monitor.Peer} message * @param {!jspb.BinaryWriter} writer */ proto.monitor.Peer.serializeBinaryToWriter = function (message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.monitor.Peer.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.monitor.Peer.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getNodeAddress(); if (f.length > 0) { writer.writeString( 1, f ); } f = this.getDelay(); if (f !== 0) { writer.writeInt64( 2, f ); } f = this.getActive(); if (f) { writer.writeBool( 3, f ); } f = this.getIpAddress(); if (f.length > 0) { writer.writeString( 4, f ); } f = this.getActiveTime(); if (f !== 0) { writer.writeInt64( 5, f ); } f = this.getInBound(); if (f) { writer.writeBool( 6, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.monitor.Peer} The clone. */ proto.monitor.Peer.prototype.cloneMessage = function () { return /** @type {!proto.monitor.Peer} */ (jspb.Message.cloneMessage(this)); }; /** * optional string node_address = 1; * @return {string} */ proto.monitor.Peer.prototype.getNodeAddress = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** @param {string} value */ proto.monitor.Peer.prototype.setNodeAddress = function (value) { jspb.Message.setField(this, 1, value); }; /** * optional int64 delay = 2; * @return {number} */ proto.monitor.Peer.prototype.getDelay = function () { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0)); }; /** @param {number} value */ proto.monitor.Peer.prototype.setDelay = function (value) { jspb.Message.setField(this, 2, value); }; /** * optional bool active = 3; * Note that Boolean fields may be set to 0/1 when serialized from a Java server. * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.monitor.Peer.prototype.getActive = function () { return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 3, false)); }; /** @param {boolean} value */ proto.monitor.Peer.prototype.setActive = function (value) { jspb.Message.setField(this, 3, value); }; /** * optional string ip_address = 4; * @return {string} */ proto.monitor.Peer.prototype.getIpAddress = function () { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 4, "")); }; /** @param {string} value */ proto.monitor.Peer.prototype.setIpAddress = function (value) { jspb.Message.setField(this, 4, value); }; /** * optional int64 active_time = 5; * @return {number} */ proto.monitor.Peer.prototype.getActiveTime = function () { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 5, 0)); }; /** @param {number} value */ proto.monitor.Peer.prototype.setActiveTime = function (value) { jspb.Message.setField(this, 5, value); }; /** * optional bool in_bound = 6; * Note that Boolean fields may be set to 0/1 when serialized from a Java server. * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.monitor.Peer.prototype.getInBound = function () { return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 6, false)); }; /** @param {boolean} value */ proto.monitor.Peer.prototype.setInBound = function (value) { jspb.Message.setField(this, 6, value); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.monitor.P2PConnection = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.monitor.P2PConnection.repeatedFields_, null); }; goog.inherits(proto.monitor.P2PConnection, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.monitor.P2PConnection.displayName = 'proto.monitor.P2PConnection'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.monitor.P2PConnection.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.monitor.P2PConnection.prototype.toObject = function (opt_includeInstance) { return proto.monitor.P2PConnection.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.monitor.P2PConnection} msg The msg instance to transform. * @return {!Object} */ proto.monitor.P2PConnection.toObject = function (includeInstance, msg) { var f, obj = { listenPort: msg.getListenPort(), peersList: jspb.Message.toObjectList(msg.getPeersList(), proto.monitor.Peer.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.monitor.P2PConnection} */ proto.monitor.P2PConnection.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.monitor.P2PConnection; return proto.monitor.P2PConnection.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.monitor.P2PConnection} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.monitor.P2PConnection} */ proto.monitor.P2PConnection.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); msg.setListenPort(value); break; case 2: var value = new proto.monitor.Peer; reader.readMessage(value, proto.monitor.Peer.deserializeBinaryFromReader); msg.getPeersList().push(value); msg.setPeersList(msg.getPeersList()); break; default: reader.skipField(); break; } } return msg; }; /** * Class method variant: serializes the given message to binary data * (in protobuf wire format), writing to the given BinaryWriter. * @param {!proto.monitor.P2PConnection} message * @param {!jspb.BinaryWriter} writer */ proto.monitor.P2PConnection.serializeBinaryToWriter = function (message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.monitor.P2PConnection.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); this.serializeBinaryToWriter(writer); return writer.getResultBuffer(); }; /** * Serializes the message to binary data (in protobuf wire format), * writing to the given BinaryWriter. * @param {!jspb.BinaryWriter} writer */ proto.monitor.P2PConnection.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getListenPort(); if (f !== 0) { writer.writeInt64( 1, f ); } f = this.getPeersList(); if (f.length > 0) { writer.writeRepeatedMessage( 2, f, proto.monitor.Peer.serializeBinaryToWriter ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.monitor.P2PConnection} The clone. */ proto.monitor.P2PConnection.prototype.cloneMessage = function () { return /** @type {!proto.monitor.P2PConnection} */ (jspb.Message.cloneMessage(this)); }; /** * optional int64 listen_port = 1; * @return {number} */ proto.monitor.P2PConnection.prototype.getListenPort = function () { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.monitor.P2PConnection.prototype.setListenPort = function (value) { jspb.Message.setField(this, 1, value); }; /** * repeated Peer peers = 2; * If you change this array by adding, removing or replacing elements, or if you * replace the array itself, then you must call the setter to update it. * @return {!Array.<!proto.monitor.Peer>} */ proto.monitor.P2PConnection.prototype.getPeersList = function () { return /** @type{!Array.<!proto.monitor.Peer>} */ ( jspb.Message.getRepeatedWrapperField(this, proto.monitor.Peer, 2)); }; /** @param {Array.<!proto.monitor.Peer>} value */ proto.monitor.P2PConnection.prototype.setPeersList = function (value) { jspb.Message.setRepeatedWrapperField(this, 2, value); }; proto.monitor.P2PConnection.prototype.clearPeersList = function () { this.setPeersList([]); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.monitor.ListenAddresses = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.monitor.ListenAddresses, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.monitor.ListenAddresses.displayName = 'proto.monitor.ListenAddresses'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.monitor.ListenAddresses.prototype.toObject = function (opt_includeInstance) { return proto.monitor.ListenAddresses.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.monitor.ListenAddresses} msg The msg instance to transform. * @return {!Object} */ proto.monitor.ListenAddresses.toObject = function (includeInstance, msg) { var f, obj = { p2pConnection: (f = msg.getP2pConnection()) && proto.monitor.P2PConnection.toObject(includeInstance, f), webserver: msg.getWebserver(), wsserver: msg.getWsserver() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.monitor.ListenAddresses} */ proto.monitor.ListenAddresses.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.monitor.ListenAddresses; return proto.monitor.ListenAddresses.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.monitor.ListenAddresses} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.monitor.ListenAddresses} */ proto.monitor.ListenAddresses.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.monitor.P2PConnection; reader.readMessage(value, proto.monitor.P2PConnection.deserializeBinaryFromReader); msg.setP2pConnection(value); break;