Update JS payload codec configuration and templates.

This commit is contained in:
Orne Brocaar 2022-04-27 09:49:33 +01:00
parent f2e6d77ce4
commit d69ff895b6
19 changed files with 320 additions and 376 deletions

View File

@ -97,10 +97,8 @@ type DeviceProfile struct {
AdrAlgorithmId string `protobuf:"bytes,7,opt,name=adr_algorithm_id,json=adrAlgorithmId,proto3" json:"adr_algorithm_id,omitempty"`
// Payload codec runtime.
PayloadCodecRuntime CodecRuntime `protobuf:"varint,8,opt,name=payload_codec_runtime,json=payloadCodecRuntime,proto3,enum=api.CodecRuntime" json:"payload_codec_runtime,omitempty"`
// Payload codec encoder config.
PayloadEncoderConfig string `protobuf:"bytes,9,opt,name=payload_encoder_config,json=payloadEncoderConfig,proto3" json:"payload_encoder_config,omitempty"`
// Payload codec decoder config.
PayloadDecoderConfig string `protobuf:"bytes,10,opt,name=payload_decoder_config,json=payloadDecoderConfig,proto3" json:"payload_decoder_config,omitempty"`
// Payload codec script.
PayloadCodecScript string `protobuf:"bytes,9,opt,name=payload_codec_script,json=payloadCodecScript,proto3" json:"payload_codec_script,omitempty"`
// Uplink interval (seconds).
// This defines the expected uplink interval which the device uses for
// communication. When the uplink interval has expired and no uplink has
@ -228,16 +226,9 @@ func (x *DeviceProfile) GetPayloadCodecRuntime() CodecRuntime {
return CodecRuntime_NONE
}
func (x *DeviceProfile) GetPayloadEncoderConfig() string {
func (x *DeviceProfile) GetPayloadCodecScript() string {
if x != nil {
return x.PayloadEncoderConfig
}
return ""
}
func (x *DeviceProfile) GetPayloadDecoderConfig() string {
if x != nil {
return x.PayloadDecoderConfig
return x.PayloadCodecScript
}
return ""
}
@ -1038,7 +1029,7 @@ var file_api_device_profile_proto_rawDesc = []byte{
0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x63,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0x9a, 0x09, 0x0a, 0x0d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0xe0, 0x08, 0x0a, 0x0d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49,
@ -1060,104 +1051,57 @@ var file_api_device_profile_proto_rawDesc = []byte{
0x61, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65,
0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x64,
0x65, 0x63, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x13, 0x70, 0x61, 0x79, 0x6c, 0x6f,
0x61, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x34,
0x0a, 0x16, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65,
0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14,
0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x43, 0x6f,
0x6e, 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f,
0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0a,
0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x65, 0x63,
0x6f, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x75, 0x70,
0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0b, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x0e, 0x75, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72,
0x76, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x1a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74,
0x61, 0x74, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61,
0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x17, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x6f, 0x74, 0x61,
0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74,
0x73, 0x4f, 0x74, 0x61, 0x61, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74,
0x73, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x62, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52,
0x0e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x42, 0x12,
0x28, 0x0a, 0x10, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x63, 0x6c, 0x61, 0x73,
0x73, 0x5f, 0x63, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x75, 0x70, 0x70, 0x6f,
0x72, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x6c, 0x61,
0x73, 0x73, 0x5f, 0x62, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x10, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x0d, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x42, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x12, 0x36, 0x0a, 0x18, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x62, 0x5f, 0x70, 0x69, 0x6e,
0x67, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x11, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x14, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x42, 0x50, 0x69, 0x6e, 0x67, 0x53,
0x6c, 0x6f, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x2e, 0x0a, 0x14, 0x63, 0x6c, 0x61,
0x73, 0x73, 0x5f, 0x62, 0x5f, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x5f, 0x64,
0x72, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x42, 0x50,
0x69, 0x6e, 0x67, 0x53, 0x6c, 0x6f, 0x74, 0x44, 0x72, 0x12, 0x32, 0x0a, 0x16, 0x63, 0x6c, 0x61,
0x73, 0x73, 0x5f, 0x62, 0x5f, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x5f, 0x66,
0x72, 0x65, 0x71, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x63, 0x6c, 0x61, 0x73, 0x73,
0x42, 0x50, 0x69, 0x6e, 0x67, 0x53, 0x6c, 0x6f, 0x74, 0x46, 0x72, 0x65, 0x71, 0x12, 0x26, 0x0a,
0x0f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x54, 0x69,
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x62, 0x70, 0x5f, 0x72, 0x78, 0x31,
0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x61, 0x62,
0x70, 0x52, 0x78, 0x31, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x29, 0x0a, 0x11, 0x61, 0x62, 0x70,
0x5f, 0x72, 0x78, 0x31, 0x5f, 0x64, 0x72, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x16,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x61, 0x62, 0x70, 0x52, 0x78, 0x31, 0x44, 0x72, 0x4f, 0x66,
0x66, 0x73, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x0a, 0x61, 0x62, 0x70, 0x5f, 0x72, 0x78, 0x32, 0x5f,
0x64, 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x61, 0x62, 0x70, 0x52, 0x78, 0x32,
0x44, 0x72, 0x12, 0x20, 0x0a, 0x0c, 0x61, 0x62, 0x70, 0x5f, 0x72, 0x78, 0x32, 0x5f, 0x66, 0x72,
0x65, 0x71, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x61, 0x62, 0x70, 0x52, 0x78, 0x32,
0x46, 0x72, 0x65, 0x71, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x19, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50,
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
0xd2, 0x03, 0x0a, 0x15, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c,
0x65, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65,
0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f,
0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67,
0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x0b, 0x6d,
0x61, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x63, 0x56, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6d, 0x61, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x49, 0x0a, 0x13, 0x72, 0x65, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x72,
0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e,
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x72, 0x65, 0x67, 0x50, 0x61, 0x72,
0x61, 0x6d, 0x73, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73,
0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x6f, 0x74, 0x61, 0x61, 0x18, 0x08, 0x20, 0x01,
0x28, 0x08, 0x52, 0x0c, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x4f, 0x74, 0x61, 0x61,
0x12, 0x28, 0x0a, 0x10, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x63, 0x6c, 0x61,
0x73, 0x73, 0x5f, 0x62, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x75, 0x70, 0x70,
0x6f, 0x72, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x42, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x75,
0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x63, 0x18, 0x0a,
0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x43, 0x6c,
0x61, 0x73, 0x73, 0x43, 0x22, 0x57, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65,
0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x39, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x0d,
0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x2d, 0x0a,
0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x29, 0x0a, 0x17,
0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xcb, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x44,
0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70,
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
0x52, 0x0d, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12,
0x61, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x30,
0x0a, 0x14, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x5f,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x61,
0x79, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74,
0x12, 0x27, 0x0a, 0x0f, 0x75, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x76, 0x61, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x75, 0x70, 0x6c, 0x69, 0x6e,
0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x1a, 0x64, 0x65, 0x76,
0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x5f, 0x69,
0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x17, 0x64,
0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x49, 0x6e,
0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72,
0x74, 0x73, 0x5f, 0x6f, 0x74, 0x61, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73,
0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x4f, 0x74, 0x61, 0x61, 0x12, 0x28, 0x0a, 0x10, 0x73,
0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x62, 0x18,
0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x43,
0x6c, 0x61, 0x73, 0x73, 0x42, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74,
0x73, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x63, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52,
0x0e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x12,
0x26, 0x0a, 0x0f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x62, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f,
0x75, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x42,
0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x36, 0x0a, 0x18, 0x63, 0x6c, 0x61, 0x73, 0x73,
0x5f, 0x62, 0x5f, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x5f, 0x70, 0x65, 0x72,
0x69, 0x6f, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x14, 0x63, 0x6c, 0x61, 0x73, 0x73,
0x42, 0x50, 0x69, 0x6e, 0x67, 0x53, 0x6c, 0x6f, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12,
0x2e, 0x0a, 0x14, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x62, 0x5f, 0x70, 0x69, 0x6e, 0x67, 0x5f,
0x73, 0x6c, 0x6f, 0x74, 0x5f, 0x64, 0x72, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x63,
0x6c, 0x61, 0x73, 0x73, 0x42, 0x50, 0x69, 0x6e, 0x67, 0x53, 0x6c, 0x6f, 0x74, 0x44, 0x72, 0x12,
0x32, 0x0a, 0x16, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x62, 0x5f, 0x70, 0x69, 0x6e, 0x67, 0x5f,
0x73, 0x6c, 0x6f, 0x74, 0x5f, 0x66, 0x72, 0x65, 0x71, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x12, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x42, 0x50, 0x69, 0x6e, 0x67, 0x53, 0x6c, 0x6f, 0x74, 0x46,
0x72, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x63, 0x5f, 0x74,
0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x63, 0x6c,
0x61, 0x73, 0x73, 0x43, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x61,
0x62, 0x70, 0x5f, 0x72, 0x78, 0x31, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x15, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x0b, 0x61, 0x62, 0x70, 0x52, 0x78, 0x31, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12,
0x29, 0x0a, 0x11, 0x61, 0x62, 0x70, 0x5f, 0x72, 0x78, 0x31, 0x5f, 0x64, 0x72, 0x5f, 0x6f, 0x66,
0x66, 0x73, 0x65, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x61, 0x62, 0x70, 0x52,
0x78, 0x31, 0x44, 0x72, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x0a, 0x61, 0x62,
0x70, 0x5f, 0x72, 0x78, 0x32, 0x5f, 0x64, 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08,
0x61, 0x62, 0x70, 0x52, 0x78, 0x32, 0x44, 0x72, 0x12, 0x20, 0x0a, 0x0c, 0x61, 0x62, 0x70, 0x5f,
0x72, 0x78, 0x32, 0x5f, 0x66, 0x72, 0x65, 0x71, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a,
0x61, 0x62, 0x70, 0x52, 0x78, 0x32, 0x46, 0x72, 0x65, 0x71, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x61,
0x67, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44,
0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x54, 0x61, 0x67,
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x1a, 0x37, 0x0a, 0x09,
0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd2, 0x03, 0x0a, 0x15, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
@ -1165,81 +1109,125 @@ var file_api_device_profile_proto_rawDesc = []byte{
0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61,
0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x57, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44,
0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72,
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52,
0x0d, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x2c,
0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72,
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x7e, 0x0a, 0x19,
0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c,
0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d,
0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12,
0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x61, 0x72, 0x63,
0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12,
0x1b, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x71, 0x0a, 0x1a,
0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c,
0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f,
0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x06, 0x72,
0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x4c,
0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22,
0x7c, 0x0a, 0x26, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x41, 0x64, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74,
0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a,
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x72, 0x65,
0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x41, 0x64, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x4c, 0x69, 0x73,
0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x0a,
0x14, 0x41, 0x64, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x4c, 0x69, 0x73,
0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x31, 0x0a, 0x0c, 0x43, 0x6f, 0x64,
0x65, 0x63, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e,
0x45, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x41, 0x59, 0x45, 0x4e, 0x4e, 0x45, 0x5f, 0x4c,
0x50, 0x50, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x4a, 0x53, 0x10, 0x02, 0x32, 0xdc, 0x03, 0x0a,
0x14, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12,
0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69,
0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76,
0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x72, 0x65, 0x67,
0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f,
0x6e, 0x12, 0x33, 0x0a, 0x0b, 0x6d, 0x61, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
0x4d, 0x61, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6d, 0x61, 0x63, 0x56,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x13, 0x72, 0x65, 0x67, 0x5f, 0x70, 0x61,
0x72, 0x61, 0x6d, 0x73, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67,
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x11,
0x72, 0x65, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f,
0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x6f, 0x74,
0x61, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72,
0x74, 0x73, 0x4f, 0x74, 0x61, 0x61, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72,
0x74, 0x73, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x62, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08,
0x52, 0x0e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x42,
0x12, 0x28, 0x0a, 0x10, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x63, 0x6c, 0x61,
0x73, 0x73, 0x5f, 0x63, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x75, 0x70, 0x70,
0x6f, 0x72, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x22, 0x57, 0x0a, 0x1a, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69,
0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x52, 0x0d, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66,
0x69, 0x6c, 0x65, 0x22, 0x2d, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1c, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69,
0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x06, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12,
0x43, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66,
0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
0x69, 0x64, 0x22, 0x29, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50,
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xcb, 0x01,
0x0a, 0x18, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69,
0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x64, 0x65,
0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50,
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x0d, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72,
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74,
0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x57, 0x0a, 0x1a, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69,
0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x0e, 0x64, 0x65, 0x76,
0x69, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72,
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x0d, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x22, 0x2c, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65,
0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
0x69, 0x64, 0x22, 0x7e, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05,
0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a,
0x06, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73,
0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f,
0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74,
0x49, 0x64, 0x22, 0x71, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e,
0x74, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72,
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x06, 0x72,
0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x7c, 0x0a, 0x26, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x41, 0x64, 0x72, 0x41, 0x6c, 0x67,
0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74,
0x12, 0x31, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69,
0x74, 0x68, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x06, 0x72, 0x65, 0x73,
0x75, 0x6c, 0x74, 0x22, 0x3a, 0x0a, 0x14, 0x41, 0x64, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69,
0x74, 0x68, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a,
0x31, 0x0a, 0x0c, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12,
0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x41, 0x59,
0x45, 0x4e, 0x4e, 0x45, 0x5f, 0x4c, 0x50, 0x50, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x4a, 0x53,
0x10, 0x02, 0x32, 0xdc, 0x03, 0x0a, 0x14, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x03, 0x47, 0x65,
0x74, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63,
0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50,
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x12, 0x43, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12,
0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69,
0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x04, 0x4c, 0x69,
0x73, 0x74, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x72,
0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
0x5a, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69,
0x74, 0x68, 0x6d, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2b, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x41, 0x64, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x59, 0x0a, 0x11, 0x69,
0x6f, 0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x61, 0x70, 0x69,
0x42, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x50,
0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x63, 0x68,
0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f,
0x76, 0x34, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x74, 0x79, 0x1a, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x41, 0x64, 0x72, 0x41, 0x6c, 0x67,
0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x42, 0x59, 0x0a, 0x11, 0x69, 0x6f, 0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61,
0x63, 0x6b, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72,
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74,
0x61, 0x63, 0x6b, 0x2f, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x61,
0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x34, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -30,11 +30,8 @@ export class DeviceProfile extends jspb.Message {
getPayloadCodecRuntime(): CodecRuntime;
setPayloadCodecRuntime(value: CodecRuntime): DeviceProfile;
getPayloadEncoderConfig(): string;
setPayloadEncoderConfig(value: string): DeviceProfile;
getPayloadDecoderConfig(): string;
setPayloadDecoderConfig(value: string): DeviceProfile;
getPayloadCodecScript(): string;
setPayloadCodecScript(value: string): DeviceProfile;
getUplinkInterval(): number;
setUplinkInterval(value: number): DeviceProfile;
@ -99,8 +96,7 @@ export namespace DeviceProfile {
regParamsRevision: common_common_pb.RegParamsRevision,
adrAlgorithmId: string,
payloadCodecRuntime: CodecRuntime,
payloadEncoderConfig: string,
payloadDecoderConfig: string,
payloadCodecScript: string,
uplinkInterval: number,
deviceStatusReqInterval: number,
supportsOtaa: boolean,

View File

@ -326,8 +326,7 @@ proto.api.DeviceProfile.toObject = function(includeInstance, msg) {
regParamsRevision: jspb.Message.getFieldWithDefault(msg, 6, 0),
adrAlgorithmId: jspb.Message.getFieldWithDefault(msg, 7, ""),
payloadCodecRuntime: jspb.Message.getFieldWithDefault(msg, 8, 0),
payloadEncoderConfig: jspb.Message.getFieldWithDefault(msg, 9, ""),
payloadDecoderConfig: jspb.Message.getFieldWithDefault(msg, 10, ""),
payloadCodecScript: jspb.Message.getFieldWithDefault(msg, 9, ""),
uplinkInterval: jspb.Message.getFieldWithDefault(msg, 11, 0),
deviceStatusReqInterval: jspb.Message.getFieldWithDefault(msg, 12, 0),
supportsOtaa: jspb.Message.getBooleanFieldWithDefault(msg, 13, false),
@ -413,11 +412,7 @@ proto.api.DeviceProfile.deserializeBinaryFromReader = function(msg, reader) {
break;
case 9:
var value = /** @type {string} */ (reader.readString());
msg.setPayloadEncoderConfig(value);
break;
case 10:
var value = /** @type {string} */ (reader.readString());
msg.setPayloadDecoderConfig(value);
msg.setPayloadCodecScript(value);
break;
case 11:
var value = /** @type {number} */ (reader.readUint32());
@ -566,20 +561,13 @@ proto.api.DeviceProfile.serializeBinaryToWriter = function(message, writer) {
f
);
}
f = message.getPayloadEncoderConfig();
f = message.getPayloadCodecScript();
if (f.length > 0) {
writer.writeString(
9,
f
);
}
f = message.getPayloadDecoderConfig();
if (f.length > 0) {
writer.writeString(
10,
f
);
}
f = message.getUplinkInterval();
if (f !== 0) {
writer.writeUint32(
@ -830,10 +818,10 @@ proto.api.DeviceProfile.prototype.setPayloadCodecRuntime = function(value) {
/**
* optional string payload_encoder_config = 9;
* optional string payload_codec_script = 9;
* @return {string}
*/
proto.api.DeviceProfile.prototype.getPayloadEncoderConfig = function() {
proto.api.DeviceProfile.prototype.getPayloadCodecScript = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};
@ -842,29 +830,11 @@ proto.api.DeviceProfile.prototype.getPayloadEncoderConfig = function() {
* @param {string} value
* @return {!proto.api.DeviceProfile} returns this
*/
proto.api.DeviceProfile.prototype.setPayloadEncoderConfig = function(value) {
proto.api.DeviceProfile.prototype.setPayloadCodecScript = function(value) {
return jspb.Message.setProto3StringField(this, 9, value);
};
/**
* optional string payload_decoder_config = 10;
* @return {string}
*/
proto.api.DeviceProfile.prototype.getPayloadDecoderConfig = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
};
/**
* @param {string} value
* @return {!proto.api.DeviceProfile} returns this
*/
proto.api.DeviceProfile.prototype.setPayloadDecoderConfig = function(value) {
return jspb.Message.setProto3StringField(this, 10, value);
};
/**
* optional uint32 uplink_interval = 11;
* @return {number}

View File

@ -31,11 +31,8 @@ export class DeviceProfile extends jspb.Message {
getPayloadCodecRuntime(): CodecRuntimeMap[keyof CodecRuntimeMap];
setPayloadCodecRuntime(value: CodecRuntimeMap[keyof CodecRuntimeMap]): void;
getPayloadEncoderConfig(): string;
setPayloadEncoderConfig(value: string): void;
getPayloadDecoderConfig(): string;
setPayloadDecoderConfig(value: string): void;
getPayloadCodecScript(): string;
setPayloadCodecScript(value: string): void;
getUplinkInterval(): number;
setUplinkInterval(value: number): void;
@ -101,8 +98,7 @@ export namespace DeviceProfile {
regParamsRevision: common_common_pb.RegParamsRevisionMap[keyof common_common_pb.RegParamsRevisionMap],
adrAlgorithmId: string,
payloadCodecRuntime: CodecRuntimeMap[keyof CodecRuntimeMap],
payloadEncoderConfig: string,
payloadDecoderConfig: string,
payloadCodecScript: string,
uplinkInterval: number,
deviceStatusReqInterval: number,
supportsOtaa: boolean,

View File

@ -79,8 +79,7 @@ proto.api.DeviceProfile.toObject = function(includeInstance, msg) {
regParamsRevision: msg.getRegParamsRevision(),
adrAlgorithmId: msg.getAdrAlgorithmId(),
payloadCodecRuntime: msg.getPayloadCodecRuntime(),
payloadEncoderConfig: msg.getPayloadEncoderConfig(),
payloadDecoderConfig: msg.getPayloadDecoderConfig(),
payloadCodecScript: msg.getPayloadCodecScript(),
uplinkInterval: msg.getUplinkInterval(),
deviceStatusReqInterval: msg.getDeviceStatusReqInterval(),
supportsOtaa: msg.getSupportsOtaa(),
@ -166,11 +165,7 @@ proto.api.DeviceProfile.deserializeBinaryFromReader = function(msg, reader) {
break;
case 9:
var value = /** @type {string} */ (reader.readString());
msg.setPayloadEncoderConfig(value);
break;
case 10:
var value = /** @type {string} */ (reader.readString());
msg.setPayloadDecoderConfig(value);
msg.setPayloadCodecScript(value);
break;
case 11:
var value = /** @type {number} */ (reader.readUint32());
@ -328,20 +323,13 @@ proto.api.DeviceProfile.prototype.serializeBinaryToWriter = function (writer) {
f
);
}
f = this.getPayloadEncoderConfig();
f = this.getPayloadCodecScript();
if (f.length > 0) {
writer.writeString(
9,
f
);
}
f = this.getPayloadDecoderConfig();
if (f.length > 0) {
writer.writeString(
10,
f
);
}
f = this.getUplinkInterval();
if (f !== 0) {
writer.writeUint32(
@ -577,35 +565,20 @@ proto.api.DeviceProfile.prototype.setPayloadCodecRuntime = function(value) {
/**
* optional string payload_encoder_config = 9;
* optional string payload_codec_script = 9;
* @return {string}
*/
proto.api.DeviceProfile.prototype.getPayloadEncoderConfig = function() {
proto.api.DeviceProfile.prototype.getPayloadCodecScript = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 9, ""));
};
/** @param {string} value */
proto.api.DeviceProfile.prototype.setPayloadEncoderConfig = function(value) {
proto.api.DeviceProfile.prototype.setPayloadCodecScript = function(value) {
jspb.Message.setField(this, 9, value);
};
/**
* optional string payload_decoder_config = 10;
* @return {string}
*/
proto.api.DeviceProfile.prototype.getPayloadDecoderConfig = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 10, ""));
};
/** @param {string} value */
proto.api.DeviceProfile.prototype.setPayloadDecoderConfig = function(value) {
jspb.Message.setField(this, 10, value);
};
/**
* optional uint32 uplink_interval = 11;
* @return {number}

2
api/js/package.json vendored
View File

@ -1,6 +1,6 @@
{
"name": "@chirpstack/chirpstack-api",
"version": "4.0.0-test.1",
"version": "4.0.0",
"description": "Chirpstack JS and TS API",
"license": "MIT",
"devDependencies": {

View File

@ -69,11 +69,8 @@ message DeviceProfile {
// Payload codec runtime.
CodecRuntime payload_codec_runtime = 8;
// Payload codec encoder config.
string payload_encoder_config = 9;
// Payload codec decoder config.
string payload_decoder_config = 10;
// Payload codec script.
string payload_codec_script = 9;
// Uplink interval (seconds).
// This defines the expected uplink interval which the device uses for

View File

@ -69,11 +69,8 @@ message DeviceProfile {
// Payload codec runtime.
CodecRuntime payload_codec_runtime = 8;
// Payload codec encoder config.
string payload_encoder_config = 9;
// Payload codec decoder config.
string payload_decoder_config = 10;
// Payload codec script.
string payload_codec_script = 9;
// Uplink interval (seconds).
// This defines the expected uplink interval which the device uses for

View File

@ -0,0 +1,8 @@
alter table device_profile
drop column payload_codec_script,
add column payload_decoder_config text not null default '',
add column payload_encoder_config text not null default '';
alter table device_profile
alter column payload_decoder_config drop default,
alter column payload_decoder_config drop default;

View File

@ -0,0 +1,7 @@
alter table device_profile
drop column payload_decoder_config,
drop column payload_encoder_config,
add column payload_codec_script text not null default '';
alter table device_profile
alter column payload_codec_script drop default;

View File

@ -684,7 +684,7 @@ impl DeviceService for Device {
dp.payload_codec_runtime,
req_qi.f_port as u8,
&dev.variables,
&dp.payload_encoder_config,
&dp.payload_codec_script,
obj,
)
.await

View File

@ -52,8 +52,7 @@ impl DeviceProfileService for DeviceProfile {
reg_params_revision: req_dp.reg_params_revision().from_proto(),
adr_algorithm_id: req_dp.adr_algorithm_id.clone(),
payload_codec_runtime: req_dp.payload_codec_runtime().from_proto(),
payload_decoder_config: req_dp.payload_encoder_config.clone(),
payload_encoder_config: req_dp.payload_decoder_config.clone(),
payload_codec_script: req_dp.payload_codec_script.clone(),
uplink_interval: req_dp.uplink_interval as i32,
device_status_req_interval: req_dp.device_status_req_interval as i32,
supports_otaa: req_dp.supports_otaa,
@ -105,8 +104,7 @@ impl DeviceProfileService for DeviceProfile {
reg_params_revision: dp.reg_params_revision.to_proto().into(),
adr_algorithm_id: dp.adr_algorithm_id,
payload_codec_runtime: dp.payload_codec_runtime.to_proto().into(),
payload_decoder_config: dp.payload_decoder_config,
payload_encoder_config: dp.payload_encoder_config,
payload_codec_script: dp.payload_codec_script,
uplink_interval: dp.uplink_interval as u32,
device_status_req_interval: dp.device_status_req_interval as u32,
supports_otaa: dp.supports_otaa,
@ -156,8 +154,7 @@ impl DeviceProfileService for DeviceProfile {
reg_params_revision: req_dp.reg_params_revision().from_proto(),
adr_algorithm_id: req_dp.adr_algorithm_id.clone(),
payload_codec_runtime: req_dp.payload_codec_runtime().from_proto(),
payload_decoder_config: req_dp.payload_encoder_config.clone(),
payload_encoder_config: req_dp.payload_decoder_config.clone(),
payload_codec_script: req_dp.payload_codec_script.clone(),
uplink_interval: req_dp.uplink_interval as i32,
device_status_req_interval: req_dp.device_status_req_interval as i32,
supports_otaa: req_dp.supports_otaa,

View File

@ -16,28 +16,40 @@ pub async fn decode(
let conf = config::get();
let max_run_ts = SystemTime::now() + conf.codec.js.max_execution_time;
let rt = rquickjs::Runtime::new().unwrap();
let rt = rquickjs::Runtime::new()?;
rt.set_interrupt_handler(Some(Box::new(move || SystemTime::now() > max_run_ts)));
let ctx = rquickjs::Context::full(&rt).unwrap();
let ctx = rquickjs::Context::full(&rt)?;
let script = decode_config.to_string();
let script = format!(
r#"
{}
export {{ decodeUplink }};
"#,
decode_config
);
let b = b.to_vec();
ctx.with(|ctx| {
let m = ctx.compile("script", script).unwrap();
let func: rquickjs::Function = m.get("Decode").unwrap();
let out = ctx.with(|ctx| -> Result<pbjson_types::Struct> {
let m = ctx.compile("script", script)?;
let func: rquickjs::Function = m.get("decodeUplink")?;
let input = rquickjs::Object::new(ctx).unwrap();
input.set("f_port", f_port.into_js(ctx).unwrap()).unwrap();
input
.set("variables", variables.into_js(ctx).unwrap())
.unwrap();
input.set("data", b.into_js(ctx).unwrap()).unwrap();
let input = rquickjs::Object::new(ctx)?;
input.set("fPort", f_port.into_js(ctx)?)?;
input.set("variables", variables.into_js(ctx)?)?;
input.set("bytes", b.into_js(ctx)?)?;
let res: rquickjs::Object = func.call((input,))?;
Ok(convert::rquickjs_to_struct(&res))
})
})?;
let obj = out.fields.get("object").cloned().unwrap_or_default();
if let Some(pbjson_types::value::Kind::StructValue(v)) = obj.kind {
return Ok(v);
}
Err(anyhow!("decodeUplink did not return 'object'"))
}
pub async fn encode(
@ -49,28 +61,31 @@ pub async fn encode(
let conf = config::get();
let max_run_ts = SystemTime::now() + conf.codec.js.max_execution_time;
let rt = rquickjs::Runtime::new().unwrap();
let rt = rquickjs::Runtime::new()?;
rt.set_interrupt_handler(Some(Box::new(move || SystemTime::now() > max_run_ts)));
let ctx = rquickjs::Context::full(&rt).unwrap();
let ctx = rquickjs::Context::full(&rt)?;
let script = encode_config.to_string();
let script = format!(
r#"
{}
export {{ encodeDownlink }};
"#,
encode_config,
);
ctx.with(|ctx| {
let m = ctx.compile("script", script).unwrap();
let func: rquickjs::Function = m.get("Encode").unwrap();
let m = ctx.compile("script", script)?;
let func: rquickjs::Function = m.get("encodeDownlink")?;
let input = rquickjs::Object::new(ctx).unwrap();
input.set("f_port", f_port.into_js(ctx).unwrap()).unwrap();
input
.set("variables", variables.into_js(ctx).unwrap())
.unwrap();
input
.set("object", convert::struct_to_rquickjs(ctx, s))
.unwrap();
let input = rquickjs::Object::new(ctx)?;
input.set("fPort", f_port.into_js(ctx)?)?;
input.set("variables", variables.into_js(ctx)?)?;
input.set("data", convert::struct_to_rquickjs(ctx, s))?;
let res: Vec<u8> = func.call((input,))?;
Ok(res)
let res: rquickjs::Object = func.call((input,))?;
let v: Vec<u8> = res.get("bytes")?;
Ok(v)
})
}
@ -81,7 +96,7 @@ pub mod test {
#[tokio::test]
pub async fn test_decode_timeout() {
let decoder = r#"
export function Decode(input) {
function decodeUplink(input) {
while (true) {
}
@ -97,11 +112,13 @@ pub mod test {
#[tokio::test]
pub async fn test_decode() {
let decoder = r#"
export function Decode(input) {
function decodeUplink(input) {
return {
f_port: input.f_port,
object: {
f_port: input.fPort,
variables: input.variables,
data: input.data
data: input.bytes
}
};
}
"#
@ -174,7 +191,7 @@ pub mod test {
#[tokio::test]
pub async fn test_encode_timeout() {
let encoder = r#"
export function Encode(input) {
function encodeDownlink(input) {
while (true) {
}
@ -195,11 +212,15 @@ pub mod test {
#[tokio::test]
pub async fn test_encode() {
let encoder = r#"
export function Encode(input) {
if (input.object.enabled) {
return [input.f_port, 0x01];
function encodeDownlink(input) {
if (input.data.enabled) {
return {
bytes: [0x01]
};
} else {
return [input.f_port, 0x00];
return {
bytes: [0x02]
};
}
}
"#
@ -208,19 +229,15 @@ pub mod test {
let mut vars: HashMap<String, String> = HashMap::new();
vars.insert("foo".into(), "bar".into());
let input = prost_types::Struct {
fields: [(
let mut input = prost_types::Struct::default();
input.fields.insert(
"enabled".to_string(),
prost_types::Value {
kind: Some(prost_types::value::Kind::BoolValue(true)),
},
)]
.iter()
.cloned()
.collect(),
};
);
let out = encode(10, &vars, &encoder, &input).await.unwrap();
assert_eq!(vec![10, 1], out);
assert_eq!(vec![1], out);
}
}

View File

@ -29,8 +29,6 @@ pub struct DeviceProfile {
pub reg_params_revision: Revision,
pub adr_algorithm_id: String,
pub payload_codec_runtime: Codec,
pub payload_decoder_config: String,
pub payload_encoder_config: String,
pub uplink_interval: i32,
pub device_status_req_interval: i32,
pub supports_otaa: bool,
@ -46,6 +44,7 @@ pub struct DeviceProfile {
pub abp_rx2_dr: i16,
pub abp_rx2_freq: i64,
pub tags: fields::KeyValue,
pub payload_codec_script: String,
}
impl DeviceProfile {
@ -72,8 +71,7 @@ impl Default for DeviceProfile {
reg_params_revision: Revision::A,
adr_algorithm_id: "".into(),
payload_codec_runtime: Codec::NONE,
payload_decoder_config: "".into(),
payload_encoder_config: "".into(),
payload_codec_script: "".into(),
uplink_interval: 0,
device_status_req_interval: 0,
supports_otaa: false,
@ -184,8 +182,7 @@ pub async fn update(dp: DeviceProfile) -> Result<DeviceProfile, Error> {
device_profile::reg_params_revision.eq(&dp.reg_params_revision),
device_profile::adr_algorithm_id.eq(&dp.adr_algorithm_id),
device_profile::payload_codec_runtime.eq(&dp.payload_codec_runtime),
device_profile::payload_decoder_config.eq(&dp.payload_decoder_config),
device_profile::payload_encoder_config.eq(&dp.payload_encoder_config),
device_profile::payload_codec_script.eq(&dp.payload_codec_script),
device_profile::uplink_interval.eq(&dp.uplink_interval),
device_profile::device_status_req_interval.eq(&dp.device_status_req_interval),
device_profile::supports_otaa.eq(&dp.supports_otaa),

View File

@ -81,8 +81,6 @@ table! {
reg_params_revision -> Varchar,
adr_algorithm_id -> Varchar,
payload_codec_runtime -> Varchar,
payload_encoder_config -> Text,
payload_decoder_config -> Text,
uplink_interval -> Int4,
device_status_req_interval -> Int4,
supports_otaa -> Bool,
@ -98,6 +96,7 @@ table! {
abp_rx2_dr -> Int2,
abp_rx2_freq -> Int8,
tags -> Jsonb,
payload_codec_script -> Text,
}
}

View File

@ -574,7 +574,7 @@ impl Data {
dp.payload_codec_runtime,
mac.f_port.unwrap_or(0),
&dev.variables,
&dp.payload_decoder_config,
&dp.payload_codec_script,
&pl.data,
)
.await

View File

@ -106,3 +106,7 @@ pre {
.search-dropdown .ant-select-dropdown-menu {
max-height: 600px;
}
.CodeMirror {
height: 600px;
}

View File

@ -28,33 +28,40 @@ class CreateDeviceProfile extends Component<IProps> {
}
render() {
const encodeScript = `// Encode encodes the given object into an array of bytes.
const codecScript = `// Decode uplink function.
//
// Input is an object with the following fields:
// - f_port = LoRaWAN fPort
// - variables = Device variables
// - object = Input object, e.g. {"temperature": 22.5}
// - bytes = Byte array containing the uplink payload, e.g. [255, 230, 255, 0]
// - fPort = Uplink fPort.
// - variables = Object containing the configured device variables.
//
// This function must return an array of bytes, e.g. [225, 230, 255, 0]
export function Encode(input) {
return [];
}`;
// Output must be an object with the following fields:
// - data = Object representing the decoded payload.
function decodeUplink(input) {
return {
object: {
temp: 22.5
}
};
}
const decodeScript = `// Decode decodes an array of bytes into an object.
// Encode downlink function.
//
// Input is an object with the following fields:
// - f_port = LoRaWAN fPort
// - variables = Device variables
// - data = Input byte array, e.g. [225, 230, 255, 0]
// - data = Object representing the payload that must be encoded.
// - variables = Object containing the configured device variables.
//
// This function must return an object, e.g. {"temperature": 22.5}
export function Decode(input) {
return {};
}`;
// Output must be an object with the following fields:
// - bytes = Byte array containing the downlink payload.
function encodeDownlink(input) {
return {
data: [225, 230, 255, 0]
};
}
`;
let deviceProfile = new DeviceProfile();
deviceProfile.setPayloadEncoderConfig(encodeScript);
deviceProfile.setPayloadDecoderConfig(decodeScript);
deviceProfile.setPayloadCodecScript(codecScript);
return(
<Space direction="vertical" style={{width: "100%"}} size="large">

View File

@ -92,8 +92,7 @@ class DeviceProfileForm extends Component<IProps, IState> {
// codec
dp.setPayloadCodecRuntime(v.payloadCodecRuntime);
dp.setPayloadEncoderConfig(v.payloadEncoderConfig);
dp.setPayloadDecoderConfig(v.payloadDecoderConfig);
dp.setPayloadCodecScript(v.payloadCodecScript);
// tags
for (const elm of v.tagsMap) {
@ -322,17 +321,9 @@ class DeviceProfileForm extends Component<IProps, IState> {
</Select>
</Form.Item>
{this.state.payloadCodecRuntime === CodecRuntime.JS && <CodeEditor
label="Decode function"
tooltip="The function must have the signature function Decode(fPort, bytes) and must return an object. ChirpStack Application Server will convert this object to JSON."
name="payloadDecoderConfig"
value={this.props.initialValues.getPayloadDecoderConfig()}
formRef={this.formRef} disabled={this.props.disabled}
/>}
{this.state.payloadCodecRuntime === CodecRuntime.JS && <CodeEditor
label="Encode function"
tooltip="The function must have the signature function Encode(fPort, obj) and must return an array of bytes."
name="payloadEncoderConfig"
value={this.props.initialValues.getPayloadEncoderConfig()}
label="Codec functions"
name="payloadCodecScript"
value={this.props.initialValues.getPayloadCodecScript()}
formRef={this.formRef} disabled={this.props.disabled}
/>}
</Tabs.TabPane>