<reponame>liuhaonan2003/chirpstack-api-v3<filename>js/as/integration/integration_pb.js<gh_stars>0/**
 * @fileoverview
 * @enhanceable
 * @public
 */
// GENERATED CODE -- DO NOT EDIT!

var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();

var common_common_pb = require('../../common/common_pb.js');
var gw_gw_pb = require('../../gw/gw_pb.js');
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.exportSymbol('proto.integration.AckEvent', null, global);
goog.exportSymbol('proto.integration.ErrorEvent', null, global);
goog.exportSymbol('proto.integration.ErrorType', null, global);
goog.exportSymbol('proto.integration.IntegrationEvent', null, global);
goog.exportSymbol('proto.integration.JoinEvent', null, global);
goog.exportSymbol('proto.integration.LocationEvent', null, global);
goog.exportSymbol('proto.integration.StatusEvent', null, global);
goog.exportSymbol('proto.integration.TxAckEvent', null, global);
goog.exportSymbol('proto.integration.UplinkEvent', 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.integration.UplinkEvent = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.integration.UplinkEvent.repeatedFields_, null);
};
goog.inherits(proto.integration.UplinkEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  proto.integration.UplinkEvent.displayName = 'proto.integration.UplinkEvent';
}
/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.integration.UplinkEvent.repeatedFields_ = [5];



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_<name>, 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.integration.UplinkEvent.prototype.toObject = function(opt_includeInstance) {
  return proto.integration.UplinkEvent.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Whether to include the JSPB
 *     instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.integration.UplinkEvent} msg The msg instance to transform.
 * @return {!Object}
 */
proto.integration.UplinkEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    applicationId: msg.getApplicationId(),
    applicationName: msg.getApplicationName(),
    deviceName: msg.getDeviceName(),
    devEui: msg.getDevEui_asB64(),
    rxInfoList: jspb.Message.toObjectList(msg.getRxInfoList(),
    gw_gw_pb.UplinkRXInfo.toObject, includeInstance),
    txInfo: (f = msg.getTxInfo()) && gw_gw_pb.UplinkTXInfo.toObject(includeInstance, f),
    adr: msg.getAdr(),
    dr: msg.getDr(),
    fCnt: msg.getFCnt(),
    fPort: msg.getFPort(),
    data: msg.getData_asB64(),
    objectJson: msg.getObjectJson(),
    tagsMap: (f = msg.getTagsMap(true)) ? f.toArray() : [],
    confirmedUplink: msg.getConfirmedUplink(),
    devAddr: msg.getDevAddr_asB64(),
    publishedAt: (f = msg.getPublishedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
    deviceProfileId: msg.getDeviceProfileId(),
    deviceProfileName: msg.getDeviceProfileName()
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.integration.UplinkEvent}
 */
proto.integration.UplinkEvent.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.integration.UplinkEvent;
  return proto.integration.UplinkEvent.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.integration.UplinkEvent} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.integration.UplinkEvent}
 */
proto.integration.UplinkEvent.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setApplicationId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setApplicationName(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setDeviceName(value);
      break;
    case 4:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setDevEui(value);
      break;
    case 5:
      var value = new gw_gw_pb.UplinkRXInfo;
      reader.readMessage(value,gw_gw_pb.UplinkRXInfo.deserializeBinaryFromReader);
      msg.getRxInfoList().push(value);
      msg.setRxInfoList(msg.getRxInfoList());
      break;
    case 6:
      var value = new gw_gw_pb.UplinkTXInfo;
      reader.readMessage(value,gw_gw_pb.UplinkTXInfo.deserializeBinaryFromReader);
      msg.setTxInfo(value);
      break;
    case 7:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setAdr(value);
      break;
    case 8:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setDr(value);
      break;
    case 9:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setFCnt(value);
      break;
    case 10:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setFPort(value);
      break;
    case 11:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setData(value);
      break;
    case 12:
      var value = /** @type {string} */ (reader.readString());
      msg.setObjectJson(value);
      break;
    case 13:
      var value = msg.getTagsMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString);
         });
      break;
    case 14:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setConfirmedUplink(value);
      break;
    case 15:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setDevAddr(value);
      break;
    case 16:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setPublishedAt(value);
      break;
    case 17:
      var value = /** @type {string} */ (reader.readString());
      msg.setDeviceProfileId(value);
      break;
    case 18:
      var value = /** @type {string} */ (reader.readString());
      msg.setDeviceProfileName(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Class method variant: serializes the given message to binary data
 * (in protobuf wire format), writing to the given BinaryWriter.
 * @param {!proto.integration.UplinkEvent} message
 * @param {!jspb.BinaryWriter} writer
 */
proto.integration.UplinkEvent.serializeBinaryToWriter = function(message, writer) {
  message.serializeBinaryToWriter(writer);
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.integration.UplinkEvent.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  this.serializeBinaryToWriter(writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the message to binary data (in protobuf wire format),
 * writing to the given BinaryWriter.
 * @param {!jspb.BinaryWriter} writer
 */
proto.integration.UplinkEvent.prototype.serializeBinaryToWriter = function (writer) {
  var f = undefined;
  f = this.getApplicationId();
  if (f !== 0) {
    writer.writeUint64(
      1,
      f
    );
  }
  f = this.getApplicationName();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = this.getDeviceName();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = this.getDevEui_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      4,
      f
    );
  }
  f = this.getRxInfoList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      5,
      f,
      gw_gw_pb.UplinkRXInfo.serializeBinaryToWriter
    );
  }
  f = this.getTxInfo();
  if (f != null) {
    writer.writeMessage(
      6,
      f,
      gw_gw_pb.UplinkTXInfo.serializeBinaryToWriter
    );
  }
  f = this.getAdr();
  if (f) {
    writer.writeBool(
      7,
      f
    );
  }
  f = this.getDr();
  if (f !== 0) {
    writer.writeUint32(
      8,
      f
    );
  }
  f = this.getFCnt();
  if (f !== 0) {
    writer.writeUint32(
      9,
      f
    );
  }
  f = this.getFPort();
  if (f !== 0) {
    writer.writeUint32(
      10,
      f
    );
  }
  f = this.getData_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      11,
      f
    );
  }
  f = this.getObjectJson();
  if (f.length > 0) {
    writer.writeString(
      12,
      f
    );
  }
  f = this.getTagsMap(true);
  if (f && f.getLength() > 0) {
    f.serializeBinary(13, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
  }
  f = this.getConfirmedUplink();
  if (f) {
    writer.writeBool(
      14,
      f
    );
  }
  f = this.getDevAddr_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      15,
      f
    );
  }
  f = this.getPublishedAt();
  if (f != null) {
    writer.writeMessage(
      16,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
  f = this.getDeviceProfileId();
  if (f.length > 0) {
    writer.writeString(
      17,
      f
    );
  }
  f = this.getDeviceProfileName();
  if (f.length > 0) {
    writer.writeString(
      18,
      f
    );
  }
};


/**
 * Creates a deep clone of this proto. No data is shared with the original.
 * @return {!proto.integration.UplinkEvent} The clone.
 */
proto.integration.UplinkEvent.prototype.cloneMessage = function() {
  return /** @type {!proto.integration.UplinkEvent} */ (jspb.Message.cloneMessage(this));
};


/**
 * optional uint64 application_id = 1;
 * @return {number}
 */
proto.integration.UplinkEvent.prototype.getApplicationId = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
};


/** @param {number} value  */
proto.integration.UplinkEvent.prototype.setApplicationId = function(value) {
  jspb.Message.setField(this, 1, value);
};


/**
 * optional string application_name = 2;
 * @return {string}
 */
proto.integration.UplinkEvent.prototype.getApplicationName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};


/** @param {string} value  */
proto.integration.UplinkEvent.prototype.setApplicationName = function(value) {
  jspb.Message.setField(this, 2, value);
};


/**
 * optional string device_name = 3;
 * @return {string}
 */
proto.integration.UplinkEvent.prototype.getDeviceName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};


/** @param {string} value  */
proto.integration.UplinkEvent.prototype.setDeviceName = function(value) {
  jspb.Message.setField(this, 3, value);
};


/**
 * optional bytes dev_eui = 4;
 * @return {!(string|Uint8Array)}
 */
proto.integration.UplinkEvent.prototype.getDevEui = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 4, ""));
};


/**
 * optional bytes dev_eui = 4;
 * This is a type-conversion wrapper around `getDevEui()`
 * @return {string}
 */
proto.integration.UplinkEvent.prototype.getDevEui_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getDevEui()));
};


/**
 * optional bytes dev_eui = 4;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getDevEui()`
 * @return {!Uint8Array}
 */
proto.integration.UplinkEvent.prototype.getDevEui_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getDevEui()));
};


/** @param {!(string|Uint8Array)} value  */
proto.integration.UplinkEvent.prototype.setDevEui = function(value) {
  jspb.Message.setField(this, 4, value);
};


/**
 * repeated gw.UplinkRXInfo rx_info = 5;
 * If you change this array by adding, removing or replacing elements, or if you
 * replace the array itself, then you must call the setter to update it.
 * @return {!Array.<!proto.gw.UplinkRXInfo>}
 */
proto.integration.UplinkEvent.prototype.getRxInfoList = function() {
  return /** @type{!Array.<!proto.gw.UplinkRXInfo>} */ (
    jspb.Message.getRepeatedWrapperField(this, gw_gw_pb.UplinkRXInfo, 5));
};


/** @param {Array.<!proto.gw.UplinkRXInfo>} value  */
proto.integration.UplinkEvent.prototype.setRxInfoList = function(value) {
  jspb.Message.setRepeatedWrapperField(this, 5, value);
};


proto.integration.UplinkEvent.prototype.clearRxInfoList = function() {
  this.setRxInfoList([]);
};


/**
 * optional gw.UplinkTXInfo tx_info = 6;
 * @return {proto.gw.UplinkTXInfo}
 */
proto.integration.UplinkEvent.prototype.getTxInfo = function() {
  return /** @type{proto.gw.UplinkTXInfo} */ (
    jspb.Message.getWrapperField(this, gw_gw_pb.UplinkTXInfo, 6));
};


/** @param {proto.gw.UplinkTXInfo|undefined} value  */
proto.integration.UplinkEvent.prototype.setTxInfo = function(value) {
  jspb.Message.setWrapperField(this, 6, value);
};


proto.integration.UplinkEvent.prototype.clearTxInfo = function() {
  this.setTxInfo(undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.integration.UplinkEvent.prototype.hasTxInfo = function() {
  return jspb.Message.getField(this, 6) != null;
};


/**
 * optional bool adr = 7;
 * Note that Boolean fields may be set to 0/1 when serialized from a Java server.
 * You should avoid comparisons like {@code val === true/false} in those cases.
 * @return {boolean}
 */
proto.integration.UplinkEvent.prototype.getAdr = function() {
  return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 7, false));
};


/** @param {boolean} value  */
proto.integration.UplinkEvent.prototype.setAdr = function(value) {
  jspb.Message.setField(this, 7, value);
};


/**
 * optional uint32 dr = 8;
 * @return {number}
 */
proto.integration.UplinkEvent.prototype.getDr = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 8, 0));
};


/** @param {number} value  */
proto.integration.UplinkEvent.prototype.setDr = function(value) {
  jspb.Message.setField(this, 8, value);
};


/**
 * optional uint32 f_cnt = 9;
 * @return {number}
 */
proto.integration.UplinkEvent.prototype.getFCnt = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 9, 0));
};


/** @param {number} value  */
proto.integration.UplinkEvent.prototype.setFCnt = function(value) {
  jspb.Message.setField(this, 9, value);
};


/**
 * optional uint32 f_port = 10;
 * @return {number}
 */
proto.integration.UplinkEvent.prototype.getFPort = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 10, 0));
};


/** @param {number} value  */
proto.integration.UplinkEvent.prototype.setFPort = function(value) {
  jspb.Message.setField(this, 10, value);
};


/**
 * optional bytes data = 11;
 * @return {!(string|Uint8Array)}
 */
proto.integration.UplinkEvent.prototype.getData = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 11, ""));
};


/**
 * optional bytes data = 11;
 * This is a type-conversion wrapper around `getData()`
 * @return {string}
 */
proto.integration.UplinkEvent.prototype.getData_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getData()));
};


/**
 * optional bytes data = 11;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getData()`
 * @return {!Uint8Array}
 */
proto.integration.UplinkEvent.prototype.getData_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getData()));
};


/** @param {!(string|Uint8Array)} value  */
proto.integration.UplinkEvent.prototype.setData = function(value) {
  jspb.Message.setField(this, 11, value);
};


/**
 * optional string object_json = 12;
 * @return {string}
 */
proto.integration.UplinkEvent.prototype.getObjectJson = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 12, ""));
};


/** @param {string} value  */
proto.integration.UplinkEvent.prototype.setObjectJson = function(value) {
  jspb.Message.setField(this, 12, value);
};


/**
 * map<string, string> tags = 13;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.integration.UplinkEvent.prototype.getTagsMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 13, opt_noLazyCreate,
      null));
};


/**
 * optional bool confirmed_uplink = 14;
 * Note that Boolean fields may be set to 0/1 when serialized from a Java server.
 * You should avoid comparisons like {@code val === true/false} in those cases.
 * @return {boolean}
 */
proto.integration.UplinkEvent.prototype.getConfirmedUplink = function() {
  return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 14, false));
};


/** @param {boolean} value  */
proto.integration.UplinkEvent.prototype.setConfirmedUplink = function(value) {
  jspb.Message.setField(this, 14, value);
};


/**
 * optional bytes dev_addr = 15;
 * @return {!(string|Uint8Array)}
 */
proto.integration.UplinkEvent.prototype.getDevAddr = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 15, ""));
};


/**
 * optional bytes dev_addr = 15;
 * This is a type-conversion wrapper around `getDevAddr()`
 * @return {string}
 */
proto.integration.UplinkEvent.prototype.getDevAddr_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getDevAddr()));
};


/**
 * optional bytes dev_addr = 15;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getDevAddr()`
 * @return {!Uint8Array}
 */
proto.integration.UplinkEvent.prototype.getDevAddr_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getDevAddr()));
};


/** @param {!(string|Uint8Array)} value  */
proto.integration.UplinkEvent.prototype.setDevAddr = function(value) {
  jspb.Message.setField(this, 15, value);
};


/**
 * optional google.protobuf.Timestamp published_at = 16;
 * @return {proto.google.protobuf.Timestamp}
 */
proto.integration.UplinkEvent.prototype.getPublishedAt = function() {
  return /** @type{proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 16));
};


/** @param {proto.google.protobuf.Timestamp|undefined} value  */
proto.integration.UplinkEvent.prototype.setPublishedAt = function(value) {
  jspb.Message.setWrapperField(this, 16, value);
};


proto.integration.UplinkEvent.prototype.clearPublishedAt = function() {
  this.setPublishedAt(undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.integration.UplinkEvent.prototype.hasPublishedAt = function() {
  return jspb.Message.getField(this, 16) != null;
};


/**
 * optional string device_profile_id = 17;
 * @return {string}
 */
proto.integration.UplinkEvent.prototype.getDeviceProfileId = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 17, ""));
};


/** @param {string} value  */
proto.integration.UplinkEvent.prototype.setDeviceProfileId = function(value) {
  jspb.Message.setField(this, 17, value);
};


/**
 * optional string device_profile_name = 18;
 * @return {string}
 */
proto.integration.UplinkEvent.prototype.getDeviceProfileName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 18, ""));
};


/** @param {string} value  */
proto.integration.UplinkEvent.prototype.setDeviceProfileName = function(value) {
  jspb.Message.setField(this, 18, 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.integration.JoinEvent = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.integration.JoinEvent.repeatedFields_, null);
};
goog.inherits(proto.integration.JoinEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  proto.integration.JoinEvent.displayName = 'proto.integration.JoinEvent';
}
/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.integration.JoinEvent.repeatedFields_ = [6];



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_<name>, 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.integration.JoinEvent.prototype.toObject = function(opt_includeInstance) {
  return proto.integration.JoinEvent.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Whether to include the JSPB
 *     instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.integration.JoinEvent} msg The msg instance to transform.
 * @return {!Object}
 */
proto.integration.JoinEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    applicationId: msg.getApplicationId(),
    applicationName: msg.getApplicationName(),
    deviceName: msg.getDeviceName(),
    devEui: msg.getDevEui_asB64(),
    devAddr: msg.getDevAddr_asB64(),
    rxInfoList: jspb.Message.toObjectList(msg.getRxInfoList(),
    gw_gw_pb.UplinkRXInfo.toObject, includeInstance),
    txInfo: (f = msg.getTxInfo()) && gw_gw_pb.UplinkTXInfo.toObject(includeInstance, f),
    dr: msg.getDr(),
    tagsMap: (f = msg.getTagsMap(true)) ? f.toArray() : [],
    publishedAt: (f = msg.getPublishedAt()) && google_protobuf_timestamp_pb.Timestamp.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.integration.JoinEvent}
 */
proto.integration.JoinEvent.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.integration.JoinEvent;
  return proto.integration.JoinEvent.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.integration.JoinEvent} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.integration.JoinEvent}
 */
proto.integration.JoinEvent.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setApplicationId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setApplicationName(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setDeviceName(value);
      break;
    case 4:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setDevEui(value);
      break;
    case 5:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setDevAddr(value);
      break;
    case 6:
      var value = new gw_gw_pb.UplinkRXInfo;
      reader.readMessage(value,gw_gw_pb.UplinkRXInfo.deserializeBinaryFromReader);
      msg.getRxInfoList().push(value);
      msg.setRxInfoList(msg.getRxInfoList());
      break;
    case 7:
      var value = new gw_gw_pb.UplinkTXInfo;
      reader.readMessage(value,gw_gw_pb.UplinkTXInfo.deserializeBinaryFromReader);
      msg.setTxInfo(value);
      break;
    case 8:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setDr(value);
      break;
    case 9:
      var value = msg.getTagsMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString);
         });
      break;
    case 10:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setPublishedAt(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Class method variant: serializes the given message to binary data
 * (in protobuf wire format), writing to the given BinaryWriter.
 * @param {!proto.integration.JoinEvent} message
 * @param {!jspb.BinaryWriter} writer
 */
proto.integration.JoinEvent.serializeBinaryToWriter = function(message, writer) {
  message.serializeBinaryToWriter(writer);
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.integration.JoinEvent.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  this.serializeBinaryToWriter(writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the message to binary data (in protobuf wire format),
 * writing to the given BinaryWriter.
 * @param {!jspb.BinaryWriter} writer
 */
proto.integration.JoinEvent.prototype.serializeBinaryToWriter = function (writer) {
  var f = undefined;
  f = this.getApplicationId();
  if (f !== 0) {
    writer.writeUint64(
      1,
      f
    );
  }
  f = this.getApplicationName();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = this.getDeviceName();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = this.getDevEui_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      4,
      f
    );
  }
  f = this.getDevAddr_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      5,
      f
    );
  }
  f = this.getRxInfoList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      6,
      f,
      gw_gw_pb.UplinkRXInfo.serializeBinaryToWriter
    );
  }
  f = this.getTxInfo();
  if (f != null) {
    writer.writeMessage(
      7,
      f,
      gw_gw_pb.UplinkTXInfo.serializeBinaryToWriter
    );
  }
  f = this.getDr();
  if (f !== 0) {
    writer.writeUint32(
      8,
      f
    );
  }
  f = this.getTagsMap(true);
  if (f && f.getLength() > 0) {
    f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
  }
  f = this.getPublishedAt();
  if (f != null) {
    writer.writeMessage(
      10,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
};


/**
 * Creates a deep clone of this proto. No data is shared with the original.
 * @return {!proto.integration.JoinEvent} The clone.
 */
proto.integration.JoinEvent.prototype.cloneMessage = function() {
  return /** @type {!proto.integration.JoinEvent} */ (jspb.Message.cloneMessage(this));
};


/**
 * optional uint64 application_id = 1;
 * @return {number}
 */
proto.integration.JoinEvent.prototype.getApplicationId = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
};


/** @param {number} value  */
proto.integration.JoinEvent.prototype.setApplicationId = function(value) {
  jspb.Message.setField(this, 1, value);
};


/**
 * optional string application_name = 2;
 * @return {string}
 */
proto.integration.JoinEvent.prototype.getApplicationName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};


/** @param {string} value  */
proto.integration.JoinEvent.prototype.setApplicationName = function(value) {
  jspb.Message.setField(this, 2, value);
};


/**
 * optional string device_name = 3;
 * @return {string}
 */
proto.integration.JoinEvent.prototype.getDeviceName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};


/** @param {string} value  */
proto.integration.JoinEvent.prototype.setDeviceName = function(value) {
  jspb.Message.setField(this, 3, value);
};


/**
 * optional bytes dev_eui = 4;
 * @return {!(string|Uint8Array)}
 */
proto.integration.JoinEvent.prototype.getDevEui = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 4, ""));
};


/**
 * optional bytes dev_eui = 4;
 * This is a type-conversion wrapper around `getDevEui()`
 * @return {string}
 */
proto.integration.JoinEvent.prototype.getDevEui_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getDevEui()));
};


/**
 * optional bytes dev_eui = 4;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getDevEui()`
 * @return {!Uint8Array}
 */
proto.integration.JoinEvent.prototype.getDevEui_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getDevEui()));
};


/** @param {!(string|Uint8Array)} value  */
proto.integration.JoinEvent.prototype.setDevEui = function(value) {
  jspb.Message.setField(this, 4, value);
};


/**
 * optional bytes dev_addr = 5;
 * @return {!(string|Uint8Array)}
 */
proto.integration.JoinEvent.prototype.getDevAddr = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 5, ""));
};


/**
 * optional bytes dev_addr = 5;
 * This is a type-conversion wrapper around `getDevAddr()`
 * @return {string}
 */
proto.integration.JoinEvent.prototype.getDevAddr_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getDevAddr()));
};


/**
 * optional bytes dev_addr = 5;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getDevAddr()`
 * @return {!Uint8Array}
 */
proto.integration.JoinEvent.prototype.getDevAddr_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getDevAddr()));
};


/** @param {!(string|Uint8Array)} value  */
proto.integration.JoinEvent.prototype.setDevAddr = function(value) {
  jspb.Message.setField(this, 5, value);
};


/**
 * repeated gw.UplinkRXInfo rx_info = 6;
 * If you change this array by adding, removing or replacing elements, or if you
 * replace the array itself, then you must call the setter to update it.
 * @return {!Array.<!proto.gw.UplinkRXInfo>}
 */
proto.integration.JoinEvent.prototype.getRxInfoList = function() {
  return /** @type{!Array.<!proto.gw.UplinkRXInfo>} */ (
    jspb.Message.getRepeatedWrapperField(this, gw_gw_pb.UplinkRXInfo, 6));
};


/** @param {Array.<!proto.gw.UplinkRXInfo>} value  */
proto.integration.JoinEvent.prototype.setRxInfoList = function(value) {
  jspb.Message.setRepeatedWrapperField(this, 6, value);
};


proto.integration.JoinEvent.prototype.clearRxInfoList = function() {
  this.setRxInfoList([]);
};


/**
 * optional gw.UplinkTXInfo tx_info = 7;
 * @return {proto.gw.UplinkTXInfo}
 */
proto.integration.JoinEvent.prototype.getTxInfo = function() {
  return /** @type{proto.gw.UplinkTXInfo} */ (
    jspb.Message.getWrapperField(this, gw_gw_pb.UplinkTXInfo, 7));
};


/** @param {proto.gw.UplinkTXInfo|undefined} value  */
proto.integration.JoinEvent.prototype.setTxInfo = function(value) {
  jspb.Message.setWrapperField(this, 7, value);
};


proto.integration.JoinEvent.prototype.clearTxInfo = function() {
  this.setTxInfo(undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.integration.JoinEvent.prototype.hasTxInfo = function() {
  return jspb.Message.getField(this, 7) != null;
};


/**
 * optional uint32 dr = 8;
 * @return {number}
 */
proto.integration.JoinEvent.prototype.getDr = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 8, 0));
};


/** @param {number} value  */
proto.integration.JoinEvent.prototype.setDr = function(value) {
  jspb.Message.setField(this, 8, value);
};


/**
 * map<string, string> tags = 9;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.integration.JoinEvent.prototype.getTagsMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 9, opt_noLazyCreate,
      null));
};


/**
 * optional google.protobuf.Timestamp published_at = 10;
 * @return {proto.google.protobuf.Timestamp}
 */
proto.integration.JoinEvent.prototype.getPublishedAt = function() {
  return /** @type{proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 10));
};


/** @param {proto.google.protobuf.Timestamp|undefined} value  */
proto.integration.JoinEvent.prototype.setPublishedAt = function(value) {
  jspb.Message.setWrapperField(this, 10, value);
};


proto.integration.JoinEvent.prototype.clearPublishedAt = function() {
  this.setPublishedAt(undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.integration.JoinEvent.prototype.hasPublishedAt = function() {
  return jspb.Message.getField(this, 10) != null;
};



/**
 * 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.integration.AckEvent = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.integration.AckEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  proto.integration.AckEvent.displayName = 'proto.integration.AckEvent';
}


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_<name>, 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.integration.AckEvent.prototype.toObject = function(opt_includeInstance) {
  return proto.integration.AckEvent.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Whether to include the JSPB
 *     instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.integration.AckEvent} msg The msg instance to transform.
 * @return {!Object}
 */
proto.integration.AckEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    applicationId: msg.getApplicationId(),
    applicationName: msg.getApplicationName(),
    deviceName: msg.getDeviceName(),
    devEui: msg.getDevEui_asB64(),
    acknowledged: msg.getAcknowledged(),
    fCnt: msg.getFCnt(),
    tagsMap: (f = msg.getTagsMap(true)) ? f.toArray() : [],
    publishedAt: (f = msg.getPublishedAt()) && google_protobuf_timestamp_pb.Timestamp.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.integration.AckEvent}
 */
proto.integration.AckEvent.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.integration.AckEvent;
  return proto.integration.AckEvent.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.integration.AckEvent} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.integration.AckEvent}
 */
proto.integration.AckEvent.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setApplicationId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setApplicationName(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setDeviceName(value);
      break;
    case 4:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setDevEui(value);
      break;
    case 5:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setAcknowledged(value);
      break;
    case 6:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setFCnt(value);
      break;
    case 7:
      var value = msg.getTagsMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString);
         });
      break;
    case 8:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setPublishedAt(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Class method variant: serializes the given message to binary data
 * (in protobuf wire format), writing to the given BinaryWriter.
 * @param {!proto.integration.AckEvent} message
 * @param {!jspb.BinaryWriter} writer
 */
proto.integration.AckEvent.serializeBinaryToWriter = function(message, writer) {
  message.serializeBinaryToWriter(writer);
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.integration.AckEvent.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  this.serializeBinaryToWriter(writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the message to binary data (in protobuf wire format),
 * writing to the given BinaryWriter.
 * @param {!jspb.BinaryWriter} writer
 */
proto.integration.AckEvent.prototype.serializeBinaryToWriter = function (writer) {
  var f = undefined;
  f = this.getApplicationId();
  if (f !== 0) {
    writer.writeUint64(
      1,
      f
    );
  }
  f = this.getApplicationName();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = this.getDeviceName();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = this.getDevEui_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      4,
      f
    );
  }
  f = this.getAcknowledged();
  if (f) {
    writer.writeBool(
      5,
      f
    );
  }
  f = this.getFCnt();
  if (f !== 0) {
    writer.writeUint32(
      6,
      f
    );
  }
  f = this.getTagsMap(true);
  if (f && f.getLength() > 0) {
    f.serializeBinary(7, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
  }
  f = this.getPublishedAt();
  if (f != null) {
    writer.writeMessage(
      8,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
};


/**
 * Creates a deep clone of this proto. No data is shared with the original.
 * @return {!proto.integration.AckEvent} The clone.
 */
proto.integration.AckEvent.prototype.cloneMessage = function() {
  return /** @type {!proto.integration.AckEvent} */ (jspb.Message.cloneMessage(this));
};


/**
 * optional uint64 application_id = 1;
 * @return {number}
 */
proto.integration.AckEvent.prototype.getApplicationId = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
};


/** @param {number} value  */
proto.integration.AckEvent.prototype.setApplicationId = function(value) {
  jspb.Message.setField(this, 1, value);
};


/**
 * optional string application_name = 2;
 * @return {string}
 */
proto.integration.AckEvent.prototype.getApplicationName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};


/** @param {string} value  */
proto.integration.AckEvent.prototype.setApplicationName = function(value) {
  jspb.Message.setField(this, 2, value);
};


/**
 * optional string device_name = 3;
 * @return {string}
 */
proto.integration.AckEvent.prototype.getDeviceName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};


/** @param {string} value  */
proto.integration.AckEvent.prototype.setDeviceName = function(value) {
  jspb.Message.setField(this, 3, value);
};


/**
 * optional bytes dev_eui = 4;
 * @return {!(string|Uint8Array)}
 */
proto.integration.AckEvent.prototype.getDevEui = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 4, ""));
};


/**
 * optional bytes dev_eui = 4;
 * This is a type-conversion wrapper around `getDevEui()`
 * @return {string}
 */
proto.integration.AckEvent.prototype.getDevEui_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getDevEui()));
};


/**
 * optional bytes dev_eui = 4;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getDevEui()`
 * @return {!Uint8Array}
 */
proto.integration.AckEvent.prototype.getDevEui_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getDevEui()));
};


/** @param {!(string|Uint8Array)} value  */
proto.integration.AckEvent.prototype.setDevEui = function(value) {
  jspb.Message.setField(this, 4, value);
};


/**
 * optional bool acknowledged = 5;
 * Note that Boolean fields may be set to 0/1 when serialized from a Java server.
 * You should avoid comparisons like {@code val === true/false} in those cases.
 * @return {boolean}
 */
proto.integration.AckEvent.prototype.getAcknowledged = function() {
  return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 5, false));
};


/** @param {boolean} value  */
proto.integration.AckEvent.prototype.setAcknowledged = function(value) {
  jspb.Message.setField(this, 5, value);
};


/**
 * optional uint32 f_cnt = 6;
 * @return {number}
 */
proto.integration.AckEvent.prototype.getFCnt = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 6, 0));
};


/** @param {number} value  */
proto.integration.AckEvent.prototype.setFCnt = function(value) {
  jspb.Message.setField(this, 6, value);
};


/**
 * map<string, string> tags = 7;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.integration.AckEvent.prototype.getTagsMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 7, opt_noLazyCreate,
      null));
};


/**
 * optional google.protobuf.Timestamp published_at = 8;
 * @return {proto.google.protobuf.Timestamp}
 */
proto.integration.AckEvent.prototype.getPublishedAt = function() {
  return /** @type{proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8));
};


/** @param {proto.google.protobuf.Timestamp|undefined} value  */
proto.integration.AckEvent.prototype.setPublishedAt = function(value) {
  jspb.Message.setWrapperField(this, 8, value);
};


proto.integration.AckEvent.prototype.clearPublishedAt = function() {
  this.setPublishedAt(undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.integration.AckEvent.prototype.hasPublishedAt = function() {
  return jspb.Message.getField(this, 8) != null;
};



/**
 * 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.integration.TxAckEvent = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.integration.TxAckEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  proto.integration.TxAckEvent.displayName = 'proto.integration.TxAckEvent';
}


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_<name>, 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.integration.TxAckEvent.prototype.toObject = function(opt_includeInstance) {
  return proto.integration.TxAckEvent.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Whether to include the JSPB
 *     instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.integration.TxAckEvent} msg The msg instance to transform.
 * @return {!Object}
 */
proto.integration.TxAckEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    applicationId: msg.getApplicationId(),
    applicationName: msg.getApplicationName(),
    deviceName: msg.getDeviceName(),
    devEui: msg.getDevEui_asB64(),
    fCnt: msg.getFCnt(),
    tagsMap: (f = msg.getTagsMap(true)) ? f.toArray() : [],
    gatewayId: msg.getGatewayId_asB64(),
    txInfo: (f = msg.getTxInfo()) && gw_gw_pb.DownlinkTXInfo.toObject(includeInstance, f),
    publishedAt: (f = msg.getPublishedAt()) && google_protobuf_timestamp_pb.Timestamp.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.integration.TxAckEvent}
 */
proto.integration.TxAckEvent.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.integration.TxAckEvent;
  return proto.integration.TxAckEvent.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.integration.TxAckEvent} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.integration.TxAckEvent}
 */
proto.integration.TxAckEvent.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setApplicationId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setApplicationName(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setDeviceName(value);
      break;
    case 4:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setDevEui(value);
      break;
    case 5:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setFCnt(value);
      break;
    case 6:
      var value = msg.getTagsMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString);
         });
      break;
    case 7:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setGatewayId(value);
      break;
    case 8:
      var value = new gw_gw_pb.DownlinkTXInfo;
      reader.readMessage(value,gw_gw_pb.DownlinkTXInfo.deserializeBinaryFromReader);
      msg.setTxInfo(value);
      break;
    case 9:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setPublishedAt(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Class method variant: serializes the given message to binary data
 * (in protobuf wire format), writing to the given BinaryWriter.
 * @param {!proto.integration.TxAckEvent} message
 * @param {!jspb.BinaryWriter} writer
 */
proto.integration.TxAckEvent.serializeBinaryToWriter = function(message, writer) {
  message.serializeBinaryToWriter(writer);
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.integration.TxAckEvent.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  this.serializeBinaryToWriter(writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the message to binary data (in protobuf wire format),
 * writing to the given BinaryWriter.
 * @param {!jspb.BinaryWriter} writer
 */
proto.integration.TxAckEvent.prototype.serializeBinaryToWriter = function (writer) {
  var f = undefined;
  f = this.getApplicationId();
  if (f !== 0) {
    writer.writeUint64(
      1,
      f
    );
  }
  f = this.getApplicationName();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = this.getDeviceName();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = this.getDevEui_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      4,
      f
    );
  }
  f = this.getFCnt();
  if (f !== 0) {
    writer.writeUint32(
      5,
      f
    );
  }
  f = this.getTagsMap(true);
  if (f && f.getLength() > 0) {
    f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
  }
  f = this.getGatewayId_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      7,
      f
    );
  }
  f = this.getTxInfo();
  if (f != null) {
    writer.writeMessage(
      8,
      f,
      gw_gw_pb.DownlinkTXInfo.serializeBinaryToWriter
    );
  }
  f = this.getPublishedAt();
  if (f != null) {
    writer.writeMessage(
      9,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
};


/**
 * Creates a deep clone of this proto. No data is shared with the original.
 * @return {!proto.integration.TxAckEvent} The clone.
 */
proto.integration.TxAckEvent.prototype.cloneMessage = function() {
  return /** @type {!proto.integration.TxAckEvent} */ (jspb.Message.cloneMessage(this));
};


/**
 * optional uint64 application_id = 1;
 * @return {number}
 */
proto.integration.TxAckEvent.prototype.getApplicationId = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
};


/** @param {number} value  */
proto.integration.TxAckEvent.prototype.setApplicationId = function(value) {
  jspb.Message.setField(this, 1, value);
};


/**
 * optional string application_name = 2;
 * @return {string}
 */
proto.integration.TxAckEvent.prototype.getApplicationName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};


/** @param {string} value  */
proto.integration.TxAckEvent.prototype.setApplicationName = function(value) {
  jspb.Message.setField(this, 2, value);
};


/**
 * optional string device_name = 3;
 * @return {string}
 */
proto.integration.TxAckEvent.prototype.getDeviceName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};


/** @param {string} value  */
proto.integration.TxAckEvent.prototype.setDeviceName = function(value) {
  jspb.Message.setField(this, 3, value);
};


/**
 * optional bytes dev_eui = 4;
 * @return {!(string|Uint8Array)}
 */
proto.integration.TxAckEvent.prototype.getDevEui = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 4, ""));
};


/**
 * optional bytes dev_eui = 4;
 * This is a type-conversion wrapper around `getDevEui()`
 * @return {string}
 */
proto.integration.TxAckEvent.prototype.getDevEui_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getDevEui()));
};


/**
 * optional bytes dev_eui = 4;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getDevEui()`
 * @return {!Uint8Array}
 */
proto.integration.TxAckEvent.prototype.getDevEui_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getDevEui()));
};


/** @param {!(string|Uint8Array)} value  */
proto.integration.TxAckEvent.prototype.setDevEui = function(value) {
  jspb.Message.setField(this, 4, value);
};


/**
 * optional uint32 f_cnt = 5;
 * @return {number}
 */
proto.integration.TxAckEvent.prototype.getFCnt = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 5, 0));
};


/** @param {number} value  */
proto.integration.TxAckEvent.prototype.setFCnt = function(value) {
  jspb.Message.setField(this, 5, value);
};


/**
 * map<string, string> tags = 6;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.integration.TxAckEvent.prototype.getTagsMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 6, opt_noLazyCreate,
      null));
};


/**
 * optional bytes gateway_id = 7;
 * @return {!(string|Uint8Array)}
 */
proto.integration.TxAckEvent.prototype.getGatewayId = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 7, ""));
};


/**
 * optional bytes gateway_id = 7;
 * This is a type-conversion wrapper around `getGatewayId()`
 * @return {string}
 */
proto.integration.TxAckEvent.prototype.getGatewayId_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getGatewayId()));
};


/**
 * optional bytes gateway_id = 7;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getGatewayId()`
 * @return {!Uint8Array}
 */
proto.integration.TxAckEvent.prototype.getGatewayId_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getGatewayId()));
};


/** @param {!(string|Uint8Array)} value  */
proto.integration.TxAckEvent.prototype.setGatewayId = function(value) {
  jspb.Message.setField(this, 7, value);
};


/**
 * optional gw.DownlinkTXInfo tx_info = 8;
 * @return {proto.gw.DownlinkTXInfo}
 */
proto.integration.TxAckEvent.prototype.getTxInfo = function() {
  return /** @type{proto.gw.DownlinkTXInfo} */ (
    jspb.Message.getWrapperField(this, gw_gw_pb.DownlinkTXInfo, 8));
};


/** @param {proto.gw.DownlinkTXInfo|undefined} value  */
proto.integration.TxAckEvent.prototype.setTxInfo = function(value) {
  jspb.Message.setWrapperField(this, 8, value);
};


proto.integration.TxAckEvent.prototype.clearTxInfo = function() {
  this.setTxInfo(undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.integration.TxAckEvent.prototype.hasTxInfo = function() {
  return jspb.Message.getField(this, 8) != null;
};


/**
 * optional google.protobuf.Timestamp published_at = 9;
 * @return {proto.google.protobuf.Timestamp}
 */
proto.integration.TxAckEvent.prototype.getPublishedAt = function() {
  return /** @type{proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9));
};


/** @param {proto.google.protobuf.Timestamp|undefined} value  */
proto.integration.TxAckEvent.prototype.setPublishedAt = function(value) {
  jspb.Message.setWrapperField(this, 9, value);
};


proto.integration.TxAckEvent.prototype.clearPublishedAt = function() {
  this.setPublishedAt(undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.integration.TxAckEvent.prototype.hasPublishedAt = function() {
  return jspb.Message.getField(this, 9) != null;
};



/**
 * 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.integration.ErrorEvent = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.integration.ErrorEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  proto.integration.ErrorEvent.displayName = 'proto.integration.ErrorEvent';
}


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_<name>, 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.integration.ErrorEvent.prototype.toObject = function(opt_includeInstance) {
  return proto.integration.ErrorEvent.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Whether to include the JSPB
 *     instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.integration.ErrorEvent} msg The msg instance to transform.
 * @return {!Object}
 */
proto.integration.ErrorEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    applicationId: msg.getApplicationId(),
    applicationName: msg.getApplicationName(),
    deviceName: msg.getDeviceName(),
    devEui: msg.getDevEui_asB64(),
    type: msg.getType(),
    error: msg.getError(),
    fCnt: msg.getFCnt(),
    tagsMap: (f = msg.getTagsMap(true)) ? f.toArray() : [],
    publishedAt: (f = msg.getPublishedAt()) && google_protobuf_timestamp_pb.Timestamp.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.integration.ErrorEvent}
 */
proto.integration.ErrorEvent.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.integration.ErrorEvent;
  return proto.integration.ErrorEvent.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.integration.ErrorEvent} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.integration.ErrorEvent}
 */
proto.integration.ErrorEvent.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setApplicationId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setApplicationName(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setDeviceName(value);
      break;
    case 4:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setDevEui(value);
      break;
    case 5:
      var value = /** @type {!proto.integration.ErrorType} */ (reader.readEnum());
      msg.setType(value);
      break;
    case 6:
      var value = /** @type {string} */ (reader.readString());
      msg.setError(value);
      break;
    case 7:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setFCnt(value);
      break;
    case 8:
      var value = msg.getTagsMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString);
         });
      break;
    case 9:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setPublishedAt(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Class method variant: serializes the given message to binary data
 * (in protobuf wire format), writing to the given BinaryWriter.
 * @param {!proto.integration.ErrorEvent} message
 * @param {!jspb.BinaryWriter} writer
 */
proto.integration.ErrorEvent.serializeBinaryToWriter = function(message, writer) {
  message.serializeBinaryToWriter(writer);
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.integration.ErrorEvent.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  this.serializeBinaryToWriter(writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the message to binary data (in protobuf wire format),
 * writing to the given BinaryWriter.
 * @param {!jspb.BinaryWriter} writer
 */
proto.integration.ErrorEvent.prototype.serializeBinaryToWriter = function (writer) {
  var f = undefined;
  f = this.getApplicationId();
  if (f !== 0) {
    writer.writeUint64(
      1,
      f
    );
  }
  f = this.getApplicationName();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = this.getDeviceName();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = this.getDevEui_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      4,
      f
    );
  }
  f = this.getType();
  if (f !== 0.0) {
    writer.writeEnum(
      5,
      f
    );
  }
  f = this.getError();
  if (f.length > 0) {
    writer.writeString(
      6,
      f
    );
  }
  f = this.getFCnt();
  if (f !== 0) {
    writer.writeUint32(
      7,
      f
    );
  }
  f = this.getTagsMap(true);
  if (f && f.getLength() > 0) {
    f.serializeBinary(8, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
  }
  f = this.getPublishedAt();
  if (f != null) {
    writer.writeMessage(
      9,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
};


/**
 * Creates a deep clone of this proto. No data is shared with the original.
 * @return {!proto.integration.ErrorEvent} The clone.
 */
proto.integration.ErrorEvent.prototype.cloneMessage = function() {
  return /** @type {!proto.integration.ErrorEvent} */ (jspb.Message.cloneMessage(this));
};


/**
 * optional uint64 application_id = 1;
 * @return {number}
 */
proto.integration.ErrorEvent.prototype.getApplicationId = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
};


/** @param {number} value  */
proto.integration.ErrorEvent.prototype.setApplicationId = function(value) {
  jspb.Message.setField(this, 1, value);
};


/**
 * optional string application_name = 2;
 * @return {string}
 */
proto.integration.ErrorEvent.prototype.getApplicationName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};


/** @param {string} value  */
proto.integration.ErrorEvent.prototype.setApplicationName = function(value) {
  jspb.Message.setField(this, 2, value);
};


/**
 * optional string device_name = 3;
 * @return {string}
 */
proto.integration.ErrorEvent.prototype.getDeviceName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};


/** @param {string} value  */
proto.integration.ErrorEvent.prototype.setDeviceName = function(value) {
  jspb.Message.setField(this, 3, value);
};


/**
 * optional bytes dev_eui = 4;
 * @return {!(string|Uint8Array)}
 */
proto.integration.ErrorEvent.prototype.getDevEui = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 4, ""));
};


/**
 * optional bytes dev_eui = 4;
 * This is a type-conversion wrapper around `getDevEui()`
 * @return {string}
 */
proto.integration.ErrorEvent.prototype.getDevEui_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getDevEui()));
};


/**
 * optional bytes dev_eui = 4;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getDevEui()`
 * @return {!Uint8Array}
 */
proto.integration.ErrorEvent.prototype.getDevEui_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getDevEui()));
};


/** @param {!(string|Uint8Array)} value  */
proto.integration.ErrorEvent.prototype.setDevEui = function(value) {
  jspb.Message.setField(this, 4, value);
};


/**
 * optional ErrorType type = 5;
 * @return {!proto.integration.ErrorType}
 */
proto.integration.ErrorEvent.prototype.getType = function() {
  return /** @type {!proto.integration.ErrorType} */ (jspb.Message.getFieldProto3(this, 5, 0));
};


/** @param {!proto.integration.ErrorType} value  */
proto.integration.ErrorEvent.prototype.setType = function(value) {
  jspb.Message.setField(this, 5, value);
};


/**
 * optional string error = 6;
 * @return {string}
 */
proto.integration.ErrorEvent.prototype.getError = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 6, ""));
};


/** @param {string} value  */
proto.integration.ErrorEvent.prototype.setError = function(value) {
  jspb.Message.setField(this, 6, value);
};


/**
 * optional uint32 f_cnt = 7;
 * @return {number}
 */
proto.integration.ErrorEvent.prototype.getFCnt = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 7, 0));
};


/** @param {number} value  */
proto.integration.ErrorEvent.prototype.setFCnt = function(value) {
  jspb.Message.setField(this, 7, value);
};


/**
 * map<string, string> tags = 8;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.integration.ErrorEvent.prototype.getTagsMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 8, opt_noLazyCreate,
      null));
};


/**
 * optional google.protobuf.Timestamp published_at = 9;
 * @return {proto.google.protobuf.Timestamp}
 */
proto.integration.ErrorEvent.prototype.getPublishedAt = function() {
  return /** @type{proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9));
};


/** @param {proto.google.protobuf.Timestamp|undefined} value  */
proto.integration.ErrorEvent.prototype.setPublishedAt = function(value) {
  jspb.Message.setWrapperField(this, 9, value);
};


proto.integration.ErrorEvent.prototype.clearPublishedAt = function() {
  this.setPublishedAt(undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.integration.ErrorEvent.prototype.hasPublishedAt = function() {
  return jspb.Message.getField(this, 9) != null;
};



/**
 * 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.integration.StatusEvent = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.integration.StatusEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  proto.integration.StatusEvent.displayName = 'proto.integration.StatusEvent';
}


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_<name>, 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.integration.StatusEvent.prototype.toObject = function(opt_includeInstance) {
  return proto.integration.StatusEvent.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Whether to include the JSPB
 *     instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.integration.StatusEvent} msg The msg instance to transform.
 * @return {!Object}
 */
proto.integration.StatusEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    applicationId: msg.getApplicationId(),
    applicationName: msg.getApplicationName(),
    deviceName: msg.getDeviceName(),
    devEui: msg.getDevEui_asB64(),
    margin: msg.getMargin(),
    externalPowerSource: msg.getExternalPowerSource(),
    batteryLevelUnavailable: msg.getBatteryLevelUnavailable(),
    batteryLevel: msg.getBatteryLevel(),
    tagsMap: (f = msg.getTagsMap(true)) ? f.toArray() : [],
    publishedAt: (f = msg.getPublishedAt()) && google_protobuf_timestamp_pb.Timestamp.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.integration.StatusEvent}
 */
proto.integration.StatusEvent.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.integration.StatusEvent;
  return proto.integration.StatusEvent.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.integration.StatusEvent} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.integration.StatusEvent}
 */
proto.integration.StatusEvent.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setApplicationId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setApplicationName(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setDeviceName(value);
      break;
    case 4:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setDevEui(value);
      break;
    case 5:
      var value = /** @type {number} */ (reader.readInt32());
      msg.setMargin(value);
      break;
    case 6:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setExternalPowerSource(value);
      break;
    case 7:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setBatteryLevelUnavailable(value);
      break;
    case 8:
      var value = /** @type {number} */ (reader.readFloat());
      msg.setBatteryLevel(value);
      break;
    case 9:
      var value = msg.getTagsMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString);
         });
      break;
    case 10:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setPublishedAt(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Class method variant: serializes the given message to binary data
 * (in protobuf wire format), writing to the given BinaryWriter.
 * @param {!proto.integration.StatusEvent} message
 * @param {!jspb.BinaryWriter} writer
 */
proto.integration.StatusEvent.serializeBinaryToWriter = function(message, writer) {
  message.serializeBinaryToWriter(writer);
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.integration.StatusEvent.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  this.serializeBinaryToWriter(writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the message to binary data (in protobuf wire format),
 * writing to the given BinaryWriter.
 * @param {!jspb.BinaryWriter} writer
 */
proto.integration.StatusEvent.prototype.serializeBinaryToWriter = function (writer) {
  var f = undefined;
  f = this.getApplicationId();
  if (f !== 0) {
    writer.writeUint64(
      1,
      f
    );
  }
  f = this.getApplicationName();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = this.getDeviceName();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = this.getDevEui_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      4,
      f
    );
  }
  f = this.getMargin();
  if (f !== 0) {
    writer.writeInt32(
      5,
      f
    );
  }
  f = this.getExternalPowerSource();
  if (f) {
    writer.writeBool(
      6,
      f
    );
  }
  f = this.getBatteryLevelUnavailable();
  if (f) {
    writer.writeBool(
      7,
      f
    );
  }
  f = this.getBatteryLevel();
  if (f !== 0.0) {
    writer.writeFloat(
      8,
      f
    );
  }
  f = this.getTagsMap(true);
  if (f && f.getLength() > 0) {
    f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
  }
  f = this.getPublishedAt();
  if (f != null) {
    writer.writeMessage(
      10,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
};


/**
 * Creates a deep clone of this proto. No data is shared with the original.
 * @return {!proto.integration.StatusEvent} The clone.
 */
proto.integration.StatusEvent.prototype.cloneMessage = function() {
  return /** @type {!proto.integration.StatusEvent} */ (jspb.Message.cloneMessage(this));
};


/**
 * optional uint64 application_id = 1;
 * @return {number}
 */
proto.integration.StatusEvent.prototype.getApplicationId = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
};


/** @param {number} value  */
proto.integration.StatusEvent.prototype.setApplicationId = function(value) {
  jspb.Message.setField(this, 1, value);
};


/**
 * optional string application_name = 2;
 * @return {string}
 */
proto.integration.StatusEvent.prototype.getApplicationName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};


/** @param {string} value  */
proto.integration.StatusEvent.prototype.setApplicationName = function(value) {
  jspb.Message.setField(this, 2, value);
};


/**
 * optional string device_name = 3;
 * @return {string}
 */
proto.integration.StatusEvent.prototype.getDeviceName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};


/** @param {string} value  */
proto.integration.StatusEvent.prototype.setDeviceName = function(value) {
  jspb.Message.setField(this, 3, value);
};


/**
 * optional bytes dev_eui = 4;
 * @return {!(string|Uint8Array)}
 */
proto.integration.StatusEvent.prototype.getDevEui = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 4, ""));
};


/**
 * optional bytes dev_eui = 4;
 * This is a type-conversion wrapper around `getDevEui()`
 * @return {string}
 */
proto.integration.StatusEvent.prototype.getDevEui_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getDevEui()));
};


/**
 * optional bytes dev_eui = 4;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getDevEui()`
 * @return {!Uint8Array}
 */
proto.integration.StatusEvent.prototype.getDevEui_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getDevEui()));
};


/** @param {!(string|Uint8Array)} value  */
proto.integration.StatusEvent.prototype.setDevEui = function(value) {
  jspb.Message.setField(this, 4, value);
};


/**
 * optional int32 margin = 5;
 * @return {number}
 */
proto.integration.StatusEvent.prototype.getMargin = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 5, 0));
};


/** @param {number} value  */
proto.integration.StatusEvent.prototype.setMargin = function(value) {
  jspb.Message.setField(this, 5, value);
};


/**
 * optional bool external_power_source = 6;
 * Note that Boolean fields may be set to 0/1 when serialized from a Java server.
 * You should avoid comparisons like {@code val === true/false} in those cases.
 * @return {boolean}
 */
proto.integration.StatusEvent.prototype.getExternalPowerSource = function() {
  return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 6, false));
};


/** @param {boolean} value  */
proto.integration.StatusEvent.prototype.setExternalPowerSource = function(value) {
  jspb.Message.setField(this, 6, value);
};


/**
 * optional bool battery_level_unavailable = 7;
 * Note that Boolean fields may be set to 0/1 when serialized from a Java server.
 * You should avoid comparisons like {@code val === true/false} in those cases.
 * @return {boolean}
 */
proto.integration.StatusEvent.prototype.getBatteryLevelUnavailable = function() {
  return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 7, false));
};


/** @param {boolean} value  */
proto.integration.StatusEvent.prototype.setBatteryLevelUnavailable = function(value) {
  jspb.Message.setField(this, 7, value);
};


/**
 * optional float battery_level = 8;
 * @return {number}
 */
proto.integration.StatusEvent.prototype.getBatteryLevel = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 8, 0));
};


/** @param {number} value  */
proto.integration.StatusEvent.prototype.setBatteryLevel = function(value) {
  jspb.Message.setField(this, 8, value);
};


/**
 * map<string, string> tags = 9;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.integration.StatusEvent.prototype.getTagsMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 9, opt_noLazyCreate,
      null));
};


/**
 * optional google.protobuf.Timestamp published_at = 10;
 * @return {proto.google.protobuf.Timestamp}
 */
proto.integration.StatusEvent.prototype.getPublishedAt = function() {
  return /** @type{proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 10));
};


/** @param {proto.google.protobuf.Timestamp|undefined} value  */
proto.integration.StatusEvent.prototype.setPublishedAt = function(value) {
  jspb.Message.setWrapperField(this, 10, value);
};


proto.integration.StatusEvent.prototype.clearPublishedAt = function() {
  this.setPublishedAt(undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.integration.StatusEvent.prototype.hasPublishedAt = function() {
  return jspb.Message.getField(this, 10) != null;
};



/**
 * 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.integration.LocationEvent = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.integration.LocationEvent.repeatedFields_, null);
};
goog.inherits(proto.integration.LocationEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  proto.integration.LocationEvent.displayName = 'proto.integration.LocationEvent';
}
/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.integration.LocationEvent.repeatedFields_ = [7];



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_<name>, 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.integration.LocationEvent.prototype.toObject = function(opt_includeInstance) {
  return proto.integration.LocationEvent.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Whether to include the JSPB
 *     instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.integration.LocationEvent} msg The msg instance to transform.
 * @return {!Object}
 */
proto.integration.LocationEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    applicationId: msg.getApplicationId(),
    applicationName: msg.getApplicationName(),
    deviceName: msg.getDeviceName(),
    devEui: msg.getDevEui_asB64(),
    location: (f = msg.getLocation()) && common_common_pb.Location.toObject(includeInstance, f),
    tagsMap: (f = msg.getTagsMap(true)) ? f.toArray() : [],
    uplinkIdsList: msg.getUplinkIdsList_asB64(),
    fCnt: msg.getFCnt(),
    publishedAt: (f = msg.getPublishedAt()) && google_protobuf_timestamp_pb.Timestamp.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.integration.LocationEvent}
 */
proto.integration.LocationEvent.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.integration.LocationEvent;
  return proto.integration.LocationEvent.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.integration.LocationEvent} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.integration.LocationEvent}
 */
proto.integration.LocationEvent.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setApplicationId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setApplicationName(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setDeviceName(value);
      break;
    case 4:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setDevEui(value);
      break;
    case 5:
      var value = new common_common_pb.Location;
      reader.readMessage(value,common_common_pb.Location.deserializeBinaryFromReader);
      msg.setLocation(value);
      break;
    case 6:
      var value = msg.getTagsMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString);
         });
      break;
    case 7:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.getUplinkIdsList().push(value);
      msg.setUplinkIdsList(msg.getUplinkIdsList());
      break;
    case 8:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setFCnt(value);
      break;
    case 9:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setPublishedAt(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Class method variant: serializes the given message to binary data
 * (in protobuf wire format), writing to the given BinaryWriter.
 * @param {!proto.integration.LocationEvent} message
 * @param {!jspb.BinaryWriter} writer
 */
proto.integration.LocationEvent.serializeBinaryToWriter = function(message, writer) {
  message.serializeBinaryToWriter(writer);
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.integration.LocationEvent.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  this.serializeBinaryToWriter(writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the message to binary data (in protobuf wire format),
 * writing to the given BinaryWriter.
 * @param {!jspb.BinaryWriter} writer
 */
proto.integration.LocationEvent.prototype.serializeBinaryToWriter = function (writer) {
  var f = undefined;
  f = this.getApplicationId();
  if (f !== 0) {
    writer.writeUint64(
      1,
      f
    );
  }
  f = this.getApplicationName();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = this.getDeviceName();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = this.getDevEui_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      4,
      f
    );
  }
  f = this.getLocation();
  if (f != null) {
    writer.writeMessage(
      5,
      f,
      common_common_pb.Location.serializeBinaryToWriter
    );
  }
  f = this.getTagsMap(true);
  if (f && f.getLength() > 0) {
    f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
  }
  f = this.getUplinkIdsList_asU8();
  if (f.length > 0) {
    writer.writeRepeatedBytes(
      7,
      f
    );
  }
  f = this.getFCnt();
  if (f !== 0) {
    writer.writeUint32(
      8,
      f
    );
  }
  f = this.getPublishedAt();
  if (f != null) {
    writer.writeMessage(
      9,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
};


/**
 * Creates a deep clone of this proto. No data is shared with the original.
 * @return {!proto.integration.LocationEvent} The clone.
 */
proto.integration.LocationEvent.prototype.cloneMessage = function() {
  return /** @type {!proto.integration.LocationEvent} */ (jspb.Message.cloneMessage(this));
};


/**
 * optional uint64 application_id = 1;
 * @return {number}
 */
proto.integration.LocationEvent.prototype.getApplicationId = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
};


/** @param {number} value  */
proto.integration.LocationEvent.prototype.setApplicationId = function(value) {
  jspb.Message.setField(this, 1, value);
};


/**
 * optional string application_name = 2;
 * @return {string}
 */
proto.integration.LocationEvent.prototype.getApplicationName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};


/** @param {string} value  */
proto.integration.LocationEvent.prototype.setApplicationName = function(value) {
  jspb.Message.setField(this, 2, value);
};


/**
 * optional string device_name = 3;
 * @return {string}
 */
proto.integration.LocationEvent.prototype.getDeviceName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};


/** @param {string} value  */
proto.integration.LocationEvent.prototype.setDeviceName = function(value) {
  jspb.Message.setField(this, 3, value);
};


/**
 * optional bytes dev_eui = 4;
 * @return {!(string|Uint8Array)}
 */
proto.integration.LocationEvent.prototype.getDevEui = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 4, ""));
};


/**
 * optional bytes dev_eui = 4;
 * This is a type-conversion wrapper around `getDevEui()`
 * @return {string}
 */
proto.integration.LocationEvent.prototype.getDevEui_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getDevEui()));
};


/**
 * optional bytes dev_eui = 4;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getDevEui()`
 * @return {!Uint8Array}
 */
proto.integration.LocationEvent.prototype.getDevEui_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getDevEui()));
};


/** @param {!(string|Uint8Array)} value  */
proto.integration.LocationEvent.prototype.setDevEui = function(value) {
  jspb.Message.setField(this, 4, value);
};


/**
 * optional common.Location location = 5;
 * @return {proto.common.Location}
 */
proto.integration.LocationEvent.prototype.getLocation = function() {
  return /** @type{proto.common.Location} */ (
    jspb.Message.getWrapperField(this, common_common_pb.Location, 5));
};


/** @param {proto.common.Location|undefined} value  */
proto.integration.LocationEvent.prototype.setLocation = function(value) {
  jspb.Message.setWrapperField(this, 5, value);
};


proto.integration.LocationEvent.prototype.clearLocation = function() {
  this.setLocation(undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.integration.LocationEvent.prototype.hasLocation = function() {
  return jspb.Message.getField(this, 5) != null;
};


/**
 * map<string, string> tags = 6;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.integration.LocationEvent.prototype.getTagsMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 6, opt_noLazyCreate,
      null));
};


/**
 * repeated bytes uplink_ids = 7;
 * If you change this array by adding, removing or replacing elements, or if you
 * replace the array itself, then you must call the setter to update it.
 * @return {!(Array<!Uint8Array>|Array<string>)}
 */
proto.integration.LocationEvent.prototype.getUplinkIdsList = function() {
  return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getField(this, 7));
};


/**
 * repeated bytes uplink_ids = 7;
 * If you change this array by adding, removing or replacing elements, or if you
 * replace the array itself, then you must call the setter to update it.
 * This is a type-conversion wrapper around `getUplinkIdsList()`
 * @return {!Array.<string>}
 */
proto.integration.LocationEvent.prototype.getUplinkIdsList_asB64 = function() {
  return /** @type {!Array.<string>} */ (jspb.Message.bytesListAsB64(
      this.getUplinkIdsList()));
};


/**
 * repeated bytes uplink_ids = 7;
 * If you change this array by adding, removing or replacing elements, or if you
 * replace the array itself, then you must call the setter to update it.
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getUplinkIdsList()`
 * @return {!Array.<!Uint8Array>}
 */
proto.integration.LocationEvent.prototype.getUplinkIdsList_asU8 = function() {
  return /** @type {!Array.<!Uint8Array>} */ (jspb.Message.bytesListAsU8(
      this.getUplinkIdsList()));
};


/** @param {!(Array<!Uint8Array>|Array<string>)} value  */
proto.integration.LocationEvent.prototype.setUplinkIdsList = function(value) {
  jspb.Message.setField(this, 7, value || []);
};


proto.integration.LocationEvent.prototype.clearUplinkIdsList = function() {
  jspb.Message.setField(this, 7, []);
};


/**
 * optional uint32 f_cnt = 8;
 * @return {number}
 */
proto.integration.LocationEvent.prototype.getFCnt = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 8, 0));
};


/** @param {number} value  */
proto.integration.LocationEvent.prototype.setFCnt = function(value) {
  jspb.Message.setField(this, 8, value);
};


/**
 * optional google.protobuf.Timestamp published_at = 9;
 * @return {proto.google.protobuf.Timestamp}
 */
proto.integration.LocationEvent.prototype.getPublishedAt = function() {
  return /** @type{proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9));
};


/** @param {proto.google.protobuf.Timestamp|undefined} value  */
proto.integration.LocationEvent.prototype.setPublishedAt = function(value) {
  jspb.Message.setWrapperField(this, 9, value);
};


proto.integration.LocationEvent.prototype.clearPublishedAt = function() {
  this.setPublishedAt(undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.integration.LocationEvent.prototype.hasPublishedAt = function() {
  return jspb.Message.getField(this, 9) != null;
};



/**
 * 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.integration.IntegrationEvent = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.integration.IntegrationEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  proto.integration.IntegrationEvent.displayName = 'proto.integration.IntegrationEvent';
}


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_<name>, 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.integration.IntegrationEvent.prototype.toObject = function(opt_includeInstance) {
  return proto.integration.IntegrationEvent.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Whether to include the JSPB
 *     instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.integration.IntegrationEvent} msg The msg instance to transform.
 * @return {!Object}
 */
proto.integration.IntegrationEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    applicationId: msg.getApplicationId(),
    applicationName: msg.getApplicationName(),
    deviceName: msg.getDeviceName(),
    devEui: msg.getDevEui_asB64(),
    tagsMap: (f = msg.getTagsMap(true)) ? f.toArray() : [],
    integrationName: msg.getIntegrationName(),
    eventType: msg.getEventType(),
    objectJson: msg.getObjectJson(),
    publishedAt: (f = msg.getPublishedAt()) && google_protobuf_timestamp_pb.Timestamp.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.integration.IntegrationEvent}
 */
proto.integration.IntegrationEvent.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.integration.IntegrationEvent;
  return proto.integration.IntegrationEvent.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.integration.IntegrationEvent} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.integration.IntegrationEvent}
 */
proto.integration.IntegrationEvent.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setApplicationId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setApplicationName(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setDeviceName(value);
      break;
    case 4:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setDevEui(value);
      break;
    case 5:
      var value = msg.getTagsMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString);
         });
      break;
    case 6:
      var value = /** @type {string} */ (reader.readString());
      msg.setIntegrationName(value);
      break;
    case 7:
      var value = /** @type {string} */ (reader.readString());
      msg.setEventType(value);
      break;
    case 8:
      var value = /** @type {string} */ (reader.readString());
      msg.setObjectJson(value);
      break;
    case 9:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setPublishedAt(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Class method variant: serializes the given message to binary data
 * (in protobuf wire format), writing to the given BinaryWriter.
 * @param {!proto.integration.IntegrationEvent} message
 * @param {!jspb.BinaryWriter} writer
 */
proto.integration.IntegrationEvent.serializeBinaryToWriter = function(message, writer) {
  message.serializeBinaryToWriter(writer);
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.integration.IntegrationEvent.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  this.serializeBinaryToWriter(writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the message to binary data (in protobuf wire format),
 * writing to the given BinaryWriter.
 * @param {!jspb.BinaryWriter} writer
 */
proto.integration.IntegrationEvent.prototype.serializeBinaryToWriter = function (writer) {
  var f = undefined;
  f = this.getApplicationId();
  if (f !== 0) {
    writer.writeUint64(
      1,
      f
    );
  }
  f = this.getApplicationName();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = this.getDeviceName();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = this.getDevEui_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      4,
      f
    );
  }
  f = this.getTagsMap(true);
  if (f && f.getLength() > 0) {
    f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
  }
  f = this.getIntegrationName();
  if (f.length > 0) {
    writer.writeString(
      6,
      f
    );
  }
  f = this.getEventType();
  if (f.length > 0) {
    writer.writeString(
      7,
      f
    );
  }
  f = this.getObjectJson();
  if (f.length > 0) {
    writer.writeString(
      8,
      f
    );
  }
  f = this.getPublishedAt();
  if (f != null) {
    writer.writeMessage(
      9,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
};


/**
 * Creates a deep clone of this proto. No data is shared with the original.
 * @return {!proto.integration.IntegrationEvent} The clone.
 */
proto.integration.IntegrationEvent.prototype.cloneMessage = function() {
  return /** @type {!proto.integration.IntegrationEvent} */ (jspb.Message.cloneMessage(this));
};


/**
 * optional uint64 application_id = 1;
 * @return {number}
 */
proto.integration.IntegrationEvent.prototype.getApplicationId = function() {
  return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
};


/** @param {number} value  */
proto.integration.IntegrationEvent.prototype.setApplicationId = function(value) {
  jspb.Message.setField(this, 1, value);
};


/**
 * optional string application_name = 2;
 * @return {string}
 */
proto.integration.IntegrationEvent.prototype.getApplicationName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};


/** @param {string} value  */
proto.integration.IntegrationEvent.prototype.setApplicationName = function(value) {
  jspb.Message.setField(this, 2, value);
};


/**
 * optional string device_name = 3;
 * @return {string}
 */
proto.integration.IntegrationEvent.prototype.getDeviceName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
};


/** @param {string} value  */
proto.integration.IntegrationEvent.prototype.setDeviceName = function(value) {
  jspb.Message.setField(this, 3, value);
};


/**
 * optional bytes dev_eui = 4;
 * @return {!(string|Uint8Array)}
 */
proto.integration.IntegrationEvent.prototype.getDevEui = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 4, ""));
};


/**
 * optional bytes dev_eui = 4;
 * This is a type-conversion wrapper around `getDevEui()`
 * @return {string}
 */
proto.integration.IntegrationEvent.prototype.getDevEui_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getDevEui()));
};


/**
 * optional bytes dev_eui = 4;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getDevEui()`
 * @return {!Uint8Array}
 */
proto.integration.IntegrationEvent.prototype.getDevEui_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getDevEui()));
};


/** @param {!(string|Uint8Array)} value  */
proto.integration.IntegrationEvent.prototype.setDevEui = function(value) {
  jspb.Message.setField(this, 4, value);
};


/**
 * map<string, string> tags = 5;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.integration.IntegrationEvent.prototype.getTagsMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 5, opt_noLazyCreate,
      null));
};


/**
 * optional string integration_name = 6;
 * @return {string}
 */
proto.integration.IntegrationEvent.prototype.getIntegrationName = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 6, ""));
};


/** @param {string} value  */
proto.integration.IntegrationEvent.prototype.setIntegrationName = function(value) {
  jspb.Message.setField(this, 6, value);
};


/**
 * optional string event_type = 7;
 * @return {string}
 */
proto.integration.IntegrationEvent.prototype.getEventType = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 7, ""));
};


/** @param {string} value  */
proto.integration.IntegrationEvent.prototype.setEventType = function(value) {
  jspb.Message.setField(this, 7, value);
};


/**
 * optional string object_json = 8;
 * @return {string}
 */
proto.integration.IntegrationEvent.prototype.getObjectJson = function() {
  return /** @type {string} */ (jspb.Message.getFieldProto3(this, 8, ""));
};


/** @param {string} value  */
proto.integration.IntegrationEvent.prototype.setObjectJson = function(value) {
  jspb.Message.setField(this, 8, value);
};


/**
 * optional google.protobuf.Timestamp published_at = 9;
 * @return {proto.google.protobuf.Timestamp}
 */
proto.integration.IntegrationEvent.prototype.getPublishedAt = function() {
  return /** @type{proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9));
};


/** @param {proto.google.protobuf.Timestamp|undefined} value  */
proto.integration.IntegrationEvent.prototype.setPublishedAt = function(value) {
  jspb.Message.setWrapperField(this, 9, value);
};


proto.integration.IntegrationEvent.prototype.clearPublishedAt = function() {
  this.setPublishedAt(undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.integration.IntegrationEvent.prototype.hasPublishedAt = function() {
  return jspb.Message.getField(this, 9) != null;
};


/**
 * @enum {number}
 */
proto.integration.ErrorType = {
  UNKNOWN: 0,
  DOWNLINK_PAYLOAD_SIZE: 1,
  DOWNLINK_FCNT: 2,
  UPLINK_CODEC: 3,
  DOWNLINK_CODEC: 4,
  OTAA: 5,
  UPLINK_FCNT_RESET: 6,
  UPLINK_MIC: 7,
  UPLINK_FCNT_RETRANSMISSION: 8,
  DOWNLINK_GATEWAY: 9
};

goog.object.extend(exports, proto.integration);
