UNPKG

@digitalasset/daml-ledger

Version:
1,528 lines (1,320 loc) 64.1 kB
// source: com/daml/ledger/api/v1/commands.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 com_daml_ledger_api_v1_value_pb = require('../../../../../com/daml/ledger/api/v1/value_pb.js'); goog.object.extend(proto, com_daml_ledger_api_v1_value_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.Command', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.Command.CommandCase', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.Commands', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.CreateAndExerciseCommand', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.CreateCommand', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.ExerciseByKeyCommand', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.ExerciseCommand', 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.Commands = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.com.daml.ledger.api.v1.Commands.repeatedFields_, null); }; goog.inherits(proto.com.daml.ledger.api.v1.Commands, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.Commands.displayName = 'proto.com.daml.ledger.api.v1.Commands'; } /** * 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.Command = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.com.daml.ledger.api.v1.Command.oneofGroups_); }; goog.inherits(proto.com.daml.ledger.api.v1.Command, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.Command.displayName = 'proto.com.daml.ledger.api.v1.Command'; } /** * 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.CreateCommand = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.com.daml.ledger.api.v1.CreateCommand, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.CreateCommand.displayName = 'proto.com.daml.ledger.api.v1.CreateCommand'; } /** * 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.ExerciseCommand = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.com.daml.ledger.api.v1.ExerciseCommand, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.ExerciseCommand.displayName = 'proto.com.daml.ledger.api.v1.ExerciseCommand'; } /** * 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.ExerciseByKeyCommand = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.com.daml.ledger.api.v1.ExerciseByKeyCommand, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.ExerciseByKeyCommand.displayName = 'proto.com.daml.ledger.api.v1.ExerciseByKeyCommand'; } /** * 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.CreateAndExerciseCommand = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.com.daml.ledger.api.v1.CreateAndExerciseCommand, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.CreateAndExerciseCommand.displayName = 'proto.com.daml.ledger.api.v1.CreateAndExerciseCommand'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.com.daml.ledger.api.v1.Commands.repeatedFields_ = [8]; 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.Commands.prototype.toObject = function(opt_includeInstance) { return proto.com.daml.ledger.api.v1.Commands.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.Commands} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.Commands.toObject = function(includeInstance, msg) { var f, obj = { ledgerId: jspb.Message.getFieldWithDefault(msg, 1, ""), workflowId: jspb.Message.getFieldWithDefault(msg, 2, ""), applicationId: jspb.Message.getFieldWithDefault(msg, 3, ""), commandId: jspb.Message.getFieldWithDefault(msg, 4, ""), party: jspb.Message.getFieldWithDefault(msg, 5, ""), commandsList: jspb.Message.toObjectList(msg.getCommandsList(), proto.com.daml.ledger.api.v1.Command.toObject, includeInstance), deduplicationTime: (f = msg.getDeduplicationTime()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), minLedgerTimeAbs: (f = msg.getMinLedgerTimeAbs()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), minLedgerTimeRel: (f = msg.getMinLedgerTimeRel()) && google_protobuf_duration_pb.Duration.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.Commands} */ proto.com.daml.ledger.api.v1.Commands.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.com.daml.ledger.api.v1.Commands; return proto.com.daml.ledger.api.v1.Commands.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.Commands} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.com.daml.ledger.api.v1.Commands} */ proto.com.daml.ledger.api.v1.Commands.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.setLedgerId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setWorkflowId(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setApplicationId(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setCommandId(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setParty(value); break; case 8: var value = new proto.com.daml.ledger.api.v1.Command; reader.readMessage(value,proto.com.daml.ledger.api.v1.Command.deserializeBinaryFromReader); msg.addCommands(value); break; case 9: var value = new google_protobuf_duration_pb.Duration; reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); msg.setDeduplicationTime(value); break; case 10: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setMinLedgerTimeAbs(value); break; case 11: var value = new google_protobuf_duration_pb.Duration; reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); msg.setMinLedgerTimeRel(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.Commands.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.com.daml.ledger.api.v1.Commands.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.Commands} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.Commands.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getLedgerId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getWorkflowId(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getApplicationId(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getCommandId(); if (f.length > 0) { writer.writeString( 4, f ); } f = message.getParty(); if (f.length > 0) { writer.writeString( 5, f ); } f = message.getCommandsList(); if (f.length > 0) { writer.writeRepeatedMessage( 8, f, proto.com.daml.ledger.api.v1.Command.serializeBinaryToWriter ); } f = message.getDeduplicationTime(); if (f != null) { writer.writeMessage( 9, f, google_protobuf_duration_pb.Duration.serializeBinaryToWriter ); } f = message.getMinLedgerTimeAbs(); if (f != null) { writer.writeMessage( 10, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getMinLedgerTimeRel(); if (f != null) { writer.writeMessage( 11, f, google_protobuf_duration_pb.Duration.serializeBinaryToWriter ); } }; /** * optional string ledger_id = 1; * @return {string} */ proto.com.daml.ledger.api.v1.Commands.prototype.getLedgerId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.com.daml.ledger.api.v1.Commands} returns this */ proto.com.daml.ledger.api.v1.Commands.prototype.setLedgerId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string workflow_id = 2; * @return {string} */ proto.com.daml.ledger.api.v1.Commands.prototype.getWorkflowId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.com.daml.ledger.api.v1.Commands} returns this */ proto.com.daml.ledger.api.v1.Commands.prototype.setWorkflowId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string application_id = 3; * @return {string} */ proto.com.daml.ledger.api.v1.Commands.prototype.getApplicationId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.com.daml.ledger.api.v1.Commands} returns this */ proto.com.daml.ledger.api.v1.Commands.prototype.setApplicationId = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string command_id = 4; * @return {string} */ proto.com.daml.ledger.api.v1.Commands.prototype.getCommandId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.com.daml.ledger.api.v1.Commands} returns this */ proto.com.daml.ledger.api.v1.Commands.prototype.setCommandId = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string party = 5; * @return {string} */ proto.com.daml.ledger.api.v1.Commands.prototype.getParty = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value * @return {!proto.com.daml.ledger.api.v1.Commands} returns this */ proto.com.daml.ledger.api.v1.Commands.prototype.setParty = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; /** * repeated Command commands = 8; * @return {!Array<!proto.com.daml.ledger.api.v1.Command>} */ proto.com.daml.ledger.api.v1.Commands.prototype.getCommandsList = function() { return /** @type{!Array<!proto.com.daml.ledger.api.v1.Command>} */ ( jspb.Message.getRepeatedWrapperField(this, proto.com.daml.ledger.api.v1.Command, 8)); }; /** * @param {!Array<!proto.com.daml.ledger.api.v1.Command>} value * @return {!proto.com.daml.ledger.api.v1.Commands} returns this */ proto.com.daml.ledger.api.v1.Commands.prototype.setCommandsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 8, value); }; /** * @param {!proto.com.daml.ledger.api.v1.Command=} opt_value * @param {number=} opt_index * @return {!proto.com.daml.ledger.api.v1.Command} */ proto.com.daml.ledger.api.v1.Commands.prototype.addCommands = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.com.daml.ledger.api.v1.Command, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.com.daml.ledger.api.v1.Commands} returns this */ proto.com.daml.ledger.api.v1.Commands.prototype.clearCommandsList = function() { return this.setCommandsList([]); }; /** * optional google.protobuf.Duration deduplication_time = 9; * @return {?proto.google.protobuf.Duration} */ proto.com.daml.ledger.api.v1.Commands.prototype.getDeduplicationTime = function() { return /** @type{?proto.google.protobuf.Duration} */ ( jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 9)); }; /** * @param {?proto.google.protobuf.Duration|undefined} value * @return {!proto.com.daml.ledger.api.v1.Commands} returns this */ proto.com.daml.ledger.api.v1.Commands.prototype.setDeduplicationTime = function(value) { return jspb.Message.setWrapperField(this, 9, value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Commands} returns this */ proto.com.daml.ledger.api.v1.Commands.prototype.clearDeduplicationTime = function() { return this.setDeduplicationTime(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Commands.prototype.hasDeduplicationTime = function() { return jspb.Message.getField(this, 9) != null; }; /** * optional google.protobuf.Timestamp min_ledger_time_abs = 10; * @return {?proto.google.protobuf.Timestamp} */ proto.com.daml.ledger.api.v1.Commands.prototype.getMinLedgerTimeAbs = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 10)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.com.daml.ledger.api.v1.Commands} returns this */ proto.com.daml.ledger.api.v1.Commands.prototype.setMinLedgerTimeAbs = function(value) { return jspb.Message.setWrapperField(this, 10, value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Commands} returns this */ proto.com.daml.ledger.api.v1.Commands.prototype.clearMinLedgerTimeAbs = function() { return this.setMinLedgerTimeAbs(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Commands.prototype.hasMinLedgerTimeAbs = function() { return jspb.Message.getField(this, 10) != null; }; /** * optional google.protobuf.Duration min_ledger_time_rel = 11; * @return {?proto.google.protobuf.Duration} */ proto.com.daml.ledger.api.v1.Commands.prototype.getMinLedgerTimeRel = function() { return /** @type{?proto.google.protobuf.Duration} */ ( jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 11)); }; /** * @param {?proto.google.protobuf.Duration|undefined} value * @return {!proto.com.daml.ledger.api.v1.Commands} returns this */ proto.com.daml.ledger.api.v1.Commands.prototype.setMinLedgerTimeRel = function(value) { return jspb.Message.setWrapperField(this, 11, value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Commands} returns this */ proto.com.daml.ledger.api.v1.Commands.prototype.clearMinLedgerTimeRel = function() { return this.setMinLedgerTimeRel(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Commands.prototype.hasMinLedgerTimeRel = function() { return jspb.Message.getField(this, 11) != null; }; /** * 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.Command.oneofGroups_ = [[1,2,4,3]]; /** * @enum {number} */ proto.com.daml.ledger.api.v1.Command.CommandCase = { COMMAND_NOT_SET: 0, CREATE: 1, EXERCISE: 2, EXERCISEBYKEY: 4, CREATEANDEXERCISE: 3 }; /** * @return {proto.com.daml.ledger.api.v1.Command.CommandCase} */ proto.com.daml.ledger.api.v1.Command.prototype.getCommandCase = function() { return /** @type {proto.com.daml.ledger.api.v1.Command.CommandCase} */(jspb.Message.computeOneofCase(this, proto.com.daml.ledger.api.v1.Command.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.Command.prototype.toObject = function(opt_includeInstance) { return proto.com.daml.ledger.api.v1.Command.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.Command} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.Command.toObject = function(includeInstance, msg) { var f, obj = { create: (f = msg.getCreate()) && proto.com.daml.ledger.api.v1.CreateCommand.toObject(includeInstance, f), exercise: (f = msg.getExercise()) && proto.com.daml.ledger.api.v1.ExerciseCommand.toObject(includeInstance, f), exercisebykey: (f = msg.getExercisebykey()) && proto.com.daml.ledger.api.v1.ExerciseByKeyCommand.toObject(includeInstance, f), createandexercise: (f = msg.getCreateandexercise()) && proto.com.daml.ledger.api.v1.CreateAndExerciseCommand.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.Command} */ proto.com.daml.ledger.api.v1.Command.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.com.daml.ledger.api.v1.Command; return proto.com.daml.ledger.api.v1.Command.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.Command} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.com.daml.ledger.api.v1.Command} */ proto.com.daml.ledger.api.v1.Command.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.CreateCommand; reader.readMessage(value,proto.com.daml.ledger.api.v1.CreateCommand.deserializeBinaryFromReader); msg.setCreate(value); break; case 2: var value = new proto.com.daml.ledger.api.v1.ExerciseCommand; reader.readMessage(value,proto.com.daml.ledger.api.v1.ExerciseCommand.deserializeBinaryFromReader); msg.setExercise(value); break; case 4: var value = new proto.com.daml.ledger.api.v1.ExerciseByKeyCommand; reader.readMessage(value,proto.com.daml.ledger.api.v1.ExerciseByKeyCommand.deserializeBinaryFromReader); msg.setExercisebykey(value); break; case 3: var value = new proto.com.daml.ledger.api.v1.CreateAndExerciseCommand; reader.readMessage(value,proto.com.daml.ledger.api.v1.CreateAndExerciseCommand.deserializeBinaryFromReader); msg.setCreateandexercise(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.Command.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.com.daml.ledger.api.v1.Command.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.Command} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.Command.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCreate(); if (f != null) { writer.writeMessage( 1, f, proto.com.daml.ledger.api.v1.CreateCommand.serializeBinaryToWriter ); } f = message.getExercise(); if (f != null) { writer.writeMessage( 2, f, proto.com.daml.ledger.api.v1.ExerciseCommand.serializeBinaryToWriter ); } f = message.getExercisebykey(); if (f != null) { writer.writeMessage( 4, f, proto.com.daml.ledger.api.v1.ExerciseByKeyCommand.serializeBinaryToWriter ); } f = message.getCreateandexercise(); if (f != null) { writer.writeMessage( 3, f, proto.com.daml.ledger.api.v1.CreateAndExerciseCommand.serializeBinaryToWriter ); } }; /** * optional CreateCommand create = 1; * @return {?proto.com.daml.ledger.api.v1.CreateCommand} */ proto.com.daml.ledger.api.v1.Command.prototype.getCreate = function() { return /** @type{?proto.com.daml.ledger.api.v1.CreateCommand} */ ( jspb.Message.getWrapperField(this, proto.com.daml.ledger.api.v1.CreateCommand, 1)); }; /** * @param {?proto.com.daml.ledger.api.v1.CreateCommand|undefined} value * @return {!proto.com.daml.ledger.api.v1.Command} returns this */ proto.com.daml.ledger.api.v1.Command.prototype.setCreate = function(value) { return jspb.Message.setOneofWrapperField(this, 1, proto.com.daml.ledger.api.v1.Command.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Command} returns this */ proto.com.daml.ledger.api.v1.Command.prototype.clearCreate = function() { return this.setCreate(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Command.prototype.hasCreate = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional ExerciseCommand exercise = 2; * @return {?proto.com.daml.ledger.api.v1.ExerciseCommand} */ proto.com.daml.ledger.api.v1.Command.prototype.getExercise = function() { return /** @type{?proto.com.daml.ledger.api.v1.ExerciseCommand} */ ( jspb.Message.getWrapperField(this, proto.com.daml.ledger.api.v1.ExerciseCommand, 2)); }; /** * @param {?proto.com.daml.ledger.api.v1.ExerciseCommand|undefined} value * @return {!proto.com.daml.ledger.api.v1.Command} returns this */ proto.com.daml.ledger.api.v1.Command.prototype.setExercise = function(value) { return jspb.Message.setOneofWrapperField(this, 2, proto.com.daml.ledger.api.v1.Command.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Command} returns this */ proto.com.daml.ledger.api.v1.Command.prototype.clearExercise = function() { return this.setExercise(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Command.prototype.hasExercise = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional ExerciseByKeyCommand exerciseByKey = 4; * @return {?proto.com.daml.ledger.api.v1.ExerciseByKeyCommand} */ proto.com.daml.ledger.api.v1.Command.prototype.getExercisebykey = function() { return /** @type{?proto.com.daml.ledger.api.v1.ExerciseByKeyCommand} */ ( jspb.Message.getWrapperField(this, proto.com.daml.ledger.api.v1.ExerciseByKeyCommand, 4)); }; /** * @param {?proto.com.daml.ledger.api.v1.ExerciseByKeyCommand|undefined} value * @return {!proto.com.daml.ledger.api.v1.Command} returns this */ proto.com.daml.ledger.api.v1.Command.prototype.setExercisebykey = function(value) { return jspb.Message.setOneofWrapperField(this, 4, proto.com.daml.ledger.api.v1.Command.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Command} returns this */ proto.com.daml.ledger.api.v1.Command.prototype.clearExercisebykey = function() { return this.setExercisebykey(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Command.prototype.hasExercisebykey = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional CreateAndExerciseCommand createAndExercise = 3; * @return {?proto.com.daml.ledger.api.v1.CreateAndExerciseCommand} */ proto.com.daml.ledger.api.v1.Command.prototype.getCreateandexercise = function() { return /** @type{?proto.com.daml.ledger.api.v1.CreateAndExerciseCommand} */ ( jspb.Message.getWrapperField(this, proto.com.daml.ledger.api.v1.CreateAndExerciseCommand, 3)); }; /** * @param {?proto.com.daml.ledger.api.v1.CreateAndExerciseCommand|undefined} value * @return {!proto.com.daml.ledger.api.v1.Command} returns this */ proto.com.daml.ledger.api.v1.Command.prototype.setCreateandexercise = function(value) { return jspb.Message.setOneofWrapperField(this, 3, proto.com.daml.ledger.api.v1.Command.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.Command} returns this */ proto.com.daml.ledger.api.v1.Command.prototype.clearCreateandexercise = function() { return this.setCreateandexercise(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.Command.prototype.hasCreateandexercise = function() { return jspb.Message.getField(this, 3) != 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.com.daml.ledger.api.v1.CreateCommand.prototype.toObject = function(opt_includeInstance) { return proto.com.daml.ledger.api.v1.CreateCommand.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.CreateCommand} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.CreateCommand.toObject = function(includeInstance, msg) { var f, obj = { templateId: (f = msg.getTemplateId()) && com_daml_ledger_api_v1_value_pb.Identifier.toObject(includeInstance, f), createArguments: (f = msg.getCreateArguments()) && com_daml_ledger_api_v1_value_pb.Record.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.CreateCommand} */ proto.com.daml.ledger.api.v1.CreateCommand.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.com.daml.ledger.api.v1.CreateCommand; return proto.com.daml.ledger.api.v1.CreateCommand.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.CreateCommand} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.com.daml.ledger.api.v1.CreateCommand} */ proto.com.daml.ledger.api.v1.CreateCommand.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new com_daml_ledger_api_v1_value_pb.Identifier; reader.readMessage(value,com_daml_ledger_api_v1_value_pb.Identifier.deserializeBinaryFromReader); msg.setTemplateId(value); break; case 2: var value = new com_daml_ledger_api_v1_value_pb.Record; reader.readMessage(value,com_daml_ledger_api_v1_value_pb.Record.deserializeBinaryFromReader); msg.setCreateArguments(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.CreateCommand.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.com.daml.ledger.api.v1.CreateCommand.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.CreateCommand} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.CreateCommand.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTemplateId(); if (f != null) { writer.writeMessage( 1, f, com_daml_ledger_api_v1_value_pb.Identifier.serializeBinaryToWriter ); } f = message.getCreateArguments(); if (f != null) { writer.writeMessage( 2, f, com_daml_ledger_api_v1_value_pb.Record.serializeBinaryToWriter ); } }; /** * optional Identifier template_id = 1; * @return {?proto.com.daml.ledger.api.v1.Identifier} */ proto.com.daml.ledger.api.v1.CreateCommand.prototype.getTemplateId = function() { return /** @type{?proto.com.daml.ledger.api.v1.Identifier} */ ( jspb.Message.getWrapperField(this, com_daml_ledger_api_v1_value_pb.Identifier, 1)); }; /** * @param {?proto.com.daml.ledger.api.v1.Identifier|undefined} value * @return {!proto.com.daml.ledger.api.v1.CreateCommand} returns this */ proto.com.daml.ledger.api.v1.CreateCommand.prototype.setTemplateId = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.CreateCommand} returns this */ proto.com.daml.ledger.api.v1.CreateCommand.prototype.clearTemplateId = function() { return this.setTemplateId(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.CreateCommand.prototype.hasTemplateId = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional Record create_arguments = 2; * @return {?proto.com.daml.ledger.api.v1.Record} */ proto.com.daml.ledger.api.v1.CreateCommand.prototype.getCreateArguments = function() { return /** @type{?proto.com.daml.ledger.api.v1.Record} */ ( jspb.Message.getWrapperField(this, com_daml_ledger_api_v1_value_pb.Record, 2)); }; /** * @param {?proto.com.daml.ledger.api.v1.Record|undefined} value * @return {!proto.com.daml.ledger.api.v1.CreateCommand} returns this */ proto.com.daml.ledger.api.v1.CreateCommand.prototype.setCreateArguments = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.CreateCommand} returns this */ proto.com.daml.ledger.api.v1.CreateCommand.prototype.clearCreateArguments = function() { return this.setCreateArguments(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.CreateCommand.prototype.hasCreateArguments = function() { return jspb.Message.getField(this, 2) != 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.com.daml.ledger.api.v1.ExerciseCommand.prototype.toObject = function(opt_includeInstance) { return proto.com.daml.ledger.api.v1.ExerciseCommand.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.ExerciseCommand} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.ExerciseCommand.toObject = function(includeInstance, msg) { var f, obj = { templateId: (f = msg.getTemplateId()) && com_daml_ledger_api_v1_value_pb.Identifier.toObject(includeInstance, f), contractId: jspb.Message.getFieldWithDefault(msg, 2, ""), choice: jspb.Message.getFieldWithDefault(msg, 3, ""), choiceArgument: (f = msg.getChoiceArgument()) && com_daml_ledger_api_v1_value_pb.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.ExerciseCommand} */ proto.com.daml.ledger.api.v1.ExerciseCommand.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.com.daml.ledger.api.v1.ExerciseCommand; return proto.com.daml.ledger.api.v1.ExerciseCommand.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.ExerciseCommand} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.com.daml.ledger.api.v1.ExerciseCommand} */ proto.com.daml.ledger.api.v1.ExerciseCommand.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new com_daml_ledger_api_v1_value_pb.Identifier; reader.readMessage(value,com_daml_ledger_api_v1_value_pb.Identifier.deserializeBinaryFromReader); msg.setTemplateId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setContractId(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setChoice(value); break; case 4: var value = new com_daml_ledger_api_v1_value_pb.Value; reader.readMessage(value,com_daml_ledger_api_v1_value_pb.Value.deserializeBinaryFromReader); msg.setChoiceArgument(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.ExerciseCommand.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.com.daml.ledger.api.v1.ExerciseCommand.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.ExerciseCommand} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.ExerciseCommand.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTemplateId(); if (f != null) { writer.writeMessage( 1, f, com_daml_ledger_api_v1_value_pb.Identifier.serializeBinaryToWriter ); } f = message.getContractId(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getChoice(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getChoiceArgument(); if (f != null) { writer.writeMessage( 4, f, com_daml_ledger_api_v1_value_pb.Value.serializeBinaryToWriter ); } }; /** * optional Identifier template_id = 1; * @return {?proto.com.daml.ledger.api.v1.Identifier} */ proto.com.daml.ledger.api.v1.ExerciseCommand.prototype.getTemplateId = function() { return /** @type{?proto.com.daml.ledger.api.v1.Identifier} */ ( jspb.Message.getWrapperField(this, com_daml_ledger_api_v1_value_pb.Identifier, 1)); }; /** * @param {?proto.com.daml.ledger.api.v1.Identifier|undefined} value * @return {!proto.com.daml.ledger.api.v1.ExerciseCommand} returns this */ proto.com.daml.ledger.api.v1.ExerciseCommand.prototype.setTemplateId = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.ExerciseCommand} returns this */ proto.com.daml.ledger.api.v1.ExerciseCommand.prototype.clearTemplateId = function() { return this.setTemplateId(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.ExerciseCommand.prototype.hasTemplateId = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional string contract_id = 2; * @return {string} */ proto.com.daml.ledger.api.v1.ExerciseCommand.prototype.getContractId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.com.daml.ledger.api.v1.ExerciseCommand} returns this */ proto.com.daml.ledger.api.v1.ExerciseCommand.prototype.setContractId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string choice = 3; * @return {string} */ proto.com.daml.ledger.api.v1.ExerciseCommand.prototype.getChoice = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.com.daml.ledger.api.v1.ExerciseCommand} returns this */ proto.com.daml.ledger.api.v1.ExerciseCommand.prototype.setChoice = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional Value choice_argument = 4; * @return {?proto.com.daml.ledger.api.v1.Value} */ proto.com.daml.ledger.api.v1.ExerciseCommand.prototype.getChoiceArgument = function() { return /** @type{?proto.com.daml.ledger.api.v1.Value} */ ( jspb.Message.getWrapperField(this, com_daml_ledger_api_v1_value_pb.Value, 4)); }; /** * @param {?proto.com.daml.ledger.api.v1.Value|undefined} value * @return {!proto.com.daml.ledger.api.v1.ExerciseCommand} returns this */ proto.com.daml.ledger.api.v1.ExerciseCommand.prototype.setChoiceArgument = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.ExerciseCommand} returns this */ proto.com.daml.ledger.api.v1.ExerciseCommand.prototype.clearChoiceArgument = function() { return this.setChoiceArgument(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.ExerciseCommand.prototype.hasChoiceArgument = function() { return jspb.Message.getField(this, 4) != 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.com.daml.ledger.api.v1.ExerciseByKeyCommand.prototype.toObject = function(opt_includeInstance) { return proto.com.daml.ledger.api.v1.ExerciseByKeyCommand.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.ExerciseByKeyCommand} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.ExerciseByKeyCommand.toObject = function(includeInstance, msg) { var f, obj = { templateId: (f = msg.getTemplateId()) && com_daml_ledger_api_v1_value_pb.Identifier.toObject(includeInstance, f), contractKey: (f = msg.getContractKey()) && com_daml_ledger_api_v1_value_pb.Value.toObject(includeInstance, f), choice: jspb.Message.getFieldWithDefault(msg, 3, ""), choiceArgument: (f = msg.getChoiceArgument()) && com_daml_ledger_api_v1_value_pb.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.ExerciseByKeyCommand} */ proto.com.daml.ledger.api.v1.ExerciseByKeyCommand.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.com.daml.ledger.api.v1.ExerciseByKeyCommand; return proto.com.daml.ledger.api.v1.ExerciseByKeyCommand.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.ExerciseByKeyCommand} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.com.daml.ledger.api.v1.ExerciseByKeyCommand} */ proto.com.daml.ledger.api.v1.ExerciseByKeyCommand.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new com_daml_ledger_api_v1_value_pb.Identifier; reader.readMessage(value,com_daml_ledger_api_v1_value_pb.Identifier.deserializeBinaryFromReader); msg.setTemplateId(value); break; case 2: var value = new com_daml_ledger_api_v1_value_pb.Value; reader.readMessage(value,com_daml_ledger_api_v1_value_pb.Value.deserializeBinaryFromReader); msg.setContractKey(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setChoice(value); break; case 4: var value = new com_daml_ledger_api_v1_value_pb.Value; reader.readMessage(value,com_daml_ledger_api_v1_value_pb.Value.deserializeBinaryFromReader); msg.setChoiceArgument(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.ExerciseByKeyCommand.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.com.daml.ledger.api.v1.ExerciseByKeyCommand.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.ExerciseByKeyCommand} message * @param {!jspb.BinaryWr