@provenanceio/wallet-utils
Version:
Typescript Utilities for Provenance Blockchain Wallet
1,519 lines (1,251 loc) • 42.3 kB
JavaScript
"use strict";
// source: provenance/name/v1/name.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);
goog.exportSymbol('proto.provenance.name.v1.CreateRootNameProposal', null, global);
goog.exportSymbol('proto.provenance.name.v1.EventNameBound', null, global);
goog.exportSymbol('proto.provenance.name.v1.EventNameUnbound', null, global);
goog.exportSymbol('proto.provenance.name.v1.EventNameUpdate', null, global);
goog.exportSymbol('proto.provenance.name.v1.NameRecord', null, global);
goog.exportSymbol('proto.provenance.name.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.name.v1.Params = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.name.v1.Params, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.name.v1.Params.displayName = 'proto.provenance.name.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.name.v1.NameRecord = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.name.v1.NameRecord, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.name.v1.NameRecord.displayName = 'proto.provenance.name.v1.NameRecord';
}
/**
* 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.name.v1.CreateRootNameProposal = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.name.v1.CreateRootNameProposal, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.name.v1.CreateRootNameProposal.displayName = 'proto.provenance.name.v1.CreateRootNameProposal';
}
/**
* 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.name.v1.EventNameBound = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.name.v1.EventNameBound, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.name.v1.EventNameBound.displayName = 'proto.provenance.name.v1.EventNameBound';
}
/**
* 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.name.v1.EventNameUnbound = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.name.v1.EventNameUnbound, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.name.v1.EventNameUnbound.displayName = 'proto.provenance.name.v1.EventNameUnbound';
}
/**
* 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.name.v1.EventNameUpdate = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.name.v1.EventNameUpdate, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.name.v1.EventNameUpdate.displayName = 'proto.provenance.name.v1.EventNameUpdate';
}
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.name.v1.Params.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.name.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.name.v1.Params} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.Params.toObject = function (includeInstance, msg) {
var f,
obj = {
maxSegmentLength: jspb.Message.getFieldWithDefault(msg, 1, 0),
minSegmentLength: jspb.Message.getFieldWithDefault(msg, 2, 0),
maxNameLevels: jspb.Message.getFieldWithDefault(msg, 3, 0),
allowUnrestrictedNames: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
};
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.name.v1.Params}
*/
proto.provenance.name.v1.Params.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.name.v1.Params();
return proto.provenance.name.v1.Params.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.name.v1.Params} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.name.v1.Params}
*/
proto.provenance.name.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.setMaxSegmentLength(value);
break;
case 2:
var value =
/** @type {number} */
reader.readUint32();
msg.setMinSegmentLength(value);
break;
case 3:
var value =
/** @type {number} */
reader.readUint32();
msg.setMaxNameLevels(value);
break;
case 4:
var value =
/** @type {boolean} */
reader.readBool();
msg.setAllowUnrestrictedNames(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.provenance.name.v1.Params.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.name.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.name.v1.Params} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.Params.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getMaxSegmentLength();
if (f !== 0) {
writer.writeUint32(1, f);
}
f = message.getMinSegmentLength();
if (f !== 0) {
writer.writeUint32(2, f);
}
f = message.getMaxNameLevels();
if (f !== 0) {
writer.writeUint32(3, f);
}
f = message.getAllowUnrestrictedNames();
if (f) {
writer.writeBool(4, f);
}
};
/**
* optional uint32 max_segment_length = 1;
* @return {number}
*/
proto.provenance.name.v1.Params.prototype.getMaxSegmentLength = function () {
return (
/** @type {number} */
jspb.Message.getFieldWithDefault(this, 1, 0)
);
};
/**
* @param {number} value
* @return {!proto.provenance.name.v1.Params} returns this
*/
proto.provenance.name.v1.Params.prototype.setMaxSegmentLength = function (value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional uint32 min_segment_length = 2;
* @return {number}
*/
proto.provenance.name.v1.Params.prototype.getMinSegmentLength = function () {
return (
/** @type {number} */
jspb.Message.getFieldWithDefault(this, 2, 0)
);
};
/**
* @param {number} value
* @return {!proto.provenance.name.v1.Params} returns this
*/
proto.provenance.name.v1.Params.prototype.setMinSegmentLength = function (value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional uint32 max_name_levels = 3;
* @return {number}
*/
proto.provenance.name.v1.Params.prototype.getMaxNameLevels = function () {
return (
/** @type {number} */
jspb.Message.getFieldWithDefault(this, 3, 0)
);
};
/**
* @param {number} value
* @return {!proto.provenance.name.v1.Params} returns this
*/
proto.provenance.name.v1.Params.prototype.setMaxNameLevels = function (value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional bool allow_unrestricted_names = 4;
* @return {boolean}
*/
proto.provenance.name.v1.Params.prototype.getAllowUnrestrictedNames = function () {
return (
/** @type {boolean} */
jspb.Message.getBooleanFieldWithDefault(this, 4, false)
);
};
/**
* @param {boolean} value
* @return {!proto.provenance.name.v1.Params} returns this
*/
proto.provenance.name.v1.Params.prototype.setAllowUnrestrictedNames = function (value) {
return jspb.Message.setProto3BooleanField(this, 4, 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.name.v1.NameRecord.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.name.v1.NameRecord.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.name.v1.NameRecord} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.NameRecord.toObject = function (includeInstance, msg) {
var f,
obj = {
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
address: jspb.Message.getFieldWithDefault(msg, 2, ""),
restricted: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
};
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.name.v1.NameRecord}
*/
proto.provenance.name.v1.NameRecord.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.name.v1.NameRecord();
return proto.provenance.name.v1.NameRecord.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.name.v1.NameRecord} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.name.v1.NameRecord}
*/
proto.provenance.name.v1.NameRecord.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.setAddress(value);
break;
case 3:
var value =
/** @type {boolean} */
reader.readBool();
msg.setRestricted(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.provenance.name.v1.NameRecord.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.name.v1.NameRecord.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.name.v1.NameRecord} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.NameRecord.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getName();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getAddress();
if (f.length > 0) {
writer.writeString(2, f);
}
f = message.getRestricted();
if (f) {
writer.writeBool(3, f);
}
};
/**
* optional string name = 1;
* @return {string}
*/
proto.provenance.name.v1.NameRecord.prototype.getName = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.name.v1.NameRecord} returns this
*/
proto.provenance.name.v1.NameRecord.prototype.setName = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string address = 2;
* @return {string}
*/
proto.provenance.name.v1.NameRecord.prototype.getAddress = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.name.v1.NameRecord} returns this
*/
proto.provenance.name.v1.NameRecord.prototype.setAddress = function (value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional bool restricted = 3;
* @return {boolean}
*/
proto.provenance.name.v1.NameRecord.prototype.getRestricted = function () {
return (
/** @type {boolean} */
jspb.Message.getBooleanFieldWithDefault(this, 3, false)
);
};
/**
* @param {boolean} value
* @return {!proto.provenance.name.v1.NameRecord} returns this
*/
proto.provenance.name.v1.NameRecord.prototype.setRestricted = function (value) {
return jspb.Message.setProto3BooleanField(this, 3, 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.name.v1.CreateRootNameProposal.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.name.v1.CreateRootNameProposal.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.name.v1.CreateRootNameProposal} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.CreateRootNameProposal.toObject = function (includeInstance, msg) {
var f,
obj = {
title: jspb.Message.getFieldWithDefault(msg, 1, ""),
description: jspb.Message.getFieldWithDefault(msg, 2, ""),
name: jspb.Message.getFieldWithDefault(msg, 3, ""),
owner: jspb.Message.getFieldWithDefault(msg, 4, ""),
restricted: jspb.Message.getBooleanFieldWithDefault(msg, 5, false)
};
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.name.v1.CreateRootNameProposal}
*/
proto.provenance.name.v1.CreateRootNameProposal.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.name.v1.CreateRootNameProposal();
return proto.provenance.name.v1.CreateRootNameProposal.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.name.v1.CreateRootNameProposal} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.name.v1.CreateRootNameProposal}
*/
proto.provenance.name.v1.CreateRootNameProposal.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.setTitle(value);
break;
case 2:
var value =
/** @type {string} */
reader.readString();
msg.setDescription(value);
break;
case 3:
var value =
/** @type {string} */
reader.readString();
msg.setName(value);
break;
case 4:
var value =
/** @type {string} */
reader.readString();
msg.setOwner(value);
break;
case 5:
var value =
/** @type {boolean} */
reader.readBool();
msg.setRestricted(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.provenance.name.v1.CreateRootNameProposal.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.name.v1.CreateRootNameProposal.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.name.v1.CreateRootNameProposal} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.CreateRootNameProposal.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getTitle();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(2, f);
}
f = message.getName();
if (f.length > 0) {
writer.writeString(3, f);
}
f = message.getOwner();
if (f.length > 0) {
writer.writeString(4, f);
}
f = message.getRestricted();
if (f) {
writer.writeBool(5, f);
}
};
/**
* optional string title = 1;
* @return {string}
*/
proto.provenance.name.v1.CreateRootNameProposal.prototype.getTitle = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.name.v1.CreateRootNameProposal} returns this
*/
proto.provenance.name.v1.CreateRootNameProposal.prototype.setTitle = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string description = 2;
* @return {string}
*/
proto.provenance.name.v1.CreateRootNameProposal.prototype.getDescription = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.name.v1.CreateRootNameProposal} returns this
*/
proto.provenance.name.v1.CreateRootNameProposal.prototype.setDescription = function (value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string name = 3;
* @return {string}
*/
proto.provenance.name.v1.CreateRootNameProposal.prototype.getName = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 3, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.name.v1.CreateRootNameProposal} returns this
*/
proto.provenance.name.v1.CreateRootNameProposal.prototype.setName = function (value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string owner = 4;
* @return {string}
*/
proto.provenance.name.v1.CreateRootNameProposal.prototype.getOwner = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 4, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.name.v1.CreateRootNameProposal} returns this
*/
proto.provenance.name.v1.CreateRootNameProposal.prototype.setOwner = function (value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional bool restricted = 5;
* @return {boolean}
*/
proto.provenance.name.v1.CreateRootNameProposal.prototype.getRestricted = function () {
return (
/** @type {boolean} */
jspb.Message.getBooleanFieldWithDefault(this, 5, false)
);
};
/**
* @param {boolean} value
* @return {!proto.provenance.name.v1.CreateRootNameProposal} returns this
*/
proto.provenance.name.v1.CreateRootNameProposal.prototype.setRestricted = function (value) {
return jspb.Message.setProto3BooleanField(this, 5, 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.name.v1.EventNameBound.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.name.v1.EventNameBound.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.name.v1.EventNameBound} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.EventNameBound.toObject = function (includeInstance, msg) {
var f,
obj = {
address: jspb.Message.getFieldWithDefault(msg, 1, ""),
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
restricted: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
};
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.name.v1.EventNameBound}
*/
proto.provenance.name.v1.EventNameBound.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.name.v1.EventNameBound();
return proto.provenance.name.v1.EventNameBound.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.name.v1.EventNameBound} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.name.v1.EventNameBound}
*/
proto.provenance.name.v1.EventNameBound.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.setAddress(value);
break;
case 2:
var value =
/** @type {string} */
reader.readString();
msg.setName(value);
break;
case 3:
var value =
/** @type {boolean} */
reader.readBool();
msg.setRestricted(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.provenance.name.v1.EventNameBound.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.name.v1.EventNameBound.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.name.v1.EventNameBound} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.EventNameBound.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getAddress();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getName();
if (f.length > 0) {
writer.writeString(2, f);
}
f = message.getRestricted();
if (f) {
writer.writeBool(3, f);
}
};
/**
* optional string address = 1;
* @return {string}
*/
proto.provenance.name.v1.EventNameBound.prototype.getAddress = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.name.v1.EventNameBound} returns this
*/
proto.provenance.name.v1.EventNameBound.prototype.setAddress = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string name = 2;
* @return {string}
*/
proto.provenance.name.v1.EventNameBound.prototype.getName = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.name.v1.EventNameBound} returns this
*/
proto.provenance.name.v1.EventNameBound.prototype.setName = function (value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional bool restricted = 3;
* @return {boolean}
*/
proto.provenance.name.v1.EventNameBound.prototype.getRestricted = function () {
return (
/** @type {boolean} */
jspb.Message.getBooleanFieldWithDefault(this, 3, false)
);
};
/**
* @param {boolean} value
* @return {!proto.provenance.name.v1.EventNameBound} returns this
*/
proto.provenance.name.v1.EventNameBound.prototype.setRestricted = function (value) {
return jspb.Message.setProto3BooleanField(this, 3, 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.name.v1.EventNameUnbound.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.name.v1.EventNameUnbound.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.name.v1.EventNameUnbound} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.EventNameUnbound.toObject = function (includeInstance, msg) {
var f,
obj = {
address: jspb.Message.getFieldWithDefault(msg, 1, ""),
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
restricted: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
};
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.name.v1.EventNameUnbound}
*/
proto.provenance.name.v1.EventNameUnbound.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.name.v1.EventNameUnbound();
return proto.provenance.name.v1.EventNameUnbound.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.name.v1.EventNameUnbound} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.name.v1.EventNameUnbound}
*/
proto.provenance.name.v1.EventNameUnbound.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.setAddress(value);
break;
case 2:
var value =
/** @type {string} */
reader.readString();
msg.setName(value);
break;
case 3:
var value =
/** @type {boolean} */
reader.readBool();
msg.setRestricted(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.provenance.name.v1.EventNameUnbound.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.name.v1.EventNameUnbound.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.name.v1.EventNameUnbound} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.EventNameUnbound.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getAddress();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getName();
if (f.length > 0) {
writer.writeString(2, f);
}
f = message.getRestricted();
if (f) {
writer.writeBool(3, f);
}
};
/**
* optional string address = 1;
* @return {string}
*/
proto.provenance.name.v1.EventNameUnbound.prototype.getAddress = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.name.v1.EventNameUnbound} returns this
*/
proto.provenance.name.v1.EventNameUnbound.prototype.setAddress = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string name = 2;
* @return {string}
*/
proto.provenance.name.v1.EventNameUnbound.prototype.getName = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.name.v1.EventNameUnbound} returns this
*/
proto.provenance.name.v1.EventNameUnbound.prototype.setName = function (value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional bool restricted = 3;
* @return {boolean}
*/
proto.provenance.name.v1.EventNameUnbound.prototype.getRestricted = function () {
return (
/** @type {boolean} */
jspb.Message.getBooleanFieldWithDefault(this, 3, false)
);
};
/**
* @param {boolean} value
* @return {!proto.provenance.name.v1.EventNameUnbound} returns this
*/
proto.provenance.name.v1.EventNameUnbound.prototype.setRestricted = function (value) {
return jspb.Message.setProto3BooleanField(this, 3, 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.name.v1.EventNameUpdate.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.name.v1.EventNameUpdate.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.name.v1.EventNameUpdate} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.EventNameUpdate.toObject = function (includeInstance, msg) {
var f,
obj = {
address: jspb.Message.getFieldWithDefault(msg, 1, ""),
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
restricted: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
};
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.name.v1.EventNameUpdate}
*/
proto.provenance.name.v1.EventNameUpdate.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.name.v1.EventNameUpdate();
return proto.provenance.name.v1.EventNameUpdate.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.name.v1.EventNameUpdate} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.name.v1.EventNameUpdate}
*/
proto.provenance.name.v1.EventNameUpdate.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.setAddress(value);
break;
case 2:
var value =
/** @type {string} */
reader.readString();
msg.setName(value);
break;
case 3:
var value =
/** @type {boolean} */
reader.readBool();
msg.setRestricted(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.provenance.name.v1.EventNameUpdate.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.name.v1.EventNameUpdate.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.name.v1.EventNameUpdate} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.name.v1.EventNameUpdate.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getAddress();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getName();
if (f.length > 0) {
writer.writeString(2, f);
}
f = message.getRestricted();
if (f) {
writer.writeBool(3, f);
}
};
/**
* optional string address = 1;
* @return {string}
*/
proto.provenance.name.v1.EventNameUpdate.prototype.getAddress = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.name.v1.EventNameUpdate} returns this
*/
proto.provenance.name.v1.EventNameUpdate.prototype.setAddress = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string name = 2;
* @return {string}
*/
proto.provenance.name.v1.EventNameUpdate.prototype.getName = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.name.v1.EventNameUpdate} returns this
*/
proto.provenance.name.v1.EventNameUpdate.prototype.setName = function (value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional bool restricted = 3;
* @return {boolean}
*/
proto.provenance.name.v1.EventNameUpdate.prototype.getRestricted = function () {
return (
/** @type {boolean} */
jspb.Message.getBooleanFieldWithDefault(this, 3, false)
);
};
/**
* @param {boolean} value
* @return {!proto.provenance.name.v1.EventNameUpdate} returns this
*/
proto.provenance.name.v1.EventNameUpdate.prototype.setRestricted = function (value) {
return jspb.Message.setProto3BooleanField(this, 3, value);
};
goog.object.extend(exports, proto.provenance.name.v1);