mirror of
https://github.com/chirpstack/chirpstack.git
synced 2024-12-22 22:42:27 +00:00
3345 lines
92 KiB
JavaScript
3345 lines
92 KiB
JavaScript
|
/**
|
||
|
* @fileoverview
|
||
|
* @enhanceable
|
||
|
* @public
|
||
|
*/
|
||
|
// GENERATED CODE -- DO NOT EDIT!
|
||
|
|
||
|
var jspb = require('google-protobuf');
|
||
|
var goog = jspb;
|
||
|
var global = Function('return this')();
|
||
|
|
||
|
var common_common_pb = require('../common/common_pb.js');
|
||
|
var gw_gw_pb = require('../gw/gw_pb.js');
|
||
|
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
|
||
|
var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');
|
||
|
goog.exportSymbol('proto.integration.AckEvent', null, global);
|
||
|
goog.exportSymbol('proto.integration.DeviceInfo', 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) {
|
||
|
proto.integration.DeviceInfo.displayName = 'proto.integration.DeviceInfo';
|
||
|
}
|
||
|
|
||
|
|
||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||
|
/**
|
||
|
* Creates an object representation of this proto suitable for use in Soy templates.
|
||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||
|
* For the list of reserved names please see:
|
||
|
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
||
|
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
||
|
* for transitional soy proto support: http://goto/soy-param-migration
|
||
|
* @return {!Object}
|
||
|
*/
|
||
|
proto.integration.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 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}
|
||
|
*/
|
||
|
proto.integration.DeviceInfo.toObject = function(includeInstance, msg) {
|
||
|
var f, obj = {
|
||
|
tenantId: msg.getTenantId(),
|
||
|
tenantName: msg.getTenantName(),
|
||
|
applicationId: msg.getApplicationId(),
|
||
|
applicationName: msg.getApplicationName(),
|
||
|
deviceProfileId: msg.getDeviceProfileId(),
|
||
|
deviceProfileName: msg.getDeviceProfileName(),
|
||
|
deviceName: msg.getDeviceName(),
|
||
|
devEui: msg.getDevEui(),
|
||
|
tagsMap: (f = msg.getTagsMap(true)) ? f.toArray() : []
|
||
|
};
|
||
|
|
||
|
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);
|
||
|
});
|
||
|
break;
|
||
|
default:
|
||
|
reader.skipField();
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
return msg;
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Class method variant: serializes the given message to binary data
|
||
|
* (in protobuf wire format), writing to the given BinaryWriter.
|
||
|
* @param {!proto.integration.DeviceInfo} message
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.DeviceInfo.serializeBinaryToWriter = function(message, writer) {
|
||
|
message.serializeBinaryToWriter(writer);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format).
|
||
|
* @return {!Uint8Array}
|
||
|
*/
|
||
|
proto.integration.DeviceInfo.prototype.serializeBinary = function() {
|
||
|
var writer = new jspb.BinaryWriter();
|
||
|
this.serializeBinaryToWriter(writer);
|
||
|
return writer.getResultBuffer();
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format),
|
||
|
* writing to the given BinaryWriter.
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.DeviceInfo.prototype.serializeBinaryToWriter = function (writer) {
|
||
|
var f = undefined;
|
||
|
f = this.getTenantId();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
1,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getTenantName();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
2,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getApplicationId();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
3,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getApplicationName();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
4,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getDeviceProfileId();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
5,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getDeviceProfileName();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
6,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getDeviceName();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
7,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getDevEui();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
8,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getTagsMap(true);
|
||
|
if (f && f.getLength() > 0) {
|
||
|
f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Creates a deep clone of this proto. No data is shared with the original.
|
||
|
* @return {!proto.integration.DeviceInfo} The clone.
|
||
|
*/
|
||
|
proto.integration.DeviceInfo.prototype.cloneMessage = function() {
|
||
|
return /** @type {!proto.integration.DeviceInfo} */ (jspb.Message.cloneMessage(this));
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string tenant_id = 1;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.DeviceInfo.prototype.getTenantId = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.DeviceInfo.prototype.setTenantId = function(value) {
|
||
|
jspb.Message.setField(this, 1, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string tenant_name = 2;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.DeviceInfo.prototype.getTenantName = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.DeviceInfo.prototype.setTenantName = function(value) {
|
||
|
jspb.Message.setField(this, 2, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string application_id = 3;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.DeviceInfo.prototype.getApplicationId = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.DeviceInfo.prototype.setApplicationId = function(value) {
|
||
|
jspb.Message.setField(this, 3, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string application_name = 4;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.DeviceInfo.prototype.getApplicationName = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 4, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.DeviceInfo.prototype.setApplicationName = function(value) {
|
||
|
jspb.Message.setField(this, 4, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string device_profile_id = 5;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.DeviceInfo.prototype.getDeviceProfileId = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 5, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.DeviceInfo.prototype.setDeviceProfileId = function(value) {
|
||
|
jspb.Message.setField(this, 5, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string device_profile_name = 6;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.DeviceInfo.prototype.getDeviceProfileName = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 6, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.DeviceInfo.prototype.setDeviceProfileName = function(value) {
|
||
|
jspb.Message.setField(this, 6, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string device_name = 7;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.DeviceInfo.prototype.getDeviceName = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 7, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.DeviceInfo.prototype.setDeviceName = function(value) {
|
||
|
jspb.Message.setField(this, 7, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string dev_eui = 8;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.DeviceInfo.prototype.getDevEui = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 8, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.DeviceInfo.prototype.setDevEui = function(value) {
|
||
|
jspb.Message.setField(this, 8, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* map<string, string> tags = 9;
|
||
|
* @param {boolean=} opt_noLazyCreate Do not create the map if
|
||
|
* empty, instead returning `undefined`
|
||
|
* @return {!jspb.Map<string,string>}
|
||
|
*/
|
||
|
proto.integration.DeviceInfo.prototype.getTagsMap = function(opt_noLazyCreate) {
|
||
|
return /** @type {!jspb.Map<string,string>} */ (
|
||
|
jspb.Message.getMapField(this, 9, opt_noLazyCreate,
|
||
|
null));
|
||
|
};
|
||
|
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Generated by JsPbCodeGenerator.
|
||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||
|
* server response, or constructed directly in Javascript. The array is used
|
||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||
|
* If no data is provided, the constructed object will be empty, but still
|
||
|
* valid.
|
||
|
* @extends {jspb.Message}
|
||
|
* @constructor
|
||
|
*/
|
||
|
proto.integration.UplinkEvent = function(opt_data) {
|
||
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.integration.UplinkEvent.repeatedFields_, null);
|
||
|
};
|
||
|
goog.inherits(proto.integration.UplinkEvent, jspb.Message);
|
||
|
if (goog.DEBUG && !COMPILED) {
|
||
|
proto.integration.UplinkEvent.displayName = 'proto.integration.UplinkEvent';
|
||
|
}
|
||
|
/**
|
||
|
* List of repeated fields within this message type.
|
||
|
* @private {!Array<number>}
|
||
|
* @const
|
||
|
*/
|
||
|
proto.integration.UplinkEvent.repeatedFields_ = [12];
|
||
|
|
||
|
|
||
|
|
||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||
|
/**
|
||
|
* Creates an object representation of this proto suitable for use in Soy templates.
|
||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||
|
* For the list of reserved names please see:
|
||
|
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
||
|
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
||
|
* for transitional soy proto support: http://goto/soy-param-migration
|
||
|
* @return {!Object}
|
||
|
*/
|
||
|
proto.integration.UplinkEvent.prototype.toObject = function(opt_includeInstance) {
|
||
|
return proto.integration.UplinkEvent.toObject(opt_includeInstance, this);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Static version of the {@see toObject} method.
|
||
|
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
||
|
* instance for transitional soy proto support:
|
||
|
* http://goto/soy-param-migration
|
||
|
* @param {!proto.integration.UplinkEvent} msg The msg instance to transform.
|
||
|
* @return {!Object}
|
||
|
*/
|
||
|
proto.integration.UplinkEvent.toObject = function(includeInstance, msg) {
|
||
|
var f, obj = {
|
||
|
deduplicationId: msg.getDeduplicationId(),
|
||
|
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
|
||
|
deviceInfo: (f = msg.getDeviceInfo()) && proto.integration.DeviceInfo.toObject(includeInstance, f),
|
||
|
devAddr: msg.getDevAddr(),
|
||
|
adr: msg.getAdr(),
|
||
|
dr: msg.getDr(),
|
||
|
fCntUp: msg.getFCntUp(),
|
||
|
fPort: msg.getFPort(),
|
||
|
confirmed: msg.getConfirmed(),
|
||
|
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.setFCntUp(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.getRxInfoList().push(value);
|
||
|
msg.setRxInfoList(msg.getRxInfoList());
|
||
|
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;
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Class method variant: serializes the given message to binary data
|
||
|
* (in protobuf wire format), writing to the given BinaryWriter.
|
||
|
* @param {!proto.integration.UplinkEvent} message
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.UplinkEvent.serializeBinaryToWriter = function(message, writer) {
|
||
|
message.serializeBinaryToWriter(writer);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format).
|
||
|
* @return {!Uint8Array}
|
||
|
*/
|
||
|
proto.integration.UplinkEvent.prototype.serializeBinary = function() {
|
||
|
var writer = new jspb.BinaryWriter();
|
||
|
this.serializeBinaryToWriter(writer);
|
||
|
return writer.getResultBuffer();
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format),
|
||
|
* writing to the given BinaryWriter.
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.UplinkEvent.prototype.serializeBinaryToWriter = function (writer) {
|
||
|
var f = undefined;
|
||
|
f = this.getDeduplicationId();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
1,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getTime();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
2,
|
||
|
f,
|
||
|
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getDeviceInfo();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
3,
|
||
|
f,
|
||
|
proto.integration.DeviceInfo.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getDevAddr();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
4,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getAdr();
|
||
|
if (f) {
|
||
|
writer.writeBool(
|
||
|
5,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getDr();
|
||
|
if (f !== 0) {
|
||
|
writer.writeUint32(
|
||
|
6,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getFCntUp();
|
||
|
if (f !== 0) {
|
||
|
writer.writeUint32(
|
||
|
7,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getFPort();
|
||
|
if (f !== 0) {
|
||
|
writer.writeUint32(
|
||
|
8,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getConfirmed();
|
||
|
if (f) {
|
||
|
writer.writeBool(
|
||
|
9,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getData_asU8();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeBytes(
|
||
|
10,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getObject();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
11,
|
||
|
f,
|
||
|
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getRxInfoList();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeRepeatedMessage(
|
||
|
12,
|
||
|
f,
|
||
|
gw_gw_pb.UplinkRXInfo.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getTxInfo();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
13,
|
||
|
f,
|
||
|
gw_gw_pb.UplinkTXInfo.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Creates a deep clone of this proto. No data is shared with the original.
|
||
|
* @return {!proto.integration.UplinkEvent} The clone.
|
||
|
*/
|
||
|
proto.integration.UplinkEvent.prototype.cloneMessage = function() {
|
||
|
return /** @type {!proto.integration.UplinkEvent} */ (jspb.Message.cloneMessage(this));
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string deduplication_id = 1;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.UplinkEvent.prototype.getDeduplicationId = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.UplinkEvent.prototype.setDeduplicationId = function(value) {
|
||
|
jspb.Message.setField(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 */
|
||
|
proto.integration.UplinkEvent.prototype.setTime = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 2, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.UplinkEvent.prototype.clearTime = function() {
|
||
|
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 */
|
||
|
proto.integration.UplinkEvent.prototype.setDeviceInfo = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 3, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.UplinkEvent.prototype.clearDeviceInfo = function() {
|
||
|
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.getFieldProto3(this, 4, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.UplinkEvent.prototype.setDevAddr = function(value) {
|
||
|
jspb.Message.setField(this, 4, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional bool adr = 5;
|
||
|
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
|
||
|
* You should avoid comparisons like {@code val === true/false} in those cases.
|
||
|
* @return {boolean}
|
||
|
*/
|
||
|
proto.integration.UplinkEvent.prototype.getAdr = function() {
|
||
|
return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 5, false));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {boolean} value */
|
||
|
proto.integration.UplinkEvent.prototype.setAdr = function(value) {
|
||
|
jspb.Message.setField(this, 5, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional uint32 dr = 6;
|
||
|
* @return {number}
|
||
|
*/
|
||
|
proto.integration.UplinkEvent.prototype.getDr = function() {
|
||
|
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 6, 0));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {number} value */
|
||
|
proto.integration.UplinkEvent.prototype.setDr = function(value) {
|
||
|
jspb.Message.setField(this, 6, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional uint32 f_cnt_up = 7;
|
||
|
* @return {number}
|
||
|
*/
|
||
|
proto.integration.UplinkEvent.prototype.getFCntUp = function() {
|
||
|
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 7, 0));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {number} value */
|
||
|
proto.integration.UplinkEvent.prototype.setFCntUp = function(value) {
|
||
|
jspb.Message.setField(this, 7, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional uint32 f_port = 8;
|
||
|
* @return {number}
|
||
|
*/
|
||
|
proto.integration.UplinkEvent.prototype.getFPort = function() {
|
||
|
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 8, 0));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {number} value */
|
||
|
proto.integration.UplinkEvent.prototype.setFPort = function(value) {
|
||
|
jspb.Message.setField(this, 8, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional bool confirmed = 9;
|
||
|
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
|
||
|
* You should avoid comparisons like {@code val === true/false} in those cases.
|
||
|
* @return {boolean}
|
||
|
*/
|
||
|
proto.integration.UplinkEvent.prototype.getConfirmed = function() {
|
||
|
return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 9, false));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {boolean} value */
|
||
|
proto.integration.UplinkEvent.prototype.setConfirmed = function(value) {
|
||
|
jspb.Message.setField(this, 9, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional bytes data = 10;
|
||
|
* @return {!(string|Uint8Array)}
|
||
|
*/
|
||
|
proto.integration.UplinkEvent.prototype.getData = function() {
|
||
|
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(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 */
|
||
|
proto.integration.UplinkEvent.prototype.setData = function(value) {
|
||
|
jspb.Message.setField(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 */
|
||
|
proto.integration.UplinkEvent.prototype.setObject = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 11, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.UplinkEvent.prototype.clearObject = function() {
|
||
|
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;
|
||
|
* If you change this array by adding, removing or replacing elements, or if you
|
||
|
* replace the array itself, then you must call the setter to update it.
|
||
|
* @return {!Array.<!proto.gw.UplinkRXInfo>}
|
||
|
*/
|
||
|
proto.integration.UplinkEvent.prototype.getRxInfoList = function() {
|
||
|
return /** @type{!Array.<!proto.gw.UplinkRXInfo>} */ (
|
||
|
jspb.Message.getRepeatedWrapperField(this, gw_gw_pb.UplinkRXInfo, 12));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {Array.<!proto.gw.UplinkRXInfo>} value */
|
||
|
proto.integration.UplinkEvent.prototype.setRxInfoList = function(value) {
|
||
|
jspb.Message.setRepeatedWrapperField(this, 12, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.UplinkEvent.prototype.clearRxInfoList = function() {
|
||
|
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 */
|
||
|
proto.integration.UplinkEvent.prototype.setTxInfo = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 13, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.UplinkEvent.prototype.clearTxInfo = function() {
|
||
|
this.setTxInfo(undefined);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Returns whether this field is set.
|
||
|
* @return{!boolean}
|
||
|
*/
|
||
|
proto.integration.UplinkEvent.prototype.hasTxInfo = function() {
|
||
|
return jspb.Message.getField(this, 13) != null;
|
||
|
};
|
||
|
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Generated by JsPbCodeGenerator.
|
||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||
|
* server response, or constructed directly in Javascript. The array is used
|
||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||
|
* If no data is provided, the constructed object will be empty, but still
|
||
|
* valid.
|
||
|
* @extends {jspb.Message}
|
||
|
* @constructor
|
||
|
*/
|
||
|
proto.integration.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) {
|
||
|
proto.integration.JoinEvent.displayName = 'proto.integration.JoinEvent';
|
||
|
}
|
||
|
|
||
|
|
||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||
|
/**
|
||
|
* Creates an object representation of this proto suitable for use in Soy templates.
|
||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||
|
* For the list of reserved names please see:
|
||
|
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
||
|
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
||
|
* for transitional soy proto support: http://goto/soy-param-migration
|
||
|
* @return {!Object}
|
||
|
*/
|
||
|
proto.integration.JoinEvent.prototype.toObject = function(opt_includeInstance) {
|
||
|
return proto.integration.JoinEvent.toObject(opt_includeInstance, this);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Static version of the {@see toObject} method.
|
||
|
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
||
|
* instance for transitional soy proto support:
|
||
|
* http://goto/soy-param-migration
|
||
|
* @param {!proto.integration.JoinEvent} msg The msg instance to transform.
|
||
|
* @return {!Object}
|
||
|
*/
|
||
|
proto.integration.JoinEvent.toObject = function(includeInstance, msg) {
|
||
|
var f, obj = {
|
||
|
deduplicationId: msg.getDeduplicationId(),
|
||
|
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
|
||
|
deviceInfo: (f = msg.getDeviceInfo()) && proto.integration.DeviceInfo.toObject(includeInstance, f),
|
||
|
devAddr: msg.getDevAddr()
|
||
|
};
|
||
|
|
||
|
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;
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Class method variant: serializes the given message to binary data
|
||
|
* (in protobuf wire format), writing to the given BinaryWriter.
|
||
|
* @param {!proto.integration.JoinEvent} message
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.JoinEvent.serializeBinaryToWriter = function(message, writer) {
|
||
|
message.serializeBinaryToWriter(writer);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format).
|
||
|
* @return {!Uint8Array}
|
||
|
*/
|
||
|
proto.integration.JoinEvent.prototype.serializeBinary = function() {
|
||
|
var writer = new jspb.BinaryWriter();
|
||
|
this.serializeBinaryToWriter(writer);
|
||
|
return writer.getResultBuffer();
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format),
|
||
|
* writing to the given BinaryWriter.
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.JoinEvent.prototype.serializeBinaryToWriter = function (writer) {
|
||
|
var f = undefined;
|
||
|
f = this.getDeduplicationId();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
1,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getTime();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
2,
|
||
|
f,
|
||
|
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getDeviceInfo();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
3,
|
||
|
f,
|
||
|
proto.integration.DeviceInfo.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getDevAddr();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
4,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Creates a deep clone of this proto. No data is shared with the original.
|
||
|
* @return {!proto.integration.JoinEvent} The clone.
|
||
|
*/
|
||
|
proto.integration.JoinEvent.prototype.cloneMessage = function() {
|
||
|
return /** @type {!proto.integration.JoinEvent} */ (jspb.Message.cloneMessage(this));
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string deduplication_id = 1;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.JoinEvent.prototype.getDeduplicationId = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.JoinEvent.prototype.setDeduplicationId = function(value) {
|
||
|
jspb.Message.setField(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 */
|
||
|
proto.integration.JoinEvent.prototype.setTime = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 2, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.JoinEvent.prototype.clearTime = function() {
|
||
|
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 */
|
||
|
proto.integration.JoinEvent.prototype.setDeviceInfo = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 3, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.JoinEvent.prototype.clearDeviceInfo = function() {
|
||
|
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.getFieldProto3(this, 4, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.JoinEvent.prototype.setDevAddr = function(value) {
|
||
|
jspb.Message.setField(this, 4, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Generated by JsPbCodeGenerator.
|
||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||
|
* server response, or constructed directly in Javascript. The array is used
|
||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||
|
* If no data is provided, the constructed object will be empty, but still
|
||
|
* valid.
|
||
|
* @extends {jspb.Message}
|
||
|
* @constructor
|
||
|
*/
|
||
|
proto.integration.AckEvent = function(opt_data) {
|
||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||
|
};
|
||
|
goog.inherits(proto.integration.AckEvent, jspb.Message);
|
||
|
if (goog.DEBUG && !COMPILED) {
|
||
|
proto.integration.AckEvent.displayName = 'proto.integration.AckEvent';
|
||
|
}
|
||
|
|
||
|
|
||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||
|
/**
|
||
|
* Creates an object representation of this proto suitable for use in Soy templates.
|
||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||
|
* For the list of reserved names please see:
|
||
|
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
||
|
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
||
|
* for transitional soy proto support: http://goto/soy-param-migration
|
||
|
* @return {!Object}
|
||
|
*/
|
||
|
proto.integration.AckEvent.prototype.toObject = function(opt_includeInstance) {
|
||
|
return proto.integration.AckEvent.toObject(opt_includeInstance, this);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Static version of the {@see toObject} method.
|
||
|
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
||
|
* instance for transitional soy proto support:
|
||
|
* http://goto/soy-param-migration
|
||
|
* @param {!proto.integration.AckEvent} msg The msg instance to transform.
|
||
|
* @return {!Object}
|
||
|
*/
|
||
|
proto.integration.AckEvent.toObject = function(includeInstance, msg) {
|
||
|
var f, obj = {
|
||
|
deduplicationId: msg.getDeduplicationId(),
|
||
|
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
|
||
|
deviceInfo: (f = msg.getDeviceInfo()) && proto.integration.DeviceInfo.toObject(includeInstance, f),
|
||
|
queueItemId: msg.getQueueItemId(),
|
||
|
acknowledged: msg.getAcknowledged(),
|
||
|
fCntDown: msg.getFCntDown()
|
||
|
};
|
||
|
|
||
|
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;
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Class method variant: serializes the given message to binary data
|
||
|
* (in protobuf wire format), writing to the given BinaryWriter.
|
||
|
* @param {!proto.integration.AckEvent} message
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.AckEvent.serializeBinaryToWriter = function(message, writer) {
|
||
|
message.serializeBinaryToWriter(writer);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format).
|
||
|
* @return {!Uint8Array}
|
||
|
*/
|
||
|
proto.integration.AckEvent.prototype.serializeBinary = function() {
|
||
|
var writer = new jspb.BinaryWriter();
|
||
|
this.serializeBinaryToWriter(writer);
|
||
|
return writer.getResultBuffer();
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format),
|
||
|
* writing to the given BinaryWriter.
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.AckEvent.prototype.serializeBinaryToWriter = function (writer) {
|
||
|
var f = undefined;
|
||
|
f = this.getDeduplicationId();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
1,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getTime();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
2,
|
||
|
f,
|
||
|
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getDeviceInfo();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
3,
|
||
|
f,
|
||
|
proto.integration.DeviceInfo.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getQueueItemId();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
4,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getAcknowledged();
|
||
|
if (f) {
|
||
|
writer.writeBool(
|
||
|
5,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getFCntDown();
|
||
|
if (f !== 0) {
|
||
|
writer.writeUint32(
|
||
|
6,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Creates a deep clone of this proto. No data is shared with the original.
|
||
|
* @return {!proto.integration.AckEvent} The clone.
|
||
|
*/
|
||
|
proto.integration.AckEvent.prototype.cloneMessage = function() {
|
||
|
return /** @type {!proto.integration.AckEvent} */ (jspb.Message.cloneMessage(this));
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string deduplication_id = 1;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.AckEvent.prototype.getDeduplicationId = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.AckEvent.prototype.setDeduplicationId = function(value) {
|
||
|
jspb.Message.setField(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 */
|
||
|
proto.integration.AckEvent.prototype.setTime = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 2, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.AckEvent.prototype.clearTime = function() {
|
||
|
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 */
|
||
|
proto.integration.AckEvent.prototype.setDeviceInfo = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 3, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.AckEvent.prototype.clearDeviceInfo = function() {
|
||
|
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.getFieldProto3(this, 4, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.AckEvent.prototype.setQueueItemId = function(value) {
|
||
|
jspb.Message.setField(this, 4, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional bool acknowledged = 5;
|
||
|
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
|
||
|
* You should avoid comparisons like {@code val === true/false} in those cases.
|
||
|
* @return {boolean}
|
||
|
*/
|
||
|
proto.integration.AckEvent.prototype.getAcknowledged = function() {
|
||
|
return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 5, false));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {boolean} value */
|
||
|
proto.integration.AckEvent.prototype.setAcknowledged = function(value) {
|
||
|
jspb.Message.setField(this, 5, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional uint32 f_cnt_down = 6;
|
||
|
* @return {number}
|
||
|
*/
|
||
|
proto.integration.AckEvent.prototype.getFCntDown = function() {
|
||
|
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 6, 0));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {number} value */
|
||
|
proto.integration.AckEvent.prototype.setFCntDown = function(value) {
|
||
|
jspb.Message.setField(this, 6, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Generated by JsPbCodeGenerator.
|
||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||
|
* server response, or constructed directly in Javascript. The array is used
|
||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||
|
* If no data is provided, the constructed object will be empty, but still
|
||
|
* valid.
|
||
|
* @extends {jspb.Message}
|
||
|
* @constructor
|
||
|
*/
|
||
|
proto.integration.TxAckEvent = function(opt_data) {
|
||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||
|
};
|
||
|
goog.inherits(proto.integration.TxAckEvent, jspb.Message);
|
||
|
if (goog.DEBUG && !COMPILED) {
|
||
|
proto.integration.TxAckEvent.displayName = 'proto.integration.TxAckEvent';
|
||
|
}
|
||
|
|
||
|
|
||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||
|
/**
|
||
|
* Creates an object representation of this proto suitable for use in Soy templates.
|
||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||
|
* For the list of reserved names please see:
|
||
|
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
||
|
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
||
|
* for transitional soy proto support: http://goto/soy-param-migration
|
||
|
* @return {!Object}
|
||
|
*/
|
||
|
proto.integration.TxAckEvent.prototype.toObject = function(opt_includeInstance) {
|
||
|
return proto.integration.TxAckEvent.toObject(opt_includeInstance, this);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Static version of the {@see toObject} method.
|
||
|
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
||
|
* instance for transitional soy proto support:
|
||
|
* http://goto/soy-param-migration
|
||
|
* @param {!proto.integration.TxAckEvent} msg The msg instance to transform.
|
||
|
* @return {!Object}
|
||
|
*/
|
||
|
proto.integration.TxAckEvent.toObject = function(includeInstance, msg) {
|
||
|
var f, obj = {
|
||
|
downlinkId: msg.getDownlinkId(),
|
||
|
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
|
||
|
deviceInfo: (f = msg.getDeviceInfo()) && proto.integration.DeviceInfo.toObject(includeInstance, f),
|
||
|
queueItemId: msg.getQueueItemId(),
|
||
|
fCntDown: msg.getFCntDown(),
|
||
|
gatewayId: msg.getGatewayId(),
|
||
|
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 {string} */ (reader.readString());
|
||
|
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;
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Class method variant: serializes the given message to binary data
|
||
|
* (in protobuf wire format), writing to the given BinaryWriter.
|
||
|
* @param {!proto.integration.TxAckEvent} message
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.TxAckEvent.serializeBinaryToWriter = function(message, writer) {
|
||
|
message.serializeBinaryToWriter(writer);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format).
|
||
|
* @return {!Uint8Array}
|
||
|
*/
|
||
|
proto.integration.TxAckEvent.prototype.serializeBinary = function() {
|
||
|
var writer = new jspb.BinaryWriter();
|
||
|
this.serializeBinaryToWriter(writer);
|
||
|
return writer.getResultBuffer();
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format),
|
||
|
* writing to the given BinaryWriter.
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.TxAckEvent.prototype.serializeBinaryToWriter = function (writer) {
|
||
|
var f = undefined;
|
||
|
f = this.getDownlinkId();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
1,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getTime();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
2,
|
||
|
f,
|
||
|
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getDeviceInfo();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
3,
|
||
|
f,
|
||
|
proto.integration.DeviceInfo.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getQueueItemId();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
4,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getFCntDown();
|
||
|
if (f !== 0) {
|
||
|
writer.writeUint32(
|
||
|
5,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getGatewayId();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
6,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getTxInfo();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
7,
|
||
|
f,
|
||
|
gw_gw_pb.DownlinkTXInfo.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Creates a deep clone of this proto. No data is shared with the original.
|
||
|
* @return {!proto.integration.TxAckEvent} The clone.
|
||
|
*/
|
||
|
proto.integration.TxAckEvent.prototype.cloneMessage = function() {
|
||
|
return /** @type {!proto.integration.TxAckEvent} */ (jspb.Message.cloneMessage(this));
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string downlink_id = 1;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.TxAckEvent.prototype.getDownlinkId = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.TxAckEvent.prototype.setDownlinkId = function(value) {
|
||
|
jspb.Message.setField(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 */
|
||
|
proto.integration.TxAckEvent.prototype.setTime = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 2, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.TxAckEvent.prototype.clearTime = function() {
|
||
|
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 */
|
||
|
proto.integration.TxAckEvent.prototype.setDeviceInfo = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 3, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.TxAckEvent.prototype.clearDeviceInfo = function() {
|
||
|
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.getFieldProto3(this, 4, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.TxAckEvent.prototype.setQueueItemId = function(value) {
|
||
|
jspb.Message.setField(this, 4, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional uint32 f_cnt_down = 5;
|
||
|
* @return {number}
|
||
|
*/
|
||
|
proto.integration.TxAckEvent.prototype.getFCntDown = function() {
|
||
|
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 5, 0));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {number} value */
|
||
|
proto.integration.TxAckEvent.prototype.setFCntDown = function(value) {
|
||
|
jspb.Message.setField(this, 5, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string gateway_id = 6;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.TxAckEvent.prototype.getGatewayId = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 6, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.TxAckEvent.prototype.setGatewayId = function(value) {
|
||
|
jspb.Message.setField(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 */
|
||
|
proto.integration.TxAckEvent.prototype.setTxInfo = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 7, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.TxAckEvent.prototype.clearTxInfo = function() {
|
||
|
this.setTxInfo(undefined);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Returns whether this field is set.
|
||
|
* @return{!boolean}
|
||
|
*/
|
||
|
proto.integration.TxAckEvent.prototype.hasTxInfo = function() {
|
||
|
return jspb.Message.getField(this, 7) != null;
|
||
|
};
|
||
|
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Generated by JsPbCodeGenerator.
|
||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||
|
* server response, or constructed directly in Javascript. The array is used
|
||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||
|
* If no data is provided, the constructed object will be empty, but still
|
||
|
* valid.
|
||
|
* @extends {jspb.Message}
|
||
|
* @constructor
|
||
|
*/
|
||
|
proto.integration.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) {
|
||
|
proto.integration.LogEvent.displayName = 'proto.integration.LogEvent';
|
||
|
}
|
||
|
|
||
|
|
||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||
|
/**
|
||
|
* Creates an object representation of this proto suitable for use in Soy templates.
|
||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||
|
* For the list of reserved names please see:
|
||
|
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
||
|
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
||
|
* for transitional soy proto support: http://goto/soy-param-migration
|
||
|
* @return {!Object}
|
||
|
*/
|
||
|
proto.integration.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 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}
|
||
|
*/
|
||
|
proto.integration.LogEvent.toObject = function(includeInstance, msg) {
|
||
|
var f, obj = {
|
||
|
deduplicationId: msg.getDeduplicationId(),
|
||
|
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
|
||
|
deviceInfo: (f = msg.getDeviceInfo()) && proto.integration.DeviceInfo.toObject(includeInstance, f),
|
||
|
level: msg.getLevel(),
|
||
|
code: msg.getCode(),
|
||
|
description: msg.getDescription(),
|
||
|
contextMap: (f = msg.getContextMap(true)) ? f.toArray() : []
|
||
|
};
|
||
|
|
||
|
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 = /** @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 {!proto.integration.LogLevel} */ (reader.readEnum());
|
||
|
msg.setLevel(value);
|
||
|
break;
|
||
|
case 5:
|
||
|
var value = /** @type {!proto.integration.LogCode} */ (reader.readEnum());
|
||
|
msg.setCode(value);
|
||
|
break;
|
||
|
case 6:
|
||
|
var value = /** @type {string} */ (reader.readString());
|
||
|
msg.setDescription(value);
|
||
|
break;
|
||
|
case 7:
|
||
|
var value = msg.getContextMap();
|
||
|
reader.readMessage(value, function(message, reader) {
|
||
|
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString);
|
||
|
});
|
||
|
break;
|
||
|
default:
|
||
|
reader.skipField();
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
return msg;
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Class method variant: serializes the given message to binary data
|
||
|
* (in protobuf wire format), writing to the given BinaryWriter.
|
||
|
* @param {!proto.integration.LogEvent} message
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.LogEvent.serializeBinaryToWriter = function(message, writer) {
|
||
|
message.serializeBinaryToWriter(writer);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format).
|
||
|
* @return {!Uint8Array}
|
||
|
*/
|
||
|
proto.integration.LogEvent.prototype.serializeBinary = function() {
|
||
|
var writer = new jspb.BinaryWriter();
|
||
|
this.serializeBinaryToWriter(writer);
|
||
|
return writer.getResultBuffer();
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format),
|
||
|
* writing to the given BinaryWriter.
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.LogEvent.prototype.serializeBinaryToWriter = function (writer) {
|
||
|
var f = undefined;
|
||
|
f = this.getDeduplicationId();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
1,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getTime();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
2,
|
||
|
f,
|
||
|
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getDeviceInfo();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
3,
|
||
|
f,
|
||
|
proto.integration.DeviceInfo.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getLevel();
|
||
|
if (f !== 0.0) {
|
||
|
writer.writeEnum(
|
||
|
4,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getCode();
|
||
|
if (f !== 0.0) {
|
||
|
writer.writeEnum(
|
||
|
5,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getDescription();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
6,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getContextMap(true);
|
||
|
if (f && f.getLength() > 0) {
|
||
|
f.serializeBinary(7, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Creates a deep clone of this proto. No data is shared with the original.
|
||
|
* @return {!proto.integration.LogEvent} The clone.
|
||
|
*/
|
||
|
proto.integration.LogEvent.prototype.cloneMessage = function() {
|
||
|
return /** @type {!proto.integration.LogEvent} */ (jspb.Message.cloneMessage(this));
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string deduplication_id = 1;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.LogEvent.prototype.getDeduplicationId = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.LogEvent.prototype.setDeduplicationId = function(value) {
|
||
|
jspb.Message.setField(this, 1, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional google.protobuf.Timestamp time = 2;
|
||
|
* @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, 2));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {proto.google.protobuf.Timestamp|undefined} value */
|
||
|
proto.integration.LogEvent.prototype.setTime = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 2, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.LogEvent.prototype.clearTime = function() {
|
||
|
this.setTime(undefined);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Returns whether this field is set.
|
||
|
* @return{!boolean}
|
||
|
*/
|
||
|
proto.integration.LogEvent.prototype.hasTime = function() {
|
||
|
return jspb.Message.getField(this, 2) != null;
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional DeviceInfo device_info = 3;
|
||
|
* @return {proto.integration.DeviceInfo}
|
||
|
*/
|
||
|
proto.integration.LogEvent.prototype.getDeviceInfo = function() {
|
||
|
return /** @type{proto.integration.DeviceInfo} */ (
|
||
|
jspb.Message.getWrapperField(this, proto.integration.DeviceInfo, 3));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {proto.integration.DeviceInfo|undefined} value */
|
||
|
proto.integration.LogEvent.prototype.setDeviceInfo = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 3, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.LogEvent.prototype.clearDeviceInfo = function() {
|
||
|
this.setDeviceInfo(undefined);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Returns whether this field is set.
|
||
|
* @return{!boolean}
|
||
|
*/
|
||
|
proto.integration.LogEvent.prototype.hasDeviceInfo = function() {
|
||
|
return jspb.Message.getField(this, 3) != null;
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional LogLevel level = 4;
|
||
|
* @return {!proto.integration.LogLevel}
|
||
|
*/
|
||
|
proto.integration.LogEvent.prototype.getLevel = function() {
|
||
|
return /** @type {!proto.integration.LogLevel} */ (jspb.Message.getFieldProto3(this, 4, 0));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {!proto.integration.LogLevel} value */
|
||
|
proto.integration.LogEvent.prototype.setLevel = function(value) {
|
||
|
jspb.Message.setField(this, 4, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional LogCode code = 5;
|
||
|
* @return {!proto.integration.LogCode}
|
||
|
*/
|
||
|
proto.integration.LogEvent.prototype.getCode = function() {
|
||
|
return /** @type {!proto.integration.LogCode} */ (jspb.Message.getFieldProto3(this, 5, 0));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {!proto.integration.LogCode} value */
|
||
|
proto.integration.LogEvent.prototype.setCode = function(value) {
|
||
|
jspb.Message.setField(this, 5, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string description = 6;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.LogEvent.prototype.getDescription = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 6, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.LogEvent.prototype.setDescription = function(value) {
|
||
|
jspb.Message.setField(this, 6, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* map<string, string> context = 7;
|
||
|
* @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, 7, opt_noLazyCreate,
|
||
|
null));
|
||
|
};
|
||
|
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Generated by JsPbCodeGenerator.
|
||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||
|
* server response, or constructed directly in Javascript. The array is used
|
||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||
|
* If no data is provided, the constructed object will be empty, but still
|
||
|
* valid.
|
||
|
* @extends {jspb.Message}
|
||
|
* @constructor
|
||
|
*/
|
||
|
proto.integration.StatusEvent = function(opt_data) {
|
||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||
|
};
|
||
|
goog.inherits(proto.integration.StatusEvent, jspb.Message);
|
||
|
if (goog.DEBUG && !COMPILED) {
|
||
|
proto.integration.StatusEvent.displayName = 'proto.integration.StatusEvent';
|
||
|
}
|
||
|
|
||
|
|
||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||
|
/**
|
||
|
* Creates an object representation of this proto suitable for use in Soy templates.
|
||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||
|
* For the list of reserved names please see:
|
||
|
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
||
|
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
||
|
* for transitional soy proto support: http://goto/soy-param-migration
|
||
|
* @return {!Object}
|
||
|
*/
|
||
|
proto.integration.StatusEvent.prototype.toObject = function(opt_includeInstance) {
|
||
|
return proto.integration.StatusEvent.toObject(opt_includeInstance, this);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Static version of the {@see toObject} method.
|
||
|
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
||
|
* instance for transitional soy proto support:
|
||
|
* http://goto/soy-param-migration
|
||
|
* @param {!proto.integration.StatusEvent} msg The msg instance to transform.
|
||
|
* @return {!Object}
|
||
|
*/
|
||
|
proto.integration.StatusEvent.toObject = function(includeInstance, msg) {
|
||
|
var f, obj = {
|
||
|
deduplicationId: msg.getDeduplicationId(),
|
||
|
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
|
||
|
deviceInfo: (f = msg.getDeviceInfo()) && proto.integration.DeviceInfo.toObject(includeInstance, f),
|
||
|
margin: msg.getMargin(),
|
||
|
externalPowerSource: msg.getExternalPowerSource(),
|
||
|
batteryLevelUnavailable: msg.getBatteryLevelUnavailable(),
|
||
|
batteryLevel: msg.getBatteryLevel()
|
||
|
};
|
||
|
|
||
|
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;
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Class method variant: serializes the given message to binary data
|
||
|
* (in protobuf wire format), writing to the given BinaryWriter.
|
||
|
* @param {!proto.integration.StatusEvent} message
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.StatusEvent.serializeBinaryToWriter = function(message, writer) {
|
||
|
message.serializeBinaryToWriter(writer);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format).
|
||
|
* @return {!Uint8Array}
|
||
|
*/
|
||
|
proto.integration.StatusEvent.prototype.serializeBinary = function() {
|
||
|
var writer = new jspb.BinaryWriter();
|
||
|
this.serializeBinaryToWriter(writer);
|
||
|
return writer.getResultBuffer();
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format),
|
||
|
* writing to the given BinaryWriter.
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.StatusEvent.prototype.serializeBinaryToWriter = function (writer) {
|
||
|
var f = undefined;
|
||
|
f = this.getDeduplicationId();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
1,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getTime();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
2,
|
||
|
f,
|
||
|
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getDeviceInfo();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
3,
|
||
|
f,
|
||
|
proto.integration.DeviceInfo.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getMargin();
|
||
|
if (f !== 0) {
|
||
|
writer.writeInt32(
|
||
|
5,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getExternalPowerSource();
|
||
|
if (f) {
|
||
|
writer.writeBool(
|
||
|
6,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getBatteryLevelUnavailable();
|
||
|
if (f) {
|
||
|
writer.writeBool(
|
||
|
7,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getBatteryLevel();
|
||
|
if (f !== 0.0) {
|
||
|
writer.writeFloat(
|
||
|
8,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Creates a deep clone of this proto. No data is shared with the original.
|
||
|
* @return {!proto.integration.StatusEvent} The clone.
|
||
|
*/
|
||
|
proto.integration.StatusEvent.prototype.cloneMessage = function() {
|
||
|
return /** @type {!proto.integration.StatusEvent} */ (jspb.Message.cloneMessage(this));
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string deduplication_id = 1;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.StatusEvent.prototype.getDeduplicationId = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.StatusEvent.prototype.setDeduplicationId = function(value) {
|
||
|
jspb.Message.setField(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 */
|
||
|
proto.integration.StatusEvent.prototype.setTime = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 2, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.StatusEvent.prototype.clearTime = function() {
|
||
|
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 */
|
||
|
proto.integration.StatusEvent.prototype.setDeviceInfo = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 3, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.StatusEvent.prototype.clearDeviceInfo = function() {
|
||
|
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.getFieldProto3(this, 5, 0));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {number} value */
|
||
|
proto.integration.StatusEvent.prototype.setMargin = function(value) {
|
||
|
jspb.Message.setField(this, 5, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional bool external_power_source = 6;
|
||
|
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
|
||
|
* You should avoid comparisons like {@code val === true/false} in those cases.
|
||
|
* @return {boolean}
|
||
|
*/
|
||
|
proto.integration.StatusEvent.prototype.getExternalPowerSource = function() {
|
||
|
return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 6, false));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {boolean} value */
|
||
|
proto.integration.StatusEvent.prototype.setExternalPowerSource = function(value) {
|
||
|
jspb.Message.setField(this, 6, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional bool battery_level_unavailable = 7;
|
||
|
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
|
||
|
* You should avoid comparisons like {@code val === true/false} in those cases.
|
||
|
* @return {boolean}
|
||
|
*/
|
||
|
proto.integration.StatusEvent.prototype.getBatteryLevelUnavailable = function() {
|
||
|
return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 7, false));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {boolean} value */
|
||
|
proto.integration.StatusEvent.prototype.setBatteryLevelUnavailable = function(value) {
|
||
|
jspb.Message.setField(this, 7, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional float battery_level = 8;
|
||
|
* @return {number}
|
||
|
*/
|
||
|
proto.integration.StatusEvent.prototype.getBatteryLevel = function() {
|
||
|
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 8, 0));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {number} value */
|
||
|
proto.integration.StatusEvent.prototype.setBatteryLevel = function(value) {
|
||
|
jspb.Message.setField(this, 8, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
|
||
|
/**
|
||
|
* 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) {
|
||
|
proto.integration.LocationEvent.displayName = 'proto.integration.LocationEvent';
|
||
|
}
|
||
|
|
||
|
|
||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||
|
/**
|
||
|
* Creates an object representation of this proto suitable for use in Soy templates.
|
||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||
|
* For the list of reserved names please see:
|
||
|
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
||
|
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
||
|
* for transitional soy proto support: http://goto/soy-param-migration
|
||
|
* @return {!Object}
|
||
|
*/
|
||
|
proto.integration.LocationEvent.prototype.toObject = function(opt_includeInstance) {
|
||
|
return proto.integration.LocationEvent.toObject(opt_includeInstance, this);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Static version of the {@see toObject} method.
|
||
|
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
||
|
* instance for transitional soy proto support:
|
||
|
* http://goto/soy-param-migration
|
||
|
* @param {!proto.integration.LocationEvent} msg The msg instance to transform.
|
||
|
* @return {!Object}
|
||
|
*/
|
||
|
proto.integration.LocationEvent.toObject = function(includeInstance, msg) {
|
||
|
var f, obj = {
|
||
|
deduplicationId: msg.getDeduplicationId(),
|
||
|
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;
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Class method variant: serializes the given message to binary data
|
||
|
* (in protobuf wire format), writing to the given BinaryWriter.
|
||
|
* @param {!proto.integration.LocationEvent} message
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.LocationEvent.serializeBinaryToWriter = function(message, writer) {
|
||
|
message.serializeBinaryToWriter(writer);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format).
|
||
|
* @return {!Uint8Array}
|
||
|
*/
|
||
|
proto.integration.LocationEvent.prototype.serializeBinary = function() {
|
||
|
var writer = new jspb.BinaryWriter();
|
||
|
this.serializeBinaryToWriter(writer);
|
||
|
return writer.getResultBuffer();
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format),
|
||
|
* writing to the given BinaryWriter.
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.LocationEvent.prototype.serializeBinaryToWriter = function (writer) {
|
||
|
var f = undefined;
|
||
|
f = this.getDeduplicationId();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
1,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getTime();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
2,
|
||
|
f,
|
||
|
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getDeviceInfo();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
3,
|
||
|
f,
|
||
|
proto.integration.DeviceInfo.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getLocation();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
4,
|
||
|
f,
|
||
|
common_common_pb.Location.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Creates a deep clone of this proto. No data is shared with the original.
|
||
|
* @return {!proto.integration.LocationEvent} The clone.
|
||
|
*/
|
||
|
proto.integration.LocationEvent.prototype.cloneMessage = function() {
|
||
|
return /** @type {!proto.integration.LocationEvent} */ (jspb.Message.cloneMessage(this));
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string deduplication_id = 1;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.LocationEvent.prototype.getDeduplicationId = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.LocationEvent.prototype.setDeduplicationId = function(value) {
|
||
|
jspb.Message.setField(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 */
|
||
|
proto.integration.LocationEvent.prototype.setTime = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 2, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.LocationEvent.prototype.clearTime = function() {
|
||
|
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 */
|
||
|
proto.integration.LocationEvent.prototype.setDeviceInfo = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 3, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.LocationEvent.prototype.clearDeviceInfo = function() {
|
||
|
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 */
|
||
|
proto.integration.LocationEvent.prototype.setLocation = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 4, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.LocationEvent.prototype.clearLocation = function() {
|
||
|
this.setLocation(undefined);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Returns whether this field is set.
|
||
|
* @return{!boolean}
|
||
|
*/
|
||
|
proto.integration.LocationEvent.prototype.hasLocation = function() {
|
||
|
return jspb.Message.getField(this, 4) != null;
|
||
|
};
|
||
|
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Generated by JsPbCodeGenerator.
|
||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||
|
* server response, or constructed directly in Javascript. The array is used
|
||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||
|
* If no data is provided, the constructed object will be empty, but still
|
||
|
* valid.
|
||
|
* @extends {jspb.Message}
|
||
|
* @constructor
|
||
|
*/
|
||
|
proto.integration.IntegrationEvent = function(opt_data) {
|
||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||
|
};
|
||
|
goog.inherits(proto.integration.IntegrationEvent, jspb.Message);
|
||
|
if (goog.DEBUG && !COMPILED) {
|
||
|
proto.integration.IntegrationEvent.displayName = 'proto.integration.IntegrationEvent';
|
||
|
}
|
||
|
|
||
|
|
||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||
|
/**
|
||
|
* Creates an object representation of this proto suitable for use in Soy templates.
|
||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||
|
* For the list of reserved names please see:
|
||
|
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
||
|
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
||
|
* for transitional soy proto support: http://goto/soy-param-migration
|
||
|
* @return {!Object}
|
||
|
*/
|
||
|
proto.integration.IntegrationEvent.prototype.toObject = function(opt_includeInstance) {
|
||
|
return proto.integration.IntegrationEvent.toObject(opt_includeInstance, this);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Static version of the {@see toObject} method.
|
||
|
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
||
|
* instance for transitional soy proto support:
|
||
|
* http://goto/soy-param-migration
|
||
|
* @param {!proto.integration.IntegrationEvent} msg The msg instance to transform.
|
||
|
* @return {!Object}
|
||
|
*/
|
||
|
proto.integration.IntegrationEvent.toObject = function(includeInstance, msg) {
|
||
|
var f, obj = {
|
||
|
deduplicationId: msg.getDeduplicationId(),
|
||
|
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
|
||
|
deviceInfo: (f = msg.getDeviceInfo()) && proto.integration.DeviceInfo.toObject(includeInstance, f),
|
||
|
integrationName: msg.getIntegrationName(),
|
||
|
eventType: msg.getEventType(),
|
||
|
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;
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Class method variant: serializes the given message to binary data
|
||
|
* (in protobuf wire format), writing to the given BinaryWriter.
|
||
|
* @param {!proto.integration.IntegrationEvent} message
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.IntegrationEvent.serializeBinaryToWriter = function(message, writer) {
|
||
|
message.serializeBinaryToWriter(writer);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format).
|
||
|
* @return {!Uint8Array}
|
||
|
*/
|
||
|
proto.integration.IntegrationEvent.prototype.serializeBinary = function() {
|
||
|
var writer = new jspb.BinaryWriter();
|
||
|
this.serializeBinaryToWriter(writer);
|
||
|
return writer.getResultBuffer();
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Serializes the message to binary data (in protobuf wire format),
|
||
|
* writing to the given BinaryWriter.
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
*/
|
||
|
proto.integration.IntegrationEvent.prototype.serializeBinaryToWriter = function (writer) {
|
||
|
var f = undefined;
|
||
|
f = this.getDeduplicationId();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
1,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getTime();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
2,
|
||
|
f,
|
||
|
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getDeviceInfo();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
3,
|
||
|
f,
|
||
|
proto.integration.DeviceInfo.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
f = this.getIntegrationName();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
4,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getEventType();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeString(
|
||
|
5,
|
||
|
f
|
||
|
);
|
||
|
}
|
||
|
f = this.getObject();
|
||
|
if (f != null) {
|
||
|
writer.writeMessage(
|
||
|
6,
|
||
|
f,
|
||
|
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
|
||
|
);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Creates a deep clone of this proto. No data is shared with the original.
|
||
|
* @return {!proto.integration.IntegrationEvent} The clone.
|
||
|
*/
|
||
|
proto.integration.IntegrationEvent.prototype.cloneMessage = function() {
|
||
|
return /** @type {!proto.integration.IntegrationEvent} */ (jspb.Message.cloneMessage(this));
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string deduplication_id = 1;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.IntegrationEvent.prototype.getDeduplicationId = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.IntegrationEvent.prototype.setDeduplicationId = function(value) {
|
||
|
jspb.Message.setField(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 */
|
||
|
proto.integration.IntegrationEvent.prototype.setTime = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 2, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.IntegrationEvent.prototype.clearTime = function() {
|
||
|
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 */
|
||
|
proto.integration.IntegrationEvent.prototype.setDeviceInfo = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 3, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.IntegrationEvent.prototype.clearDeviceInfo = function() {
|
||
|
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.getFieldProto3(this, 4, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.IntegrationEvent.prototype.setIntegrationName = function(value) {
|
||
|
jspb.Message.setField(this, 4, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string event_type = 5;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.integration.IntegrationEvent.prototype.getEventType = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 5, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/** @param {string} value */
|
||
|
proto.integration.IntegrationEvent.prototype.setEventType = function(value) {
|
||
|
jspb.Message.setField(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 */
|
||
|
proto.integration.IntegrationEvent.prototype.setObject = function(value) {
|
||
|
jspb.Message.setWrapperField(this, 6, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
proto.integration.IntegrationEvent.prototype.clearObject = function() {
|
||
|
this.setObject(undefined);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Returns whether this field is set.
|
||
|
* @return{!boolean}
|
||
|
*/
|
||
|
proto.integration.IntegrationEvent.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);
|