Skip to content

Commit

Permalink
Merge pull request #17 from CyBear-Jinni/Changing_grpc
Browse files Browse the repository at this point in the history
Changed methods naming to reduce conflicts
  • Loading branch information
guyluz11 committed Nov 18, 2021
2 parents 515abcd + 87513ad commit eadc5c2
Show file tree
Hide file tree
Showing 9 changed files with 271 additions and 262 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,17 @@ class CBJCommendStatus extends $pb.GeneratedMessage {
void clearSuccess() => clearField(1);
}

class CompInfo extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CompInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CBJAppConnections'), createEmptyInstance: create)
..aOM<CbjIno>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cbjInfo', protoName: 'cbjInfo', subBuilder: CbjIno.create)
..aOM<CompSpecs>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'compSpecs', protoName: 'compSpecs', subBuilder: CompSpecs.create)
class CompAppInfo extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CompAppInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CBJAppConnections'), createEmptyInstance: create)
..aOM<CbjAppIno>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cbjInfo', protoName: 'cbjInfo', subBuilder: CbjAppIno.create)
..aOM<CompAppSpecs>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'compSpecs', protoName: 'compSpecs', subBuilder: CompAppSpecs.create)
..hasRequiredFields = false
;

CompInfo._() : super();
factory CompInfo({
CbjIno? cbjInfo,
CompSpecs? compSpecs,
CompAppInfo._() : super();
factory CompAppInfo({
CbjAppIno? cbjInfo,
CompAppSpecs? compSpecs,
}) {
final _result = create();
if (cbjInfo != null) {
Expand All @@ -124,60 +124,60 @@ class CompInfo extends $pb.GeneratedMessage {
}
return _result;
}
factory CompInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory CompInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
factory CompAppInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory CompAppInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
CompInfo clone() => CompInfo()..mergeFromMessage(this);
CompAppInfo clone() => CompAppInfo()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
CompInfo copyWith(void Function(CompInfo) updates) => super.copyWith((message) => updates(message as CompInfo)) as CompInfo; // ignore: deprecated_member_use
CompAppInfo copyWith(void Function(CompAppInfo) updates) => super.copyWith((message) => updates(message as CompAppInfo)) as CompAppInfo; // ignore: deprecated_member_use
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static CompInfo create() => CompInfo._();
CompInfo createEmptyInstance() => create();
static $pb.PbList<CompInfo> createRepeated() => $pb.PbList<CompInfo>();
static CompAppInfo create() => CompAppInfo._();
CompAppInfo createEmptyInstance() => create();
static $pb.PbList<CompAppInfo> createRepeated() => $pb.PbList<CompAppInfo>();
@$core.pragma('dart2js:noInline')
static CompInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<CompInfo>(create);
static CompInfo? _defaultInstance;
static CompAppInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<CompAppInfo>(create);
static CompAppInfo? _defaultInstance;

@$pb.TagNumber(3)
CbjIno get cbjInfo => $_getN(0);
CbjAppIno get cbjInfo => $_getN(0);
@$pb.TagNumber(3)
set cbjInfo(CbjIno v) { setField(3, v); }
set cbjInfo(CbjAppIno v) { setField(3, v); }
@$pb.TagNumber(3)
$core.bool hasCbjInfo() => $_has(0);
@$pb.TagNumber(3)
void clearCbjInfo() => clearField(3);
@$pb.TagNumber(3)
CbjIno ensureCbjInfo() => $_ensure(0);
CbjAppIno ensureCbjInfo() => $_ensure(0);

@$pb.TagNumber(4)
CompSpecs get compSpecs => $_getN(1);
CompAppSpecs get compSpecs => $_getN(1);
@$pb.TagNumber(4)
set compSpecs(CompSpecs v) { setField(4, v); }
set compSpecs(CompAppSpecs v) { setField(4, v); }
@$pb.TagNumber(4)
$core.bool hasCompSpecs() => $_has(1);
@$pb.TagNumber(4)
void clearCompSpecs() => clearField(4);
@$pb.TagNumber(4)
CompSpecs ensureCompSpecs() => $_ensure(1);
CompAppSpecs ensureCompSpecs() => $_ensure(1);
}

class CbjIno extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CbjIno', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CBJAppConnections'), createEmptyInstance: create)
class CbjAppIno extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CbjAppIno', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CBJAppConnections'), createEmptyInstance: create)
..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'deviceName', protoName: 'deviceName')
..aOS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pubspecYamlVersion', protoName: 'pubspecYamlVersion')
..aOS(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'protoLastGenDate', protoName: 'protoLastGenDate')
..hasRequiredFields = false
;

CbjIno._() : super();
factory CbjIno({
CbjAppIno._() : super();
factory CbjAppIno({
$core.String? deviceName,
$core.String? pubspecYamlVersion,
$core.String? protoLastGenDate,
Expand All @@ -194,26 +194,26 @@ class CbjIno extends $pb.GeneratedMessage {
}
return _result;
}
factory CbjIno.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory CbjIno.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
factory CbjAppIno.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory CbjAppIno.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
CbjIno clone() => CbjIno()..mergeFromMessage(this);
CbjAppIno clone() => CbjAppIno()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
CbjIno copyWith(void Function(CbjIno) updates) => super.copyWith((message) => updates(message as CbjIno)) as CbjIno; // ignore: deprecated_member_use
CbjAppIno copyWith(void Function(CbjAppIno) updates) => super.copyWith((message) => updates(message as CbjAppIno)) as CbjAppIno; // ignore: deprecated_member_use
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static CbjIno create() => CbjIno._();
CbjIno createEmptyInstance() => create();
static $pb.PbList<CbjIno> createRepeated() => $pb.PbList<CbjIno>();
static CbjAppIno create() => CbjAppIno._();
CbjAppIno createEmptyInstance() => create();
static $pb.PbList<CbjAppIno> createRepeated() => $pb.PbList<CbjAppIno>();
@$core.pragma('dart2js:noInline')
static CbjIno getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<CbjIno>(create);
static CbjIno? _defaultInstance;
static CbjAppIno getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<CbjAppIno>(create);
static CbjAppIno? _defaultInstance;

@$pb.TagNumber(5)
$core.String get deviceName => $_getSZ(0);
Expand Down Expand Up @@ -243,8 +243,8 @@ class CbjIno extends $pb.GeneratedMessage {
void clearProtoLastGenDate() => clearField(7);
}

class CompSpecs extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CompSpecs', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CBJAppConnections'), createEmptyInstance: create)
class CompAppSpecs extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CompAppSpecs', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CBJAppConnections'), createEmptyInstance: create)
..aOS(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'compId', protoName: 'compId')
..aOS(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'compUuid', protoName: 'compUuid')
..aOS(10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'compOs', protoName: 'compOs')
Expand All @@ -253,8 +253,8 @@ class CompSpecs extends $pb.GeneratedMessage {
..hasRequiredFields = false
;

CompSpecs._() : super();
factory CompSpecs({
CompAppSpecs._() : super();
factory CompAppSpecs({
$core.String? compId,
$core.String? compUuid,
$core.String? compOs,
Expand All @@ -279,26 +279,26 @@ class CompSpecs extends $pb.GeneratedMessage {
}
return _result;
}
factory CompSpecs.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory CompSpecs.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
factory CompAppSpecs.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory CompAppSpecs.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
CompSpecs clone() => CompSpecs()..mergeFromMessage(this);
CompAppSpecs clone() => CompAppSpecs()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
CompSpecs copyWith(void Function(CompSpecs) updates) => super.copyWith((message) => updates(message as CompSpecs)) as CompSpecs; // ignore: deprecated_member_use
CompAppSpecs copyWith(void Function(CompAppSpecs) updates) => super.copyWith((message) => updates(message as CompAppSpecs)) as CompAppSpecs; // ignore: deprecated_member_use
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static CompSpecs create() => CompSpecs._();
CompSpecs createEmptyInstance() => create();
static $pb.PbList<CompSpecs> createRepeated() => $pb.PbList<CompSpecs>();
static CompAppSpecs create() => CompAppSpecs._();
CompAppSpecs createEmptyInstance() => create();
static $pb.PbList<CompAppSpecs> createRepeated() => $pb.PbList<CompAppSpecs>();
@$core.pragma('dart2js:noInline')
static CompSpecs getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<CompSpecs>(create);
static CompSpecs? _defaultInstance;
static CompAppSpecs getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<CompAppSpecs>(create);
static CompAppSpecs? _defaultInstance;

@$pb.TagNumber(8)
$core.String get compId => $_getSZ(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ class CyBearJinniAppClient extends $grpc.Client {
($0.CompInfoSB value) => value.writeToBuffer(),
($core.List<$core.int> value) =>
$0.CBJCommendStatus.fromBuffer(value));
static final _$getCompInfo = $grpc.ClientMethod<$0.CompInfo, $0.CompInfo>(
'/CBJAppConnections.CyBearJinniApp/getCompInfo',
($0.CompInfo value) => value.writeToBuffer(),
($core.List<$core.int> value) => $0.CompInfo.fromBuffer(value));
static final _$getCompAppInfo =
$grpc.ClientMethod<$0.CompAppInfo, $0.CompAppInfo>(
'/CBJAppConnections.CyBearJinniApp/getCompAppInfo',
($0.CompAppInfo value) => value.writeToBuffer(),
($core.List<$core.int> value) => $0.CompAppInfo.fromBuffer(value));

CyBearJinniAppClient($grpc.ClientChannel channel,
{$grpc.CallOptions? options,
Expand All @@ -37,9 +38,9 @@ class CyBearJinniAppClient extends $grpc.Client {
options: options);
}

$grpc.ResponseFuture<$0.CompInfo> getCompInfo($0.CompInfo request,
$grpc.ResponseFuture<$0.CompAppInfo> getCompAppInfo($0.CompAppInfo request,
{$grpc.CallOptions? options}) {
return $createUnaryCall(_$getCompInfo, request, options: options);
return $createUnaryCall(_$getCompAppInfo, request, options: options);
}
}

Expand All @@ -54,27 +55,27 @@ abstract class CyBearJinniAppServiceBase extends $grpc.Service {
false,
($core.List<$core.int> value) => $0.CompInfoSB.fromBuffer(value),
($0.CBJCommendStatus value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$0.CompInfo, $0.CompInfo>(
'getCompInfo',
getCompInfo_Pre,
$addMethod($grpc.ServiceMethod<$0.CompAppInfo, $0.CompAppInfo>(
'getCompAppInfo',
getCompAppInfo_Pre,
false,
false,
($core.List<$core.int> value) => $0.CompInfo.fromBuffer(value),
($0.CompInfo value) => value.writeToBuffer()));
($core.List<$core.int> value) => $0.CompAppInfo.fromBuffer(value),
($0.CompAppInfo value) => value.writeToBuffer()));
}

$async.Future<$0.CBJCommendStatus> cBJAppGetSmartDeviceInformation_Pre(
$grpc.ServiceCall call, $async.Future<$0.CompInfoSB> request) async {
return cBJAppGetSmartDeviceInformation(call, await request);
}

$async.Future<$0.CompInfo> getCompInfo_Pre(
$grpc.ServiceCall call, $async.Future<$0.CompInfo> request) async {
return getCompInfo(call, await request);
$async.Future<$0.CompAppInfo> getCompAppInfo_Pre(
$grpc.ServiceCall call, $async.Future<$0.CompAppInfo> request) async {
return getCompAppInfo(call, await request);
}

$async.Future<$0.CBJCommendStatus> cBJAppGetSmartDeviceInformation(
$grpc.ServiceCall call, $0.CompInfoSB request);
$async.Future<$0.CompInfo> getCompInfo(
$grpc.ServiceCall call, $0.CompInfo request);
$async.Future<$0.CompAppInfo> getCompAppInfo(
$grpc.ServiceCall call, $0.CompAppInfo request);
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,32 @@ const CBJCommendStatus$json = const {

/// Descriptor for `CBJCommendStatus`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List cBJCommendStatusDescriptor = $convert.base64Decode('ChBDQkpDb21tZW5kU3RhdHVzEhgKB3N1Y2Nlc3MYASABKAhSB3N1Y2Nlc3M=');
@$core.Deprecated('Use compInfoDescriptor instead')
const CompInfo$json = const {
'1': 'CompInfo',
@$core.Deprecated('Use compAppInfoDescriptor instead')
const CompAppInfo$json = const {
'1': 'CompAppInfo',
'2': const [
const {'1': 'cbjInfo', '3': 3, '4': 1, '5': 11, '6': '.CBJAppConnections.CbjIno', '10': 'cbjInfo'},
const {'1': 'compSpecs', '3': 4, '4': 1, '5': 11, '6': '.CBJAppConnections.CompSpecs', '10': 'compSpecs'},
const {'1': 'cbjInfo', '3': 3, '4': 1, '5': 11, '6': '.CBJAppConnections.CbjAppIno', '10': 'cbjInfo'},
const {'1': 'compSpecs', '3': 4, '4': 1, '5': 11, '6': '.CBJAppConnections.CompAppSpecs', '10': 'compSpecs'},
],
};

/// Descriptor for `CompInfo`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List compInfoDescriptor = $convert.base64Decode('CghDb21wSW5mbxIzCgdjYmpJbmZvGAMgASgLMhkuQ0JKQXBwQ29ubmVjdGlvbnMuQ2JqSW5vUgdjYmpJbmZvEjoKCWNvbXBTcGVjcxgEIAEoCzIcLkNCSkFwcENvbm5lY3Rpb25zLkNvbXBTcGVjc1IJY29tcFNwZWNz');
@$core.Deprecated('Use cbjInoDescriptor instead')
const CbjIno$json = const {
'1': 'CbjIno',
/// Descriptor for `CompAppInfo`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List compAppInfoDescriptor = $convert.base64Decode('CgtDb21wQXBwSW5mbxI2CgdjYmpJbmZvGAMgASgLMhwuQ0JKQXBwQ29ubmVjdGlvbnMuQ2JqQXBwSW5vUgdjYmpJbmZvEj0KCWNvbXBTcGVjcxgEIAEoCzIfLkNCSkFwcENvbm5lY3Rpb25zLkNvbXBBcHBTcGVjc1IJY29tcFNwZWNz');
@$core.Deprecated('Use cbjAppInoDescriptor instead')
const CbjAppIno$json = const {
'1': 'CbjAppIno',
'2': const [
const {'1': 'deviceName', '3': 5, '4': 1, '5': 9, '10': 'deviceName'},
const {'1': 'pubspecYamlVersion', '3': 6, '4': 1, '5': 9, '10': 'pubspecYamlVersion'},
const {'1': 'protoLastGenDate', '3': 7, '4': 1, '5': 9, '10': 'protoLastGenDate'},
],
};

/// Descriptor for `CbjIno`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List cbjInoDescriptor = $convert.base64Decode('CgZDYmpJbm8SHgoKZGV2aWNlTmFtZRgFIAEoCVIKZGV2aWNlTmFtZRIuChJwdWJzcGVjWWFtbFZlcnNpb24YBiABKAlSEnB1YnNwZWNZYW1sVmVyc2lvbhIqChBwcm90b0xhc3RHZW5EYXRlGAcgASgJUhBwcm90b0xhc3RHZW5EYXRl');
@$core.Deprecated('Use compSpecsDescriptor instead')
const CompSpecs$json = const {
'1': 'CompSpecs',
/// Descriptor for `CbjAppIno`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List cbjAppInoDescriptor = $convert.base64Decode('CglDYmpBcHBJbm8SHgoKZGV2aWNlTmFtZRgFIAEoCVIKZGV2aWNlTmFtZRIuChJwdWJzcGVjWWFtbFZlcnNpb24YBiABKAlSEnB1YnNwZWNZYW1sVmVyc2lvbhIqChBwcm90b0xhc3RHZW5EYXRlGAcgASgJUhBwcm90b0xhc3RHZW5EYXRl');
@$core.Deprecated('Use compAppSpecsDescriptor instead')
const CompAppSpecs$json = const {
'1': 'CompAppSpecs',
'2': const [
const {'1': 'compId', '3': 8, '4': 1, '5': 9, '10': 'compId'},
const {'1': 'compUuid', '3': 9, '4': 1, '5': 9, '10': 'compUuid'},
Expand All @@ -63,5 +63,5 @@ const CompSpecs$json = const {
],
};

/// Descriptor for `CompSpecs`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List compSpecsDescriptor = $convert.base64Decode('CglDb21wU3BlY3MSFgoGY29tcElkGAggASgJUgZjb21wSWQSGgoIY29tcFV1aWQYCSABKAlSCGNvbXBVdWlkEhYKBmNvbXBPcxgKIAEoCVIGY29tcE9zEhwKCWNvbXBNb2RlbBgLIAEoCVIJY29tcE1vZGVsEhoKCGNvbXBUeXBlGAwgASgJUghjb21wVHlwZQ==');
/// Descriptor for `CompAppSpecs`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List compAppSpecsDescriptor = $convert.base64Decode('CgxDb21wQXBwU3BlY3MSFgoGY29tcElkGAggASgJUgZjb21wSWQSGgoIY29tcFV1aWQYCSABKAlSCGNvbXBVdWlkEhYKBmNvbXBPcxgKIAEoCVIGY29tcE9zEhwKCWNvbXBNb2RlbBgLIAEoCVIJY29tcE1vZGVsEhoKCGNvbXBUeXBlGAwgASgJUghjb21wVHlwZQ==');

0 comments on commit eadc5c2

Please sign in to comment.