// source: integration/integration.proto
/**
 * @fileoverview
 * @enhanceable
 * @suppress {messageConventions} JS Compiler reports an error if a variable or
 *     field starts with 'MSG_' and isn't a translatable message.
 * @public
 */
// GENERATED CODE -- DO NOT EDIT!

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

var common_common_pb = require('../common/common_pb.js');
goog.object.extend(proto, common_common_pb);
var gw_gw_pb = require('../gw/gw_pb.js');
goog.object.extend(proto, gw_gw_pb);
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');
goog.object.extend(proto, google_protobuf_struct_pb);
goog.exportSymbol('proto.integration.AckEvent', null, global);
goog.exportSymbol('proto.integration.DeviceInfo', null, global);
goog.exportSymbol('proto.integration.DownlinkCommand', 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.LogCode', null, global);
goog.exportSymbol('proto.integration.LogEvent', null, global);
goog.exportSymbol('proto.integration.LogLevel', 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.DeviceInfo = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.integration.DeviceInfo, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.integration.DeviceInfo.displayName = 'proto.integration.DeviceInfo';
}
/**
 * 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) {
  /**
   * @public
   * @override
   */
  proto.integration.UplinkEvent.displayName = 'proto.integration.UplinkEvent';
}
/**
 * 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, null, null);
};
goog.inherits(proto.integration.JoinEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.integration.JoinEvent.displayName = 'proto.integration.JoinEvent';
}
/**
 * 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) {
  /**
   * @public
   * @override
   */
  proto.integration.AckEvent.displayName = 'proto.integration.AckEvent';
}
/**
 * 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) {
  /**
   * @public
   * @override
   */
  proto.integration.TxAckEvent.displayName = 'proto.integration.TxAckEvent';
}
/**
 * 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.LogEvent = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.integration.LogEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.integration.LogEvent.displayName = 'proto.integration.LogEvent';
}
/**
 * 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) {
  /**
   * @public
   * @override
   */
  proto.integration.StatusEvent.displayName = 'proto.integration.StatusEvent';
}
/**
 * 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, null, null);
};
goog.inherits(proto.integration.LocationEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.integration.LocationEvent.displayName = 'proto.integration.LocationEvent';
}
/**
 * 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) {
  /**
   * @public
   * @override
   */
  proto.integration.IntegrationEvent.displayName = 'proto.integration.IntegrationEvent';
}
/**
 * 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.DownlinkCommand = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.integration.DownlinkCommand, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.integration.DownlinkCommand.displayName = 'proto.integration.DownlinkCommand';
}



if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.integration.DeviceInfo.prototype.toObject = function(opt_includeInstance) {
  return proto.integration.DeviceInfo.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.integration.DeviceInfo} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.DeviceInfo.toObject = function(includeInstance, msg) {
  var f, obj = {
    tenantId: jspb.Message.getFieldWithDefault(msg, 1, ""),
    tenantName: jspb.Message.getFieldWithDefault(msg, 2, ""),
    applicationId: jspb.Message.getFieldWithDefault(msg, 3, ""),
    applicationName: jspb.Message.getFieldWithDefault(msg, 4, ""),
    deviceProfileId: jspb.Message.getFieldWithDefault(msg, 5, ""),
    deviceProfileName: jspb.Message.getFieldWithDefault(msg, 6, ""),
    deviceName: jspb.Message.getFieldWithDefault(msg, 7, ""),
    devEui: jspb.Message.getFieldWithDefault(msg, 8, ""),
    tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : []
  };

  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.DeviceInfo}
 */
proto.integration.DeviceInfo.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.integration.DeviceInfo;
  return proto.integration.DeviceInfo.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.integration.DeviceInfo} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.integration.DeviceInfo}
 */
proto.integration.DeviceInfo.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {string} */ (reader.readString());
      msg.setTenantId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setTenantName(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setApplicationId(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setApplicationName(value);
      break;
    case 5:
      var value = /** @type {string} */ (reader.readString());
      msg.setDeviceProfileId(value);
      break;
    case 6:
      var value = /** @type {string} */ (reader.readString());
      msg.setDeviceProfileName(value);
      break;
    case 7:
      var value = /** @type {string} */ (reader.readString());
      msg.setDeviceName(value);
      break;
    case 8:
      var value = /** @type {string} */ (reader.readString());
      msg.setDevEui(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, null, "", "");
         });
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.integration.DeviceInfo} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.DeviceInfo.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getTenantId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getTenantName();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getApplicationId();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getApplicationName();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
  f = message.getDeviceProfileId();
  if (f.length > 0) {
    writer.writeString(
      5,
      f
    );
  }
  f = message.getDeviceProfileName();
  if (f.length > 0) {
    writer.writeString(
      6,
      f
    );
  }
  f = message.getDeviceName();
  if (f.length > 0) {
    writer.writeString(
      7,
      f
    );
  }
  f = message.getDevEui();
  if (f.length > 0) {
    writer.writeString(
      8,
      f
    );
  }
  f = message.getTagsMap(true);
  if (f && f.getLength() > 0) {
    f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
  }
};


/**
 * optional string tenant_id = 1;
 * @return {string}
 */
proto.integration.DeviceInfo.prototype.getTenantId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.DeviceInfo} returns this
 */
proto.integration.DeviceInfo.prototype.setTenantId = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string tenant_name = 2;
 * @return {string}
 */
proto.integration.DeviceInfo.prototype.getTenantName = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.DeviceInfo} returns this
 */
proto.integration.DeviceInfo.prototype.setTenantName = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional string application_id = 3;
 * @return {string}
 */
proto.integration.DeviceInfo.prototype.getApplicationId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.DeviceInfo} returns this
 */
proto.integration.DeviceInfo.prototype.setApplicationId = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};


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


/**
 * @param {string} value
 * @return {!proto.integration.DeviceInfo} returns this
 */
proto.integration.DeviceInfo.prototype.setApplicationName = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};


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


/**
 * @param {string} value
 * @return {!proto.integration.DeviceInfo} returns this
 */
proto.integration.DeviceInfo.prototype.setDeviceProfileId = function(value) {
  return jspb.Message.setProto3StringField(this, 5, value);
};


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


/**
 * @param {string} value
 * @return {!proto.integration.DeviceInfo} returns this
 */
proto.integration.DeviceInfo.prototype.setDeviceProfileName = function(value) {
  return jspb.Message.setProto3StringField(this, 6, value);
};


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


/**
 * @param {string} value
 * @return {!proto.integration.DeviceInfo} returns this
 */
proto.integration.DeviceInfo.prototype.setDeviceName = function(value) {
  return jspb.Message.setProto3StringField(this, 7, value);
};


/**
 * optional string dev_eui = 8;
 * @return {string}
 */
proto.integration.DeviceInfo.prototype.getDevEui = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.DeviceInfo} returns this
 */
proto.integration.DeviceInfo.prototype.setDevEui = function(value) {
  return jspb.Message.setProto3StringField(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.DeviceInfo.prototype.getTagsMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 9, opt_noLazyCreate,
      null));
};


/**
 * Clears values from the map. The map will be non-null.
 * @return {!proto.integration.DeviceInfo} returns this
 */
proto.integration.DeviceInfo.prototype.clearTagsMap = function() {
  this.getTagsMap().clear();
  return this;};



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.integration.UplinkEvent.repeatedFields_ = [12];



if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.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 Deprecated. 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}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.UplinkEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    deduplicationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
    time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
    deviceInfo: (f = msg.getDeviceInfo()) && proto.integration.DeviceInfo.toObject(includeInstance, f),
    devAddr: jspb.Message.getFieldWithDefault(msg, 4, ""),
    adr: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
    dr: jspb.Message.getFieldWithDefault(msg, 6, 0),
    fCnt: jspb.Message.getFieldWithDefault(msg, 7, 0),
    fPort: jspb.Message.getFieldWithDefault(msg, 8, 0),
    confirmed: jspb.Message.getBooleanFieldWithDefault(msg, 9, false),
    data: msg.getData_asB64(),
    object: (f = msg.getObject()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
    rxInfoList: jspb.Message.toObjectList(msg.getRxInfoList(),
    gw_gw_pb.UplinkRxInfo.toObject, includeInstance),
    txInfo: (f = msg.getTxInfo()) && gw_gw_pb.UplinkTxInfo.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.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 {string} */ (reader.readString());
      msg.setDeduplicationId(value);
      break;
    case 2:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setTime(value);
      break;
    case 3:
      var value = new proto.integration.DeviceInfo;
      reader.readMessage(value,proto.integration.DeviceInfo.deserializeBinaryFromReader);
      msg.setDeviceInfo(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setDevAddr(value);
      break;
    case 5:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setAdr(value);
      break;
    case 6:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setDr(value);
      break;
    case 7:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setFCnt(value);
      break;
    case 8:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setFPort(value);
      break;
    case 9:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setConfirmed(value);
      break;
    case 10:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setData(value);
      break;
    case 11:
      var value = new google_protobuf_struct_pb.Struct;
      reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
      msg.setObject(value);
      break;
    case 12:
      var value = new gw_gw_pb.UplinkRxInfo;
      reader.readMessage(value,gw_gw_pb.UplinkRxInfo.deserializeBinaryFromReader);
      msg.addRxInfo(value);
      break;
    case 13:
      var value = new gw_gw_pb.UplinkTxInfo;
      reader.readMessage(value,gw_gw_pb.UplinkTxInfo.deserializeBinaryFromReader);
      msg.setTxInfo(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * 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
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.UplinkEvent.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getDeduplicationId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getTime();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
  f = message.getDeviceInfo();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.integration.DeviceInfo.serializeBinaryToWriter
    );
  }
  f = message.getDevAddr();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
  f = message.getAdr();
  if (f) {
    writer.writeBool(
      5,
      f
    );
  }
  f = message.getDr();
  if (f !== 0) {
    writer.writeUint32(
      6,
      f
    );
  }
  f = message.getFCnt();
  if (f !== 0) {
    writer.writeUint32(
      7,
      f
    );
  }
  f = message.getFPort();
  if (f !== 0) {
    writer.writeUint32(
      8,
      f
    );
  }
  f = message.getConfirmed();
  if (f) {
    writer.writeBool(
      9,
      f
    );
  }
  f = message.getData_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      10,
      f
    );
  }
  f = message.getObject();
  if (f != null) {
    writer.writeMessage(
      11,
      f,
      google_protobuf_struct_pb.Struct.serializeBinaryToWriter
    );
  }
  f = message.getRxInfoList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      12,
      f,
      gw_gw_pb.UplinkRxInfo.serializeBinaryToWriter
    );
  }
  f = message.getTxInfo();
  if (f != null) {
    writer.writeMessage(
      13,
      f,
      gw_gw_pb.UplinkTxInfo.serializeBinaryToWriter
    );
  }
};


/**
 * optional string deduplication_id = 1;
 * @return {string}
 */
proto.integration.UplinkEvent.prototype.getDeduplicationId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.UplinkEvent} returns this
 */
proto.integration.UplinkEvent.prototype.setDeduplicationId = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional google.protobuf.Timestamp time = 2;
 * @return {?proto.google.protobuf.Timestamp}
 */
proto.integration.UplinkEvent.prototype.getTime = function() {
  return /** @type{?proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
};


/**
 * @param {?proto.google.protobuf.Timestamp|undefined} value
 * @return {!proto.integration.UplinkEvent} returns this
*/
proto.integration.UplinkEvent.prototype.setTime = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.UplinkEvent} returns this
 */
proto.integration.UplinkEvent.prototype.clearTime = function() {
  return this.setTime(undefined);
};


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


/**
 * optional DeviceInfo device_info = 3;
 * @return {?proto.integration.DeviceInfo}
 */
proto.integration.UplinkEvent.prototype.getDeviceInfo = function() {
  return /** @type{?proto.integration.DeviceInfo} */ (
    jspb.Message.getWrapperField(this, proto.integration.DeviceInfo, 3));
};


/**
 * @param {?proto.integration.DeviceInfo|undefined} value
 * @return {!proto.integration.UplinkEvent} returns this
*/
proto.integration.UplinkEvent.prototype.setDeviceInfo = function(value) {
  return jspb.Message.setWrapperField(this, 3, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.UplinkEvent} returns this
 */
proto.integration.UplinkEvent.prototype.clearDeviceInfo = function() {
  return this.setDeviceInfo(undefined);
};


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


/**
 * optional string dev_addr = 4;
 * @return {string}
 */
proto.integration.UplinkEvent.prototype.getDevAddr = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.UplinkEvent} returns this
 */
proto.integration.UplinkEvent.prototype.setDevAddr = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};


/**
 * optional bool adr = 5;
 * @return {boolean}
 */
proto.integration.UplinkEvent.prototype.getAdr = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
};


/**
 * @param {boolean} value
 * @return {!proto.integration.UplinkEvent} returns this
 */
proto.integration.UplinkEvent.prototype.setAdr = function(value) {
  return jspb.Message.setProto3BooleanField(this, 5, value);
};


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


/**
 * @param {number} value
 * @return {!proto.integration.UplinkEvent} returns this
 */
proto.integration.UplinkEvent.prototype.setDr = function(value) {
  return jspb.Message.setProto3IntField(this, 6, value);
};


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


/**
 * @param {number} value
 * @return {!proto.integration.UplinkEvent} returns this
 */
proto.integration.UplinkEvent.prototype.setFCnt = function(value) {
  return jspb.Message.setProto3IntField(this, 7, value);
};


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


/**
 * @param {number} value
 * @return {!proto.integration.UplinkEvent} returns this
 */
proto.integration.UplinkEvent.prototype.setFPort = function(value) {
  return jspb.Message.setProto3IntField(this, 8, value);
};


/**
 * optional bool confirmed = 9;
 * @return {boolean}
 */
proto.integration.UplinkEvent.prototype.getConfirmed = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false));
};


/**
 * @param {boolean} value
 * @return {!proto.integration.UplinkEvent} returns this
 */
proto.integration.UplinkEvent.prototype.setConfirmed = function(value) {
  return jspb.Message.setProto3BooleanField(this, 9, value);
};


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


/**
 * optional bytes data = 10;
 * 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 = 10;
 * 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
 * @return {!proto.integration.UplinkEvent} returns this
 */
proto.integration.UplinkEvent.prototype.setData = function(value) {
  return jspb.Message.setProto3BytesField(this, 10, value);
};


/**
 * optional google.protobuf.Struct object = 11;
 * @return {?proto.google.protobuf.Struct}
 */
proto.integration.UplinkEvent.prototype.getObject = function() {
  return /** @type{?proto.google.protobuf.Struct} */ (
    jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 11));
};


/**
 * @param {?proto.google.protobuf.Struct|undefined} value
 * @return {!proto.integration.UplinkEvent} returns this
*/
proto.integration.UplinkEvent.prototype.setObject = function(value) {
  return jspb.Message.setWrapperField(this, 11, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.UplinkEvent} returns this
 */
proto.integration.UplinkEvent.prototype.clearObject = function() {
  return this.setObject(undefined);
};


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


/**
 * repeated gw.UplinkRxInfo rx_info = 12;
 * @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, 12));
};


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


/**
 * @param {!proto.gw.UplinkRxInfo=} opt_value
 * @param {number=} opt_index
 * @return {!proto.gw.UplinkRxInfo}
 */
proto.integration.UplinkEvent.prototype.addRxInfo = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.gw.UplinkRxInfo, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.integration.UplinkEvent} returns this
 */
proto.integration.UplinkEvent.prototype.clearRxInfoList = function() {
  return this.setRxInfoList([]);
};


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


/**
 * @param {?proto.gw.UplinkTxInfo|undefined} value
 * @return {!proto.integration.UplinkEvent} returns this
*/
proto.integration.UplinkEvent.prototype.setTxInfo = function(value) {
  return jspb.Message.setWrapperField(this, 13, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.UplinkEvent} returns this
 */
proto.integration.UplinkEvent.prototype.clearTxInfo = function() {
  return this.setTxInfo(undefined);
};


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





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.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 Deprecated. 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}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.JoinEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    deduplicationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
    time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
    deviceInfo: (f = msg.getDeviceInfo()) && proto.integration.DeviceInfo.toObject(includeInstance, f),
    devAddr: jspb.Message.getFieldWithDefault(msg, 4, "")
  };

  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 {string} */ (reader.readString());
      msg.setDeduplicationId(value);
      break;
    case 2:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setTime(value);
      break;
    case 3:
      var value = new proto.integration.DeviceInfo;
      reader.readMessage(value,proto.integration.DeviceInfo.deserializeBinaryFromReader);
      msg.setDeviceInfo(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setDevAddr(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * 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
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.JoinEvent.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getDeduplicationId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getTime();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
  f = message.getDeviceInfo();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.integration.DeviceInfo.serializeBinaryToWriter
    );
  }
  f = message.getDevAddr();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
};


/**
 * optional string deduplication_id = 1;
 * @return {string}
 */
proto.integration.JoinEvent.prototype.getDeduplicationId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.JoinEvent} returns this
 */
proto.integration.JoinEvent.prototype.setDeduplicationId = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional google.protobuf.Timestamp time = 2;
 * @return {?proto.google.protobuf.Timestamp}
 */
proto.integration.JoinEvent.prototype.getTime = function() {
  return /** @type{?proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
};


/**
 * @param {?proto.google.protobuf.Timestamp|undefined} value
 * @return {!proto.integration.JoinEvent} returns this
*/
proto.integration.JoinEvent.prototype.setTime = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.JoinEvent} returns this
 */
proto.integration.JoinEvent.prototype.clearTime = function() {
  return this.setTime(undefined);
};


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


/**
 * optional DeviceInfo device_info = 3;
 * @return {?proto.integration.DeviceInfo}
 */
proto.integration.JoinEvent.prototype.getDeviceInfo = function() {
  return /** @type{?proto.integration.DeviceInfo} */ (
    jspb.Message.getWrapperField(this, proto.integration.DeviceInfo, 3));
};


/**
 * @param {?proto.integration.DeviceInfo|undefined} value
 * @return {!proto.integration.JoinEvent} returns this
*/
proto.integration.JoinEvent.prototype.setDeviceInfo = function(value) {
  return jspb.Message.setWrapperField(this, 3, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.JoinEvent} returns this
 */
proto.integration.JoinEvent.prototype.clearDeviceInfo = function() {
  return this.setDeviceInfo(undefined);
};


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


/**
 * optional string dev_addr = 4;
 * @return {string}
 */
proto.integration.JoinEvent.prototype.getDevAddr = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.JoinEvent} returns this
 */
proto.integration.JoinEvent.prototype.setDevAddr = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.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 Deprecated. 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}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.AckEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    deduplicationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
    time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
    deviceInfo: (f = msg.getDeviceInfo()) && proto.integration.DeviceInfo.toObject(includeInstance, f),
    queueItemId: jspb.Message.getFieldWithDefault(msg, 4, ""),
    acknowledged: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
    fCntDown: jspb.Message.getFieldWithDefault(msg, 6, 0)
  };

  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 {string} */ (reader.readString());
      msg.setDeduplicationId(value);
      break;
    case 2:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setTime(value);
      break;
    case 3:
      var value = new proto.integration.DeviceInfo;
      reader.readMessage(value,proto.integration.DeviceInfo.deserializeBinaryFromReader);
      msg.setDeviceInfo(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setQueueItemId(value);
      break;
    case 5:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setAcknowledged(value);
      break;
    case 6:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setFCntDown(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * 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
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.AckEvent.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getDeduplicationId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getTime();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
  f = message.getDeviceInfo();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.integration.DeviceInfo.serializeBinaryToWriter
    );
  }
  f = message.getQueueItemId();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
  f = message.getAcknowledged();
  if (f) {
    writer.writeBool(
      5,
      f
    );
  }
  f = message.getFCntDown();
  if (f !== 0) {
    writer.writeUint32(
      6,
      f
    );
  }
};


/**
 * optional string deduplication_id = 1;
 * @return {string}
 */
proto.integration.AckEvent.prototype.getDeduplicationId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.AckEvent} returns this
 */
proto.integration.AckEvent.prototype.setDeduplicationId = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional google.protobuf.Timestamp time = 2;
 * @return {?proto.google.protobuf.Timestamp}
 */
proto.integration.AckEvent.prototype.getTime = function() {
  return /** @type{?proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
};


/**
 * @param {?proto.google.protobuf.Timestamp|undefined} value
 * @return {!proto.integration.AckEvent} returns this
*/
proto.integration.AckEvent.prototype.setTime = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.AckEvent} returns this
 */
proto.integration.AckEvent.prototype.clearTime = function() {
  return this.setTime(undefined);
};


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


/**
 * optional DeviceInfo device_info = 3;
 * @return {?proto.integration.DeviceInfo}
 */
proto.integration.AckEvent.prototype.getDeviceInfo = function() {
  return /** @type{?proto.integration.DeviceInfo} */ (
    jspb.Message.getWrapperField(this, proto.integration.DeviceInfo, 3));
};


/**
 * @param {?proto.integration.DeviceInfo|undefined} value
 * @return {!proto.integration.AckEvent} returns this
*/
proto.integration.AckEvent.prototype.setDeviceInfo = function(value) {
  return jspb.Message.setWrapperField(this, 3, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.AckEvent} returns this
 */
proto.integration.AckEvent.prototype.clearDeviceInfo = function() {
  return this.setDeviceInfo(undefined);
};


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


/**
 * optional string queue_item_id = 4;
 * @return {string}
 */
proto.integration.AckEvent.prototype.getQueueItemId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.AckEvent} returns this
 */
proto.integration.AckEvent.prototype.setQueueItemId = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};


/**
 * optional bool acknowledged = 5;
 * @return {boolean}
 */
proto.integration.AckEvent.prototype.getAcknowledged = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
};


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


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


/**
 * @param {number} value
 * @return {!proto.integration.AckEvent} returns this
 */
proto.integration.AckEvent.prototype.setFCntDown = function(value) {
  return jspb.Message.setProto3IntField(this, 6, value);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.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 Deprecated. 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}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.TxAckEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    downlinkId: jspb.Message.getFieldWithDefault(msg, 1, 0),
    time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
    deviceInfo: (f = msg.getDeviceInfo()) && proto.integration.DeviceInfo.toObject(includeInstance, f),
    queueItemId: jspb.Message.getFieldWithDefault(msg, 4, ""),
    fCntDown: jspb.Message.getFieldWithDefault(msg, 5, 0),
    gatewayId: jspb.Message.getFieldWithDefault(msg, 6, ""),
    txInfo: (f = msg.getTxInfo()) && gw_gw_pb.DownlinkTxInfo.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.readUint32());
      msg.setDownlinkId(value);
      break;
    case 2:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setTime(value);
      break;
    case 3:
      var value = new proto.integration.DeviceInfo;
      reader.readMessage(value,proto.integration.DeviceInfo.deserializeBinaryFromReader);
      msg.setDeviceInfo(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setQueueItemId(value);
      break;
    case 5:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setFCntDown(value);
      break;
    case 6:
      var value = /** @type {string} */ (reader.readString());
      msg.setGatewayId(value);
      break;
    case 7:
      var value = new gw_gw_pb.DownlinkTxInfo;
      reader.readMessage(value,gw_gw_pb.DownlinkTxInfo.deserializeBinaryFromReader);
      msg.setTxInfo(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * 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
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.TxAckEvent.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getDownlinkId();
  if (f !== 0) {
    writer.writeUint32(
      1,
      f
    );
  }
  f = message.getTime();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
  f = message.getDeviceInfo();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.integration.DeviceInfo.serializeBinaryToWriter
    );
  }
  f = message.getQueueItemId();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
  f = message.getFCntDown();
  if (f !== 0) {
    writer.writeUint32(
      5,
      f
    );
  }
  f = message.getGatewayId();
  if (f.length > 0) {
    writer.writeString(
      6,
      f
    );
  }
  f = message.getTxInfo();
  if (f != null) {
    writer.writeMessage(
      7,
      f,
      gw_gw_pb.DownlinkTxInfo.serializeBinaryToWriter
    );
  }
};


/**
 * optional uint32 downlink_id = 1;
 * @return {number}
 */
proto.integration.TxAckEvent.prototype.getDownlinkId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.integration.TxAckEvent} returns this
 */
proto.integration.TxAckEvent.prototype.setDownlinkId = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};


/**
 * optional google.protobuf.Timestamp time = 2;
 * @return {?proto.google.protobuf.Timestamp}
 */
proto.integration.TxAckEvent.prototype.getTime = function() {
  return /** @type{?proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
};


/**
 * @param {?proto.google.protobuf.Timestamp|undefined} value
 * @return {!proto.integration.TxAckEvent} returns this
*/
proto.integration.TxAckEvent.prototype.setTime = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.TxAckEvent} returns this
 */
proto.integration.TxAckEvent.prototype.clearTime = function() {
  return this.setTime(undefined);
};


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


/**
 * optional DeviceInfo device_info = 3;
 * @return {?proto.integration.DeviceInfo}
 */
proto.integration.TxAckEvent.prototype.getDeviceInfo = function() {
  return /** @type{?proto.integration.DeviceInfo} */ (
    jspb.Message.getWrapperField(this, proto.integration.DeviceInfo, 3));
};


/**
 * @param {?proto.integration.DeviceInfo|undefined} value
 * @return {!proto.integration.TxAckEvent} returns this
*/
proto.integration.TxAckEvent.prototype.setDeviceInfo = function(value) {
  return jspb.Message.setWrapperField(this, 3, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.TxAckEvent} returns this
 */
proto.integration.TxAckEvent.prototype.clearDeviceInfo = function() {
  return this.setDeviceInfo(undefined);
};


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


/**
 * optional string queue_item_id = 4;
 * @return {string}
 */
proto.integration.TxAckEvent.prototype.getQueueItemId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.TxAckEvent} returns this
 */
proto.integration.TxAckEvent.prototype.setQueueItemId = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};


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


/**
 * @param {number} value
 * @return {!proto.integration.TxAckEvent} returns this
 */
proto.integration.TxAckEvent.prototype.setFCntDown = function(value) {
  return jspb.Message.setProto3IntField(this, 5, value);
};


/**
 * optional string gateway_id = 6;
 * @return {string}
 */
proto.integration.TxAckEvent.prototype.getGatewayId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.TxAckEvent} returns this
 */
proto.integration.TxAckEvent.prototype.setGatewayId = function(value) {
  return jspb.Message.setProto3StringField(this, 6, value);
};


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


/**
 * @param {?proto.gw.DownlinkTxInfo|undefined} value
 * @return {!proto.integration.TxAckEvent} returns this
*/
proto.integration.TxAckEvent.prototype.setTxInfo = function(value) {
  return jspb.Message.setWrapperField(this, 7, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.TxAckEvent} returns this
 */
proto.integration.TxAckEvent.prototype.clearTxInfo = function() {
  return this.setTxInfo(undefined);
};


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





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.integration.LogEvent.prototype.toObject = function(opt_includeInstance) {
  return proto.integration.LogEvent.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.integration.LogEvent} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.LogEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
    deviceInfo: (f = msg.getDeviceInfo()) && proto.integration.DeviceInfo.toObject(includeInstance, f),
    level: jspb.Message.getFieldWithDefault(msg, 3, 0),
    code: jspb.Message.getFieldWithDefault(msg, 4, 0),
    description: jspb.Message.getFieldWithDefault(msg, 5, ""),
    contextMap: (f = msg.getContextMap()) ? f.toObject(includeInstance, undefined) : []
  };

  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.LogEvent}
 */
proto.integration.LogEvent.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.integration.LogEvent;
  return proto.integration.LogEvent.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.integration.LogEvent} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.integration.LogEvent}
 */
proto.integration.LogEvent.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setTime(value);
      break;
    case 2:
      var value = new proto.integration.DeviceInfo;
      reader.readMessage(value,proto.integration.DeviceInfo.deserializeBinaryFromReader);
      msg.setDeviceInfo(value);
      break;
    case 3:
      var value = /** @type {!proto.integration.LogLevel} */ (reader.readEnum());
      msg.setLevel(value);
      break;
    case 4:
      var value = /** @type {!proto.integration.LogCode} */ (reader.readEnum());
      msg.setCode(value);
      break;
    case 5:
      var value = /** @type {string} */ (reader.readString());
      msg.setDescription(value);
      break;
    case 6:
      var value = msg.getContextMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
         });
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.integration.LogEvent} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.LogEvent.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getTime();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
  f = message.getDeviceInfo();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      proto.integration.DeviceInfo.serializeBinaryToWriter
    );
  }
  f = message.getLevel();
  if (f !== 0.0) {
    writer.writeEnum(
      3,
      f
    );
  }
  f = message.getCode();
  if (f !== 0.0) {
    writer.writeEnum(
      4,
      f
    );
  }
  f = message.getDescription();
  if (f.length > 0) {
    writer.writeString(
      5,
      f
    );
  }
  f = message.getContextMap(true);
  if (f && f.getLength() > 0) {
    f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
  }
};


/**
 * optional google.protobuf.Timestamp time = 1;
 * @return {?proto.google.protobuf.Timestamp}
 */
proto.integration.LogEvent.prototype.getTime = function() {
  return /** @type{?proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1));
};


/**
 * @param {?proto.google.protobuf.Timestamp|undefined} value
 * @return {!proto.integration.LogEvent} returns this
*/
proto.integration.LogEvent.prototype.setTime = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.LogEvent} returns this
 */
proto.integration.LogEvent.prototype.clearTime = function() {
  return this.setTime(undefined);
};


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


/**
 * optional DeviceInfo device_info = 2;
 * @return {?proto.integration.DeviceInfo}
 */
proto.integration.LogEvent.prototype.getDeviceInfo = function() {
  return /** @type{?proto.integration.DeviceInfo} */ (
    jspb.Message.getWrapperField(this, proto.integration.DeviceInfo, 2));
};


/**
 * @param {?proto.integration.DeviceInfo|undefined} value
 * @return {!proto.integration.LogEvent} returns this
*/
proto.integration.LogEvent.prototype.setDeviceInfo = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.LogEvent} returns this
 */
proto.integration.LogEvent.prototype.clearDeviceInfo = function() {
  return this.setDeviceInfo(undefined);
};


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


/**
 * optional LogLevel level = 3;
 * @return {!proto.integration.LogLevel}
 */
proto.integration.LogEvent.prototype.getLevel = function() {
  return /** @type {!proto.integration.LogLevel} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};


/**
 * @param {!proto.integration.LogLevel} value
 * @return {!proto.integration.LogEvent} returns this
 */
proto.integration.LogEvent.prototype.setLevel = function(value) {
  return jspb.Message.setProto3EnumField(this, 3, value);
};


/**
 * optional LogCode code = 4;
 * @return {!proto.integration.LogCode}
 */
proto.integration.LogEvent.prototype.getCode = function() {
  return /** @type {!proto.integration.LogCode} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};


/**
 * @param {!proto.integration.LogCode} value
 * @return {!proto.integration.LogEvent} returns this
 */
proto.integration.LogEvent.prototype.setCode = function(value) {
  return jspb.Message.setProto3EnumField(this, 4, value);
};


/**
 * optional string description = 5;
 * @return {string}
 */
proto.integration.LogEvent.prototype.getDescription = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.LogEvent} returns this
 */
proto.integration.LogEvent.prototype.setDescription = function(value) {
  return jspb.Message.setProto3StringField(this, 5, value);
};


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


/**
 * Clears values from the map. The map will be non-null.
 * @return {!proto.integration.LogEvent} returns this
 */
proto.integration.LogEvent.prototype.clearContextMap = function() {
  this.getContextMap().clear();
  return this;};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.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 Deprecated. 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}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.StatusEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    deduplicationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
    time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
    deviceInfo: (f = msg.getDeviceInfo()) && proto.integration.DeviceInfo.toObject(includeInstance, f),
    margin: jspb.Message.getFieldWithDefault(msg, 5, 0),
    externalPowerSource: jspb.Message.getBooleanFieldWithDefault(msg, 6, false),
    batteryLevelUnavailable: jspb.Message.getBooleanFieldWithDefault(msg, 7, false),
    batteryLevel: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0)
  };

  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 {string} */ (reader.readString());
      msg.setDeduplicationId(value);
      break;
    case 2:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setTime(value);
      break;
    case 3:
      var value = new proto.integration.DeviceInfo;
      reader.readMessage(value,proto.integration.DeviceInfo.deserializeBinaryFromReader);
      msg.setDeviceInfo(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;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * 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
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.StatusEvent.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getDeduplicationId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getTime();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
  f = message.getDeviceInfo();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.integration.DeviceInfo.serializeBinaryToWriter
    );
  }
  f = message.getMargin();
  if (f !== 0) {
    writer.writeInt32(
      5,
      f
    );
  }
  f = message.getExternalPowerSource();
  if (f) {
    writer.writeBool(
      6,
      f
    );
  }
  f = message.getBatteryLevelUnavailable();
  if (f) {
    writer.writeBool(
      7,
      f
    );
  }
  f = message.getBatteryLevel();
  if (f !== 0.0) {
    writer.writeFloat(
      8,
      f
    );
  }
};


/**
 * optional string deduplication_id = 1;
 * @return {string}
 */
proto.integration.StatusEvent.prototype.getDeduplicationId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.StatusEvent} returns this
 */
proto.integration.StatusEvent.prototype.setDeduplicationId = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional google.protobuf.Timestamp time = 2;
 * @return {?proto.google.protobuf.Timestamp}
 */
proto.integration.StatusEvent.prototype.getTime = function() {
  return /** @type{?proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
};


/**
 * @param {?proto.google.protobuf.Timestamp|undefined} value
 * @return {!proto.integration.StatusEvent} returns this
*/
proto.integration.StatusEvent.prototype.setTime = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.StatusEvent} returns this
 */
proto.integration.StatusEvent.prototype.clearTime = function() {
  return this.setTime(undefined);
};


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


/**
 * optional DeviceInfo device_info = 3;
 * @return {?proto.integration.DeviceInfo}
 */
proto.integration.StatusEvent.prototype.getDeviceInfo = function() {
  return /** @type{?proto.integration.DeviceInfo} */ (
    jspb.Message.getWrapperField(this, proto.integration.DeviceInfo, 3));
};


/**
 * @param {?proto.integration.DeviceInfo|undefined} value
 * @return {!proto.integration.StatusEvent} returns this
*/
proto.integration.StatusEvent.prototype.setDeviceInfo = function(value) {
  return jspb.Message.setWrapperField(this, 3, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.StatusEvent} returns this
 */
proto.integration.StatusEvent.prototype.clearDeviceInfo = function() {
  return this.setDeviceInfo(undefined);
};


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


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


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


/**
 * optional bool external_power_source = 6;
 * @return {boolean}
 */
proto.integration.StatusEvent.prototype.getExternalPowerSource = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
};


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


/**
 * optional bool battery_level_unavailable = 7;
 * @return {boolean}
 */
proto.integration.StatusEvent.prototype.getBatteryLevelUnavailable = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false));
};


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


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


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





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.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 Deprecated. 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}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.LocationEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    deduplicationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
    time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
    deviceInfo: (f = msg.getDeviceInfo()) && proto.integration.DeviceInfo.toObject(includeInstance, f),
    location: (f = msg.getLocation()) && common_common_pb.Location.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 {string} */ (reader.readString());
      msg.setDeduplicationId(value);
      break;
    case 2:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setTime(value);
      break;
    case 3:
      var value = new proto.integration.DeviceInfo;
      reader.readMessage(value,proto.integration.DeviceInfo.deserializeBinaryFromReader);
      msg.setDeviceInfo(value);
      break;
    case 4:
      var value = new common_common_pb.Location;
      reader.readMessage(value,common_common_pb.Location.deserializeBinaryFromReader);
      msg.setLocation(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * 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
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.LocationEvent.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getDeduplicationId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getTime();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
  f = message.getDeviceInfo();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.integration.DeviceInfo.serializeBinaryToWriter
    );
  }
  f = message.getLocation();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      common_common_pb.Location.serializeBinaryToWriter
    );
  }
};


/**
 * optional string deduplication_id = 1;
 * @return {string}
 */
proto.integration.LocationEvent.prototype.getDeduplicationId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.LocationEvent} returns this
 */
proto.integration.LocationEvent.prototype.setDeduplicationId = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional google.protobuf.Timestamp time = 2;
 * @return {?proto.google.protobuf.Timestamp}
 */
proto.integration.LocationEvent.prototype.getTime = function() {
  return /** @type{?proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
};


/**
 * @param {?proto.google.protobuf.Timestamp|undefined} value
 * @return {!proto.integration.LocationEvent} returns this
*/
proto.integration.LocationEvent.prototype.setTime = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.LocationEvent} returns this
 */
proto.integration.LocationEvent.prototype.clearTime = function() {
  return this.setTime(undefined);
};


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


/**
 * optional DeviceInfo device_info = 3;
 * @return {?proto.integration.DeviceInfo}
 */
proto.integration.LocationEvent.prototype.getDeviceInfo = function() {
  return /** @type{?proto.integration.DeviceInfo} */ (
    jspb.Message.getWrapperField(this, proto.integration.DeviceInfo, 3));
};


/**
 * @param {?proto.integration.DeviceInfo|undefined} value
 * @return {!proto.integration.LocationEvent} returns this
*/
proto.integration.LocationEvent.prototype.setDeviceInfo = function(value) {
  return jspb.Message.setWrapperField(this, 3, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.LocationEvent} returns this
 */
proto.integration.LocationEvent.prototype.clearDeviceInfo = function() {
  return this.setDeviceInfo(undefined);
};


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


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


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


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.LocationEvent} returns this
 */
proto.integration.LocationEvent.prototype.clearLocation = function() {
  return this.setLocation(undefined);
};


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





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.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 Deprecated. 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}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.IntegrationEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    deduplicationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
    time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
    deviceInfo: (f = msg.getDeviceInfo()) && proto.integration.DeviceInfo.toObject(includeInstance, f),
    integrationName: jspb.Message.getFieldWithDefault(msg, 4, ""),
    eventType: jspb.Message.getFieldWithDefault(msg, 5, ""),
    object: (f = msg.getObject()) && google_protobuf_struct_pb.Struct.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 {string} */ (reader.readString());
      msg.setDeduplicationId(value);
      break;
    case 2:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setTime(value);
      break;
    case 3:
      var value = new proto.integration.DeviceInfo;
      reader.readMessage(value,proto.integration.DeviceInfo.deserializeBinaryFromReader);
      msg.setDeviceInfo(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setIntegrationName(value);
      break;
    case 5:
      var value = /** @type {string} */ (reader.readString());
      msg.setEventType(value);
      break;
    case 6:
      var value = new google_protobuf_struct_pb.Struct;
      reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
      msg.setObject(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * 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
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.IntegrationEvent.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getDeduplicationId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getTime();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
  f = message.getDeviceInfo();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.integration.DeviceInfo.serializeBinaryToWriter
    );
  }
  f = message.getIntegrationName();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
  f = message.getEventType();
  if (f.length > 0) {
    writer.writeString(
      5,
      f
    );
  }
  f = message.getObject();
  if (f != null) {
    writer.writeMessage(
      6,
      f,
      google_protobuf_struct_pb.Struct.serializeBinaryToWriter
    );
  }
};


/**
 * optional string deduplication_id = 1;
 * @return {string}
 */
proto.integration.IntegrationEvent.prototype.getDeduplicationId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.IntegrationEvent} returns this
 */
proto.integration.IntegrationEvent.prototype.setDeduplicationId = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional google.protobuf.Timestamp time = 2;
 * @return {?proto.google.protobuf.Timestamp}
 */
proto.integration.IntegrationEvent.prototype.getTime = function() {
  return /** @type{?proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
};


/**
 * @param {?proto.google.protobuf.Timestamp|undefined} value
 * @return {!proto.integration.IntegrationEvent} returns this
*/
proto.integration.IntegrationEvent.prototype.setTime = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.IntegrationEvent} returns this
 */
proto.integration.IntegrationEvent.prototype.clearTime = function() {
  return this.setTime(undefined);
};


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


/**
 * optional DeviceInfo device_info = 3;
 * @return {?proto.integration.DeviceInfo}
 */
proto.integration.IntegrationEvent.prototype.getDeviceInfo = function() {
  return /** @type{?proto.integration.DeviceInfo} */ (
    jspb.Message.getWrapperField(this, proto.integration.DeviceInfo, 3));
};


/**
 * @param {?proto.integration.DeviceInfo|undefined} value
 * @return {!proto.integration.IntegrationEvent} returns this
*/
proto.integration.IntegrationEvent.prototype.setDeviceInfo = function(value) {
  return jspb.Message.setWrapperField(this, 3, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.IntegrationEvent} returns this
 */
proto.integration.IntegrationEvent.prototype.clearDeviceInfo = function() {
  return this.setDeviceInfo(undefined);
};


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


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


/**
 * @param {string} value
 * @return {!proto.integration.IntegrationEvent} returns this
 */
proto.integration.IntegrationEvent.prototype.setIntegrationName = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};


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


/**
 * @param {string} value
 * @return {!proto.integration.IntegrationEvent} returns this
 */
proto.integration.IntegrationEvent.prototype.setEventType = function(value) {
  return jspb.Message.setProto3StringField(this, 5, value);
};


/**
 * optional google.protobuf.Struct object = 6;
 * @return {?proto.google.protobuf.Struct}
 */
proto.integration.IntegrationEvent.prototype.getObject = function() {
  return /** @type{?proto.google.protobuf.Struct} */ (
    jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 6));
};


/**
 * @param {?proto.google.protobuf.Struct|undefined} value
 * @return {!proto.integration.IntegrationEvent} returns this
*/
proto.integration.IntegrationEvent.prototype.setObject = function(value) {
  return jspb.Message.setWrapperField(this, 6, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.IntegrationEvent} returns this
 */
proto.integration.IntegrationEvent.prototype.clearObject = function() {
  return this.setObject(undefined);
};


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





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.integration.DownlinkCommand.prototype.toObject = function(opt_includeInstance) {
  return proto.integration.DownlinkCommand.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.integration.DownlinkCommand} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.DownlinkCommand.toObject = function(includeInstance, msg) {
  var f, obj = {
    id: jspb.Message.getFieldWithDefault(msg, 1, ""),
    devEui: jspb.Message.getFieldWithDefault(msg, 2, ""),
    confirmed: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
    fPort: jspb.Message.getFieldWithDefault(msg, 4, 0),
    data: msg.getData_asB64(),
    object: (f = msg.getObject()) && google_protobuf_struct_pb.Struct.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.DownlinkCommand}
 */
proto.integration.DownlinkCommand.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.integration.DownlinkCommand;
  return proto.integration.DownlinkCommand.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.integration.DownlinkCommand} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.integration.DownlinkCommand}
 */
proto.integration.DownlinkCommand.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {string} */ (reader.readString());
      msg.setId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setDevEui(value);
      break;
    case 3:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setConfirmed(value);
      break;
    case 4:
      var value = /** @type {number} */ (reader.readUint32());
      msg.setFPort(value);
      break;
    case 5:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setData(value);
      break;
    case 6:
      var value = new google_protobuf_struct_pb.Struct;
      reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
      msg.setObject(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.integration.DownlinkCommand} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.integration.DownlinkCommand.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getDevEui();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getConfirmed();
  if (f) {
    writer.writeBool(
      3,
      f
    );
  }
  f = message.getFPort();
  if (f !== 0) {
    writer.writeUint32(
      4,
      f
    );
  }
  f = message.getData_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      5,
      f
    );
  }
  f = message.getObject();
  if (f != null) {
    writer.writeMessage(
      6,
      f,
      google_protobuf_struct_pb.Struct.serializeBinaryToWriter
    );
  }
};


/**
 * optional string id = 1;
 * @return {string}
 */
proto.integration.DownlinkCommand.prototype.getId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.DownlinkCommand} returns this
 */
proto.integration.DownlinkCommand.prototype.setId = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string dev_eui = 2;
 * @return {string}
 */
proto.integration.DownlinkCommand.prototype.getDevEui = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.integration.DownlinkCommand} returns this
 */
proto.integration.DownlinkCommand.prototype.setDevEui = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional bool confirmed = 3;
 * @return {boolean}
 */
proto.integration.DownlinkCommand.prototype.getConfirmed = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
};


/**
 * @param {boolean} value
 * @return {!proto.integration.DownlinkCommand} returns this
 */
proto.integration.DownlinkCommand.prototype.setConfirmed = function(value) {
  return jspb.Message.setProto3BooleanField(this, 3, value);
};


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


/**
 * @param {number} value
 * @return {!proto.integration.DownlinkCommand} returns this
 */
proto.integration.DownlinkCommand.prototype.setFPort = function(value) {
  return jspb.Message.setProto3IntField(this, 4, value);
};


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


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


/**
 * optional bytes data = 5;
 * 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.DownlinkCommand.prototype.getData_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getData()));
};


/**
 * @param {!(string|Uint8Array)} value
 * @return {!proto.integration.DownlinkCommand} returns this
 */
proto.integration.DownlinkCommand.prototype.setData = function(value) {
  return jspb.Message.setProto3BytesField(this, 5, value);
};


/**
 * optional google.protobuf.Struct object = 6;
 * @return {?proto.google.protobuf.Struct}
 */
proto.integration.DownlinkCommand.prototype.getObject = function() {
  return /** @type{?proto.google.protobuf.Struct} */ (
    jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 6));
};


/**
 * @param {?proto.google.protobuf.Struct|undefined} value
 * @return {!proto.integration.DownlinkCommand} returns this
*/
proto.integration.DownlinkCommand.prototype.setObject = function(value) {
  return jspb.Message.setWrapperField(this, 6, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.integration.DownlinkCommand} returns this
 */
proto.integration.DownlinkCommand.prototype.clearObject = function() {
  return this.setObject(undefined);
};


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


/**
 * @enum {number}
 */
proto.integration.LogLevel = {
  INFO: 0,
  WARNING: 1,
  ERROR: 2
};

/**
 * @enum {number}
 */
proto.integration.LogCode = {
  UNKNOWN: 0,
  DOWNLINK_PAYLOAD_SIZE: 1,
  UPLINK_CODEC: 2,
  DOWNLINK_CODEC: 3,
  OTAA: 4,
  UPLINK_F_CNT_RESET: 5,
  UPLINK_MIC: 6,
  UPLINK_F_CNT_RETRANSMISSION: 7,
  DOWNLINK_GATEWAY: 8
};

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