How to use the google-protobuf.Message function in google-protobuf

To help you get started, we’ve selected a few google-protobuf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github googleforgames / agones / sdks / nodejs / lib / google / api / http_pb.js View on Github external
proto.google.api.HttpRule.prototype.getPatternCase = function() {
  return /** @type {proto.google.api.HttpRule.PatternCase} */(jspb.Message.computeOneofCase(this, proto.google.api.HttpRule.oneofGroups_[0]));
};
github Opteo / google-ads-node / src / protos / google / api / usage_pb.js View on Github external
proto.google.api.Usage.prototype.addRequirements = function(value, opt_index) {
  jspb.Message.addToRepeatedField(this, 1, value, opt_index);
};
github wavesplatform / data-service / src / protobuf / balances_pb.js View on Github external
proto.BalancesByAddressRequest.prototype.getHeight = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
github Opteo / google-ads-node / src / protos / google / ads / googleads / v1 / common / policy_pb.js View on Github external
proto.google.ads.googleads.v1.common.PolicyTopicEvidence.TextList.toObject = function(includeInstance, msg) {
  var f, obj = {
    textsList: jspb.Message.toObjectList(msg.getTextsList(),
    google_protobuf_wrappers_pb.StringValue.toObject, includeInstance)
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}
github hyperledger / burrow / js / proto / tendermint / types / validator_pb.js View on Github external
proto.tendermint.types.ValidatorSet = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.ValidatorSet.repeatedFields_, null);
};
goog.inherits(proto.tendermint.types.ValidatorSet, jspb.Message);
github ArcBlock / forge-js / packages / forge-proto / lib / event_pb.js View on Github external
goog.exportSymbol('proto.forge_abi.TopicType', 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.forge_abi.RequestSubscribe = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.forge_abi.RequestSubscribe, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  proto.forge_abi.RequestSubscribe.displayName = 'proto.forge_abi.RequestSubscribe';
}

if (jspb.Message.GENERATE_TO_OBJECT) {
  /**
   * Creates an object representation of this proto suitable for use in Soy templates.
   * Field names that are reserved in JavaScript and will be renamed to pb_name.
   * To access a reserved field use, foo.pb_, eg, foo.pb_default.
   * For the list of reserved names please see:
   *     com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
   * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
   *     for transitional soy proto support: http://goto/soy-param-migration
   * @return {!Object}
   */
  proto.forge_abi.RequestSubscribe.prototype.toObject = function(opt_includeInstance) {
github grpc / grpc-node / packages / grpc-health-check / v1 / health_pb.js View on Github external
proto.grpc.health.v1.HealthCheckResponse.prototype.getStatus = function() {
  return /** @type {!proto.grpc.health.v1.HealthCheckResponse.ServingStatus} */ (jspb.Message.getFieldProto3(this, 1, 0));
};
github csweichel / werft / pkg / webui / src / api / werft_pb.js View on Github external
proto.v1.StartGitHubJobRequest.prototype.setJobYaml = function(value) {
  jspb.Message.setProto3BytesField(this, 4, value);
};
github hyperledger / burrow / js / proto / tendermint / state / types_pb.js View on Github external
proto.tendermint.state.ABCIResponses.prototype.getDeliverTxsList = function() {
  return /** @type{!Array} */ (
    jspb.Message.getRepeatedWrapperField(this, tendermint_abci_types_pb.ResponseDeliverTx, 1));
};
github ArcBlock / forge-js / forge / forge-proto / lib / stake_tx_pb.js View on Github external
proto.forge_abi.StakeTx.prototype.hasValue = function() {
  return jspb.Message.getField(this, 2) != null;
};