Re-generate API code.

This commit is contained in:
Orne Brocaar
2023-06-14 13:11:46 +01:00
parent ba7b262323
commit 087a27f904
30 changed files with 1842 additions and 1443 deletions

View File

@ -451,7 +451,8 @@ flushDevNonces: {
responseSerialize: serialize_google_protobuf_Empty,
responseDeserialize: deserialize_google_protobuf_Empty,
},
// Activate (re)activates the device with the given parameters (for ABP or for importing OTAA activations).
// Activate (re)activates the device with the given parameters (for ABP or for
// importing OTAA activations).
activate: {
path: '/api.DeviceService/Activate',
requestStream: false,
@ -475,7 +476,8 @@ deactivate: {
responseSerialize: serialize_google_protobuf_Empty,
responseDeserialize: deserialize_google_protobuf_Empty,
},
// GetActivation returns the current activation details of the device (OTAA or ABP).
// GetActivation returns the current activation details of the device (OTAA or
// ABP).
getActivation: {
path: '/api.DeviceService/GetActivation',
requestStream: false,
@ -487,7 +489,8 @@ getActivation: {
responseSerialize: serialize_api_GetDeviceActivationResponse,
responseDeserialize: deserialize_api_GetDeviceActivationResponse,
},
// GetRandomDevAddr returns a random DevAddr taking the NwkID prefix into account.
// GetRandomDevAddr returns a random DevAddr taking the NwkID prefix into
// account.
getRandomDevAddr: {
path: '/api.DeviceService/GetRandomDevAddr',
requestStream: false,
@ -500,7 +503,8 @@ getRandomDevAddr: {
responseDeserialize: deserialize_api_GetRandomDevAddrResponse,
},
// GetMetrics returns the device metrics.
// Note that this requires a device-profile with codec and measurements configured.
// Note that this requires a device-profile with codec and measurements
// configured.
getMetrics: {
path: '/api.DeviceService/GetMetrics',
requestStream: false,

View File

@ -246,6 +246,9 @@ export class GetDeviceResponse extends jspb.Message {
getDeviceStatus(): DeviceStatus | undefined;
setDeviceStatus(value?: DeviceStatus): void;
getClassEnabled(): common_common_pb.DeviceClassMap[keyof common_common_pb.DeviceClassMap];
setClassEnabled(value: common_common_pb.DeviceClassMap[keyof common_common_pb.DeviceClassMap]): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetDeviceResponse.AsObject;
static toObject(includeInstance: boolean, msg: GetDeviceResponse): GetDeviceResponse.AsObject;
@ -263,6 +266,7 @@ export namespace GetDeviceResponse {
updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject,
lastSeenAt?: google_protobuf_timestamp_pb.Timestamp.AsObject,
deviceStatus?: DeviceStatus.AsObject,
classEnabled: common_common_pb.DeviceClassMap[keyof common_common_pb.DeviceClassMap],
}
}

View File

@ -2349,7 +2349,8 @@ proto.api.GetDeviceResponse.toObject = function(includeInstance, msg) {
createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
lastSeenAt: (f = msg.getLastSeenAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
deviceStatus: (f = msg.getDeviceStatus()) && proto.api.DeviceStatus.toObject(includeInstance, f)
deviceStatus: (f = msg.getDeviceStatus()) && proto.api.DeviceStatus.toObject(includeInstance, f),
classEnabled: jspb.Message.getFieldWithDefault(msg, 6, 0)
};
if (includeInstance) {
@ -2411,6 +2412,10 @@ proto.api.GetDeviceResponse.deserializeBinaryFromReader = function(msg, reader)
reader.readMessage(value,proto.api.DeviceStatus.deserializeBinaryFromReader);
msg.setDeviceStatus(value);
break;
case 6:
var value = /** @type {!proto.common.DeviceClass} */ (reader.readEnum());
msg.setClassEnabled(value);
break;
default:
reader.skipField();
break;
@ -2480,6 +2485,13 @@ proto.api.GetDeviceResponse.serializeBinaryToWriter = function(message, writer)
proto.api.DeviceStatus.serializeBinaryToWriter
);
}
f = message.getClassEnabled();
if (f !== 0.0) {
writer.writeEnum(
6,
f
);
}
};
@ -2668,6 +2680,24 @@ proto.api.GetDeviceResponse.prototype.hasDeviceStatus = function() {
};
/**
* optional common.DeviceClass class_enabled = 6;
* @return {!proto.common.DeviceClass}
*/
proto.api.GetDeviceResponse.prototype.getClassEnabled = function() {
return /** @type {!proto.common.DeviceClass} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/**
* @param {!proto.common.DeviceClass} value
* @return {!proto.api.GetDeviceResponse} returns this
*/
proto.api.GetDeviceResponse.prototype.setClassEnabled = function(value) {
return jspb.Message.setProto3EnumField(this, 6, value);
};

View File

@ -218,3 +218,11 @@ export interface MetricKindMap {
export const MetricKind: MetricKindMap;
export interface DeviceClassMap {
CLASS_A: 0;
CLASS_B: 1;
CLASS_C: 2;
}
export const DeviceClass: DeviceClassMap;

View File

@ -15,6 +15,7 @@ var global = Function('return this')();
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
goog.exportSymbol('proto.common.Aggregation', null, global);
goog.exportSymbol('proto.common.DeviceClass', null, global);
goog.exportSymbol('proto.common.KeyEnvelope', null, global);
goog.exportSymbol('proto.common.Location', null, global);
goog.exportSymbol('proto.common.LocationSource', null, global);
@ -1101,4 +1102,13 @@ proto.common.MetricKind = {
GAUGE: 2
};
/**
* @enum {number}
*/
proto.common.DeviceClass = {
CLASS_A: 0,
CLASS_B: 1,
CLASS_C: 2
};
goog.object.extend(exports, proto.common);

View File

@ -32,6 +32,9 @@ export class DeviceInfo extends jspb.Message {
getDevEui(): string;
setDevEui(value: string): void;
getDeviceClassEnabled(): common_common_pb.DeviceClassMap[keyof common_common_pb.DeviceClassMap];
setDeviceClassEnabled(value: common_common_pb.DeviceClassMap[keyof common_common_pb.DeviceClassMap]): void;
getTagsMap(): jspb.Map<string, string>;
clearTagsMap(): void;
serializeBinary(): Uint8Array;
@ -54,6 +57,7 @@ export namespace DeviceInfo {
deviceProfileName: string,
deviceName: string,
devEui: string,
deviceClassEnabled: common_common_pb.DeviceClassMap[keyof common_common_pb.DeviceClassMap],
tagsMap: Array<[string, string]>,
}
}

View File

@ -304,6 +304,7 @@ proto.integration.DeviceInfo.toObject = function(includeInstance, msg) {
deviceProfileName: jspb.Message.getFieldWithDefault(msg, 6, ""),
deviceName: jspb.Message.getFieldWithDefault(msg, 7, ""),
devEui: jspb.Message.getFieldWithDefault(msg, 8, ""),
deviceClassEnabled: jspb.Message.getFieldWithDefault(msg, 10, 0),
tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : []
};
@ -373,6 +374,10 @@ proto.integration.DeviceInfo.deserializeBinaryFromReader = function(msg, reader)
var value = /** @type {string} */ (reader.readString());
msg.setDevEui(value);
break;
case 10:
var value = /** @type {!proto.common.DeviceClass} */ (reader.readEnum());
msg.setDeviceClassEnabled(value);
break;
case 9:
var value = msg.getTagsMap();
reader.readMessage(value, function(message, reader) {
@ -464,6 +469,13 @@ proto.integration.DeviceInfo.serializeBinaryToWriter = function(message, writer)
f
);
}
f = message.getDeviceClassEnabled();
if (f !== 0.0) {
writer.writeEnum(
10,
f
);
}
f = message.getTagsMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
@ -615,6 +627,24 @@ proto.integration.DeviceInfo.prototype.setDevEui = function(value) {
};
/**
* optional common.DeviceClass device_class_enabled = 10;
* @return {!proto.common.DeviceClass}
*/
proto.integration.DeviceInfo.prototype.getDeviceClassEnabled = function() {
return /** @type {!proto.common.DeviceClass} */ (jspb.Message.getFieldWithDefault(this, 10, 0));
};
/**
* @param {!proto.common.DeviceClass} value
* @return {!proto.integration.DeviceInfo} returns this
*/
proto.integration.DeviceInfo.prototype.setDeviceClassEnabled = function(value) {
return jspb.Message.setProto3EnumField(this, 10, value);
};
/**
* map<string, string> tags = 9;
* @param {boolean=} opt_noLazyCreate Do not create the map if