UNPKG

@digitalasset/daml-ledger

Version:
1,605 lines (1,397 loc) 99.8 kB
// source: com/daml/ledger/api/v1/value.proto /** * @fileoverview * @enhanceable * @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! var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js'); goog.object.extend(proto, google_protobuf_empty_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); goog.object.extend(proto, google_protobuf_duration_pb); goog.exportSymbol('proto.com.daml.ledger.api.v1.Enum', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.GenMap', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.GenMap.Entry', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.Identifier', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.List', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.Map', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.Map.Entry', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.Optional', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.Record', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.RecordField', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.Value', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.Value.SumCase', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.Variant', 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.com.daml.ledger.api.v1.Value = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.com.daml.ledger.api.v1.Value.oneofGroups_); }; goog.inherits(proto.com.daml.ledger.api.v1.Value, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.Value.displayName = 'proto.com.daml.ledger.api.v1.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.com.daml.ledger.api.v1.Record = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.com.daml.ledger.api.v1.Record.repeatedFields_, null); }; goog.inherits(proto.com.daml.ledger.api.v1.Record, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.Record.displayName = 'proto.com.daml.ledger.api.v1.Record'; } /** * 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.com.daml.ledger.api.v1.RecordField = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.com.daml.ledger.api.v1.RecordField, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.RecordField.displayName = 'proto.com.daml.ledger.api.v1.RecordField'; } /** * 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.com.daml.ledger.api.v1.Identifier = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.com.daml.ledger.api.v1.Identifier, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.Identifier.displayName = 'proto.com.daml.ledger.api.v1.Identifier'; } /** * 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.com.daml.ledger.api.v1.Variant = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.com.daml.ledger.api.v1.Variant, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.Variant.displayName = 'proto.com.daml.ledger.api.v1.Variant'; } /** * 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.com.daml.ledger.api.v1.Enum = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.com.daml.ledger.api.v1.Enum, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.Enum.displayName = 'proto.com.daml.ledger.api.v1.Enum'; } /** * 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.com.daml.ledger.api.v1.List = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.com.daml.ledger.api.v1.List.repeatedFields_, null); }; goog.inherits(proto.com.daml.ledger.api.v1.List, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.List.displayName = 'proto.com.daml.ledger.api.v1.List'; } /** * 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.com.daml.ledger.api.v1.Optional = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.com.daml.ledger.api.v1.Optional, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.Optional.displayName = 'proto.com.daml.ledger.api.v1.Optional'; } /** * 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.com.daml.ledger.api.v1.Map = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.com.daml.ledger.api.v1.Map.repeatedFields_, null); }; goog.inherits(proto.com.daml.ledger.api.v1.Map, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.Map.displayName = 'proto.com.daml.ledger.api.v1.Map'; } /** * 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.com.daml.ledger.api.v1.Map.Entry = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.com.daml.ledger.api.v1.Map.Entry, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.Map.Entry.displayName = 'proto.com.daml.ledger.api.v1.Map.Entry'; } /** * 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.com.daml.ledger.api.v1.GenMap = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.com.daml.ledger.api.v1.GenMap.repeatedFields_, null); }; goog.inherits(proto.com.daml.ledger.api.v1.GenMap, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.GenMap.displayName = 'proto.com.daml.ledger.api.v1.GenMap'; } /** * 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.com.daml.ledger.api.v1.GenMap.Entry = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.com.daml.ledger.api.v1.GenMap.Entry, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.GenMap.Entry.displayName = 'proto.com.daml.ledger.api.v1.GenMap.Entry'; } /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array<!Array<number>>} * @const */ proto.com.daml.ledger.api.v1.Value.oneofGroups_ = [[1,2,3,4,5,6,8,9,11,12,13,14,15,16,17,18]]; /** * @enum {number} */ proto.com.daml.ledger.api.v1.Value.SumCase = { SUM_NOT_SET: 0, RECORD: 1, VARIANT: 2, CONTRACT_ID: 3, LIST: 4, INT64: 5, NUMERIC: 6, TEXT: 8, TIMESTAMP: 9, PARTY: 11, BOOL: 12, UNIT: 13, DATE: 14, OPTIONAL: 15, MAP: 16, ENUM: 17, GEN_MAP: 18 }; /** * @return {proto.com.daml.ledger.api.v1.Value.SumCase} */ proto.com.daml.ledger.api.v1.Value.prototype.getSumCase = function() { return /** @type {proto.com.daml.ledger.api.v1.Value.SumCase} */(jspb.Message.computeOneofCase(this, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0])); }; 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.com.daml.ledger.api.v1.Value.prototype.toObject = function(opt_includeInstance) { return proto.com.daml.ledger.api.v1.Value.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.com.daml.ledger.api.v1.Value} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.Value.toObject = function(includeInstance, msg) { var f, obj = { record: (f = msg.getRecord()) && proto.com.daml.ledger.api.v1.Record.toObject(includeInstance, f), variant: (f = msg.getVariant()) && proto.com.daml.ledger.api.v1.Variant.toObject(includeInstance, f), contractId: jspb.Message.getFieldWithDefault(msg, 3, ""), list: (f = msg.getList()) && proto.com.daml.ledger.api.v1.List.toObject(includeInstance, f), int64: jspb.Message.getFieldWithDefault(msg, 5, "0"), numeric: jspb.Message.getFieldWithDefault(msg, 6, ""), text: jspb.Message.getFieldWithDefault(msg, 8, ""), timestamp: jspb.Message.getFieldWithDefault(msg, 9, "0"), party: jspb.Message.getFieldWithDefault(msg, 11, ""), bool: jspb.Message.getBooleanFieldWithDefault(msg, 12, false), unit: (f = msg.getUnit()) && google_protobuf_empty_pb.Empty.toObject(includeInstance, f), date: jspb.Message.getFieldWithDefault(msg, 14, 0), optional: (f = msg.getOptional()) && proto.com.daml.ledger.api.v1.Optional.toObject(includeInstance, f), map: (f = msg.getMap()) && proto.com.daml.ledger.api.v1.Map.toObject(includeInstance, f), pb_enum: (f = msg.getEnum()) && proto.com.daml.ledger.api.v1.Enum.toObject(includeInstance, f), genMap: (f = msg.getGenMap()) && proto.com.daml.ledger.api.v1.GenMap.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.com.daml.ledger.api.v1.Value} */ proto.com.daml.ledger.api.v1.Value.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.com.daml.ledger.api.v1.Value; return proto.com.daml.ledger.api.v1.Value.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.com.daml.ledger.api.v1.Value} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.com.daml.ledger.api.v1.Value} */ proto.com.daml.ledger.api.v1.Value.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.com.daml.ledger.api.v1.Record; reader.readMessage(value,proto.com.daml.ledger.api.v1.Record.deserializeBinaryFromReader); msg.setRecord(value); break; case 2: var value = new proto.com.daml.ledger.api.v1.Variant; reader.readMessage(value,proto.com.daml.ledger.api.v1.Variant.deserializeBinaryFromReader); msg.setVariant(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setContractId(value); break; case 4: var value = new proto.com.daml.ledger.api.v1.List; reader.readMessage(value,proto.com.daml.ledger.api.v1.List.deserializeBinaryFromReader); msg.setList(value); break; case 5: var value = /** @type {string} */ (reader.readSint64String()); msg.setInt64(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setNumeric(value); break; case 8: var value = /** @type {string} */ (reader.readString()); msg.setText(value); break; case 9: var value = /** @type {string} */ (reader.readSfixed64String()); msg.setTimestamp(value); break; case 11: var value = /** @type {string} */ (reader.readString()); msg.setParty(value); break; case 12: var value = /** @type {boolean} */ (reader.readBool()); msg.setBool(value); break; case 13: var value = new google_protobuf_empty_pb.Empty; reader.readMessage(value,google_protobuf_empty_pb.Empty.deserializeBinaryFromReader); msg.setUnit(value); break; case 14: var value = /** @type {number} */ (reader.readInt32()); msg.setDate(value); break; case 15: var value = new proto.com.daml.ledger.api.v1.Optional; reader.readMessage(value,proto.com.daml.ledger.api.v1.Optional.deserializeBinaryFromReader); msg.setOptional(value); break; case 16: var value = new proto.com.daml.ledger.api.v1.Map; reader.readMessage(value,proto.com.daml.ledger.api.v1.Map.deserializeBinaryFromReader); msg.setMap(value); break; case 17: var value = new proto.com.daml.ledger.api.v1.Enum; reader.readMessage(value,proto.com.daml.ledger.api.v1.Enum.deserializeBinaryFromReader); msg.setEnum(value); break; case 18: var value = new proto.com.daml.ledger.api.v1.GenMap; reader.readMessage(value,proto.com.daml.ledger.api.v1.GenMap.deserializeBinaryFromReader); msg.setGenMap(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.com.daml.ledger.api.v1.Value.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.com.daml.ledger.api.v1.Value.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.com.daml.ledger.api.v1.Value} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.Value.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getRecord(); if (f != null) { writer.writeMessage( 1, f, proto.com.daml.ledger.api.v1.Record.serializeBinaryToWriter ); } f = message.getVariant(); if (f != null) { writer.writeMessage( 2, f, proto.com.daml.ledger.api.v1.Variant.serializeBinaryToWriter ); } f = /** @type {string} */ (jspb.Message.getField(message, 3)); if (f != null) { writer.writeString( 3, f ); } f = message.getList(); if (f != null) { writer.writeMessage( 4, f, proto.com.daml.ledger.api.v1.List.serializeBinaryToWriter ); } f = /** @type {string} */ (jspb.Message.getField(message, 5)); if (f != null) { writer.writeSint64String( 5, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 6)); if (f != null) { writer.writeString( 6, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 8)); if (f != null) { writer.writeString( 8, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 9)); if (f != null) { writer.writeSfixed64String( 9, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 11)); if (f != null) { writer.writeString( 11, f ); } f = /** @type {boolean} */ (jspb.Message.getField(message, 12)); if (f != null) { writer.writeBool( 12, f ); } f = message.getUnit(); if (f != null) { writer.writeMessage( 13, f, google_protobuf_empty_pb.Empty.serializeBinaryToWriter ); } f = /** @type {number} */ (jspb.Message.getField(message, 14)); if (f != null) { writer.writeInt32( 14, f ); } f = message.getOptional(); if (f != null) { writer.writeMessage( 15, f, proto.com.daml.ledger.api.v1.Optional.serializeBinaryToWriter ); } f = message.getMap(); if (f != null) { writer.writeMessage( 16, f, proto.com.daml.ledger.api.v1.Map.serializeBinaryToWriter ); } f = message.getEnum(); if (f != null) { writer.writeMessage( 17, f, proto.com.daml.ledger.api.v1.Enum.serializeBinaryToWriter ); } f = message.getGenMap(); if (f != null) { writer.writeMessage( 18, f, proto.com.daml.ledger.api.v1.GenMap.serializeBinaryToWriter ); } }; /** * optional Record record = 1; * @return {?proto.com.daml.ledger.api.v1.Record} */ proto.com.daml.ledger.api.v1.Value.prototype.getRecord = function() { return /** @type{?proto.com.daml.ledger.api.v1.Record} */ ( jspb.Message.getWrapperField(this, proto.com.daml.ledger.api.v1.Record, 1)); }; /** * @param {?proto.com.daml.ledger.api.v1.Record|undefined} value * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.setRecord = function(value) { return jspb.Message.setOneofWrapperField(this, 1, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.clearRecord = function() { return this.setRecord(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Value.prototype.hasRecord = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional Variant variant = 2; * @return {?proto.com.daml.ledger.api.v1.Variant} */ proto.com.daml.ledger.api.v1.Value.prototype.getVariant = function() { return /** @type{?proto.com.daml.ledger.api.v1.Variant} */ ( jspb.Message.getWrapperField(this, proto.com.daml.ledger.api.v1.Variant, 2)); }; /** * @param {?proto.com.daml.ledger.api.v1.Variant|undefined} value * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.setVariant = function(value) { return jspb.Message.setOneofWrapperField(this, 2, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.clearVariant = function() { return this.setVariant(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Value.prototype.hasVariant = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional string contract_id = 3; * @return {string} */ proto.com.daml.ledger.api.v1.Value.prototype.getContractId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.setContractId = function(value) { return jspb.Message.setOneofField(this, 3, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.clearContractId = function() { return jspb.Message.setOneofField(this, 3, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Value.prototype.hasContractId = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional List list = 4; * @return {?proto.com.daml.ledger.api.v1.List} */ proto.com.daml.ledger.api.v1.Value.prototype.getList = function() { return /** @type{?proto.com.daml.ledger.api.v1.List} */ ( jspb.Message.getWrapperField(this, proto.com.daml.ledger.api.v1.List, 4)); }; /** * @param {?proto.com.daml.ledger.api.v1.List|undefined} value * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.setList = function(value) { return jspb.Message.setOneofWrapperField(this, 4, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.clearList = function() { return this.setList(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Value.prototype.hasList = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional sint64 int64 = 5; * @return {string} */ proto.com.daml.ledger.api.v1.Value.prototype.getInt64 = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; /** * @param {string} value * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.setInt64 = function(value) { return jspb.Message.setOneofField(this, 5, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.clearInt64 = function() { return jspb.Message.setOneofField(this, 5, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Value.prototype.hasInt64 = function() { return jspb.Message.getField(this, 5) != null; }; /** * optional string numeric = 6; * @return {string} */ proto.com.daml.ledger.api.v1.Value.prototype.getNumeric = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** * @param {string} value * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.setNumeric = function(value) { return jspb.Message.setOneofField(this, 6, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.clearNumeric = function() { return jspb.Message.setOneofField(this, 6, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Value.prototype.hasNumeric = function() { return jspb.Message.getField(this, 6) != null; }; /** * optional string text = 8; * @return {string} */ proto.com.daml.ledger.api.v1.Value.prototype.getText = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** * @param {string} value * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.setText = function(value) { return jspb.Message.setOneofField(this, 8, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.clearText = function() { return jspb.Message.setOneofField(this, 8, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Value.prototype.hasText = function() { return jspb.Message.getField(this, 8) != null; }; /** * optional sfixed64 timestamp = 9; * @return {string} */ proto.com.daml.ledger.api.v1.Value.prototype.getTimestamp = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); }; /** * @param {string} value * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.setTimestamp = function(value) { return jspb.Message.setOneofField(this, 9, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.clearTimestamp = function() { return jspb.Message.setOneofField(this, 9, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Value.prototype.hasTimestamp = function() { return jspb.Message.getField(this, 9) != null; }; /** * optional string party = 11; * @return {string} */ proto.com.daml.ledger.api.v1.Value.prototype.getParty = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); }; /** * @param {string} value * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.setParty = function(value) { return jspb.Message.setOneofField(this, 11, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.clearParty = function() { return jspb.Message.setOneofField(this, 11, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Value.prototype.hasParty = function() { return jspb.Message.getField(this, 11) != null; }; /** * optional bool bool = 12; * @return {boolean} */ proto.com.daml.ledger.api.v1.Value.prototype.getBool = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false)); }; /** * @param {boolean} value * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.setBool = function(value) { return jspb.Message.setOneofField(this, 12, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.clearBool = function() { return jspb.Message.setOneofField(this, 12, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Value.prototype.hasBool = function() { return jspb.Message.getField(this, 12) != null; }; /** * optional google.protobuf.Empty unit = 13; * @return {?proto.google.protobuf.Empty} */ proto.com.daml.ledger.api.v1.Value.prototype.getUnit = function() { return /** @type{?proto.google.protobuf.Empty} */ ( jspb.Message.getWrapperField(this, google_protobuf_empty_pb.Empty, 13)); }; /** * @param {?proto.google.protobuf.Empty|undefined} value * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.setUnit = function(value) { return jspb.Message.setOneofWrapperField(this, 13, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.clearUnit = function() { return this.setUnit(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Value.prototype.hasUnit = function() { return jspb.Message.getField(this, 13) != null; }; /** * optional int32 date = 14; * @return {number} */ proto.com.daml.ledger.api.v1.Value.prototype.getDate = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); }; /** * @param {number} value * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.setDate = function(value) { return jspb.Message.setOneofField(this, 14, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.clearDate = function() { return jspb.Message.setOneofField(this, 14, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Value.prototype.hasDate = function() { return jspb.Message.getField(this, 14) != null; }; /** * optional Optional optional = 15; * @return {?proto.com.daml.ledger.api.v1.Optional} */ proto.com.daml.ledger.api.v1.Value.prototype.getOptional = function() { return /** @type{?proto.com.daml.ledger.api.v1.Optional} */ ( jspb.Message.getWrapperField(this, proto.com.daml.ledger.api.v1.Optional, 15)); }; /** * @param {?proto.com.daml.ledger.api.v1.Optional|undefined} value * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.setOptional = function(value) { return jspb.Message.setOneofWrapperField(this, 15, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.clearOptional = function() { return this.setOptional(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Value.prototype.hasOptional = function() { return jspb.Message.getField(this, 15) != null; }; /** * optional Map map = 16; * @return {?proto.com.daml.ledger.api.v1.Map} */ proto.com.daml.ledger.api.v1.Value.prototype.getMap = function() { return /** @type{?proto.com.daml.ledger.api.v1.Map} */ ( jspb.Message.getWrapperField(this, proto.com.daml.ledger.api.v1.Map, 16)); }; /** * @param {?proto.com.daml.ledger.api.v1.Map|undefined} value * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.setMap = function(value) { return jspb.Message.setOneofWrapperField(this, 16, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.clearMap = function() { return this.setMap(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Value.prototype.hasMap = function() { return jspb.Message.getField(this, 16) != null; }; /** * optional Enum enum = 17; * @return {?proto.com.daml.ledger.api.v1.Enum} */ proto.com.daml.ledger.api.v1.Value.prototype.getEnum = function() { return /** @type{?proto.com.daml.ledger.api.v1.Enum} */ ( jspb.Message.getWrapperField(this, proto.com.daml.ledger.api.v1.Enum, 17)); }; /** * @param {?proto.com.daml.ledger.api.v1.Enum|undefined} value * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.setEnum = function(value) { return jspb.Message.setOneofWrapperField(this, 17, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.clearEnum = function() { return this.setEnum(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Value.prototype.hasEnum = function() { return jspb.Message.getField(this, 17) != null; }; /** * optional GenMap gen_map = 18; * @return {?proto.com.daml.ledger.api.v1.GenMap} */ proto.com.daml.ledger.api.v1.Value.prototype.getGenMap = function() { return /** @type{?proto.com.daml.ledger.api.v1.GenMap} */ ( jspb.Message.getWrapperField(this, proto.com.daml.ledger.api.v1.GenMap, 18)); }; /** * @param {?proto.com.daml.ledger.api.v1.GenMap|undefined} value * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.setGenMap = function(value) { return jspb.Message.setOneofWrapperField(this, 18, proto.com.daml.ledger.api.v1.Value.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Value} returns this */ proto.com.daml.ledger.api.v1.Value.prototype.clearGenMap = function() { return this.setGenMap(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Value.prototype.hasGenMap = function() { return jspb.Message.getField(this, 18) != null; }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.com.daml.ledger.api.v1.Record.repeatedFields_ = [2]; 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.com.daml.ledger.api.v1.Record.prototype.toObject = function(opt_includeInstance) { return proto.com.daml.ledger.api.v1.Record.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.com.daml.ledger.api.v1.Record} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.Record.toObject = function(includeInstance, msg) { var f, obj = { recordId: (f = msg.getRecordId()) && proto.com.daml.ledger.api.v1.Identifier.toObject(includeInstance, f), fieldsList: jspb.Message.toObjectList(msg.getFieldsList(), proto.com.daml.ledger.api.v1.RecordField.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.com.daml.ledger.api.v1.Record} */ proto.com.daml.ledger.api.v1.Record.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.com.daml.ledger.api.v1.Record; return proto.com.daml.ledger.api.v1.Record.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.com.daml.ledger.api.v1.Record} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.com.daml.ledger.api.v1.Record} */ proto.com.daml.ledger.api.v1.Record.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.com.daml.ledger.api.v1.Identifier; reader.readMessage(value,proto.com.daml.ledger.api.v1.Identifier.deserializeBinaryFromReader); msg.setRecordId(value); break; case 2: var value = new proto.com.daml.ledger.api.v1.RecordField; reader.readMessage(value,proto.com.daml.ledger.api.v1.RecordField.deserializeBinaryFromReader); msg.addFields(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.com.daml.ledger.api.v1.Record.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.com.daml.ledger.api.v1.Record.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.com.daml.ledger.api.v1.Record} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.Record.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getRecordId(); if (f != null) { writer.writeMessage( 1, f, proto.com.daml.ledger.api.v1.Identifier.serializeBinaryToWriter ); } f = message.getFieldsList(); if (f.length > 0) { writer.writeRepeatedMessage( 2, f, proto.com.daml.ledger.api.v1.RecordField.serializeBinaryToWriter ); } }; /** * optional Identifier record_id = 1; * @return {?proto.com.daml.ledger.api.v1.Identifier} */ proto.com.daml.ledger.api.v1.Record.prototype.getRecordId = function() { return /** @type{?proto.com.daml.ledger.api.v1.Identifier} */ ( jspb.Message.getWrapperField(this, proto.com.daml.ledger.api.v1.Identifier, 1)); }; /** * @param {?proto.com.daml.ledger.api.v1.Identifier|undefined} value * @return {!proto.com.daml.ledger.api.v1.Record} returns this */ proto.com.daml.ledger.api.v1.Record.prototype.setRecordId = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Record} returns this */ proto.com.daml.ledger.api.v1.Record.prototype.clearRecordId = function() { return this.setRecordId(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Record.prototype.hasRecordId = function() { return jspb.Message.getField(this, 1) != null; }; /** * repeated RecordField fields = 2; * @return {!Array<!proto.com.daml.ledger.api.v1.RecordField>} */ proto.com.daml.ledger.api.v1.Record.prototype.getFieldsList = function() { return /** @type{!Array<!proto.com.daml.ledger.api.v1.RecordField>} */ ( jspb.Message.getRepeatedWrapperField(this, proto.com.daml.ledger.api.v1.RecordField, 2)); }; /** * @param {!Array<!proto.com.daml.ledger.api.v1.RecordField>} value * @return {!proto.com.daml.ledger.api.v1.Record} returns this */ proto.com.daml.ledger.api.v1.Record.prototype.setFieldsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** * @param {!proto.com.daml.ledger.api.v1.RecordField=} opt_value * @param {number=} opt_index * @return {!proto.com.daml.ledger.api.v1.RecordField} */ proto.com.daml.ledger.api.v1.Record.prototype.addFields = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.com.daml.ledger.api.v1.RecordField, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.com.daml.ledger.api.v1.Record} returns this */ proto.com.daml.ledger.api.v1.Record.prototype.clearFieldsList = function() { return this.setFieldsList([]); }; 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.com.daml.ledger.api.v1.RecordField.prototype.toObject = function(opt_includeInstance) { return proto.com.daml.ledger.api.v1.RecordField.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.com.daml.ledger.api.v1.RecordField} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.RecordField.toObject = function(includeInstance, msg) { var f, obj = { label: jspb.Message.getFieldWithDefault(msg, 1, ""), value: (f = msg.getValue()) && proto.com.daml.ledger.api.v1.Value.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.com.daml.ledger.api.v1.RecordField} */ proto.com.daml.ledger.api.v1.RecordField.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.com.daml.ledger.api.v1.RecordField; return proto.com.daml.ledger.api.v1.RecordField.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.com.daml.ledger.api.v1.RecordField} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.com.daml.ledger.api.v1.RecordField} */ proto.com.daml.ledger.api.v1.RecordField.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.setLabel(value); break; case 2: var value = new proto.com.daml.ledger.api.v1.Value; reader.readMessage(value,proto.com.daml.ledger.api.v1.Value.deserializeBinaryFromReader); msg.setValue(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.com.daml.ledger.api.v1.RecordField.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.com.daml.ledger.api.v1.RecordField.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.com.daml.ledger.api.v1.RecordField} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.RecordField.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getLabel(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getValue(); if (f != null) { writer.writeMessage( 2, f, proto.com.daml.ledger.api.v1.Value.serializeBinaryToWriter ); } }; /** * optional string label = 1; * @return {string} */ proto.com.daml.ledger.api.v1.RecordField.prototype.getLabel = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.com.daml.ledger.api.v1.RecordField} returns this */ proto.com.daml.ledger.api.v1.RecordField.prototype.setLabel = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional Value value = 2; * @return {?proto.com.daml.ledger.api.v1.Value} */ proto.com.daml.ledger.api.v1.RecordField.prototype.getValue = function() { return /** @type{?proto.com.daml.ledger.api.v1.Value} */ ( jspb.Message.getWrapperField(this, proto.com.daml.ledger.api.v1.Value, 2)); }; /** * @param {?proto.com.daml.ledger.api.v1.Value|undefined} value * @return {!proto.com.daml.ledger.api.v1.RecordField} returns this */ proto.com.daml.ledger.api.v1.RecordField.prototype.setValue = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.RecordField} returns this */ proto.com.daml.ledger.api.v1.RecordField.prototype.clearValue = function() { return this.setValue(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.RecordField.prototype