diff --git a/lib/common/constants.dart b/lib/common/constants.dart index 1640da498..490726b5a 100644 --- a/lib/common/constants.dart +++ b/lib/common/constants.dart @@ -21,8 +21,9 @@ class Constants { static const String traceId = '11111111111111111111111111111111:1111111111111111:0:0'; static const String userAgent = - 'Mozilla/5.0 BiliDroid/1.46.2 (bbcallen@gmail.com) os/android model/vivo mobi_app/android_hd build/1462100 channel/yingyongbao innerVer/1462100 osVer/14 network/2'; - static const String statistics = '%7B%22appId%22%3A5%2C%22platform%22%3A3%2C%22version%22%3A%221.46.2%22%2C%22abtest%22%3A%22%22%7D'; + 'Mozilla/5.0 BiliDroid/1.46.2 (bbcallen@gmail.com) os/android model/vivo mobi_app/android build/1462100 channel/bili innerVer/1462100 osVer/14 network/2'; + static const String statistics = + '%7B%22appId%22%3A5%2C%22platform%22%3A3%2C%22version%22%3A%221.46.2%22%2C%22abtest%22%3A%22%22%7D'; //Uri.encodeComponent('{"appId": 5,"platform": 3,"version": "1.46.2","abtest": ""}'); //内容来自 https://passport.bilibili.com/web/generic/country/list diff --git a/lib/common/widgets/overlay_pop.dart b/lib/common/widgets/overlay_pop.dart index 7445b7aa6..c77d56bb3 100644 --- a/lib/common/widgets/overlay_pop.dart +++ b/lib/common/widgets/overlay_pop.dart @@ -1,5 +1,6 @@ import 'dart:math'; +import 'package:PiliPalaX/grpc/app/card/v1/card.pb.dart' as card; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import '../../utils/download.dart'; @@ -31,7 +32,8 @@ class OverlayPop extends StatelessWidget { NetworkImgLayer( width: imgWidth, height: imgWidth / StyleString.aspectRatio, - src: videoItem.pic! as String, + src: (videoItem as card.Card?)?.smallCoverV5.base.cover ?? + videoItem.pic, quality: 100, ), Positioned( @@ -66,7 +68,8 @@ class OverlayPop extends StatelessWidget { children: [ Expanded( child: Text( - videoItem.title! as String, + (videoItem as card.Card?)?.smallCoverV5.base.title ?? + videoItem.title, ), ), const SizedBox(width: 4), @@ -75,9 +78,10 @@ class OverlayPop extends StatelessWidget { onPressed: () async { await DownloadUtils.downloadImg( context, - videoItem.pic != null - ? videoItem.pic as String - : videoItem.cover as String, + (videoItem as card.Card?)?.smallCoverV5.base.cover ?? + (videoItem.pic != null + ? videoItem.pic as String + : videoItem.cover as String), ); closeFn!(); }, diff --git a/lib/common/widgets/video_card_h_grpc.dart b/lib/common/widgets/video_card_h_grpc.dart new file mode 100644 index 000000000..6d1a0a073 --- /dev/null +++ b/lib/common/widgets/video_card_h_grpc.dart @@ -0,0 +1,270 @@ +import 'package:PiliPalaX/grpc/app/card/v1/card.pb.dart' as card; +import 'package:PiliPalaX/utils/id_utils.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:get/get.dart'; +import '../../http/search.dart'; +import '../../utils/utils.dart'; +import '../constants.dart'; +import 'badge.dart'; +import 'network_img_layer.dart'; +import 'stat/danmu.dart'; +import 'stat/view.dart'; +import 'video_popup_menu.dart'; + +// 视频卡片 - 水平布局 +class VideoCardHGrpc extends StatelessWidget { + const VideoCardHGrpc({ + super.key, + required this.videoItem, + this.longPress, + this.longPressEnd, + this.source = 'normal', + this.showOwner = true, + this.showView = true, + this.showDanmaku = true, + this.showPubdate = false, + }); + // ignore: prefer_typing_uninitialized_variables + final card.Card videoItem; + final Function()? longPress; + final Function()? longPressEnd; + final String source; + final bool showOwner; + final bool showView; + final bool showDanmaku; + final bool showPubdate; + + @override + Widget build(BuildContext context) { + final int aid = videoItem.smallCoverV5.base.args.aid.toInt(); + final String bvid = IdUtils.av2bv(aid); + String type = 'video'; + // try { + // type = videoItem.type; + // } catch (_) {} + // List actions = + // VideoCustomActions(videoItem, context).actions; + final String heroTag = Utils.makeHeroTag(aid); + return Stack(children: [ + Semantics( + // label: Utils.videoItemSemantics(videoItem), + excludeSemantics: true, + // customSemanticsActions: { + // for (var item in actions) + // CustomSemanticsAction(label: item.title): item.onTap!, + // }, + child: InkWell( + borderRadius: BorderRadius.circular(12), + onLongPress: () { + if (longPress != null) { + longPress!(); + } + }, + onTap: () async { + if (type == 'ketang') { + SmartDialog.showToast('课堂视频暂不支持播放'); + return; + } + try { + final int cid = + videoItem.smallCoverV5.base.playerArgs.cid.toInt() ?? + await SearchHttp.ab2c(aid: aid, bvid: bvid); + Get.toNamed('/video?bvid=$bvid&cid=$cid', + arguments: {'heroTag': heroTag}); + // Get.toNamed('/video?bvid=$bvid&cid=$cid', + // arguments: {'videoItem': videoItem, 'heroTag': heroTag}); + } catch (err) { + SmartDialog.showToast(err.toString()); + } + }, + child: LayoutBuilder( + builder: (BuildContext context, BoxConstraints boxConstraints) { + return Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AspectRatio( + aspectRatio: StyleString.aspectRatio, + child: LayoutBuilder( + builder: (BuildContext context, + BoxConstraints boxConstraints) { + final double maxWidth = boxConstraints.maxWidth; + final double maxHeight = boxConstraints.maxHeight; + return Stack( + children: [ + Hero( + tag: heroTag, + child: NetworkImgLayer( + src: videoItem.smallCoverV5.base.cover, + width: maxWidth, + height: maxHeight, + ), + ), + if (videoItem + .smallCoverV5.coverRightText1.isNotEmpty) + PBadge( + text: Utils.timeFormat( + videoItem.smallCoverV5.coverRightText1), + right: 6.0, + bottom: 6.0, + type: 'gray', + ), + if (type != 'video') + PBadge( + text: type, + left: 6.0, + bottom: 6.0, + type: 'primary', + ), + // if (videoItem.rcmdReason != null && + // videoItem.rcmdReason.content != '') + // pBadge(videoItem.rcmdReason.content, context, + // 6.0, 6.0, null, null), + ], + ); + }, + ), + ), + VideoContent( + videoItem: videoItem, + source: source, + showOwner: showOwner, + showView: showView, + showDanmaku: showDanmaku, + showPubdate: showPubdate, + ) + ], + ); + }, + ), + ), + ), + // if (source == 'normal') + // Positioned( + // bottom: 0, + // right: 0, + // child: VideoPopupMenu( + // size: 29, + // iconSize: 17, + // actions: actions, + // ), + // ), + ]); + } +} + +class VideoContent extends StatelessWidget { + // ignore: prefer_typing_uninitialized_variables + final card.Card videoItem; + final String source; + final bool showOwner; + final bool showView; + final bool showDanmaku; + final bool showPubdate; + + const VideoContent({ + super.key, + required this.videoItem, + this.source = 'normal', + this.showOwner = true, + this.showView = true, + this.showDanmaku = true, + this.showPubdate = false, + }); + + @override + Widget build(BuildContext context) { + // String pubdate = showPubdate + // ? Utils.dateFormat(videoItem.pubdate!, formatType: 'day') + // : ''; + // if (pubdate != '') pubdate += ' '; + return Expanded( + child: Padding( + padding: const EdgeInsets.fromLTRB(10, 0, 6, 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ...[ + Expanded( + child: Text( + videoItem.smallCoverV5.base.title, + textAlign: TextAlign.start, + style: TextStyle( + fontWeight: FontWeight.w400, + fontSize: Theme.of(context).textTheme.bodyMedium!.fontSize, + height: 1.42, + letterSpacing: 0.3, + ), + maxLines: 2, + overflow: TextOverflow.ellipsis, + ), + ), + ], + // const Spacer(), + // if (videoItem.rcmdReason != null && + // videoItem.rcmdReason.content != '') + // Container( + // padding: const EdgeInsets.symmetric(vertical: 2, horizontal: 5), + // decoration: BoxDecoration( + // borderRadius: BorderRadius.circular(4), + // border: Border.all( + // color: Theme.of(context).colorScheme.surfaceTint), + // ), + // child: Text( + // videoItem.rcmdReason.content, + // style: TextStyle( + // fontSize: 9, + // color: Theme.of(context).colorScheme.surfaceTint), + // ), + // ), + // const SizedBox(height: 4), + if (showOwner || showPubdate) + Text( + videoItem.smallCoverV5.rightDesc1, + maxLines: 1, + style: TextStyle( + fontWeight: FontWeight.w400, + fontSize: Theme.of(context).textTheme.labelMedium!.fontSize, + height: 1, + color: Theme.of(context).colorScheme.outline, + overflow: TextOverflow.clip, + ), + ), + const SizedBox(height: 3), + Text( + videoItem.smallCoverV5.rightDesc2, + maxLines: 1, + style: TextStyle( + fontWeight: FontWeight.w400, + fontSize: Theme.of(context).textTheme.labelMedium!.fontSize, + height: 1, + color: Theme.of(context).colorScheme.outline, + overflow: TextOverflow.clip, + ), + ), + // Row( + // children: [ + // if (showView) ...[ + // StatView( + // theme: 'gray', + // view: videoItem.stat.view as int, + // ), + // const SizedBox(width: 8), + // ], + // if (showDanmaku) + // StatDanMu( + // theme: 'gray', + // danmu: videoItem.stat.danmu as int, + // ), + // const Spacer(), + // if (source == 'normal') const SizedBox(width: 24), + // ], + // ), + ], + ), + ), + ); + } +} diff --git a/lib/grpc/app/archive/middleware/v1/preload.pb.dart b/lib/grpc/app/archive/middleware/v1/preload.pb.dart new file mode 100644 index 000000000..92482365a --- /dev/null +++ b/lib/grpc/app/archive/middleware/v1/preload.pb.dart @@ -0,0 +1,132 @@ +// +// Generated code. Do not modify. +// source: bilibili/app/archive/middleware/v1/preload.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +/// 视频秒开参数 +class PlayerArgs extends $pb.GeneratedMessage { + factory PlayerArgs({ + $fixnum.Int64? qn, + $fixnum.Int64? fnver, + $fixnum.Int64? fnval, + $fixnum.Int64? forceHost, + $fixnum.Int64? voiceBalance, + }) { + final $result = create(); + if (qn != null) { + $result.qn = qn; + } + if (fnver != null) { + $result.fnver = fnver; + } + if (fnval != null) { + $result.fnval = fnval; + } + if (forceHost != null) { + $result.forceHost = forceHost; + } + if (voiceBalance != null) { + $result.voiceBalance = voiceBalance; + } + return $result; + } + PlayerArgs._() : super(); + factory PlayerArgs.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PlayerArgs.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'PlayerArgs', package: const $pb.PackageName(_omitMessageNames ? '' : 'bilibili.app.archive.middleware.v1'), createEmptyInstance: create) + ..aInt64(1, _omitFieldNames ? '' : 'qn') + ..aInt64(2, _omitFieldNames ? '' : 'fnver') + ..aInt64(3, _omitFieldNames ? '' : 'fnval') + ..aInt64(4, _omitFieldNames ? '' : 'forceHost') + ..aInt64(5, _omitFieldNames ? '' : 'voiceBalance') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PlayerArgs clone() => PlayerArgs()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PlayerArgs copyWith(void Function(PlayerArgs) updates) => super.copyWith((message) => updates(message as PlayerArgs)) as PlayerArgs; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static PlayerArgs create() => PlayerArgs._(); + PlayerArgs createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PlayerArgs getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PlayerArgs? _defaultInstance; + + /// 清晰度 + @$pb.TagNumber(1) + $fixnum.Int64 get qn => $_getI64(0); + @$pb.TagNumber(1) + set qn($fixnum.Int64 v) { $_setInt64(0, v); } + @$pb.TagNumber(1) + $core.bool hasQn() => $_has(0); + @$pb.TagNumber(1) + void clearQn() => clearField(1); + + /// 流版本 + @$pb.TagNumber(2) + $fixnum.Int64 get fnver => $_getI64(1); + @$pb.TagNumber(2) + set fnver($fixnum.Int64 v) { $_setInt64(1, v); } + @$pb.TagNumber(2) + $core.bool hasFnver() => $_has(1); + @$pb.TagNumber(2) + void clearFnver() => clearField(2); + + /// 流类型 + @$pb.TagNumber(3) + $fixnum.Int64 get fnval => $_getI64(2); + @$pb.TagNumber(3) + set fnval($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(3) + $core.bool hasFnval() => $_has(2); + @$pb.TagNumber(3) + void clearFnval() => clearField(3); + + /// 返回url是否强制使用域名 + /// 0:不强制使用域名 1:http域名 2:https域名 + @$pb.TagNumber(4) + $fixnum.Int64 get forceHost => $_getI64(3); + @$pb.TagNumber(4) + set forceHost($fixnum.Int64 v) { $_setInt64(3, v); } + @$pb.TagNumber(4) + $core.bool hasForceHost() => $_has(3); + @$pb.TagNumber(4) + void clearForceHost() => clearField(4); + + /// 音量均衡 + @$pb.TagNumber(5) + $fixnum.Int64 get voiceBalance => $_getI64(4); + @$pb.TagNumber(5) + set voiceBalance($fixnum.Int64 v) { $_setInt64(4, v); } + @$pb.TagNumber(5) + $core.bool hasVoiceBalance() => $_has(4); + @$pb.TagNumber(5) + void clearVoiceBalance() => clearField(5); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/grpc/app/archive/middleware/v1/preload.pbenum.dart b/lib/grpc/app/archive/middleware/v1/preload.pbenum.dart new file mode 100644 index 000000000..f398193bf --- /dev/null +++ b/lib/grpc/app/archive/middleware/v1/preload.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: bilibili/app/archive/middleware/v1/preload.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/lib/grpc/app/archive/middleware/v1/preload.pbjson.dart b/lib/grpc/app/archive/middleware/v1/preload.pbjson.dart new file mode 100644 index 000000000..7bd15d518 --- /dev/null +++ b/lib/grpc/app/archive/middleware/v1/preload.pbjson.dart @@ -0,0 +1,33 @@ +// +// Generated code. Do not modify. +// source: bilibili/app/archive/middleware/v1/preload.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use playerArgsDescriptor instead') +const PlayerArgs$json = { + '1': 'PlayerArgs', + '2': [ + {'1': 'qn', '3': 1, '4': 1, '5': 3, '10': 'qn'}, + {'1': 'fnver', '3': 2, '4': 1, '5': 3, '10': 'fnver'}, + {'1': 'fnval', '3': 3, '4': 1, '5': 3, '10': 'fnval'}, + {'1': 'force_host', '3': 4, '4': 1, '5': 3, '10': 'forceHost'}, + {'1': 'voice_balance', '3': 5, '4': 1, '5': 3, '10': 'voiceBalance'}, + ], +}; + +/// Descriptor for `PlayerArgs`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List playerArgsDescriptor = $convert.base64Decode( + 'CgpQbGF5ZXJBcmdzEg4KAnFuGAEgASgDUgJxbhIUCgVmbnZlchgCIAEoA1IFZm52ZXISFAoFZm' + '52YWwYAyABKANSBWZudmFsEh0KCmZvcmNlX2hvc3QYBCABKANSCWZvcmNlSG9zdBIjCg12b2lj' + 'ZV9iYWxhbmNlGAUgASgDUgx2b2ljZUJhbGFuY2U='); + diff --git a/lib/grpc/app/card/v1/ad.pb.dart b/lib/grpc/app/card/v1/ad.pb.dart new file mode 100644 index 000000000..c09ec48cb --- /dev/null +++ b/lib/grpc/app/card/v1/ad.pb.dart @@ -0,0 +1,471 @@ +// +// Generated code. Do not modify. +// source: bilibili/app/card/v1/ad.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +class AdInfo extends $pb.GeneratedMessage { + factory AdInfo({ + $fixnum.Int64? creativeId, + $core.int? creativeType, + $core.int? cardType, + CreativeContent? creativeContent, + $core.String? adCb, + $fixnum.Int64? resource, + $core.int? source, + $core.String? requestId, + $core.bool? isAd, + $fixnum.Int64? cmMark, + $core.int? index, + $core.bool? isAdLoc, + $core.int? cardIndex, + $core.String? clientIp, + $core.List<$core.int>? extra, + $core.int? creativeStyle, + }) { + final $result = create(); + if (creativeId != null) { + $result.creativeId = creativeId; + } + if (creativeType != null) { + $result.creativeType = creativeType; + } + if (cardType != null) { + $result.cardType = cardType; + } + if (creativeContent != null) { + $result.creativeContent = creativeContent; + } + if (adCb != null) { + $result.adCb = adCb; + } + if (resource != null) { + $result.resource = resource; + } + if (source != null) { + $result.source = source; + } + if (requestId != null) { + $result.requestId = requestId; + } + if (isAd != null) { + $result.isAd = isAd; + } + if (cmMark != null) { + $result.cmMark = cmMark; + } + if (index != null) { + $result.index = index; + } + if (isAdLoc != null) { + $result.isAdLoc = isAdLoc; + } + if (cardIndex != null) { + $result.cardIndex = cardIndex; + } + if (clientIp != null) { + $result.clientIp = clientIp; + } + if (extra != null) { + $result.extra = extra; + } + if (creativeStyle != null) { + $result.creativeStyle = creativeStyle; + } + return $result; + } + AdInfo._() : super(); + factory AdInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory AdInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'AdInfo', package: const $pb.PackageName(_omitMessageNames ? '' : 'bilibili.app.card.v1'), createEmptyInstance: create) + ..aInt64(1, _omitFieldNames ? '' : 'creativeId') + ..a<$core.int>(2, _omitFieldNames ? '' : 'creativeType', $pb.PbFieldType.O3) + ..a<$core.int>(3, _omitFieldNames ? '' : 'cardType', $pb.PbFieldType.O3) + ..aOM(4, _omitFieldNames ? '' : 'creativeContent', subBuilder: CreativeContent.create) + ..aOS(5, _omitFieldNames ? '' : 'adCb') + ..aInt64(6, _omitFieldNames ? '' : 'resource') + ..a<$core.int>(7, _omitFieldNames ? '' : 'source', $pb.PbFieldType.O3) + ..aOS(8, _omitFieldNames ? '' : 'requestId') + ..aOB(9, _omitFieldNames ? '' : 'isAd') + ..aInt64(10, _omitFieldNames ? '' : 'cmMark') + ..a<$core.int>(11, _omitFieldNames ? '' : 'index', $pb.PbFieldType.O3) + ..aOB(12, _omitFieldNames ? '' : 'isAdLoc') + ..a<$core.int>(13, _omitFieldNames ? '' : 'cardIndex', $pb.PbFieldType.O3) + ..aOS(14, _omitFieldNames ? '' : 'clientIp') + ..a<$core.List<$core.int>>(15, _omitFieldNames ? '' : 'extra', $pb.PbFieldType.OY) + ..a<$core.int>(16, _omitFieldNames ? '' : 'creativeStyle', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + AdInfo clone() => AdInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + AdInfo copyWith(void Function(AdInfo) updates) => super.copyWith((message) => updates(message as AdInfo)) as AdInfo; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static AdInfo create() => AdInfo._(); + AdInfo createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static AdInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static AdInfo? _defaultInstance; + + @$pb.TagNumber(1) + $fixnum.Int64 get creativeId => $_getI64(0); + @$pb.TagNumber(1) + set creativeId($fixnum.Int64 v) { $_setInt64(0, v); } + @$pb.TagNumber(1) + $core.bool hasCreativeId() => $_has(0); + @$pb.TagNumber(1) + void clearCreativeId() => clearField(1); + + @$pb.TagNumber(2) + $core.int get creativeType => $_getIZ(1); + @$pb.TagNumber(2) + set creativeType($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasCreativeType() => $_has(1); + @$pb.TagNumber(2) + void clearCreativeType() => clearField(2); + + @$pb.TagNumber(3) + $core.int get cardType => $_getIZ(2); + @$pb.TagNumber(3) + set cardType($core.int v) { $_setSignedInt32(2, v); } + @$pb.TagNumber(3) + $core.bool hasCardType() => $_has(2); + @$pb.TagNumber(3) + void clearCardType() => clearField(3); + + @$pb.TagNumber(4) + CreativeContent get creativeContent => $_getN(3); + @$pb.TagNumber(4) + set creativeContent(CreativeContent v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasCreativeContent() => $_has(3); + @$pb.TagNumber(4) + void clearCreativeContent() => clearField(4); + @$pb.TagNumber(4) + CreativeContent ensureCreativeContent() => $_ensure(3); + + @$pb.TagNumber(5) + $core.String get adCb => $_getSZ(4); + @$pb.TagNumber(5) + set adCb($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasAdCb() => $_has(4); + @$pb.TagNumber(5) + void clearAdCb() => clearField(5); + + @$pb.TagNumber(6) + $fixnum.Int64 get resource => $_getI64(5); + @$pb.TagNumber(6) + set resource($fixnum.Int64 v) { $_setInt64(5, v); } + @$pb.TagNumber(6) + $core.bool hasResource() => $_has(5); + @$pb.TagNumber(6) + void clearResource() => clearField(6); + + @$pb.TagNumber(7) + $core.int get source => $_getIZ(6); + @$pb.TagNumber(7) + set source($core.int v) { $_setSignedInt32(6, v); } + @$pb.TagNumber(7) + $core.bool hasSource() => $_has(6); + @$pb.TagNumber(7) + void clearSource() => clearField(7); + + @$pb.TagNumber(8) + $core.String get requestId => $_getSZ(7); + @$pb.TagNumber(8) + set requestId($core.String v) { $_setString(7, v); } + @$pb.TagNumber(8) + $core.bool hasRequestId() => $_has(7); + @$pb.TagNumber(8) + void clearRequestId() => clearField(8); + + @$pb.TagNumber(9) + $core.bool get isAd => $_getBF(8); + @$pb.TagNumber(9) + set isAd($core.bool v) { $_setBool(8, v); } + @$pb.TagNumber(9) + $core.bool hasIsAd() => $_has(8); + @$pb.TagNumber(9) + void clearIsAd() => clearField(9); + + @$pb.TagNumber(10) + $fixnum.Int64 get cmMark => $_getI64(9); + @$pb.TagNumber(10) + set cmMark($fixnum.Int64 v) { $_setInt64(9, v); } + @$pb.TagNumber(10) + $core.bool hasCmMark() => $_has(9); + @$pb.TagNumber(10) + void clearCmMark() => clearField(10); + + @$pb.TagNumber(11) + $core.int get index => $_getIZ(10); + @$pb.TagNumber(11) + set index($core.int v) { $_setSignedInt32(10, v); } + @$pb.TagNumber(11) + $core.bool hasIndex() => $_has(10); + @$pb.TagNumber(11) + void clearIndex() => clearField(11); + + @$pb.TagNumber(12) + $core.bool get isAdLoc => $_getBF(11); + @$pb.TagNumber(12) + set isAdLoc($core.bool v) { $_setBool(11, v); } + @$pb.TagNumber(12) + $core.bool hasIsAdLoc() => $_has(11); + @$pb.TagNumber(12) + void clearIsAdLoc() => clearField(12); + + @$pb.TagNumber(13) + $core.int get cardIndex => $_getIZ(12); + @$pb.TagNumber(13) + set cardIndex($core.int v) { $_setSignedInt32(12, v); } + @$pb.TagNumber(13) + $core.bool hasCardIndex() => $_has(12); + @$pb.TagNumber(13) + void clearCardIndex() => clearField(13); + + @$pb.TagNumber(14) + $core.String get clientIp => $_getSZ(13); + @$pb.TagNumber(14) + set clientIp($core.String v) { $_setString(13, v); } + @$pb.TagNumber(14) + $core.bool hasClientIp() => $_has(13); + @$pb.TagNumber(14) + void clearClientIp() => clearField(14); + + @$pb.TagNumber(15) + $core.List<$core.int> get extra => $_getN(14); + @$pb.TagNumber(15) + set extra($core.List<$core.int> v) { $_setBytes(14, v); } + @$pb.TagNumber(15) + $core.bool hasExtra() => $_has(14); + @$pb.TagNumber(15) + void clearExtra() => clearField(15); + + @$pb.TagNumber(16) + $core.int get creativeStyle => $_getIZ(15); + @$pb.TagNumber(16) + set creativeStyle($core.int v) { $_setSignedInt32(15, v); } + @$pb.TagNumber(16) + $core.bool hasCreativeStyle() => $_has(15); + @$pb.TagNumber(16) + void clearCreativeStyle() => clearField(16); +} + +class CreativeContent extends $pb.GeneratedMessage { + factory CreativeContent({ + $core.String? title, + $core.String? description, + $fixnum.Int64? videoId, + $core.String? username, + $core.String? imageUrl, + $core.String? imageMd5, + $core.String? logUrl, + $core.String? logMd5, + $core.String? url, + $core.String? clickUrl, + $core.String? showUrl, + }) { + final $result = create(); + if (title != null) { + $result.title = title; + } + if (description != null) { + $result.description = description; + } + if (videoId != null) { + $result.videoId = videoId; + } + if (username != null) { + $result.username = username; + } + if (imageUrl != null) { + $result.imageUrl = imageUrl; + } + if (imageMd5 != null) { + $result.imageMd5 = imageMd5; + } + if (logUrl != null) { + $result.logUrl = logUrl; + } + if (logMd5 != null) { + $result.logMd5 = logMd5; + } + if (url != null) { + $result.url = url; + } + if (clickUrl != null) { + $result.clickUrl = clickUrl; + } + if (showUrl != null) { + $result.showUrl = showUrl; + } + return $result; + } + CreativeContent._() : super(); + factory CreativeContent.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreativeContent.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'CreativeContent', package: const $pb.PackageName(_omitMessageNames ? '' : 'bilibili.app.card.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'title') + ..aOS(2, _omitFieldNames ? '' : 'description') + ..aInt64(3, _omitFieldNames ? '' : 'videoId') + ..aOS(4, _omitFieldNames ? '' : 'username') + ..aOS(5, _omitFieldNames ? '' : 'imageUrl') + ..aOS(6, _omitFieldNames ? '' : 'imageMd5') + ..aOS(7, _omitFieldNames ? '' : 'logUrl') + ..aOS(8, _omitFieldNames ? '' : 'logMd5') + ..aOS(9, _omitFieldNames ? '' : 'url') + ..aOS(10, _omitFieldNames ? '' : 'clickUrl') + ..aOS(11, _omitFieldNames ? '' : 'showUrl') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreativeContent clone() => CreativeContent()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreativeContent copyWith(void Function(CreativeContent) updates) => super.copyWith((message) => updates(message as CreativeContent)) as CreativeContent; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static CreativeContent create() => CreativeContent._(); + CreativeContent createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreativeContent getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreativeContent? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get title => $_getSZ(0); + @$pb.TagNumber(1) + set title($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasTitle() => $_has(0); + @$pb.TagNumber(1) + void clearTitle() => clearField(1); + + @$pb.TagNumber(2) + $core.String get description => $_getSZ(1); + @$pb.TagNumber(2) + set description($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasDescription() => $_has(1); + @$pb.TagNumber(2) + void clearDescription() => clearField(2); + + @$pb.TagNumber(3) + $fixnum.Int64 get videoId => $_getI64(2); + @$pb.TagNumber(3) + set videoId($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(3) + $core.bool hasVideoId() => $_has(2); + @$pb.TagNumber(3) + void clearVideoId() => clearField(3); + + @$pb.TagNumber(4) + $core.String get username => $_getSZ(3); + @$pb.TagNumber(4) + set username($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasUsername() => $_has(3); + @$pb.TagNumber(4) + void clearUsername() => clearField(4); + + @$pb.TagNumber(5) + $core.String get imageUrl => $_getSZ(4); + @$pb.TagNumber(5) + set imageUrl($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasImageUrl() => $_has(4); + @$pb.TagNumber(5) + void clearImageUrl() => clearField(5); + + @$pb.TagNumber(6) + $core.String get imageMd5 => $_getSZ(5); + @$pb.TagNumber(6) + set imageMd5($core.String v) { $_setString(5, v); } + @$pb.TagNumber(6) + $core.bool hasImageMd5() => $_has(5); + @$pb.TagNumber(6) + void clearImageMd5() => clearField(6); + + @$pb.TagNumber(7) + $core.String get logUrl => $_getSZ(6); + @$pb.TagNumber(7) + set logUrl($core.String v) { $_setString(6, v); } + @$pb.TagNumber(7) + $core.bool hasLogUrl() => $_has(6); + @$pb.TagNumber(7) + void clearLogUrl() => clearField(7); + + @$pb.TagNumber(8) + $core.String get logMd5 => $_getSZ(7); + @$pb.TagNumber(8) + set logMd5($core.String v) { $_setString(7, v); } + @$pb.TagNumber(8) + $core.bool hasLogMd5() => $_has(7); + @$pb.TagNumber(8) + void clearLogMd5() => clearField(8); + + @$pb.TagNumber(9) + $core.String get url => $_getSZ(8); + @$pb.TagNumber(9) + set url($core.String v) { $_setString(8, v); } + @$pb.TagNumber(9) + $core.bool hasUrl() => $_has(8); + @$pb.TagNumber(9) + void clearUrl() => clearField(9); + + @$pb.TagNumber(10) + $core.String get clickUrl => $_getSZ(9); + @$pb.TagNumber(10) + set clickUrl($core.String v) { $_setString(9, v); } + @$pb.TagNumber(10) + $core.bool hasClickUrl() => $_has(9); + @$pb.TagNumber(10) + void clearClickUrl() => clearField(10); + + @$pb.TagNumber(11) + $core.String get showUrl => $_getSZ(10); + @$pb.TagNumber(11) + set showUrl($core.String v) { $_setString(10, v); } + @$pb.TagNumber(11) + $core.bool hasShowUrl() => $_has(10); + @$pb.TagNumber(11) + void clearShowUrl() => clearField(11); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/grpc/app/card/v1/ad.pbenum.dart b/lib/grpc/app/card/v1/ad.pbenum.dart new file mode 100644 index 000000000..627cacdcc --- /dev/null +++ b/lib/grpc/app/card/v1/ad.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: bilibili/app/card/v1/ad.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/lib/grpc/app/card/v1/ad.pbjson.dart b/lib/grpc/app/card/v1/ad.pbjson.dart new file mode 100644 index 000000000..cfa7487bb --- /dev/null +++ b/lib/grpc/app/card/v1/ad.pbjson.dart @@ -0,0 +1,78 @@ +// +// Generated code. Do not modify. +// source: bilibili/app/card/v1/ad.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use adInfoDescriptor instead') +const AdInfo$json = { + '1': 'AdInfo', + '2': [ + {'1': 'creative_id', '3': 1, '4': 1, '5': 3, '10': 'creativeId'}, + {'1': 'creative_type', '3': 2, '4': 1, '5': 5, '10': 'creativeType'}, + {'1': 'card_type', '3': 3, '4': 1, '5': 5, '10': 'cardType'}, + {'1': 'creative_content', '3': 4, '4': 1, '5': 11, '6': '.bilibili.app.card.v1.CreativeContent', '10': 'creativeContent'}, + {'1': 'ad_cb', '3': 5, '4': 1, '5': 9, '10': 'adCb'}, + {'1': 'resource', '3': 6, '4': 1, '5': 3, '10': 'resource'}, + {'1': 'source', '3': 7, '4': 1, '5': 5, '10': 'source'}, + {'1': 'request_id', '3': 8, '4': 1, '5': 9, '10': 'requestId'}, + {'1': 'is_ad', '3': 9, '4': 1, '5': 8, '10': 'isAd'}, + {'1': 'cm_mark', '3': 10, '4': 1, '5': 3, '10': 'cmMark'}, + {'1': 'index', '3': 11, '4': 1, '5': 5, '10': 'index'}, + {'1': 'is_ad_loc', '3': 12, '4': 1, '5': 8, '10': 'isAdLoc'}, + {'1': 'card_index', '3': 13, '4': 1, '5': 5, '10': 'cardIndex'}, + {'1': 'client_ip', '3': 14, '4': 1, '5': 9, '10': 'clientIp'}, + {'1': 'extra', '3': 15, '4': 1, '5': 12, '10': 'extra'}, + {'1': 'creative_style', '3': 16, '4': 1, '5': 5, '10': 'creativeStyle'}, + ], +}; + +/// Descriptor for `AdInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List adInfoDescriptor = $convert.base64Decode( + 'CgZBZEluZm8SHwoLY3JlYXRpdmVfaWQYASABKANSCmNyZWF0aXZlSWQSIwoNY3JlYXRpdmVfdH' + 'lwZRgCIAEoBVIMY3JlYXRpdmVUeXBlEhsKCWNhcmRfdHlwZRgDIAEoBVIIY2FyZFR5cGUSUAoQ' + 'Y3JlYXRpdmVfY29udGVudBgEIAEoCzIlLmJpbGliaWxpLmFwcC5jYXJkLnYxLkNyZWF0aXZlQ2' + '9udGVudFIPY3JlYXRpdmVDb250ZW50EhMKBWFkX2NiGAUgASgJUgRhZENiEhoKCHJlc291cmNl' + 'GAYgASgDUghyZXNvdXJjZRIWCgZzb3VyY2UYByABKAVSBnNvdXJjZRIdCgpyZXF1ZXN0X2lkGA' + 'ggASgJUglyZXF1ZXN0SWQSEwoFaXNfYWQYCSABKAhSBGlzQWQSFwoHY21fbWFyaxgKIAEoA1IG' + 'Y21NYXJrEhQKBWluZGV4GAsgASgFUgVpbmRleBIaCglpc19hZF9sb2MYDCABKAhSB2lzQWRMb2' + 'MSHQoKY2FyZF9pbmRleBgNIAEoBVIJY2FyZEluZGV4EhsKCWNsaWVudF9pcBgOIAEoCVIIY2xp' + 'ZW50SXASFAoFZXh0cmEYDyABKAxSBWV4dHJhEiUKDmNyZWF0aXZlX3N0eWxlGBAgASgFUg1jcm' + 'VhdGl2ZVN0eWxl'); + +@$core.Deprecated('Use creativeContentDescriptor instead') +const CreativeContent$json = { + '1': 'CreativeContent', + '2': [ + {'1': 'title', '3': 1, '4': 1, '5': 9, '10': 'title'}, + {'1': 'description', '3': 2, '4': 1, '5': 9, '10': 'description'}, + {'1': 'video_id', '3': 3, '4': 1, '5': 3, '10': 'videoId'}, + {'1': 'username', '3': 4, '4': 1, '5': 9, '10': 'username'}, + {'1': 'image_url', '3': 5, '4': 1, '5': 9, '10': 'imageUrl'}, + {'1': 'image_md5', '3': 6, '4': 1, '5': 9, '10': 'imageMd5'}, + {'1': 'log_url', '3': 7, '4': 1, '5': 9, '10': 'logUrl'}, + {'1': 'log_md5', '3': 8, '4': 1, '5': 9, '10': 'logMd5'}, + {'1': 'url', '3': 9, '4': 1, '5': 9, '10': 'url'}, + {'1': 'click_url', '3': 10, '4': 1, '5': 9, '10': 'clickUrl'}, + {'1': 'show_url', '3': 11, '4': 1, '5': 9, '10': 'showUrl'}, + ], +}; + +/// Descriptor for `CreativeContent`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List creativeContentDescriptor = $convert.base64Decode( + 'Cg9DcmVhdGl2ZUNvbnRlbnQSFAoFdGl0bGUYASABKAlSBXRpdGxlEiAKC2Rlc2NyaXB0aW9uGA' + 'IgASgJUgtkZXNjcmlwdGlvbhIZCgh2aWRlb19pZBgDIAEoA1IHdmlkZW9JZBIaCgh1c2VybmFt' + 'ZRgEIAEoCVIIdXNlcm5hbWUSGwoJaW1hZ2VfdXJsGAUgASgJUghpbWFnZVVybBIbCglpbWFnZV' + '9tZDUYBiABKAlSCGltYWdlTWQ1EhcKB2xvZ191cmwYByABKAlSBmxvZ1VybBIXCgdsb2dfbWQ1' + 'GAggASgJUgZsb2dNZDUSEAoDdXJsGAkgASgJUgN1cmwSGwoJY2xpY2tfdXJsGAogASgJUghjbG' + 'lja1VybBIZCghzaG93X3VybBgLIAEoCVIHc2hvd1VybA=='); + diff --git a/lib/grpc/app/card/v1/card.pb.dart b/lib/grpc/app/card/v1/card.pb.dart new file mode 100644 index 000000000..1ea5d6a83 --- /dev/null +++ b/lib/grpc/app/card/v1/card.pb.dart @@ -0,0 +1,268 @@ +// +// Generated code. Do not modify. +// source: bilibili/app/card/v1/card.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'single.pb.dart' as $0; + +enum Card_Item { + smallCoverV5, + largeCoverV1, + threeItemAllV2, + threeItemV1, + hotTopic, + threeItemHV5, + middleCoverV3, + largeCoverV4, + popularTopEntrance, + rcmdOneItem, + smallCoverV5Ad, + notSet +} + +/// 卡片信息 +class Card extends $pb.GeneratedMessage { + factory Card({ + $0.SmallCoverV5? smallCoverV5, + $0.LargeCoverV1? largeCoverV1, + $0.ThreeItemAllV2? threeItemAllV2, + $0.ThreeItemV1? threeItemV1, + $0.HotTopic? hotTopic, + $0.DynamicHot? threeItemHV5, + $0.MiddleCoverV3? middleCoverV3, + $0.LargeCoverV4? largeCoverV4, + $0.PopularTopEntrance? popularTopEntrance, + $0.RcmdOneItem? rcmdOneItem, + $0.SmallCoverV5Ad? smallCoverV5Ad, + }) { + final $result = create(); + if (smallCoverV5 != null) { + $result.smallCoverV5 = smallCoverV5; + } + if (largeCoverV1 != null) { + $result.largeCoverV1 = largeCoverV1; + } + if (threeItemAllV2 != null) { + $result.threeItemAllV2 = threeItemAllV2; + } + if (threeItemV1 != null) { + $result.threeItemV1 = threeItemV1; + } + if (hotTopic != null) { + $result.hotTopic = hotTopic; + } + if (threeItemHV5 != null) { + $result.threeItemHV5 = threeItemHV5; + } + if (middleCoverV3 != null) { + $result.middleCoverV3 = middleCoverV3; + } + if (largeCoverV4 != null) { + $result.largeCoverV4 = largeCoverV4; + } + if (popularTopEntrance != null) { + $result.popularTopEntrance = popularTopEntrance; + } + if (rcmdOneItem != null) { + $result.rcmdOneItem = rcmdOneItem; + } + if (smallCoverV5Ad != null) { + $result.smallCoverV5Ad = smallCoverV5Ad; + } + return $result; + } + Card._() : super(); + factory Card.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Card.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, Card_Item> _Card_ItemByTag = { + 1 : Card_Item.smallCoverV5, + 2 : Card_Item.largeCoverV1, + 3 : Card_Item.threeItemAllV2, + 4 : Card_Item.threeItemV1, + 5 : Card_Item.hotTopic, + 6 : Card_Item.threeItemHV5, + 7 : Card_Item.middleCoverV3, + 8 : Card_Item.largeCoverV4, + 9 : Card_Item.popularTopEntrance, + 10 : Card_Item.rcmdOneItem, + 11 : Card_Item.smallCoverV5Ad, + 0 : Card_Item.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Card', package: const $pb.PackageName(_omitMessageNames ? '' : 'bilibili.app.card.v1'), createEmptyInstance: create) + ..oo(0, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) + ..aOM<$0.SmallCoverV5>(1, _omitFieldNames ? '' : 'smallCoverV5', subBuilder: $0.SmallCoverV5.create) + ..aOM<$0.LargeCoverV1>(2, _omitFieldNames ? '' : 'largeCoverV1', subBuilder: $0.LargeCoverV1.create) + ..aOM<$0.ThreeItemAllV2>(3, _omitFieldNames ? '' : 'threeItemAllV2', subBuilder: $0.ThreeItemAllV2.create) + ..aOM<$0.ThreeItemV1>(4, _omitFieldNames ? '' : 'threeItemV1', subBuilder: $0.ThreeItemV1.create) + ..aOM<$0.HotTopic>(5, _omitFieldNames ? '' : 'hotTopic', subBuilder: $0.HotTopic.create) + ..aOM<$0.DynamicHot>(6, _omitFieldNames ? '' : 'threeItemHV5', subBuilder: $0.DynamicHot.create) + ..aOM<$0.MiddleCoverV3>(7, _omitFieldNames ? '' : 'middleCoverV3', subBuilder: $0.MiddleCoverV3.create) + ..aOM<$0.LargeCoverV4>(8, _omitFieldNames ? '' : 'largeCoverV4', subBuilder: $0.LargeCoverV4.create) + ..aOM<$0.PopularTopEntrance>(9, _omitFieldNames ? '' : 'popularTopEntrance', subBuilder: $0.PopularTopEntrance.create) + ..aOM<$0.RcmdOneItem>(10, _omitFieldNames ? '' : 'rcmdOneItem', subBuilder: $0.RcmdOneItem.create) + ..aOM<$0.SmallCoverV5Ad>(11, _omitFieldNames ? '' : 'smallCoverV5Ad', subBuilder: $0.SmallCoverV5Ad.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Card clone() => Card()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Card copyWith(void Function(Card) updates) => super.copyWith((message) => updates(message as Card)) as Card; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Card create() => Card._(); + Card createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Card getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Card? _defaultInstance; + + Card_Item whichItem() => _Card_ItemByTag[$_whichOneof(0)]!; + void clearItem() => clearField($_whichOneof(0)); + + /// 小封面条目 + @$pb.TagNumber(1) + $0.SmallCoverV5 get smallCoverV5 => $_getN(0); + @$pb.TagNumber(1) + set smallCoverV5($0.SmallCoverV5 v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasSmallCoverV5() => $_has(0); + @$pb.TagNumber(1) + void clearSmallCoverV5() => clearField(1); + @$pb.TagNumber(1) + $0.SmallCoverV5 ensureSmallCoverV5() => $_ensure(0); + + @$pb.TagNumber(2) + $0.LargeCoverV1 get largeCoverV1 => $_getN(1); + @$pb.TagNumber(2) + set largeCoverV1($0.LargeCoverV1 v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasLargeCoverV1() => $_has(1); + @$pb.TagNumber(2) + void clearLargeCoverV1() => clearField(2); + @$pb.TagNumber(2) + $0.LargeCoverV1 ensureLargeCoverV1() => $_ensure(1); + + @$pb.TagNumber(3) + $0.ThreeItemAllV2 get threeItemAllV2 => $_getN(2); + @$pb.TagNumber(3) + set threeItemAllV2($0.ThreeItemAllV2 v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasThreeItemAllV2() => $_has(2); + @$pb.TagNumber(3) + void clearThreeItemAllV2() => clearField(3); + @$pb.TagNumber(3) + $0.ThreeItemAllV2 ensureThreeItemAllV2() => $_ensure(2); + + @$pb.TagNumber(4) + $0.ThreeItemV1 get threeItemV1 => $_getN(3); + @$pb.TagNumber(4) + set threeItemV1($0.ThreeItemV1 v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasThreeItemV1() => $_has(3); + @$pb.TagNumber(4) + void clearThreeItemV1() => clearField(4); + @$pb.TagNumber(4) + $0.ThreeItemV1 ensureThreeItemV1() => $_ensure(3); + + @$pb.TagNumber(5) + $0.HotTopic get hotTopic => $_getN(4); + @$pb.TagNumber(5) + set hotTopic($0.HotTopic v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasHotTopic() => $_has(4); + @$pb.TagNumber(5) + void clearHotTopic() => clearField(5); + @$pb.TagNumber(5) + $0.HotTopic ensureHotTopic() => $_ensure(4); + + @$pb.TagNumber(6) + $0.DynamicHot get threeItemHV5 => $_getN(5); + @$pb.TagNumber(6) + set threeItemHV5($0.DynamicHot v) { setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasThreeItemHV5() => $_has(5); + @$pb.TagNumber(6) + void clearThreeItemHV5() => clearField(6); + @$pb.TagNumber(6) + $0.DynamicHot ensureThreeItemHV5() => $_ensure(5); + + @$pb.TagNumber(7) + $0.MiddleCoverV3 get middleCoverV3 => $_getN(6); + @$pb.TagNumber(7) + set middleCoverV3($0.MiddleCoverV3 v) { setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasMiddleCoverV3() => $_has(6); + @$pb.TagNumber(7) + void clearMiddleCoverV3() => clearField(7); + @$pb.TagNumber(7) + $0.MiddleCoverV3 ensureMiddleCoverV3() => $_ensure(6); + + @$pb.TagNumber(8) + $0.LargeCoverV4 get largeCoverV4 => $_getN(7); + @$pb.TagNumber(8) + set largeCoverV4($0.LargeCoverV4 v) { setField(8, v); } + @$pb.TagNumber(8) + $core.bool hasLargeCoverV4() => $_has(7); + @$pb.TagNumber(8) + void clearLargeCoverV4() => clearField(8); + @$pb.TagNumber(8) + $0.LargeCoverV4 ensureLargeCoverV4() => $_ensure(7); + + /// 热门列表顶部按钮 + @$pb.TagNumber(9) + $0.PopularTopEntrance get popularTopEntrance => $_getN(8); + @$pb.TagNumber(9) + set popularTopEntrance($0.PopularTopEntrance v) { setField(9, v); } + @$pb.TagNumber(9) + $core.bool hasPopularTopEntrance() => $_has(8); + @$pb.TagNumber(9) + void clearPopularTopEntrance() => clearField(9); + @$pb.TagNumber(9) + $0.PopularTopEntrance ensurePopularTopEntrance() => $_ensure(8); + + @$pb.TagNumber(10) + $0.RcmdOneItem get rcmdOneItem => $_getN(9); + @$pb.TagNumber(10) + set rcmdOneItem($0.RcmdOneItem v) { setField(10, v); } + @$pb.TagNumber(10) + $core.bool hasRcmdOneItem() => $_has(9); + @$pb.TagNumber(10) + void clearRcmdOneItem() => clearField(10); + @$pb.TagNumber(10) + $0.RcmdOneItem ensureRcmdOneItem() => $_ensure(9); + + @$pb.TagNumber(11) + $0.SmallCoverV5Ad get smallCoverV5Ad => $_getN(10); + @$pb.TagNumber(11) + set smallCoverV5Ad($0.SmallCoverV5Ad v) { setField(11, v); } + @$pb.TagNumber(11) + $core.bool hasSmallCoverV5Ad() => $_has(10); + @$pb.TagNumber(11) + void clearSmallCoverV5Ad() => clearField(11); + @$pb.TagNumber(11) + $0.SmallCoverV5Ad ensureSmallCoverV5Ad() => $_ensure(10); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/grpc/app/card/v1/card.pbenum.dart b/lib/grpc/app/card/v1/card.pbenum.dart new file mode 100644 index 000000000..10ba0f961 --- /dev/null +++ b/lib/grpc/app/card/v1/card.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: bilibili/app/card/v1/card.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/lib/grpc/app/card/v1/card.pbjson.dart b/lib/grpc/app/card/v1/card.pbjson.dart new file mode 100644 index 000000000..a64fc4215 --- /dev/null +++ b/lib/grpc/app/card/v1/card.pbjson.dart @@ -0,0 +1,55 @@ +// +// Generated code. Do not modify. +// source: bilibili/app/card/v1/card.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use cardDescriptor instead') +const Card$json = { + '1': 'Card', + '2': [ + {'1': 'small_cover_v5', '3': 1, '4': 1, '5': 11, '6': '.bilibili.app.card.v1.SmallCoverV5', '9': 0, '10': 'smallCoverV5'}, + {'1': 'large_cover_v1', '3': 2, '4': 1, '5': 11, '6': '.bilibili.app.card.v1.LargeCoverV1', '9': 0, '10': 'largeCoverV1'}, + {'1': 'three_item_all_v2', '3': 3, '4': 1, '5': 11, '6': '.bilibili.app.card.v1.ThreeItemAllV2', '9': 0, '10': 'threeItemAllV2'}, + {'1': 'three_item_v1', '3': 4, '4': 1, '5': 11, '6': '.bilibili.app.card.v1.ThreeItemV1', '9': 0, '10': 'threeItemV1'}, + {'1': 'hot_topic', '3': 5, '4': 1, '5': 11, '6': '.bilibili.app.card.v1.HotTopic', '9': 0, '10': 'hotTopic'}, + {'1': 'three_item_h_v5', '3': 6, '4': 1, '5': 11, '6': '.bilibili.app.card.v1.DynamicHot', '9': 0, '10': 'threeItemHV5'}, + {'1': 'middle_cover_v3', '3': 7, '4': 1, '5': 11, '6': '.bilibili.app.card.v1.MiddleCoverV3', '9': 0, '10': 'middleCoverV3'}, + {'1': 'large_cover_v4', '3': 8, '4': 1, '5': 11, '6': '.bilibili.app.card.v1.LargeCoverV4', '9': 0, '10': 'largeCoverV4'}, + {'1': 'popular_top_entrance', '3': 9, '4': 1, '5': 11, '6': '.bilibili.app.card.v1.PopularTopEntrance', '9': 0, '10': 'popularTopEntrance'}, + {'1': 'rcmd_one_item', '3': 10, '4': 1, '5': 11, '6': '.bilibili.app.card.v1.RcmdOneItem', '9': 0, '10': 'rcmdOneItem'}, + {'1': 'small_cover_v5_ad', '3': 11, '4': 1, '5': 11, '6': '.bilibili.app.card.v1.SmallCoverV5Ad', '9': 0, '10': 'smallCoverV5Ad'}, + ], + '8': [ + {'1': 'item'}, + ], +}; + +/// Descriptor for `Card`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List cardDescriptor = $convert.base64Decode( + 'CgRDYXJkEkoKDnNtYWxsX2NvdmVyX3Y1GAEgASgLMiIuYmlsaWJpbGkuYXBwLmNhcmQudjEuU2' + '1hbGxDb3ZlclY1SABSDHNtYWxsQ292ZXJWNRJKCg5sYXJnZV9jb3Zlcl92MRgCIAEoCzIiLmJp' + 'bGliaWxpLmFwcC5jYXJkLnYxLkxhcmdlQ292ZXJWMUgAUgxsYXJnZUNvdmVyVjESUQoRdGhyZW' + 'VfaXRlbV9hbGxfdjIYAyABKAsyJC5iaWxpYmlsaS5hcHAuY2FyZC52MS5UaHJlZUl0ZW1BbGxW' + 'MkgAUg50aHJlZUl0ZW1BbGxWMhJHCg10aHJlZV9pdGVtX3YxGAQgASgLMiEuYmlsaWJpbGkuYX' + 'BwLmNhcmQudjEuVGhyZWVJdGVtVjFIAFILdGhyZWVJdGVtVjESPQoJaG90X3RvcGljGAUgASgL' + 'Mh4uYmlsaWJpbGkuYXBwLmNhcmQudjEuSG90VG9waWNIAFIIaG90VG9waWMSSQoPdGhyZWVfaX' + 'RlbV9oX3Y1GAYgASgLMiAuYmlsaWJpbGkuYXBwLmNhcmQudjEuRHluYW1pY0hvdEgAUgx0aHJl' + 'ZUl0ZW1IVjUSTQoPbWlkZGxlX2NvdmVyX3YzGAcgASgLMiMuYmlsaWJpbGkuYXBwLmNhcmQudj' + 'EuTWlkZGxlQ292ZXJWM0gAUg1taWRkbGVDb3ZlclYzEkoKDmxhcmdlX2NvdmVyX3Y0GAggASgL' + 'MiIuYmlsaWJpbGkuYXBwLmNhcmQudjEuTGFyZ2VDb3ZlclY0SABSDGxhcmdlQ292ZXJWNBJcCh' + 'Rwb3B1bGFyX3RvcF9lbnRyYW5jZRgJIAEoCzIoLmJpbGliaWxpLmFwcC5jYXJkLnYxLlBvcHVs' + 'YXJUb3BFbnRyYW5jZUgAUhJwb3B1bGFyVG9wRW50cmFuY2USRwoNcmNtZF9vbmVfaXRlbRgKIA' + 'EoCzIhLmJpbGliaWxpLmFwcC5jYXJkLnYxLlJjbWRPbmVJdGVtSABSC3JjbWRPbmVJdGVtElEK' + 'EXNtYWxsX2NvdmVyX3Y1X2FkGAsgASgLMiQuYmlsaWJpbGkuYXBwLmNhcmQudjEuU21hbGxDb3' + 'ZlclY1QWRIAFIOc21hbGxDb3ZlclY1QWRCBgoEaXRlbQ=='); + diff --git a/lib/grpc/app/card/v1/common.pb.dart b/lib/grpc/app/card/v1/common.pb.dart new file mode 100644 index 000000000..68aa97103 --- /dev/null +++ b/lib/grpc/app/card/v1/common.pb.dart @@ -0,0 +1,2532 @@ +// +// Generated code. Do not modify. +// source: bilibili/app/card/v1/common.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'ad.pb.dart' as $0; + +class Args extends $pb.GeneratedMessage { + factory Args({ + $core.int? type, + $fixnum.Int64? upId, + $core.String? upName, + $core.int? rid, + $core.String? rname, + $fixnum.Int64? tid, + $core.String? tname, + $core.String? trackId, + $core.String? state, + $core.int? convergeType, + $fixnum.Int64? aid, + }) { + final $result = create(); + if (type != null) { + $result.type = type; + } + if (upId != null) { + $result.upId = upId; + } + if (upName != null) { + $result.upName = upName; + } + if (rid != null) { + $result.rid = rid; + } + if (rname != null) { + $result.rname = rname; + } + if (tid != null) { + $result.tid = tid; + } + if (tname != null) { + $result.tname = tname; + } + if (trackId != null) { + $result.trackId = trackId; + } + if (state != null) { + $result.state = state; + } + if (convergeType != null) { + $result.convergeType = convergeType; + } + if (aid != null) { + $result.aid = aid; + } + return $result; + } + Args._() : super(); + factory Args.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Args.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Args', package: const $pb.PackageName(_omitMessageNames ? '' : 'bilibili.app.card.v1'), createEmptyInstance: create) + ..a<$core.int>(1, _omitFieldNames ? '' : 'type', $pb.PbFieldType.O3) + ..aInt64(2, _omitFieldNames ? '' : 'upId') + ..aOS(3, _omitFieldNames ? '' : 'upName') + ..a<$core.int>(4, _omitFieldNames ? '' : 'rid', $pb.PbFieldType.O3) + ..aOS(5, _omitFieldNames ? '' : 'rname') + ..aInt64(6, _omitFieldNames ? '' : 'tid') + ..aOS(7, _omitFieldNames ? '' : 'tname') + ..aOS(8, _omitFieldNames ? '' : 'trackId') + ..aOS(9, _omitFieldNames ? '' : 'state') + ..a<$core.int>(10, _omitFieldNames ? '' : 'convergeType', $pb.PbFieldType.O3) + ..aInt64(11, _omitFieldNames ? '' : 'aid') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Args clone() => Args()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Args copyWith(void Function(Args) updates) => super.copyWith((message) => updates(message as Args)) as Args; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Args create() => Args._(); + Args createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Args getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Args? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get type => $_getIZ(0); + @$pb.TagNumber(1) + set type($core.int v) { $_setSignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasType() => $_has(0); + @$pb.TagNumber(1) + void clearType() => clearField(1); + + @$pb.TagNumber(2) + $fixnum.Int64 get upId => $_getI64(1); + @$pb.TagNumber(2) + set upId($fixnum.Int64 v) { $_setInt64(1, v); } + @$pb.TagNumber(2) + $core.bool hasUpId() => $_has(1); + @$pb.TagNumber(2) + void clearUpId() => clearField(2); + + @$pb.TagNumber(3) + $core.String get upName => $_getSZ(2); + @$pb.TagNumber(3) + set upName($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasUpName() => $_has(2); + @$pb.TagNumber(3) + void clearUpName() => clearField(3); + + @$pb.TagNumber(4) + $core.int get rid => $_getIZ(3); + @$pb.TagNumber(4) + set rid($core.int v) { $_setSignedInt32(3, v); } + @$pb.TagNumber(4) + $core.bool hasRid() => $_has(3); + @$pb.TagNumber(4) + void clearRid() => clearField(4); + + @$pb.TagNumber(5) + $core.String get rname => $_getSZ(4); + @$pb.TagNumber(5) + set rname($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasRname() => $_has(4); + @$pb.TagNumber(5) + void clearRname() => clearField(5); + + @$pb.TagNumber(6) + $fixnum.Int64 get tid => $_getI64(5); + @$pb.TagNumber(6) + set tid($fixnum.Int64 v) { $_setInt64(5, v); } + @$pb.TagNumber(6) + $core.bool hasTid() => $_has(5); + @$pb.TagNumber(6) + void clearTid() => clearField(6); + + @$pb.TagNumber(7) + $core.String get tname => $_getSZ(6); + @$pb.TagNumber(7) + set tname($core.String v) { $_setString(6, v); } + @$pb.TagNumber(7) + $core.bool hasTname() => $_has(6); + @$pb.TagNumber(7) + void clearTname() => clearField(7); + + @$pb.TagNumber(8) + $core.String get trackId => $_getSZ(7); + @$pb.TagNumber(8) + set trackId($core.String v) { $_setString(7, v); } + @$pb.TagNumber(8) + $core.bool hasTrackId() => $_has(7); + @$pb.TagNumber(8) + void clearTrackId() => clearField(8); + + @$pb.TagNumber(9) + $core.String get state => $_getSZ(8); + @$pb.TagNumber(9) + set state($core.String v) { $_setString(8, v); } + @$pb.TagNumber(9) + $core.bool hasState() => $_has(8); + @$pb.TagNumber(9) + void clearState() => clearField(9); + + @$pb.TagNumber(10) + $core.int get convergeType => $_getIZ(9); + @$pb.TagNumber(10) + set convergeType($core.int v) { $_setSignedInt32(9, v); } + @$pb.TagNumber(10) + $core.bool hasConvergeType() => $_has(9); + @$pb.TagNumber(10) + void clearConvergeType() => clearField(10); + + @$pb.TagNumber(11) + $fixnum.Int64 get aid => $_getI64(10); + @$pb.TagNumber(11) + set aid($fixnum.Int64 v) { $_setInt64(10, v); } + @$pb.TagNumber(11) + $core.bool hasAid() => $_has(10); + @$pb.TagNumber(11) + void clearAid() => clearField(11); +} + +class Avatar extends $pb.GeneratedMessage { + factory Avatar({ + $core.String? cover, + $core.String? text, + $core.String? uri, + $core.int? type, + $core.String? event, + $core.String? eventV2, + $core.int? defalutCover, + }) { + final $result = create(); + if (cover != null) { + $result.cover = cover; + } + if (text != null) { + $result.text = text; + } + if (uri != null) { + $result.uri = uri; + } + if (type != null) { + $result.type = type; + } + if (event != null) { + $result.event = event; + } + if (eventV2 != null) { + $result.eventV2 = eventV2; + } + if (defalutCover != null) { + $result.defalutCover = defalutCover; + } + return $result; + } + Avatar._() : super(); + factory Avatar.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Avatar.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Avatar', package: const $pb.PackageName(_omitMessageNames ? '' : 'bilibili.app.card.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'cover') + ..aOS(2, _omitFieldNames ? '' : 'text') + ..aOS(3, _omitFieldNames ? '' : 'uri') + ..a<$core.int>(4, _omitFieldNames ? '' : 'type', $pb.PbFieldType.O3) + ..aOS(5, _omitFieldNames ? '' : 'event') + ..aOS(6, _omitFieldNames ? '' : 'eventV2') + ..a<$core.int>(7, _omitFieldNames ? '' : 'defalutCover', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Avatar clone() => Avatar()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Avatar copyWith(void Function(Avatar) updates) => super.copyWith((message) => updates(message as Avatar)) as Avatar; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Avatar create() => Avatar._(); + Avatar createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Avatar getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Avatar? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get cover => $_getSZ(0); + @$pb.TagNumber(1) + set cover($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasCover() => $_has(0); + @$pb.TagNumber(1) + void clearCover() => clearField(1); + + @$pb.TagNumber(2) + $core.String get text => $_getSZ(1); + @$pb.TagNumber(2) + set text($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasText() => $_has(1); + @$pb.TagNumber(2) + void clearText() => clearField(2); + + @$pb.TagNumber(3) + $core.String get uri => $_getSZ(2); + @$pb.TagNumber(3) + set uri($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasUri() => $_has(2); + @$pb.TagNumber(3) + void clearUri() => clearField(3); + + @$pb.TagNumber(4) + $core.int get type => $_getIZ(3); + @$pb.TagNumber(4) + set type($core.int v) { $_setSignedInt32(3, v); } + @$pb.TagNumber(4) + $core.bool hasType() => $_has(3); + @$pb.TagNumber(4) + void clearType() => clearField(4); + + @$pb.TagNumber(5) + $core.String get event => $_getSZ(4); + @$pb.TagNumber(5) + set event($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasEvent() => $_has(4); + @$pb.TagNumber(5) + void clearEvent() => clearField(5); + + @$pb.TagNumber(6) + $core.String get eventV2 => $_getSZ(5); + @$pb.TagNumber(6) + set eventV2($core.String v) { $_setString(5, v); } + @$pb.TagNumber(6) + $core.bool hasEventV2() => $_has(5); + @$pb.TagNumber(6) + void clearEventV2() => clearField(6); + + @$pb.TagNumber(7) + $core.int get defalutCover => $_getIZ(6); + @$pb.TagNumber(7) + set defalutCover($core.int v) { $_setSignedInt32(6, v); } + @$pb.TagNumber(7) + $core.bool hasDefalutCover() => $_has(6); + @$pb.TagNumber(7) + void clearDefalutCover() => clearField(7); +} + +/// 条目基本信息 +class Base extends $pb.GeneratedMessage { + factory Base({ + $core.String? cardType, + $core.String? cardGoto, + $core.String? goto, + $core.String? param, + $core.String? cover, + $core.String? title, + $core.String? uri, + ThreePoint? threePoint, + Args? args, + PlayerArgs? playerArgs, + $fixnum.Int64? idx, + $0.AdInfo? adInfo, + Mask? mask, + $core.String? fromType, + $core.Iterable? threePointV2, + $core.Iterable? threePointV3, + Button? descButton, + ThreePointV4? threePointV4, + UpArgs? upArgs, + }) { + final $result = create(); + if (cardType != null) { + $result.cardType = cardType; + } + if (cardGoto != null) { + $result.cardGoto = cardGoto; + } + if (goto != null) { + $result.goto = goto; + } + if (param != null) { + $result.param = param; + } + if (cover != null) { + $result.cover = cover; + } + if (title != null) { + $result.title = title; + } + if (uri != null) { + $result.uri = uri; + } + if (threePoint != null) { + $result.threePoint = threePoint; + } + if (args != null) { + $result.args = args; + } + if (playerArgs != null) { + $result.playerArgs = playerArgs; + } + if (idx != null) { + $result.idx = idx; + } + if (adInfo != null) { + $result.adInfo = adInfo; + } + if (mask != null) { + $result.mask = mask; + } + if (fromType != null) { + $result.fromType = fromType; + } + if (threePointV2 != null) { + $result.threePointV2.addAll(threePointV2); + } + if (threePointV3 != null) { + $result.threePointV3.addAll(threePointV3); + } + if (descButton != null) { + $result.descButton = descButton; + } + if (threePointV4 != null) { + $result.threePointV4 = threePointV4; + } + if (upArgs != null) { + $result.upArgs = upArgs; + } + return $result; + } + Base._() : super(); + factory Base.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Base.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Base', package: const $pb.PackageName(_omitMessageNames ? '' : 'bilibili.app.card.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'cardType') + ..aOS(2, _omitFieldNames ? '' : 'cardGoto') + ..aOS(3, _omitFieldNames ? '' : 'goto') + ..aOS(4, _omitFieldNames ? '' : 'param') + ..aOS(5, _omitFieldNames ? '' : 'cover') + ..aOS(6, _omitFieldNames ? '' : 'title') + ..aOS(7, _omitFieldNames ? '' : 'uri') + ..aOM(8, _omitFieldNames ? '' : 'threePoint', subBuilder: ThreePoint.create) + ..aOM(9, _omitFieldNames ? '' : 'args', subBuilder: Args.create) + ..aOM(10, _omitFieldNames ? '' : 'playerArgs', subBuilder: PlayerArgs.create) + ..aInt64(11, _omitFieldNames ? '' : 'idx') + ..aOM<$0.AdInfo>(12, _omitFieldNames ? '' : 'adInfo', subBuilder: $0.AdInfo.create) + ..aOM(13, _omitFieldNames ? '' : 'mask', subBuilder: Mask.create) + ..aOS(14, _omitFieldNames ? '' : 'fromType') + ..pc(15, _omitFieldNames ? '' : 'threePointV2', $pb.PbFieldType.PM, subBuilder: ThreePointV2.create) + ..pc(16, _omitFieldNames ? '' : 'threePointV3', $pb.PbFieldType.PM, subBuilder: ThreePointV3.create) + ..aOM