UNPKG

@digitalasset/daml-ledger

Version:
569 lines (490 loc) 20.3 kB
// source: com/daml/ledger/api/v1/ledger_configuration_service.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_trace_context_pb = require('../../../../../com/daml/ledger/api/v1/trace_context_pb.js'); goog.object.extend(proto, com_daml_ledger_api_v1_trace_context_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.GetLedgerConfigurationRequest', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse', null, global); goog.exportSymbol('proto.com.daml.ledger.api.v1.LedgerConfiguration', 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.GetLedgerConfigurationRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, 500, null, null); }; goog.inherits(proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest.displayName = 'proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest'; } /** * 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.GetLedgerConfigurationResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse.displayName = 'proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse'; } /** * 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.LedgerConfiguration = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.com.daml.ledger.api.v1.LedgerConfiguration, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.daml.ledger.api.v1.LedgerConfiguration.displayName = 'proto.com.daml.ledger.api.v1.LedgerConfiguration'; } 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.GetLedgerConfigurationRequest.prototype.toObject = function(opt_includeInstance) { return proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest.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.GetLedgerConfigurationRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest.toObject = function(includeInstance, msg) { var f, obj = { ledgerId: jspb.Message.getFieldWithDefault(msg, 1, ""), traceContext: (f = msg.getTraceContext()) && com_daml_ledger_api_v1_trace_context_pb.TraceContext.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.GetLedgerConfigurationRequest} */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest; return proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest.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.GetLedgerConfigurationRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest} */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest.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 1000: var value = new com_daml_ledger_api_v1_trace_context_pb.TraceContext; reader.readMessage(value,com_daml_ledger_api_v1_trace_context_pb.TraceContext.deserializeBinaryFromReader); msg.setTraceContext(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.GetLedgerConfigurationRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest.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.GetLedgerConfigurationRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getLedgerId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getTraceContext(); if (f != null) { writer.writeMessage( 1000, f, com_daml_ledger_api_v1_trace_context_pb.TraceContext.serializeBinaryToWriter ); } }; /** * optional string ledger_id = 1; * @return {string} */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest.prototype.getLedgerId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest} returns this */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest.prototype.setLedgerId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional TraceContext trace_context = 1000; * @return {?proto.com.daml.ledger.api.v1.TraceContext} */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest.prototype.getTraceContext = function() { return /** @type{?proto.com.daml.ledger.api.v1.TraceContext} */ ( jspb.Message.getWrapperField(this, com_daml_ledger_api_v1_trace_context_pb.TraceContext, 1000)); }; /** * @param {?proto.com.daml.ledger.api.v1.TraceContext|undefined} value * @return {!proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest} returns this */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest.prototype.setTraceContext = function(value) { return jspb.Message.setWrapperField(this, 1000, value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest} returns this */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest.prototype.clearTraceContext = function() { return this.setTraceContext(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationRequest.prototype.hasTraceContext = function() { return jspb.Message.getField(this, 1000) != 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.GetLedgerConfigurationResponse.prototype.toObject = function(opt_includeInstance) { return proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse.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.GetLedgerConfigurationResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse.toObject = function(includeInstance, msg) { var f, obj = { ledgerConfiguration: (f = msg.getLedgerConfiguration()) && proto.com.daml.ledger.api.v1.LedgerConfiguration.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.GetLedgerConfigurationResponse} */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse; return proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse.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.GetLedgerConfigurationResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse} */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse.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.LedgerConfiguration; reader.readMessage(value,proto.com.daml.ledger.api.v1.LedgerConfiguration.deserializeBinaryFromReader); msg.setLedgerConfiguration(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.GetLedgerConfigurationResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse.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.GetLedgerConfigurationResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getLedgerConfiguration(); if (f != null) { writer.writeMessage( 1, f, proto.com.daml.ledger.api.v1.LedgerConfiguration.serializeBinaryToWriter ); } }; /** * optional LedgerConfiguration ledger_configuration = 1; * @return {?proto.com.daml.ledger.api.v1.LedgerConfiguration} */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse.prototype.getLedgerConfiguration = function() { return /** @type{?proto.com.daml.ledger.api.v1.LedgerConfiguration} */ ( jspb.Message.getWrapperField(this, proto.com.daml.ledger.api.v1.LedgerConfiguration, 1)); }; /** * @param {?proto.com.daml.ledger.api.v1.LedgerConfiguration|undefined} value * @return {!proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse} returns this */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse.prototype.setLedgerConfiguration = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse} returns this */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse.prototype.clearLedgerConfiguration = function() { return this.setLedgerConfiguration(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.GetLedgerConfigurationResponse.prototype.hasLedgerConfiguration = function() { return jspb.Message.getField(this, 1) != 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.LedgerConfiguration.prototype.toObject = function(opt_includeInstance) { return proto.com.daml.ledger.api.v1.LedgerConfiguration.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.LedgerConfiguration} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.LedgerConfiguration.toObject = function(includeInstance, msg) { var f, obj = { maxDeduplicationTime: (f = msg.getMaxDeduplicationTime()) && 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.LedgerConfiguration} */ proto.com.daml.ledger.api.v1.LedgerConfiguration.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.com.daml.ledger.api.v1.LedgerConfiguration; return proto.com.daml.ledger.api.v1.LedgerConfiguration.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.LedgerConfiguration} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.com.daml.ledger.api.v1.LedgerConfiguration} */ proto.com.daml.ledger.api.v1.LedgerConfiguration.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 3: var value = new google_protobuf_duration_pb.Duration; reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); msg.setMaxDeduplicationTime(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.LedgerConfiguration.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.com.daml.ledger.api.v1.LedgerConfiguration.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.LedgerConfiguration} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.daml.ledger.api.v1.LedgerConfiguration.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMaxDeduplicationTime(); if (f != null) { writer.writeMessage( 3, f, google_protobuf_duration_pb.Duration.serializeBinaryToWriter ); } }; /** * optional google.protobuf.Duration max_deduplication_time = 3; * @return {?proto.google.protobuf.Duration} */ proto.com.daml.ledger.api.v1.LedgerConfiguration.prototype.getMaxDeduplicationTime = function() { return /** @type{?proto.google.protobuf.Duration} */ ( jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 3)); }; /** * @param {?proto.google.protobuf.Duration|undefined} value * @return {!proto.com.daml.ledger.api.v1.LedgerConfiguration} returns this */ proto.com.daml.ledger.api.v1.LedgerConfiguration.prototype.setMaxDeduplicationTime = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.com.daml.ledger.api.v1.LedgerConfiguration} returns this */ proto.com.daml.ledger.api.v1.LedgerConfiguration.prototype.clearMaxDeduplicationTime = function() { return this.setMaxDeduplicationTime(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.com.daml.ledger.api.v1.LedgerConfiguration.prototype.hasMaxDeduplicationTime = function() { return jspb.Message.getField(this, 3) != null; }; goog.object.extend(exports, proto.com.daml.ledger.api.v1);