UNPKG

@provenanceio/wallet-utils

Version:

Typescript Utilities for Provenance Blockchain Wallet

1,736 lines (1,427 loc) 74.1 kB
"use strict"; // source: provenance/attribute/v1/attribute.proto /** * @fileoverview * @enhanceable * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ // @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = function () { return this || window || global || self || Function('return this')(); }.call(null); var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); goog.exportSymbol('proto.provenance.attribute.v1.Attribute', null, global); goog.exportSymbol('proto.provenance.attribute.v1.AttributeType', null, global); goog.exportSymbol('proto.provenance.attribute.v1.EventAccountDataUpdated', null, global); goog.exportSymbol('proto.provenance.attribute.v1.EventAttributeAdd', null, global); goog.exportSymbol('proto.provenance.attribute.v1.EventAttributeDelete', null, global); goog.exportSymbol('proto.provenance.attribute.v1.EventAttributeDistinctDelete', null, global); goog.exportSymbol('proto.provenance.attribute.v1.EventAttributeExpirationUpdate', null, global); goog.exportSymbol('proto.provenance.attribute.v1.EventAttributeExpired', null, global); goog.exportSymbol('proto.provenance.attribute.v1.EventAttributeUpdate', null, global); goog.exportSymbol('proto.provenance.attribute.v1.Params', 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.provenance.attribute.v1.Params = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.Params, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.Params.displayName = 'proto.provenance.attribute.v1.Params'; } /** * 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.provenance.attribute.v1.Attribute = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.Attribute, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.Attribute.displayName = 'proto.provenance.attribute.v1.Attribute'; } /** * 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.provenance.attribute.v1.EventAttributeAdd = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.EventAttributeAdd, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.EventAttributeAdd.displayName = 'proto.provenance.attribute.v1.EventAttributeAdd'; } /** * 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.provenance.attribute.v1.EventAttributeUpdate = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.EventAttributeUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.EventAttributeUpdate.displayName = 'proto.provenance.attribute.v1.EventAttributeUpdate'; } /** * 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.provenance.attribute.v1.EventAttributeExpirationUpdate = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.EventAttributeExpirationUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.displayName = 'proto.provenance.attribute.v1.EventAttributeExpirationUpdate'; } /** * 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.provenance.attribute.v1.EventAttributeDelete = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.EventAttributeDelete, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.EventAttributeDelete.displayName = 'proto.provenance.attribute.v1.EventAttributeDelete'; } /** * 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.provenance.attribute.v1.EventAttributeDistinctDelete = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.EventAttributeDistinctDelete, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.EventAttributeDistinctDelete.displayName = 'proto.provenance.attribute.v1.EventAttributeDistinctDelete'; } /** * 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.provenance.attribute.v1.EventAttributeExpired = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.EventAttributeExpired, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.EventAttributeExpired.displayName = 'proto.provenance.attribute.v1.EventAttributeExpired'; } /** * 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.provenance.attribute.v1.EventAccountDataUpdated = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.attribute.v1.EventAccountDataUpdated, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.attribute.v1.EventAccountDataUpdated.displayName = 'proto.provenance.attribute.v1.EventAccountDataUpdated'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.provenance.attribute.v1.Params.prototype.toObject = function (opt_includeInstance) { return proto.provenance.attribute.v1.Params.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.provenance.attribute.v1.Params} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.Params.toObject = function (includeInstance, msg) { var f, obj = { maxValueLength: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.provenance.attribute.v1.Params} */ proto.provenance.attribute.v1.Params.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.attribute.v1.Params(); return proto.provenance.attribute.v1.Params.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.attribute.v1.Params} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.attribute.v1.Params} */ proto.provenance.attribute.v1.Params.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ reader.readUint32(); msg.setMaxValueLength(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.attribute.v1.Params.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.attribute.v1.Params.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.attribute.v1.Params} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.Params.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getMaxValueLength(); if (f !== 0) { writer.writeUint32(1, f); } }; /** * optional uint32 max_value_length = 1; * @return {number} */ proto.provenance.attribute.v1.Params.prototype.getMaxValueLength = function () { return ( /** @type {number} */ jspb.Message.getFieldWithDefault(this, 1, 0) ); }; /** * @param {number} value * @return {!proto.provenance.attribute.v1.Params} returns this */ proto.provenance.attribute.v1.Params.prototype.setMaxValueLength = function (value) { return jspb.Message.setProto3IntField(this, 1, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.provenance.attribute.v1.Attribute.prototype.toObject = function (opt_includeInstance) { return proto.provenance.attribute.v1.Attribute.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.provenance.attribute.v1.Attribute} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.Attribute.toObject = function (includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), value: msg.getValue_asB64(), attributeType: jspb.Message.getFieldWithDefault(msg, 3, 0), address: jspb.Message.getFieldWithDefault(msg, 4, ""), expirationDate: (f = msg.getExpirationDate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.provenance.attribute.v1.Attribute} */ proto.provenance.attribute.v1.Attribute.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.attribute.v1.Attribute(); return proto.provenance.attribute.v1.Attribute.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.attribute.v1.Attribute} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.attribute.v1.Attribute} */ proto.provenance.attribute.v1.Attribute.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.setName(value); break; case 2: var value = /** @type {!Uint8Array} */ reader.readBytes(); msg.setValue(value); break; case 3: var value = /** @type {!proto.provenance.attribute.v1.AttributeType} */ reader.readEnum(); msg.setAttributeType(value); break; case 4: var value = /** @type {string} */ reader.readString(); msg.setAddress(value); break; case 5: var value = new google_protobuf_timestamp_pb.Timestamp(); reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setExpirationDate(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.attribute.v1.Attribute.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.attribute.v1.Attribute.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.attribute.v1.Attribute} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.Attribute.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString(1, f); } f = message.getValue_asU8(); if (f.length > 0) { writer.writeBytes(2, f); } f = message.getAttributeType(); if (f !== 0.0) { writer.writeEnum(3, f); } f = message.getAddress(); if (f.length > 0) { writer.writeString(4, f); } f = message.getExpirationDate(); if (f != null) { writer.writeMessage(5, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter); } }; /** * optional string name = 1; * @return {string} */ proto.provenance.attribute.v1.Attribute.prototype.getName = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.Attribute} returns this */ proto.provenance.attribute.v1.Attribute.prototype.setName = function (value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional bytes value = 2; * @return {!(string|Uint8Array)} */ proto.provenance.attribute.v1.Attribute.prototype.getValue = function () { return ( /** @type {!(string|Uint8Array)} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; /** * optional bytes value = 2; * This is a type-conversion wrapper around `getValue()` * @return {string} */ proto.provenance.attribute.v1.Attribute.prototype.getValue_asB64 = function () { return ( /** @type {string} */ jspb.Message.bytesAsB64(this.getValue()) ); }; /** * optional bytes value = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getValue()` * @return {!Uint8Array} */ proto.provenance.attribute.v1.Attribute.prototype.getValue_asU8 = function () { return ( /** @type {!Uint8Array} */ jspb.Message.bytesAsU8(this.getValue()) ); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.provenance.attribute.v1.Attribute} returns this */ proto.provenance.attribute.v1.Attribute.prototype.setValue = function (value) { return jspb.Message.setProto3BytesField(this, 2, value); }; /** * optional AttributeType attribute_type = 3; * @return {!proto.provenance.attribute.v1.AttributeType} */ proto.provenance.attribute.v1.Attribute.prototype.getAttributeType = function () { return ( /** @type {!proto.provenance.attribute.v1.AttributeType} */ jspb.Message.getFieldWithDefault(this, 3, 0) ); }; /** * @param {!proto.provenance.attribute.v1.AttributeType} value * @return {!proto.provenance.attribute.v1.Attribute} returns this */ proto.provenance.attribute.v1.Attribute.prototype.setAttributeType = function (value) { return jspb.Message.setProto3EnumField(this, 3, value); }; /** * optional string address = 4; * @return {string} */ proto.provenance.attribute.v1.Attribute.prototype.getAddress = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 4, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.Attribute} returns this */ proto.provenance.attribute.v1.Attribute.prototype.setAddress = function (value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional google.protobuf.Timestamp expiration_date = 5; * @return {?proto.google.protobuf.Timestamp} */ proto.provenance.attribute.v1.Attribute.prototype.getExpirationDate = function () { return ( /** @type{?proto.google.protobuf.Timestamp} */ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5) ); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.provenance.attribute.v1.Attribute} returns this */ proto.provenance.attribute.v1.Attribute.prototype.setExpirationDate = function (value) { return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. * @return {!proto.provenance.attribute.v1.Attribute} returns this */ proto.provenance.attribute.v1.Attribute.prototype.clearExpirationDate = function () { return this.setExpirationDate(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.provenance.attribute.v1.Attribute.prototype.hasExpirationDate = function () { return jspb.Message.getField(this, 5) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.provenance.attribute.v1.EventAttributeAdd.prototype.toObject = function (opt_includeInstance) { return proto.provenance.attribute.v1.EventAttributeAdd.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.provenance.attribute.v1.EventAttributeAdd} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.EventAttributeAdd.toObject = function (includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), value: jspb.Message.getFieldWithDefault(msg, 2, ""), type: jspb.Message.getFieldWithDefault(msg, 3, ""), account: jspb.Message.getFieldWithDefault(msg, 4, ""), owner: jspb.Message.getFieldWithDefault(msg, 5, ""), expiration: jspb.Message.getFieldWithDefault(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.provenance.attribute.v1.EventAttributeAdd} */ proto.provenance.attribute.v1.EventAttributeAdd.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.attribute.v1.EventAttributeAdd(); return proto.provenance.attribute.v1.EventAttributeAdd.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.attribute.v1.EventAttributeAdd} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.attribute.v1.EventAttributeAdd} */ proto.provenance.attribute.v1.EventAttributeAdd.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.setName(value); break; case 2: var value = /** @type {string} */ reader.readString(); msg.setValue(value); break; case 3: var value = /** @type {string} */ reader.readString(); msg.setType(value); break; case 4: var value = /** @type {string} */ reader.readString(); msg.setAccount(value); break; case 5: var value = /** @type {string} */ reader.readString(); msg.setOwner(value); break; case 6: var value = /** @type {string} */ reader.readString(); msg.setExpiration(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.attribute.v1.EventAttributeAdd.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.attribute.v1.EventAttributeAdd.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.attribute.v1.EventAttributeAdd} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.EventAttributeAdd.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString(1, f); } f = message.getValue(); if (f.length > 0) { writer.writeString(2, f); } f = message.getType(); if (f.length > 0) { writer.writeString(3, f); } f = message.getAccount(); if (f.length > 0) { writer.writeString(4, f); } f = message.getOwner(); if (f.length > 0) { writer.writeString(5, f); } f = message.getExpiration(); if (f.length > 0) { writer.writeString(6, f); } }; /** * optional string name = 1; * @return {string} */ proto.provenance.attribute.v1.EventAttributeAdd.prototype.getName = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeAdd} returns this */ proto.provenance.attribute.v1.EventAttributeAdd.prototype.setName = function (value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string value = 2; * @return {string} */ proto.provenance.attribute.v1.EventAttributeAdd.prototype.getValue = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeAdd} returns this */ proto.provenance.attribute.v1.EventAttributeAdd.prototype.setValue = function (value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string type = 3; * @return {string} */ proto.provenance.attribute.v1.EventAttributeAdd.prototype.getType = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeAdd} returns this */ proto.provenance.attribute.v1.EventAttributeAdd.prototype.setType = function (value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string account = 4; * @return {string} */ proto.provenance.attribute.v1.EventAttributeAdd.prototype.getAccount = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 4, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeAdd} returns this */ proto.provenance.attribute.v1.EventAttributeAdd.prototype.setAccount = function (value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string owner = 5; * @return {string} */ proto.provenance.attribute.v1.EventAttributeAdd.prototype.getOwner = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 5, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeAdd} returns this */ proto.provenance.attribute.v1.EventAttributeAdd.prototype.setOwner = function (value) { return jspb.Message.setProto3StringField(this, 5, value); }; /** * optional string expiration = 6; * @return {string} */ proto.provenance.attribute.v1.EventAttributeAdd.prototype.getExpiration = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 6, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeAdd} returns this */ proto.provenance.attribute.v1.EventAttributeAdd.prototype.setExpiration = function (value) { return jspb.Message.setProto3StringField(this, 6, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.provenance.attribute.v1.EventAttributeUpdate.prototype.toObject = function (opt_includeInstance) { return proto.provenance.attribute.v1.EventAttributeUpdate.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.provenance.attribute.v1.EventAttributeUpdate} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.EventAttributeUpdate.toObject = function (includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), originalValue: jspb.Message.getFieldWithDefault(msg, 2, ""), originalType: jspb.Message.getFieldWithDefault(msg, 3, ""), updateValue: jspb.Message.getFieldWithDefault(msg, 4, ""), updateType: jspb.Message.getFieldWithDefault(msg, 5, ""), account: jspb.Message.getFieldWithDefault(msg, 6, ""), owner: jspb.Message.getFieldWithDefault(msg, 7, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.provenance.attribute.v1.EventAttributeUpdate} */ proto.provenance.attribute.v1.EventAttributeUpdate.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.attribute.v1.EventAttributeUpdate(); return proto.provenance.attribute.v1.EventAttributeUpdate.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.attribute.v1.EventAttributeUpdate} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.attribute.v1.EventAttributeUpdate} */ proto.provenance.attribute.v1.EventAttributeUpdate.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.setName(value); break; case 2: var value = /** @type {string} */ reader.readString(); msg.setOriginalValue(value); break; case 3: var value = /** @type {string} */ reader.readString(); msg.setOriginalType(value); break; case 4: var value = /** @type {string} */ reader.readString(); msg.setUpdateValue(value); break; case 5: var value = /** @type {string} */ reader.readString(); msg.setUpdateType(value); break; case 6: var value = /** @type {string} */ reader.readString(); msg.setAccount(value); break; case 7: var value = /** @type {string} */ reader.readString(); msg.setOwner(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.attribute.v1.EventAttributeUpdate.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.attribute.v1.EventAttributeUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.attribute.v1.EventAttributeUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.EventAttributeUpdate.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString(1, f); } f = message.getOriginalValue(); if (f.length > 0) { writer.writeString(2, f); } f = message.getOriginalType(); if (f.length > 0) { writer.writeString(3, f); } f = message.getUpdateValue(); if (f.length > 0) { writer.writeString(4, f); } f = message.getUpdateType(); if (f.length > 0) { writer.writeString(5, f); } f = message.getAccount(); if (f.length > 0) { writer.writeString(6, f); } f = message.getOwner(); if (f.length > 0) { writer.writeString(7, f); } }; /** * optional string name = 1; * @return {string} */ proto.provenance.attribute.v1.EventAttributeUpdate.prototype.getName = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeUpdate} returns this */ proto.provenance.attribute.v1.EventAttributeUpdate.prototype.setName = function (value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string original_value = 2; * @return {string} */ proto.provenance.attribute.v1.EventAttributeUpdate.prototype.getOriginalValue = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeUpdate} returns this */ proto.provenance.attribute.v1.EventAttributeUpdate.prototype.setOriginalValue = function (value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string original_type = 3; * @return {string} */ proto.provenance.attribute.v1.EventAttributeUpdate.prototype.getOriginalType = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeUpdate} returns this */ proto.provenance.attribute.v1.EventAttributeUpdate.prototype.setOriginalType = function (value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string update_value = 4; * @return {string} */ proto.provenance.attribute.v1.EventAttributeUpdate.prototype.getUpdateValue = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 4, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeUpdate} returns this */ proto.provenance.attribute.v1.EventAttributeUpdate.prototype.setUpdateValue = function (value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string update_type = 5; * @return {string} */ proto.provenance.attribute.v1.EventAttributeUpdate.prototype.getUpdateType = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 5, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeUpdate} returns this */ proto.provenance.attribute.v1.EventAttributeUpdate.prototype.setUpdateType = function (value) { return jspb.Message.setProto3StringField(this, 5, value); }; /** * optional string account = 6; * @return {string} */ proto.provenance.attribute.v1.EventAttributeUpdate.prototype.getAccount = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 6, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeUpdate} returns this */ proto.provenance.attribute.v1.EventAttributeUpdate.prototype.setAccount = function (value) { return jspb.Message.setProto3StringField(this, 6, value); }; /** * optional string owner = 7; * @return {string} */ proto.provenance.attribute.v1.EventAttributeUpdate.prototype.getOwner = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 7, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeUpdate} returns this */ proto.provenance.attribute.v1.EventAttributeUpdate.prototype.setOwner = function (value) { return jspb.Message.setProto3StringField(this, 7, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.prototype.toObject = function (opt_includeInstance) { return proto.provenance.attribute.v1.EventAttributeExpirationUpdate.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.provenance.attribute.v1.EventAttributeExpirationUpdate} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.toObject = function (includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), value: jspb.Message.getFieldWithDefault(msg, 2, ""), account: jspb.Message.getFieldWithDefault(msg, 3, ""), owner: jspb.Message.getFieldWithDefault(msg, 4, ""), originalExpiration: jspb.Message.getFieldWithDefault(msg, 5, ""), updatedExpiration: jspb.Message.getFieldWithDefault(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.provenance.attribute.v1.EventAttributeExpirationUpdate} */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.attribute.v1.EventAttributeExpirationUpdate(); return proto.provenance.attribute.v1.EventAttributeExpirationUpdate.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.attribute.v1.EventAttributeExpirationUpdate} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.attribute.v1.EventAttributeExpirationUpdate} */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.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.setName(value); break; case 2: var value = /** @type {string} */ reader.readString(); msg.setValue(value); break; case 3: var value = /** @type {string} */ reader.readString(); msg.setAccount(value); break; case 4: var value = /** @type {string} */ reader.readString(); msg.setOwner(value); break; case 5: var value = /** @type {string} */ reader.readString(); msg.setOriginalExpiration(value); break; case 6: var value = /** @type {string} */ reader.readString(); msg.setUpdatedExpiration(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.attribute.v1.EventAttributeExpirationUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.attribute.v1.EventAttributeExpirationUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString(1, f); } f = message.getValue(); if (f.length > 0) { writer.writeString(2, f); } f = message.getAccount(); if (f.length > 0) { writer.writeString(3, f); } f = message.getOwner(); if (f.length > 0) { writer.writeString(4, f); } f = message.getOriginalExpiration(); if (f.length > 0) { writer.writeString(5, f); } f = message.getUpdatedExpiration(); if (f.length > 0) { writer.writeString(6, f); } }; /** * optional string name = 1; * @return {string} */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.prototype.getName = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeExpirationUpdate} returns this */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.prototype.setName = function (value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string value = 2; * @return {string} */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.prototype.getValue = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeExpirationUpdate} returns this */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.prototype.setValue = function (value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string account = 3; * @return {string} */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.prototype.getAccount = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeExpirationUpdate} returns this */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.prototype.setAccount = function (value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string owner = 4; * @return {string} */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.prototype.getOwner = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 4, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeExpirationUpdate} returns this */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.prototype.setOwner = function (value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string original_expiration = 5; * @return {string} */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.prototype.getOriginalExpiration = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 5, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeExpirationUpdate} returns this */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.prototype.setOriginalExpiration = function (value) { return jspb.Message.setProto3StringField(this, 5, value); }; /** * optional string updated_expiration = 6; * @return {string} */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.prototype.getUpdatedExpiration = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 6, "") ); }; /** * @param {string} value * @return {!proto.provenance.attribute.v1.EventAttributeExpirationUpdate} returns this */ proto.provenance.attribute.v1.EventAttributeExpirationUpdate.prototype.setUpdatedExpiration = function (value) { return jspb.Message.setProto3StringField(this, 6, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.provenance.attribute.v1.EventAttributeDelete.prototype.toObject = function (opt_includeInstance) { return proto.provenance.attribute.v1.EventAttributeDelete.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.provenance.attribute.v1.EventAttributeDelete} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.attribute.v1.EventAttributeDelete.toObject = function (includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), account: jspb.Message.getFieldWithDefault(msg, 2, ""), owner: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.provenance.attribute.v1.EventAttributeDelete} */ proto.provenance.att