fix:调整proto

This commit is contained in:
liyi 2024-12-05 13:49:56 +08:00
parent 05fb0689c9
commit 4aeda1bfdf
2 changed files with 14 additions and 46 deletions

View File

@ -19,14 +19,10 @@ export 'ble_message.pbenum.dart';
class BleReq extends $pb.GeneratedMessage {
factory BleReq({
$core.int? iD,
$core.String? bluetoothDeviceName,
$core.List<$core.int>? structData,
}) {
final $result = create();
if (iD != null) {
$result.iD = iD;
}
if (bluetoothDeviceName != null) {
$result.bluetoothDeviceName = bluetoothDeviceName;
}
@ -40,7 +36,6 @@ class BleReq extends $pb.GeneratedMessage {
factory BleReq.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BleReq', package: const $pb.PackageName(_omitMessageNames ? '' : 'main'), createEmptyInstance: create)
..a<$core.int>(1, _omitFieldNames ? '' : 'ID', $pb.PbFieldType.OU3, protoName: 'ID')
..aOS(2, _omitFieldNames ? '' : 'bluetoothDeviceName', protoName: 'bluetoothDeviceName')
..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'StructData', $pb.PbFieldType.OY, protoName: 'StructData')
..hasRequiredFields = false
@ -67,33 +62,23 @@ class BleReq extends $pb.GeneratedMessage {
static BleReq getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<BleReq>(create);
static BleReq? _defaultInstance;
/// ID
@$pb.TagNumber(1)
$core.int get iD => $_getIZ(0);
@$pb.TagNumber(1)
set iD($core.int v) { $_setUnsignedInt32(0, v); }
@$pb.TagNumber(1)
$core.bool hasID() => $_has(0);
@$pb.TagNumber(1)
void clearID() => clearField(1);
/// mac地址
@$pb.TagNumber(2)
$core.String get bluetoothDeviceName => $_getSZ(1);
$core.String get bluetoothDeviceName => $_getSZ(0);
@$pb.TagNumber(2)
set bluetoothDeviceName($core.String v) { $_setString(1, v); }
set bluetoothDeviceName($core.String v) { $_setString(0, v); }
@$pb.TagNumber(2)
$core.bool hasBluetoothDeviceName() => $_has(1);
$core.bool hasBluetoothDeviceName() => $_has(0);
@$pb.TagNumber(2)
void clearBluetoothDeviceName() => clearField(2);
///
@$pb.TagNumber(3)
$core.List<$core.int> get structData => $_getN(2);
$core.List<$core.int> get structData => $_getN(1);
@$pb.TagNumber(3)
set structData($core.List<$core.int> v) { $_setBytes(2, v); }
set structData($core.List<$core.int> v) { $_setBytes(1, v); }
@$pb.TagNumber(3)
$core.bool hasStructData() => $_has(2);
$core.bool hasStructData() => $_has(1);
@$pb.TagNumber(3)
void clearStructData() => clearField(3);
}
@ -101,16 +86,12 @@ class BleReq extends $pb.GeneratedMessage {
class BleResp extends $pb.GeneratedMessage {
factory BleResp({
BleResp_StatusE? status,
$core.int? iD,
$core.List<$core.int>? structData,
}) {
final $result = create();
if (status != null) {
$result.status = status;
}
if (iD != null) {
$result.iD = iD;
}
if (structData != null) {
$result.structData = structData;
}
@ -122,7 +103,6 @@ class BleResp extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BleResp', package: const $pb.PackageName(_omitMessageNames ? '' : 'main'), createEmptyInstance: create)
..e<BleResp_StatusE>(1, _omitFieldNames ? '' : 'Status', $pb.PbFieldType.OE, protoName: 'Status', defaultOrMaker: BleResp_StatusE.SUCCESS, valueOf: BleResp_StatusE.valueOf, enumValues: BleResp_StatusE.values)
..a<$core.int>(2, _omitFieldNames ? '' : 'ID', $pb.PbFieldType.OU3, protoName: 'ID')
..a<$core.List<$core.int>>(4, _omitFieldNames ? '' : 'StructData', $pb.PbFieldType.OY, protoName: 'StructData')
..hasRequiredFields = false
;
@ -158,23 +138,13 @@ class BleResp extends $pb.GeneratedMessage {
@$pb.TagNumber(1)
void clearStatus() => clearField(1);
/// IDID
@$pb.TagNumber(2)
$core.int get iD => $_getIZ(1);
@$pb.TagNumber(2)
set iD($core.int v) { $_setUnsignedInt32(1, v); }
@$pb.TagNumber(2)
$core.bool hasID() => $_has(1);
@$pb.TagNumber(2)
void clearID() => clearField(2);
///
@$pb.TagNumber(4)
$core.List<$core.int> get structData => $_getN(2);
$core.List<$core.int> get structData => $_getN(1);
@$pb.TagNumber(4)
set structData($core.List<$core.int> v) { $_setBytes(2, v); }
set structData($core.List<$core.int> v) { $_setBytes(1, v); }
@$pb.TagNumber(4)
$core.bool hasStructData() => $_has(2);
$core.bool hasStructData() => $_has(1);
@$pb.TagNumber(4)
void clearStructData() => clearField(4);
}

View File

@ -17,7 +17,6 @@ import 'dart:typed_data' as $typed_data;
const BleReq$json = {
'1': 'BleReq',
'2': [
{'1': 'ID', '3': 1, '4': 1, '5': 13, '10': 'ID'},
{'1': 'bluetoothDeviceName', '3': 2, '4': 1, '5': 9, '10': 'bluetoothDeviceName'},
{'1': 'StructData', '3': 3, '4': 1, '5': 12, '10': 'StructData'},
],
@ -25,15 +24,14 @@ const BleReq$json = {
/// Descriptor for `BleReq`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List bleReqDescriptor = $convert.base64Decode(
'CgZCbGVSZXESDgoCSUQYASABKA1SAklEEjAKE2JsdWV0b290aERldmljZU5hbWUYAiABKAlSE2'
'JsdWV0b290aERldmljZU5hbWUSHgoKU3RydWN0RGF0YRgDIAEoDFIKU3RydWN0RGF0YQ==');
'CgZCbGVSZXESMAoTYmx1ZXRvb3RoRGV2aWNlTmFtZRgCIAEoCVITYmx1ZXRvb3RoRGV2aWNlTm'
'FtZRIeCgpTdHJ1Y3REYXRhGAMgASgMUgpTdHJ1Y3REYXRh');
@$core.Deprecated('Use bleRespDescriptor instead')
const BleResp$json = {
'1': 'BleResp',
'2': [
{'1': 'Status', '3': 1, '4': 1, '5': 14, '6': '.main.BleResp.StatusE', '10': 'Status'},
{'1': 'ID', '3': 2, '4': 1, '5': 13, '10': 'ID'},
{'1': 'StructData', '3': 4, '4': 1, '5': 12, '10': 'StructData'},
],
'4': [BleResp_StatusE$json],
@ -55,7 +53,7 @@ const BleResp_StatusE$json = {
/// Descriptor for `BleResp`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List bleRespDescriptor = $convert.base64Decode(
'CgdCbGVSZXNwEi0KBlN0YXR1cxgBIAEoDjIVLm1haW4uQmxlUmVzcC5TdGF0dXNFUgZTdGF0dX'
'MSDgoCSUQYAiABKA1SAklEEh4KClN0cnVjdERhdGEYBCABKAxSClN0cnVjdERhdGEiYQoHU3Rh'
'dHVzRRILCgdTVUNDRVNTEAASCAoERkFJTBABEg0KCU5PVF9GT1VORBACEhIKDkNBTk5PVF9DT0'
'5ORUNUEAMSDwoLQ0FOTk9UX1NFTkQQBBILCgdUSU1FT1VUEAU=');
'MSHgoKU3RydWN0RGF0YRgEIAEoDFIKU3RydWN0RGF0YSJhCgdTdGF0dXNFEgsKB1NVQ0NFU1MQ'
'ABIICgRGQUlMEAESDQoJTk9UX0ZPVU5EEAISEgoOQ0FOTk9UX0NPTk5FQ1QQAxIPCgtDQU5OT1'
'RfU0VORBAEEgsKB1RJTUVPVVQQBQ==');