Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: read view info

appflowyd4d7ba7452be
diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/protobuf.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/protobuf.dart
index 4ca4fa1fd1..fe05a53682 100644
--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/protobuf.dart
+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/protobuf.dart
@@ -1,5 +1,6 @@
// Auto-generated, do not edit
export './app.pb.dart';
+export './view_info.pb.dart';
export './view.pb.dart';
export './trash.pb.dart';
export './workspace.pb.dart';
diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view.pb.dart
index 42d99339b7..b62668c488 100644
--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view.pb.dart
+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view.pb.dart
@@ -145,399 +145,56 @@ class View extends $pb.GeneratedMessage {
void clearPluginType() => clearField(7);
}
-class ViewInfo extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ViewInfo', createEmptyInstance: create)
- ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id')
- ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'belongToId')
- ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
- ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc')
- ..e<ViewDataType>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'dataType', $pb.PbFieldType.OE, defaultOrMaker: ViewDataType.TextBlock, valueOf: ViewDataType.valueOf, enumValues: ViewDataType.values)
- ..aOM<RepeatedView>(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'belongings', subBuilder: RepeatedView.create)
- ..aOM<ViewExtData>(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'extData', subBuilder: ViewExtData.create)
- ..hasRequiredFields = false
- ;
-
- ViewInfo._() : super();
- factory ViewInfo({
- $core.String? id,
- $core.String? belongToId,
- $core.String? name,
- $core.String? desc,
- ViewDataType? dataType,
- RepeatedView? belongings,
- ViewExtData? extData,
- }) {
- final _result = create();
- if (id != null) {
- _result.id = id;
- }
- if (belongToId != null) {
- _result.belongToId = belongToId;
- }
- if (name != null) {
- _result.name = name;
- }
- if (desc != null) {
- _result.desc = desc;
- }
- if (dataType != null) {
- _result.dataType = dataType;
- }
- if (belongings != null) {
- _result.belongings = belongings;
- }
- if (extData != null) {
- _result.extData = extData;
- }
- return _result;
- }
- factory ViewInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
- factory ViewInfo.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')
- ViewInfo clone() => ViewInfo()..mergeFromMessage(this);
- @$core.Deprecated(
- 'Using this can add significant overhead to your binary. '
- 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
- 'Will be removed in next major version')
- ViewInfo copyWith(void Function(ViewInfo) updates) => super.copyWith((message) => updates(message as ViewInfo)) as ViewInfo; // ignore: deprecated_member_use
- $pb.BuilderInfo get info_ => _i;
- @$core.pragma('dart2js:noInline')
- static ViewInfo create() => ViewInfo._();
- ViewInfo createEmptyInstance() => create();
- static $pb.PbList<ViewInfo> createRepeated() => $pb.PbList<ViewInfo>();
- @$core.pragma('dart2js:noInline')
- static ViewInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ViewInfo>(create);
- static ViewInfo? _defaultInstance;
-
- @$pb.TagNumber(1)
- $core.String get id => $_getSZ(0);
- @$pb.TagNumber(1)
- set id($core.String v) { $_setString(0, v); }
- @$pb.TagNumber(1)
- $core.bool hasId() => $_has(0);
- @$pb.TagNumber(1)
- void clearId() => clearField(1);
-
- @$pb.TagNumber(2)
- $core.String get belongToId => $_getSZ(1);
- @$pb.TagNumber(2)
- set belongToId($core.String v) { $_setString(1, v); }
- @$pb.TagNumber(2)
- $core.bool hasBelongToId() => $_has(1);
- @$pb.TagNumber(2)
- void clearBelongToId() => clearField(2);
-
- @$pb.TagNumber(3)
- $core.String get name => $_getSZ(2);
- @$pb.TagNumber(3)
- set name($core.String v) { $_setString(2, v); }
- @$pb.TagNumber(3)
- $core.bool hasName() => $_has(2);
- @$pb.TagNumber(3)
- void clearName() => clearField(3);
-
- @$pb.TagNumber(4)
- $core.String get desc => $_getSZ(3);
- @$pb.TagNumber(4)
- set desc($core.String v) { $_setString(3, v); }
- @$pb.TagNumber(4)
- $core.bool hasDesc() => $_has(3);
- @$pb.TagNumber(4)
- void clearDesc() => clearField(4);
-
- @$pb.TagNumber(5)
- ViewDataType get dataType => $_getN(4);
- @$pb.TagNumber(5)
- set dataType(ViewDataType v) { setField(5, v); }
- @$pb.TagNumber(5)
- $core.bool hasDataType() => $_has(4);
- @$pb.TagNumber(5)
- void clearDataType() => clearField(5);
-
- @$pb.TagNumber(6)
- RepeatedView get belongings => $_getN(5);
- @$pb.TagNumber(6)
- set belongings(RepeatedView v) { setField(6, v); }
- @$pb.TagNumber(6)
- $core.bool hasBelongings() => $_has(5);
- @$pb.TagNumber(6)
- void clearBelongings() => clearField(6);
- @$pb.TagNumber(6)
- RepeatedView ensureBelongings() => $_ensure(5);
-
- @$pb.TagNumber(7)
- ViewExtData get extData => $_getN(6);
- @$pb.TagNumber(7)
- set extData(ViewExtData v) { setField(7, v); }
- @$pb.TagNumber(7)
- $core.bool hasExtData() => $_has(6);
- @$pb.TagNumber(7)
- void clearExtData() => clearField(7);
- @$pb.TagNumber(7)
- ViewExtData ensureExtData() => $_ensure(6);
-}
-
-class ViewExtData extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ViewExtData', createEmptyInstance: create)
- ..aOM<ViewFilter>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'filter', subBuilder: ViewFilter.create)
- ..aOM<ViewGroup>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'group', subBuilder: ViewGroup.create)
- ..aOM<ViewSort>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sort', subBuilder: ViewSort.create)
- ..hasRequiredFields = false
- ;
-
- ViewExtData._() : super();
- factory ViewExtData({
- ViewFilter? filter,
- ViewGroup? group,
- ViewSort? sort,
- }) {
- final _result = create();
- if (filter != null) {
- _result.filter = filter;
- }
- if (group != null) {
- _result.group = group;
- }
- if (sort != null) {
- _result.sort = sort;
- }
- return _result;
- }
- factory ViewExtData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
- factory ViewExtData.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')
- ViewExtData clone() => ViewExtData()..mergeFromMessage(this);
- @$core.Deprecated(
- 'Using this can add significant overhead to your binary. '
- 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
- 'Will be removed in next major version')
- ViewExtData copyWith(void Function(ViewExtData) updates) => super.copyWith((message) => updates(message as ViewExtData)) as ViewExtData; // ignore: deprecated_member_use
- $pb.BuilderInfo get info_ => _i;
- @$core.pragma('dart2js:noInline')
- static ViewExtData create() => ViewExtData._();
- ViewExtData createEmptyInstance() => create();
- static $pb.PbList<ViewExtData> createRepeated() => $pb.PbList<ViewExtData>();
- @$core.pragma('dart2js:noInline')
- static ViewExtData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ViewExtData>(create);
- static ViewExtData? _defaultInstance;
-
- @$pb.TagNumber(1)
- ViewFilter get filter => $_getN(0);
- @$pb.TagNumber(1)
- set filter(ViewFilter v) { setField(1, v); }
- @$pb.TagNumber(1)
- $core.bool hasFilter() => $_has(0);
- @$pb.TagNumber(1)
- void clearFilter() => clearField(1);
- @$pb.TagNumber(1)
- ViewFilter ensureFilter() => $_ensure(0);
-
- @$pb.TagNumber(2)
- ViewGroup get group => $_getN(1);
- @$pb.TagNumber(2)
- set group(ViewGroup v) { setField(2, v); }
- @$pb.TagNumber(2)
- $core.bool hasGroup() => $_has(1);
- @$pb.TagNumber(2)
- void clearGroup() => clearField(2);
- @$pb.TagNumber(2)
- ViewGroup ensureGroup() => $_ensure(1);
-
- @$pb.TagNumber(3)
- ViewSort get sort => $_getN(2);
- @$pb.TagNumber(3)
- set sort(ViewSort v) { setField(3, v); }
- @$pb.TagNumber(3)
- $core.bool hasSort() => $_has(2);
- @$pb.TagNumber(3)
- void clearSort() => clearField(3);
- @$pb.TagNumber(3)
- ViewSort ensureSort() => $_ensure(2);
-}
-
-class ViewFilter extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ViewFilter', createEmptyInstance: create)
- ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fieldId')
- ..hasRequiredFields = false
- ;
-
- ViewFilter._() : super();
- factory ViewFilter({
- $core.String? fieldId,
- }) {
- final _result = create();
- if (fieldId != null) {
- _result.fieldId = fieldId;
- }
- return _result;
- }
- factory ViewFilter.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
- factory ViewFilter.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')
- ViewFilter clone() => ViewFilter()..mergeFromMessage(this);
- @$core.Deprecated(
- 'Using this can add significant overhead to your binary. '
- 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
- 'Will be removed in next major version')
- ViewFilter copyWith(void Function(ViewFilter) updates) => super.copyWith((message) => updates(message as ViewFilter)) as ViewFilter; // ignore: deprecated_member_use
- $pb.BuilderInfo get info_ => _i;
- @$core.pragma('dart2js:noInline')
- static ViewFilter create() => ViewFilter._();
- ViewFilter createEmptyInstance() => create();
- static $pb.PbList<ViewFilter> createRepeated() => $pb.PbList<ViewFilter>();
- @$core.pragma('dart2js:noInline')
- static ViewFilter getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ViewFilter>(create);
- static ViewFilter? _defaultInstance;
-
- @$pb.TagNumber(1)
- $core.String get fieldId => $_getSZ(0);
- @$pb.TagNumber(1)
- set fieldId($core.String v) { $_setString(0, v); }
- @$pb.TagNumber(1)
- $core.bool hasFieldId() => $_has(0);
- @$pb.TagNumber(1)
- void clearFieldId() => clearField(1);
-}
-
-enum ViewGroup_OneOfSubGroupFieldId {
- subGroupFieldId,
- notSet
-}
-
-class ViewGroup extends $pb.GeneratedMessage {
- static const $core.Map<$core.int, ViewGroup_OneOfSubGroupFieldId> _ViewGroup_OneOfSubGroupFieldIdByTag = {
- 2 : ViewGroup_OneOfSubGroupFieldId.subGroupFieldId,
- 0 : ViewGroup_OneOfSubGroupFieldId.notSet
- };
- static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ViewGroup', createEmptyInstance: create)
- ..oo(0, [2])
- ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'groupFieldId')
- ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'subGroupFieldId')
- ..hasRequiredFields = false
- ;
-
- ViewGroup._() : super();
- factory ViewGroup({
- $core.String? groupFieldId,
- $core.String? subGroupFieldId,
- }) {
- final _result = create();
- if (groupFieldId != null) {
- _result.groupFieldId = groupFieldId;
- }
- if (subGroupFieldId != null) {
- _result.subGroupFieldId = subGroupFieldId;
- }
- return _result;
- }
- factory ViewGroup.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
- factory ViewGroup.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')
- ViewGroup clone() => ViewGroup()..mergeFromMessage(this);
- @$core.Deprecated(
- 'Using this can add significant overhead to your binary. '
- 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
- 'Will be removed in next major version')
- ViewGroup copyWith(void Function(ViewGroup) updates) => super.copyWith((message) => updates(message as ViewGroup)) as ViewGroup; // ignore: deprecated_member_use
- $pb.BuilderInfo get info_ => _i;
- @$core.pragma('dart2js:noInline')
- static ViewGroup create() => ViewGroup._();
- ViewGroup createEmptyInstance() => create();
- static $pb.PbList<ViewGroup> createRepeated() => $pb.PbList<ViewGroup>();
- @$core.pragma('dart2js:noInline')
- static ViewGroup getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ViewGroup>(create);
- static ViewGroup? _defaultInstance;
-
- ViewGroup_OneOfSubGroupFieldId whichOneOfSubGroupFieldId() => _ViewGroup_OneOfSubGroupFieldIdByTag[$_whichOneof(0)]!;
- void clearOneOfSubGroupFieldId() => clearField($_whichOneof(0));
-
- @$pb.TagNumber(1)
- $core.String get groupFieldId => $_getSZ(0);
- @$pb.TagNumber(1)
- set groupFieldId($core.String v) { $_setString(0, v); }
- @$pb.TagNumber(1)
- $core.bool hasGroupFieldId() => $_has(0);
- @$pb.TagNumber(1)
- void clearGroupFieldId() => clearField(1);
-
- @$pb.TagNumber(2)
- $core.String get subGroupFieldId => $_getSZ(1);
- @$pb.TagNumber(2)
- set subGroupFieldId($core.String v) { $_setString(1, v); }
- @$pb.TagNumber(2)
- $core.bool hasSubGroupFieldId() => $_has(1);
- @$pb.TagNumber(2)
- void clearSubGroupFieldId() => clearField(2);
-}
-
-class ViewSort extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ViewSort', createEmptyInstance: create)
- ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fieldId')
+class RepeatedView extends $pb.GeneratedMessage {
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RepeatedView', createEmptyInstance: create)
+ ..pc<View>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'items', $pb.PbFieldType.PM, subBuilder: View.create)
..hasRequiredFields = false
;
- ViewSort._() : super();
- factory ViewSort({
- $core.String? fieldId,
+ RepeatedView._() : super();
+ factory RepeatedView({
+ $core.Iterable<View>? items,
}) {
final _result = create();
- if (fieldId != null) {
- _result.fieldId = fieldId;
+ if (items != null) {
+ _result.items.addAll(items);
}
return _result;
}
- factory ViewSort.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
- factory ViewSort.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+ factory RepeatedView.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory RepeatedView.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')
- ViewSort clone() => ViewSort()..mergeFromMessage(this);
+ RepeatedView clone() => RepeatedView()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
- ViewSort copyWith(void Function(ViewSort) updates) => super.copyWith((message) => updates(message as ViewSort)) as ViewSort; // ignore: deprecated_member_use
+ RepeatedView copyWith(void Function(RepeatedView) updates) => super.copyWith((message) => updates(message as RepeatedView)) as RepeatedView; // ignore: deprecated_member_use
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
- static ViewSort create() => ViewSort._();
- ViewSort createEmptyInstance() => create();
- static $pb.PbList<ViewSort> createRepeated() => $pb.PbList<ViewSort>();
+ static RepeatedView create() => RepeatedView._();
+ RepeatedView createEmptyInstance() => create();
+ static $pb.PbList<RepeatedView> createRepeated() => $pb.PbList<RepeatedView>();
@$core.pragma('dart2js:noInline')
- static ViewSort getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ViewSort>(create);
- static ViewSort? _defaultInstance;
+ static RepeatedView getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<RepeatedView>(create);
+ static RepeatedView? _defaultInstance;
@$pb.TagNumber(1)
- $core.String get fieldId => $_getSZ(0);
- @$pb.TagNumber(1)
- set fieldId($core.String v) { $_setString(0, v); }
- @$pb.TagNumber(1)
- $core.bool hasFieldId() => $_has(0);
- @$pb.TagNumber(1)
- void clearFieldId() => clearField(1);
+ $core.List<View> get items => $_getList(0);
}
-class RepeatedView extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RepeatedView', createEmptyInstance: create)
- ..pc<View>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'items', $pb.PbFieldType.PM, subBuilder: View.create)
+class RepeatedViewId extends $pb.GeneratedMessage {
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RepeatedViewId', createEmptyInstance: create)
+ ..pPS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'items')
..hasRequiredFields = false
;
- RepeatedView._() : super();
- factory RepeatedView({
- $core.Iterable<View>? items,
+ RepeatedViewId._() : super();
+ factory RepeatedViewId({
+ $core.Iterable<$core.String>? items,
}) {
final _result = create();
if (items != null) {
@@ -545,29 +202,29 @@ class RepeatedView extends $pb.GeneratedMessage {
}
return _result;
}
- factory RepeatedView.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
- factory RepeatedView.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+ factory RepeatedViewId.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory RepeatedViewId.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')
- RepeatedView clone() => RepeatedView()..mergeFromMessage(this);
+ RepeatedViewId clone() => RepeatedViewId()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
- RepeatedView copyWith(void Function(RepeatedView) updates) => super.copyWith((message) => updates(message as RepeatedView)) as RepeatedView; // ignore: deprecated_member_use
+ RepeatedViewId copyWith(void Function(RepeatedViewId) updates) => super.copyWith((message) => updates(message as RepeatedViewId)) as RepeatedViewId; // ignore: deprecated_member_use
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
- static RepeatedView create() => RepeatedView._();
- RepeatedView createEmptyInstance() => create();
- static $pb.PbList<RepeatedView> createRepeated() => $pb.PbList<RepeatedView>();
+ static RepeatedViewId create() => RepeatedViewId._();
+ RepeatedViewId createEmptyInstance() => create();
+ static $pb.PbList<RepeatedViewId> createRepeated() => $pb.PbList<RepeatedViewId>();
@$core.pragma('dart2js:noInline')
- static RepeatedView getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<RepeatedView>(create);
- static RepeatedView? _defaultInstance;
+ static RepeatedViewId getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<RepeatedViewId>(create);
+ static RepeatedViewId? _defaultInstance;
@$pb.TagNumber(1)
- $core.List<View> get items => $_getList(0);
+ $core.List<$core.String> get items => $_getList(0);
}
enum CreateViewPayload_OneOfThumbnail {
@@ -906,47 +563,6 @@ class ViewId extends $pb.GeneratedMessage {
void clearValue() => clearField(1);
}
-class RepeatedViewId extends $pb.GeneratedMessage {
- static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RepeatedViewId', createEmptyInstance: create)
- ..pPS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'items')
- ..hasRequiredFields = false
- ;
-
- RepeatedViewId._() : super();
- factory RepeatedViewId({
- $core.Iterable<$core.String>? items,
- }) {
- final _result = create();
- if (items != null) {
- _result.items.addAll(items);
- }
- return _result;
- }
- factory RepeatedViewId.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
- factory RepeatedViewId.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')
- RepeatedViewId clone() => RepeatedViewId()..mergeFromMessage(this);
- @$core.Deprecated(
- 'Using this can add significant overhead to your binary. '
- 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
- 'Will be removed in next major version')
- RepeatedViewId copyWith(void Function(RepeatedViewId) updates) => super.copyWith((message) => updates(message as RepeatedViewId)) as RepeatedViewId; // ignore: deprecated_member_use
- $pb.BuilderInfo get info_ => _i;
- @$core.pragma('dart2js:noInline')
- static RepeatedViewId create() => RepeatedViewId._();
- RepeatedViewId createEmptyInstance() => create();
- static $pb.PbList<RepeatedViewId> createRepeated() => $pb.PbList<RepeatedViewId>();
- @$core.pragma('dart2js:noInline')
- static RepeatedViewId getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<RepeatedViewId>(create);
- static RepeatedViewId? _defaultInstance;
-
- @$pb.TagNumber(1)
- $core.List<$core.String> get items => $_getList(0);
-}
-
enum UpdateViewPayload_OneOfName {
name,
notSet
diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view.pbjson.dart
index b83147e64e..1574f527c4 100644
--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view.pbjson.dart
+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view.pbjson.dart
@@ -46,68 +46,6 @@ const View$json = const {
/// Descriptor for `View`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List viewDescriptor = $convert.base64Decode('CgRWaWV3Eg4KAmlkGAEgASgJUgJpZBIgCgxiZWxvbmdfdG9faWQYAiABKAlSCmJlbG9uZ1RvSWQSEgoEbmFtZRgDIAEoCVIEbmFtZRIqCglkYXRhX3R5cGUYBCABKA4yDS5WaWV3RGF0YVR5cGVSCGRhdGFUeXBlEiMKDW1vZGlmaWVkX3RpbWUYBSABKANSDG1vZGlmaWVkVGltZRIfCgtjcmVhdGVfdGltZRgGIAEoA1IKY3JlYXRlVGltZRIfCgtwbHVnaW5fdHlwZRgHIAEoBVIKcGx1Z2luVHlwZQ==');
-@$core.Deprecated('Use viewInfoDescriptor instead')
-const ViewInfo$json = const {
- '1': 'ViewInfo',
- '2': const [
- const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},
- const {'1': 'belong_to_id', '3': 2, '4': 1, '5': 9, '10': 'belongToId'},
- const {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'},
- const {'1': 'desc', '3': 4, '4': 1, '5': 9, '10': 'desc'},
- const {'1': 'data_type', '3': 5, '4': 1, '5': 14, '6': '.ViewDataType', '10': 'dataType'},
- const {'1': 'belongings', '3': 6, '4': 1, '5': 11, '6': '.RepeatedView', '10': 'belongings'},
- const {'1': 'ext_data', '3': 7, '4': 1, '5': 11, '6': '.ViewExtData', '10': 'extData'},
- ],
-};
-
-/// Descriptor for `ViewInfo`. Decode as a `google.protobuf.DescriptorProto`.
-final $typed_data.Uint8List viewInfoDescriptor = $convert.base64Decode('CghWaWV3SW5mbxIOCgJpZBgBIAEoCVICaWQSIAoMYmVsb25nX3RvX2lkGAIgASgJUgpiZWxvbmdUb0lkEhIKBG5hbWUYAyABKAlSBG5hbWUSEgoEZGVzYxgEIAEoCVIEZGVzYxIqCglkYXRhX3R5cGUYBSABKA4yDS5WaWV3RGF0YVR5cGVSCGRhdGFUeXBlEi0KCmJlbG9uZ2luZ3MYBiABKAsyDS5SZXBlYXRlZFZpZXdSCmJlbG9uZ2luZ3MSJwoIZXh0X2RhdGEYByABKAsyDC5WaWV3RXh0RGF0YVIHZXh0RGF0YQ==');
-@$core.Deprecated('Use viewExtDataDescriptor instead')
-const ViewExtData$json = const {
- '1': 'ViewExtData',
- '2': const [
- const {'1': 'filter', '3': 1, '4': 1, '5': 11, '6': '.ViewFilter', '10': 'filter'},
- const {'1': 'group', '3': 2, '4': 1, '5': 11, '6': '.ViewGroup', '10': 'group'},
- const {'1': 'sort', '3': 3, '4': 1, '5': 11, '6': '.ViewSort', '10': 'sort'},
- ],
-};
-
-/// Descriptor for `ViewExtData`. Decode as a `google.protobuf.DescriptorProto`.
-final $typed_data.Uint8List viewExtDataDescriptor = $convert.base64Decode('CgtWaWV3RXh0RGF0YRIjCgZmaWx0ZXIYASABKAsyCy5WaWV3RmlsdGVyUgZmaWx0ZXISIAoFZ3JvdXAYAiABKAsyCi5WaWV3R3JvdXBSBWdyb3VwEh0KBHNvcnQYAyABKAsyCS5WaWV3U29ydFIEc29ydA==');
-@$core.Deprecated('Use viewFilterDescriptor instead')
-const ViewFilter$json = const {
- '1': 'ViewFilter',
- '2': const [
- const {'1': 'field_id', '3': 1, '4': 1, '5': 9, '10': 'fieldId'},
- ],
-};
-
-/// Descriptor for `ViewFilter`. Decode as a `google.protobuf.DescriptorProto`.
-final $typed_data.Uint8List viewFilterDescriptor = $convert.base64Decode('CgpWaWV3RmlsdGVyEhkKCGZpZWxkX2lkGAEgASgJUgdmaWVsZElk');
-@$core.Deprecated('Use viewGroupDescriptor instead')
-const ViewGroup$json = const {
- '1': 'ViewGroup',
- '2': const [
- const {'1': 'group_field_id', '3': 1, '4': 1, '5': 9, '10': 'groupFieldId'},
- const {'1': 'sub_group_field_id', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'subGroupFieldId'},
- ],
- '8': const [
- const {'1': 'one_of_sub_group_field_id'},
- ],
-};
-
-/// Descriptor for `ViewGroup`. Decode as a `google.protobuf.DescriptorProto`.
-final $typed_data.Uint8List viewGroupDescriptor = $convert.base64Decode('CglWaWV3R3JvdXASJAoOZ3JvdXBfZmllbGRfaWQYASABKAlSDGdyb3VwRmllbGRJZBItChJzdWJfZ3JvdXBfZmllbGRfaWQYAiABKAlIAFIPc3ViR3JvdXBGaWVsZElkQhsKGW9uZV9vZl9zdWJfZ3JvdXBfZmllbGRfaWQ=');
-@$core.Deprecated('Use viewSortDescriptor instead')
-const ViewSort$json = const {
- '1': 'ViewSort',
- '2': const [
- const {'1': 'field_id', '3': 1, '4': 1, '5': 9, '10': 'fieldId'},
- ],
-};
-
-/// Descriptor for `ViewSort`. Decode as a `google.protobuf.DescriptorProto`.
-final $typed_data.Uint8List viewSortDescriptor = $convert.base64Decode('CghWaWV3U29ydBIZCghmaWVsZF9pZBgBIAEoCVIHZmllbGRJZA==');
@$core.Deprecated('Use repeatedViewDescriptor instead')
const RepeatedView$json = const {
'1': 'RepeatedView',
@@ -118,6 +56,16 @@ const RepeatedView$json = const {
/// Descriptor for `RepeatedView`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List repeatedViewDescriptor = $convert.base64Decode('CgxSZXBlYXRlZFZpZXcSGwoFaXRlbXMYASADKAsyBS5WaWV3UgVpdGVtcw==');
+@$core.Deprecated('Use repeatedViewIdDescriptor instead')
+const RepeatedViewId$json = const {
+ '1': 'RepeatedViewId',
+ '2': const [
+ const {'1': 'items', '3': 1, '4': 3, '5': 9, '10': 'items'},
+ ],
+};
+
+/// Descriptor for `RepeatedViewId`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List repeatedViewIdDescriptor = $convert.base64Decode('Cg5SZXBlYXRlZFZpZXdJZBIUCgVpdGVtcxgBIAMoCVIFaXRlbXM=');
@$core.Deprecated('Use createViewPayloadDescriptor instead')
const CreateViewPayload$json = const {
'1': 'CreateViewPayload',
@@ -164,16 +112,6 @@ const ViewId$json = const {
/// Descriptor for `ViewId`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List viewIdDescriptor = $convert.base64Decode('CgZWaWV3SWQSFAoFdmFsdWUYASABKAlSBXZhbHVl');
-@$core.Deprecated('Use repeatedViewIdDescriptor instead')
-const RepeatedViewId$json = const {
- '1': 'RepeatedViewId',
- '2': const [
- const {'1': 'items', '3': 1, '4': 3, '5': 9, '10': 'items'},
- ],
-};
-
-/// Descriptor for `RepeatedViewId`. Decode as a `google.protobuf.DescriptorProto`.
-final $typed_data.Uint8List repeatedViewIdDescriptor = $convert.base64Decode('Cg5SZXBlYXRlZFZpZXdJZBIUCgVpdGVtcxgBIAMoCVIFaXRlbXM=');
@$core.Deprecated('Use updateViewPayloadDescriptor instead')
const UpdateViewPayload$json = const {
'1': 'UpdateViewPayload',
diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view_info.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view_info.pb.dart
new file mode 100644
index 0000000000..11d6115cfb
--- /dev/null
+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view_info.pb.dart
@@ -0,0 +1,399 @@
+///
+// Generated code. Do not modify.
+// source: view_info.proto
+//
+// @dart = 2.12
+// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields
+
+import 'dart:core' as $core;
+
+import 'package:protobuf/protobuf.dart' as $pb;
+
+import 'view.pb.dart' as $0;
+
+import 'view.pbenum.dart' as $0;
+
+class ViewInfo extends $pb.GeneratedMessage {
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ViewInfo', createEmptyInstance: create)
+ ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id')
+ ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'belongToId')
+ ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
+ ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc')
+ ..e<$0.ViewDataType>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'dataType', $pb.PbFieldType.OE, defaultOrMaker: $0.ViewDataType.TextBlock, valueOf: $0.ViewDataType.valueOf, enumValues: $0.ViewDataType.values)
+ ..aOM<$0.RepeatedView>(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'belongings', subBuilder: $0.RepeatedView.create)
+ ..aOM<ViewExtData>(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'extData', subBuilder: ViewExtData.create)
+ ..hasRequiredFields = false
+ ;
+
+ ViewInfo._() : super();
+ factory ViewInfo({
+ $core.String? id,
+ $core.String? belongToId,
+ $core.String? name,
+ $core.String? desc,
+ $0.ViewDataType? dataType,
+ $0.RepeatedView? belongings,
+ ViewExtData? extData,
+ }) {
+ final _result = create();
+ if (id != null) {
+ _result.id = id;
+ }
+ if (belongToId != null) {
+ _result.belongToId = belongToId;
+ }
+ if (name != null) {
+ _result.name = name;
+ }
+ if (desc != null) {
+ _result.desc = desc;
+ }
+ if (dataType != null) {
+ _result.dataType = dataType;
+ }
+ if (belongings != null) {
+ _result.belongings = belongings;
+ }
+ if (extData != null) {
+ _result.extData = extData;
+ }
+ return _result;
+ }
+ factory ViewInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory ViewInfo.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')
+ ViewInfo clone() => ViewInfo()..mergeFromMessage(this);
+ @$core.Deprecated(
+ 'Using this can add significant overhead to your binary. '
+ 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+ 'Will be removed in next major version')
+ ViewInfo copyWith(void Function(ViewInfo) updates) => super.copyWith((message) => updates(message as ViewInfo)) as ViewInfo; // ignore: deprecated_member_use
+ $pb.BuilderInfo get info_ => _i;
+ @$core.pragma('dart2js:noInline')
+ static ViewInfo create() => ViewInfo._();
+ ViewInfo createEmptyInstance() => create();
+ static $pb.PbList<ViewInfo> createRepeated() => $pb.PbList<ViewInfo>();
+ @$core.pragma('dart2js:noInline')
+ static ViewInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ViewInfo>(create);
+ static ViewInfo? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ $core.String get id => $_getSZ(0);
+ @$pb.TagNumber(1)
+ set id($core.String v) { $_setString(0, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasId() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearId() => clearField(1);
+
+ @$pb.TagNumber(2)
+ $core.String get belongToId => $_getSZ(1);
+ @$pb.TagNumber(2)
+ set belongToId($core.String v) { $_setString(1, v); }
+ @$pb.TagNumber(2)
+ $core.bool hasBelongToId() => $_has(1);
+ @$pb.TagNumber(2)
+ void clearBelongToId() => clearField(2);
+
+ @$pb.TagNumber(3)
+ $core.String get name => $_getSZ(2);
+ @$pb.TagNumber(3)
+ set name($core.String v) { $_setString(2, v); }
+ @$pb.TagNumber(3)
+ $core.bool hasName() => $_has(2);
+ @$pb.TagNumber(3)
+ void clearName() => clearField(3);
+
+ @$pb.TagNumber(4)
+ $core.String get desc => $_getSZ(3);
+ @$pb.TagNumber(4)
+ set desc($core.String v) { $_setString(3, v); }
+ @$pb.TagNumber(4)
+ $core.bool hasDesc() => $_has(3);
+ @$pb.TagNumber(4)
+ void clearDesc() => clearField(4);
+
+ @$pb.TagNumber(5)
+ $0.ViewDataType get dataType => $_getN(4);
+ @$pb.TagNumber(5)
+ set dataType($0.ViewDataType v) { setField(5, v); }
+ @$pb.TagNumber(5)
+ $core.bool hasDataType() => $_has(4);
+ @$pb.TagNumber(5)
+ void clearDataType() => clearField(5);
+
+ @$pb.TagNumber(6)
+ $0.RepeatedView get belongings => $_getN(5);
+ @$pb.TagNumber(6)
+ set belongings($0.RepeatedView v) { setField(6, v); }
+ @$pb.TagNumber(6)
+ $core.bool hasBelongings() => $_has(5);
+ @$pb.TagNumber(6)
+ void clearBelongings() => clearField(6);
+ @$pb.TagNumber(6)
+ $0.RepeatedView ensureBelongings() => $_ensure(5);
+
+ @$pb.TagNumber(7)
+ ViewExtData get extData => $_getN(6);
+ @$pb.TagNumber(7)
+ set extData(ViewExtData v) { setField(7, v); }
+ @$pb.TagNumber(7)
+ $core.bool hasExtData() => $_has(6);
+ @$pb.TagNumber(7)
+ void clearExtData() => clearField(7);
+ @$pb.TagNumber(7)
+ ViewExtData ensureExtData() => $_ensure(6);
+}
+
+class ViewExtData extends $pb.GeneratedMessage {
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ViewExtData', createEmptyInstance: create)
+ ..aOM<ViewFilter>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'filter', subBuilder: ViewFilter.create)
+ ..aOM<ViewGroup>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'group', subBuilder: ViewGroup.create)
+ ..aOM<ViewSort>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sort', subBuilder: ViewSort.create)
+ ..hasRequiredFields = false
+ ;
+
+ ViewExtData._() : super();
+ factory ViewExtData({
+ ViewFilter? filter,
+ ViewGroup? group,
+ ViewSort? sort,
+ }) {
+ final _result = create();
+ if (filter != null) {
+ _result.filter = filter;
+ }
+ if (group != null) {
+ _result.group = group;
+ }
+ if (sort != null) {
+ _result.sort = sort;
+ }
+ return _result;
+ }
+ factory ViewExtData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory ViewExtData.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')
+ ViewExtData clone() => ViewExtData()..mergeFromMessage(this);
+ @$core.Deprecated(
+ 'Using this can add significant overhead to your binary. '
+ 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+ 'Will be removed in next major version')
+ ViewExtData copyWith(void Function(ViewExtData) updates) => super.copyWith((message) => updates(message as ViewExtData)) as ViewExtData; // ignore: deprecated_member_use
+ $pb.BuilderInfo get info_ => _i;
+ @$core.pragma('dart2js:noInline')
+ static ViewExtData create() => ViewExtData._();
+ ViewExtData createEmptyInstance() => create();
+ static $pb.PbList<ViewExtData> createRepeated() => $pb.PbList<ViewExtData>();
+ @$core.pragma('dart2js:noInline')
+ static ViewExtData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ViewExtData>(create);
+ static ViewExtData? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ ViewFilter get filter => $_getN(0);
+ @$pb.TagNumber(1)
+ set filter(ViewFilter v) { setField(1, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasFilter() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearFilter() => clearField(1);
+ @$pb.TagNumber(1)
+ ViewFilter ensureFilter() => $_ensure(0);
+
+ @$pb.TagNumber(2)
+ ViewGroup get group => $_getN(1);
+ @$pb.TagNumber(2)
+ set group(ViewGroup v) { setField(2, v); }
+ @$pb.TagNumber(2)
+ $core.bool hasGroup() => $_has(1);
+ @$pb.TagNumber(2)
+ void clearGroup() => clearField(2);
+ @$pb.TagNumber(2)
+ ViewGroup ensureGroup() => $_ensure(1);
+
+ @$pb.TagNumber(3)
+ ViewSort get sort => $_getN(2);
+ @$pb.TagNumber(3)
+ set sort(ViewSort v) { setField(3, v); }
+ @$pb.TagNumber(3)
+ $core.bool hasSort() => $_has(2);
+ @$pb.TagNumber(3)
+ void clearSort() => clearField(3);
+ @$pb.TagNumber(3)
+ ViewSort ensureSort() => $_ensure(2);
+}
+
+class ViewFilter extends $pb.GeneratedMessage {
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ViewFilter', createEmptyInstance: create)
+ ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fieldId')
+ ..hasRequiredFields = false
+ ;
+
+ ViewFilter._() : super();
+ factory ViewFilter({
+ $core.String? fieldId,
+ }) {
+ final _result = create();
+ if (fieldId != null) {
+ _result.fieldId = fieldId;
+ }
+ return _result;
+ }
+ factory ViewFilter.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory ViewFilter.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')
+ ViewFilter clone() => ViewFilter()..mergeFromMessage(this);
+ @$core.Deprecated(
+ 'Using this can add significant overhead to your binary. '
+ 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+ 'Will be removed in next major version')
+ ViewFilter copyWith(void Function(ViewFilter) updates) => super.copyWith((message) => updates(message as ViewFilter)) as ViewFilter; // ignore: deprecated_member_use
+ $pb.BuilderInfo get info_ => _i;
+ @$core.pragma('dart2js:noInline')
+ static ViewFilter create() => ViewFilter._();
+ ViewFilter createEmptyInstance() => create();
+ static $pb.PbList<ViewFilter> createRepeated() => $pb.PbList<ViewFilter>();
+ @$core.pragma('dart2js:noInline')
+ static ViewFilter getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ViewFilter>(create);
+ static ViewFilter? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ $core.String get fieldId => $_getSZ(0);
+ @$pb.TagNumber(1)
+ set fieldId($core.String v) { $_setString(0, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasFieldId() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearFieldId() => clearField(1);
+}
+
+enum ViewGroup_OneOfSubGroupFieldId {
+ subGroupFieldId,
+ notSet
+}
+
+class ViewGroup extends $pb.GeneratedMessage {
+ static const $core.Map<$core.int, ViewGroup_OneOfSubGroupFieldId> _ViewGroup_OneOfSubGroupFieldIdByTag = {
+ 2 : ViewGroup_OneOfSubGroupFieldId.subGroupFieldId,
+ 0 : ViewGroup_OneOfSubGroupFieldId.notSet
+ };
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ViewGroup', createEmptyInstance: create)
+ ..oo(0, [2])
+ ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'groupFieldId')
+ ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'subGroupFieldId')
+ ..hasRequiredFields = false
+ ;
+
+ ViewGroup._() : super();
+ factory ViewGroup({
+ $core.String? groupFieldId,
+ $core.String? subGroupFieldId,
+ }) {
+ final _result = create();
+ if (groupFieldId != null) {
+ _result.groupFieldId = groupFieldId;
+ }
+ if (subGroupFieldId != null) {
+ _result.subGroupFieldId = subGroupFieldId;
+ }
+ return _result;
+ }
+ factory ViewGroup.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory ViewGroup.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')
+ ViewGroup clone() => ViewGroup()..mergeFromMessage(this);
+ @$core.Deprecated(
+ 'Using this can add significant overhead to your binary. '
+ 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+ 'Will be removed in next major version')
+ ViewGroup copyWith(void Function(ViewGroup) updates) => super.copyWith((message) => updates(message as ViewGroup)) as ViewGroup; // ignore: deprecated_member_use
+ $pb.BuilderInfo get info_ => _i;
+ @$core.pragma('dart2js:noInline')
+ static ViewGroup create() => ViewGroup._();
+ ViewGroup createEmptyInstance() => create();
+ static $pb.PbList<ViewGroup> createRepeated() => $pb.PbList<ViewGroup>();
+ @$core.pragma('dart2js:noInline')
+ static ViewGroup getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ViewGroup>(create);
+ static ViewGroup? _defaultInstance;
+
+ ViewGroup_OneOfSubGroupFieldId whichOneOfSubGroupFieldId() => _ViewGroup_OneOfSubGroupFieldIdByTag[$_whichOneof(0)]!;
+ void clearOneOfSubGroupFieldId() => clearField($_whichOneof(0));
+
+ @$pb.TagNumber(1)
+ $core.String get groupFieldId => $_getSZ(0);
+ @$pb.TagNumber(1)
+ set groupFieldId($core.String v) { $_setString(0, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasGroupFieldId() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearGroupFieldId() => clearField(1);
+
+ @$pb.TagNumber(2)
+ $core.String get subGroupFieldId => $_getSZ(1);
+ @$pb.TagNumber(2)
+ set subGroupFieldId($core.String v) { $_setString(1, v); }
+ @$pb.TagNumber(2)
+ $core.bool hasSubGroupFieldId() => $_has(1);
+ @$pb.TagNumber(2)
+ void clearSubGroupFieldId() => clearField(2);
+}
+
+class ViewSort extends $pb.GeneratedMessage {
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ViewSort', createEmptyInstance: create)
+ ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fieldId')
+ ..hasRequiredFields = false
+ ;
+
+ ViewSort._() : super();
+ factory ViewSort({
+ $core.String? fieldId,
+ }) {
+ final _result = create();
+ if (fieldId != null) {
+ _result.fieldId = fieldId;
+ }
+ return _result;
+ }
+ factory ViewSort.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory ViewSort.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')
+ ViewSort clone() => ViewSort()..mergeFromMessage(this);
+ @$core.Deprecated(
+ 'Using this can add significant overhead to your binary. '
+ 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+ 'Will be removed in next major version')
+ ViewSort copyWith(void Function(ViewSort) updates) => super.copyWith((message) => updates(message as ViewSort)) as ViewSort; // ignore: deprecated_member_use
+ $pb.BuilderInfo get info_ => _i;
+ @$core.pragma('dart2js:noInline')
+ static ViewSort create() => ViewSort._();
+ ViewSort createEmptyInstance() => create();
+ static $pb.PbList<ViewSort> createRepeated() => $pb.PbList<ViewSort>();
+ @$core.pragma('dart2js:noInline')
+ static ViewSort getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ViewSort>(create);
+ static ViewSort? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ $core.String get fieldId => $_getSZ(0);
+ @$pb.TagNumber(1)
+ set fieldId($core.String v) { $_setString(0, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasFieldId() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearFieldId() => clearField(1);
+}
+
diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view_info.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view_info.pbenum.dart
new file mode 100644
index 0000000000..d242b16359
--- /dev/null
+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view_info.pbenum.dart
@@ -0,0 +1,7 @@
+///
+// Generated code. Do not modify.
+// source: view_info.proto
+//
+// @dart = 2.12
+// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields
+
diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view_info.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view_info.pbjson.dart
new file mode 100644
index 0000000000..6aff03111d
--- /dev/null
+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view_info.pbjson.dart
@@ -0,0 +1,72 @@
+///
+// Generated code. Do not modify.
+// source: view_info.proto
+//
+// @dart = 2.12
+// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package
+
+import 'dart:core' as $core;
+import 'dart:convert' as $convert;
+import 'dart:typed_data' as $typed_data;
+@$core.Deprecated('Use viewInfoDescriptor instead')
+const ViewInfo$json = const {
+ '1': 'ViewInfo',
+ '2': const [
+ const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},
+ const {'1': 'belong_to_id', '3': 2, '4': 1, '5': 9, '10': 'belongToId'},
+ const {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'},
+ const {'1': 'desc', '3': 4, '4': 1, '5': 9, '10': 'desc'},
+ const {'1': 'data_type', '3': 5, '4': 1, '5': 14, '6': '.ViewDataType', '10': 'dataType'},
+ const {'1': 'belongings', '3': 6, '4': 1, '5': 11, '6': '.RepeatedView', '10': 'belongings'},
+ const {'1': 'ext_data', '3': 7, '4': 1, '5': 11, '6': '.ViewExtData', '10': 'extData'},
+ ],
+};
+
+/// Descriptor for `ViewInfo`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List viewInfoDescriptor = $convert.base64Decode('CghWaWV3SW5mbxIOCgJpZBgBIAEoCVICaWQSIAoMYmVsb25nX3RvX2lkGAIgASgJUgpiZWxvbmdUb0lkEhIKBG5hbWUYAyABKAlSBG5hbWUSEgoEZGVzYxgEIAEoCVIEZGVzYxIqCglkYXRhX3R5cGUYBSABKA4yDS5WaWV3RGF0YVR5cGVSCGRhdGFUeXBlEi0KCmJlbG9uZ2luZ3MYBiABKAsyDS5SZXBlYXRlZFZpZXdSCmJlbG9uZ2luZ3MSJwoIZXh0X2RhdGEYByABKAsyDC5WaWV3RXh0RGF0YVIHZXh0RGF0YQ==');
+@$core.Deprecated('Use viewExtDataDescriptor instead')
+const ViewExtData$json = const {
+ '1': 'ViewExtData',
+ '2': const [
+ const {'1': 'filter', '3': 1, '4': 1, '5': 11, '6': '.ViewFilter', '10': 'filter'},
+ const {'1': 'group', '3': 2, '4': 1, '5': 11, '6': '.ViewGroup', '10': 'group'},
+ const {'1': 'sort', '3': 3, '4': 1, '5': 11, '6': '.ViewSort', '10': 'sort'},
+ ],
+};
+
+/// Descriptor for `ViewExtData`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List viewExtDataDescriptor = $convert.base64Decode('CgtWaWV3RXh0RGF0YRIjCgZmaWx0ZXIYASABKAsyCy5WaWV3RmlsdGVyUgZmaWx0ZXISIAoFZ3JvdXAYAiABKAsyCi5WaWV3R3JvdXBSBWdyb3VwEh0KBHNvcnQYAyABKAsyCS5WaWV3U29ydFIEc29ydA==');
+@$core.Deprecated('Use viewFilterDescriptor instead')
+const ViewFilter$json = const {
+ '1': 'ViewFilter',
+ '2': const [
+ const {'1': 'field_id', '3': 1, '4': 1, '5': 9, '10': 'fieldId'},
+ ],
+};
+
+/// Descriptor for `ViewFilter`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List viewFilterDescriptor = $convert.base64Decode('CgpWaWV3RmlsdGVyEhkKCGZpZWxkX2lkGAEgASgJUgdmaWVsZElk');
+@$core.Deprecated('Use viewGroupDescriptor instead')
+const ViewGroup$json = const {
+ '1': 'ViewGroup',
+ '2': const [
+ const {'1': 'group_field_id', '3': 1, '4': 1, '5': 9, '10': 'groupFieldId'},
+ const {'1': 'sub_group_field_id', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'subGroupFieldId'},
+ ],
+ '8': const [
+ const {'1': 'one_of_sub_group_field_id'},
+ ],
+};
+
+/// Descriptor for `ViewGroup`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List viewGroupDescriptor = $convert.base64Decode('CglWaWV3R3JvdXASJAoOZ3JvdXBfZmllbGRfaWQYASABKAlSDGdyb3VwRmllbGRJZBItChJzdWJfZ3JvdXBfZmllbGRfaWQYAiABKAlIAFIPc3ViR3JvdXBGaWVsZElkQhsKGW9uZV9vZl9zdWJfZ3JvdXBfZmllbGRfaWQ=');
+@$core.Deprecated('Use viewSortDescriptor instead')
+const ViewSort$json = const {
+ '1': 'ViewSort',
+ '2': const [
+ const {'1': 'field_id', '3': 1, '4': 1, '5': 9, '10': 'fieldId'},
+ ],
+};
+
+/// Descriptor for `ViewSort`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List viewSortDescriptor = $convert.base64Decode('CghWaWV3U29ydBIZCghmaWVsZF9pZBgBIAEoCVIHZmllbGRJZA==');
diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view_info.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view_info.pbserver.dart
new file mode 100644
index 0000000000..8d78c9f49a
--- /dev/null
+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/view_info.pbserver.dart
@@ -0,0 +1,9 @@
+///
+// Generated code. Do not modify.
+// source: view_info.proto
+//
+// @dart = 2.12
+// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package
+
+export 'view_info.pb.dart';
+
diff --git a/frontend/rust-lib/flowy-folder/src/event_map.rs b/frontend/rust-lib/flowy-folder/src/event_map.rs
index bc2afa9491..b1a0b186a3 100644
--- a/frontend/rust-lib/flowy-folder/src/event_map.rs
+++ b/frontend/rust-lib/flowy-folder/src/event_map.rs
@@ -59,8 +59,9 @@ pub fn create(folder: Arc<FolderManager>) -> Module {
module = module
.event(FolderEvent::CreateView, create_view_handler)
.event(FolderEvent::ReadView, read_view_handler)
- .event(FolderEvent::ReadViewInfo, read_view_info_handler)
.event(FolderEvent::UpdateView, update_view_handler)
+ .event(FolderEvent::ReadViewInfo, read_view_info_handler)
+ .event(FolderEvent::UpdateViewInfo, update_view_info_handler)
.event(FolderEvent::DeleteView, delete_view_handler)
.event(FolderEvent::DuplicateView, duplicate_view_handler)
.event(FolderEvent::SetLatestView, set_latest_view_handler)
@@ -131,6 +132,9 @@ pub enum FolderEvent {
#[event(input = "ViewId", output = "ViewInfo")]
ReadViewInfo = 207,
+ #[event(input = "UpdateViewInfoPayload", output = "ViewInfo")]
+ UpdateViewInfo = 208,
+
#[event()]
CopyLink = 220,
diff --git a/frontend/rust-lib/flowy-folder/src/services/view/event_handler.rs b/frontend/rust-lib/flowy-folder/src/services/view/event_handler.rs
index cfacc23e0e..85efa862ef 100644
--- a/frontend/rust-lib/flowy-folder/src/services/view/event_handler.rs
+++ b/frontend/rust-lib/flowy-folder/src/services/view/event_handler.rs
@@ -54,6 +54,17 @@ pub(crate) async fn update_view_handler(
Ok(())
}
+#[tracing::instrument(level = "debug", skip(data, controller), err)]
+pub(crate) async fn update_view_info_handler(
+ data: Data<UpdateViewPayload>,
+ controller: AppData<Arc<ViewController>>,
+) -> Result<(), FlowyError> {
+ let params: UpdateViewParams = data.into_inner().try_into()?;
+ let _ = controller.update_view(params).await?;
+
+ Ok(())
+}
+
pub(crate) async fn delete_view_handler(
data: Data<RepeatedViewId>,
view_controller: AppData<Arc<ViewController>>,
diff --git a/shared-lib/flowy-folder-data-model/src/entities/mod.rs b/shared-lib/flowy-folder-data-model/src/entities/mod.rs
index 72ffbaebcf..ed6954739c 100644
--- a/shared-lib/flowy-folder-data-model/src/entities/mod.rs
+++ b/shared-lib/flowy-folder-data-model/src/entities/mod.rs
@@ -1,9 +1,11 @@
pub mod app;
pub mod trash;
pub mod view;
+mod view_info;
pub mod workspace;
pub use app::*;
pub use trash::*;
pub use view::*;
+pub use view_info::*;
pub use workspace::*;
diff --git a/shared-lib/flowy-folder-data-model/src/entities/view.rs b/shared-lib/flowy-folder-data-model/src/entities/view.rs
index affe373caf..445aa6544a 100644
--- a/shared-lib/flowy-folder-data-model/src/entities/view.rs
+++ b/shared-lib/flowy-folder-data-model/src/entities/view.rs
@@ -8,7 +8,6 @@ use crate::{
};
use flowy_derive::{ProtoBuf, ProtoBuf_Enum};
use nanoid::nanoid;
-
use serde_repr::*;
use std::convert::TryInto;
@@ -40,72 +39,6 @@ pub struct View {
pub plugin_type: i32,
}
-#[derive(Eq, PartialEq, ProtoBuf, Debug, Default, Clone)]
-pub struct ViewInfo {
- #[pb(index = 1)]
- pub id: String,
-
- #[pb(index = 2)]
- pub belong_to_id: String,
-
- #[pb(index = 3)]
- pub name: String,
-
- #[pb(index = 4)]
- pub desc: String,
-
- #[pb(index = 5)]
- pub data_type: ViewDataType,
-
- #[pb(index = 6)]
- pub belongings: RepeatedView,
-
- #[pb(index = 7)]
- pub ext_data: ViewExtData,
-}
-
-#[derive(Eq, PartialEq, ProtoBuf, Debug, Default, Clone)]
-pub struct ViewExtData {
- #[pb(index = 1)]
- pub filter: ViewFilter,
-
- #[pb(index = 2)]
- pub group: ViewGroup,
-
- #[pb(index = 3)]
- pub sort: ViewSort,
-}
-
-#[derive(Eq, PartialEq, ProtoBuf, Debug, Default, Clone)]
-pub struct ViewFilter {
- #[pb(index = 1)]
- pub field_id: String,
-}
-
-#[derive(Eq, PartialEq, ProtoBuf, Debug, Default, Clone)]
-pub struct ViewGroup {
- #[pb(index = 1)]
- pub group_field_id: String,
-
- #[pb(index = 2, one_of)]
- pub sub_group_field_id: Option<String>,
-}
-
-#[derive(Eq, PartialEq, ProtoBuf, Debug, Default, Clone)]
-pub struct ViewSort {
- #[pb(index = 1)]
- pub field_id: String,
-}
-
-#[derive(Eq, PartialEq, Debug, Default, ProtoBuf, Clone)]
-// #[serde(transparent)]
-pub struct RepeatedView {
- #[pb(index = 1)]
- pub items: Vec<View>,
-}
-
-impl_def_and_def_mut!(RepeatedView, View);
-
#[derive(Eq, PartialEq, Hash, Debug, ProtoBuf_Enum, Clone, Serialize_repr, Deserialize_repr)]
#[repr(u8)]
pub enum ViewDataType {
@@ -132,6 +65,20 @@ impl std::convert::From<i32> for ViewDataType {
}
}
+#[derive(Eq, PartialEq, Debug, Default, ProtoBuf, Clone)]
+pub struct RepeatedView {
+ #[pb(index = 1)]
+ pub items: Vec<View>,
+}
+
+impl_def_and_def_mut!(RepeatedView, View);
+
+#[derive(Default, ProtoBuf)]
+pub struct RepeatedViewId {
+ #[pb(index = 1)]
+ pub items: Vec<String>,
+}
+
#[derive(Default, ProtoBuf)]
pub struct CreateViewPayload {
#[pb(index = 1)]
@@ -230,12 +177,6 @@ impl std::ops::Deref for ViewId {
}
}
-#[derive(Default, ProtoBuf)]
-pub struct RepeatedViewId {
- #[pb(index = 1)]
- pub items: Vec<String>,
-}
-
#[derive(Default, ProtoBuf)]
pub struct UpdateViewPayload {
#[pb(index = 1)]
@@ -266,25 +207,6 @@ pub struct UpdateViewParams {
pub thumbnail: Option<String>,
}
-impl UpdateViewParams {
- pub fn new(view_id: &str) -> Self {
- Self {
- view_id: view_id.to_owned(),
- ..Default::default()
- }
- }
-
- pub fn name(mut self, name: &str) -> Self {
- self.name = Some(name.to_owned());
- self
- }
-
- pub fn desc(mut self, desc: &str) -> Self {
- self.desc = Some(desc.to_owned());
- self
- }
-}
-
impl TryInto<UpdateViewParams> for UpdateViewPayload {
type Error = ErrorCode;
diff --git a/shared-lib/flowy-folder-data-model/src/entities/view_info.rs b/shared-lib/flowy-folder-data-model/src/entities/view_info.rs
new file mode 100644
index 0000000000..7cb598e534
--- /dev/null
+++ b/shared-lib/flowy-folder-data-model/src/entities/view_info.rs
@@ -0,0 +1,84 @@
+use crate::entities::{RepeatedView, ViewDataType};
+use crate::parser::view::ViewIdentify;
+use flowy_derive::ProtoBuf;
+use flowy_error_code::ErrorCode;
+use std::convert::TryInto;
+
+#[derive(Eq, PartialEq, ProtoBuf, Debug, Default, Clone)]
+pub struct ViewInfo {
+ #[pb(index = 1)]
+ pub id: String,
+
+ #[pb(index = 2)]
+ pub belong_to_id: String,
+
+ #[pb(index = 3)]
+ pub name: String,
+
+ #[pb(index = 4)]
+ pub desc: String,
+
+ #[pb(index = 5)]
+ pub data_type: ViewDataType,
+
+ #[pb(index = 6)]
+ pub belongings: RepeatedView,
+
+ #[pb(index = 7)]
+ pub ext_data: ViewExtData,
+}
+
+#[derive(Eq, PartialEq, ProtoBuf, Debug, Default, Clone)]
+pub struct ViewExtData {
+ #[pb(index = 1)]
+ pub filter: ViewFilter,
+
+ #[pb(index = 2)]
+ pub group: ViewGroup,
+
+ #[pb(index = 3)]
+ pub sort: ViewSort,
+}
+
+#[derive(Eq, PartialEq, ProtoBuf, Debug, Default, Clone)]
+pub struct ViewFilter {
+ #[pb(index = 1)]
+ pub field_id: String,
+}
+
+#[derive(Eq, PartialEq, ProtoBuf, Debug, Default, Clone)]
+pub struct ViewGroup {
+ #[pb(index = 1)]
+ pub group_field_id: String,
+
+ #[pb(index = 2, one_of)]
+ pub sub_group_field_id: Option<String>,
+}
+
+#[derive(Eq, PartialEq, ProtoBuf, Debug, Default, Clone)]
+pub struct ViewSort {
+ #[pb(index = 1)]
+ pub field_id: String,
+}
+
+#[derive(Default, ProtoBuf)]
+pub struct UpdateViewInfoPayload {
+ #[pb(index = 1)]
+ pub view_id: String,
+
+ #[pb(index = 2, one_of)]
+ pub filter: Option<ViewFilter>,
+
+ #[pb(index = 3, one_of)]
+ pub group: Option<ViewGroup>,
+
+ #[pb(index = 4, one_of)]
+ pub sort: Option<ViewSort>,
+}
+
+pub struct UpdateViewInfoParams {
+ pub view_id: String,
+ pub filter: Option<ViewFilter>,
+ pub group: Option<ViewGroup>,
+ pub sort: Option<ViewSort>,
+}
diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/model/mod.rs b/shared-lib/flowy-folder-data-model/src/protobuf/model/mod.rs
index d12cb83589..64debcc99c 100644
--- a/shared-lib/flowy-folder-data-model/src/protobuf/model/mod.rs
+++ b/shared-lib/flowy-folder-data-model/src/protobuf/model/mod.rs
@@ -4,6 +4,9 @@
mod app;
pub use app::*;
+mod view_info;
+pub use view_info::*;
+
mod view;
pub use view::*;
diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/model/view.rs b/shared-lib/flowy-folder-data-model/src/protobuf/model/view.rs
index 2954cfa693..3730b36759 100644
--- a/shared-lib/flowy-folder-data-model/src/protobuf/model/view.rs
+++ b/shared-lib/flowy-folder-data-model/src/protobuf/model/view.rs
@@ -403,1172 +403,58 @@ impl ::protobuf::reflect::ProtobufValue for View {
}
#[derive(PartialEq,Clone,Default)]
-pub struct ViewInfo {
- // message fields
- pub id: ::std::string::String,
- pub belong_to_id: ::std::string::String,
- pub name: ::std::string::String,
- pub desc: ::std::string::String,
- pub data_type: ViewDataType,
- pub belongings: ::protobuf::SingularPtrField<RepeatedView>,
- pub ext_data: ::protobuf::SingularPtrField<ViewExtData>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a ViewInfo {
- fn default() -> &'a ViewInfo {
- <ViewInfo as ::protobuf::Message>::default_instance()
- }
-}
-
-impl ViewInfo {
- pub fn new() -> ViewInfo {
- ::std::default::Default::default()
- }
-
- // string id = 1;
-
-
- pub fn get_id(&self) -> &str {
- &self.id
- }
- pub fn clear_id(&mut self) {
- self.id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_id(&mut self, v: ::std::string::String) {
- self.id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_id(&mut self) -> &mut ::std::string::String {
- &mut self.id
- }
-
- // Take field
- pub fn take_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.id, ::std::string::String::new())
- }
-
- // string belong_to_id = 2;
-
-
- pub fn get_belong_to_id(&self) -> &str {
- &self.belong_to_id
- }
- pub fn clear_belong_to_id(&mut self) {
- self.belong_to_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_belong_to_id(&mut self, v: ::std::string::String) {
- self.belong_to_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_belong_to_id(&mut self) -> &mut ::std::string::String {
- &mut self.belong_to_id
- }
-
- // Take field
- pub fn take_belong_to_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.belong_to_id, ::std::string::String::new())
- }
-
- // string name = 3;
-
-
- pub fn get_name(&self) -> &str {
- &self.name
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- &mut self.name
- }
-
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.name, ::std::string::String::new())
- }
-
- // string desc = 4;
-
-
- pub fn get_desc(&self) -> &str {
- &self.desc
- }
- pub fn clear_desc(&mut self) {
- self.desc.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_desc(&mut self, v: ::std::string::String) {
- self.desc = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_desc(&mut self) -> &mut ::std::string::String {
- &mut self.desc
- }
-
- // Take field
- pub fn take_desc(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.desc, ::std::string::String::new())
- }
-
- // .ViewDataType data_type = 5;
-
-
- pub fn get_data_type(&self) -> ViewDataType {
- self.data_type
- }
- pub fn clear_data_type(&mut self) {
- self.data_type = ViewDataType::TextBlock;
- }
-
- // Param is passed by value, moved
- pub fn set_data_type(&mut self, v: ViewDataType) {
- self.data_type = v;
- }
-
- // .RepeatedView belongings = 6;
-
-
- pub fn get_belongings(&self) -> &RepeatedView {
- self.belongings.as_ref().unwrap_or_else(|| <RepeatedView as ::protobuf::Message>::default_instance())
- }
- pub fn clear_belongings(&mut self) {
- self.belongings.clear();
- }
-
- pub fn has_belongings(&self) -> bool {
- self.belongings.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_belongings(&mut self, v: RepeatedView) {
- self.belongings = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_belongings(&mut self) -> &mut RepeatedView {
- if self.belongings.is_none() {
- self.belongings.set_default();
- }
- self.belongings.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_belongings(&mut self) -> RepeatedView {
- self.belongings.take().unwrap_or_else(|| RepeatedView::new())
- }
-
- // .ViewExtData ext_data = 7;
-
-
- pub fn get_ext_data(&self) -> &ViewExtData {
- self.ext_data.as_ref().unwrap_or_else(|| <ViewExtData as ::protobuf::Message>::default_instance())
- }
- pub fn clear_ext_data(&mut self) {
- self.ext_data.clear();
- }
-
- pub fn has_ext_data(&self) -> bool {
- self.ext_data.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_ext_data(&mut self, v: ViewExtData) {
- self.ext_data = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_ext_data(&mut self) -> &mut ViewExtData {
- if self.ext_data.is_none() {
- self.ext_data.set_default();
- }
- self.ext_data.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_ext_data(&mut self) -> ViewExtData {
- self.ext_data.take().unwrap_or_else(|| ViewExtData::new())
- }
-}
-
-impl ::protobuf::Message for ViewInfo {
- fn is_initialized(&self) -> bool {
- for v in &self.belongings {
- if !v.is_initialized() {
- return false;
- }
- };
- for v in &self.ext_data {
- if !v.is_initialized() {
- return false;
- }
- };
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- while !is.eof()? {
- let (field_number, wire_type) = is.read_tag_unpack()?;
- match field_number {
- 1 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.belong_to_id)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
- },
- 4 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
- },
- 5 => {
- ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.data_type, 5, &mut self.unknown_fields)?
- },
- 6 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.belongings)?;
- },
- 7 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.ext_data)?;
- },
- _ => {
- ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u32 {
- let mut my_size = 0;
- if !self.id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.id);
- }
- if !self.belong_to_id.is_empty() {
- my_size += ::protobuf::rt::string_size(2, &self.belong_to_id);
- }
- if !self.name.is_empty() {
- my_size += ::protobuf::rt::string_size(3, &self.name);
- }
- if !self.desc.is_empty() {
- my_size += ::protobuf::rt::string_size(4, &self.desc);
- }
- if self.data_type != ViewDataType::TextBlock {
- my_size += ::protobuf::rt::enum_size(5, self.data_type);
- }
- if let Some(ref v) = self.belongings.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if let Some(ref v) = self.ext_data.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
- self.cached_size.set(my_size);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- if !self.id.is_empty() {
- os.write_string(1, &self.id)?;
- }
- if !self.belong_to_id.is_empty() {
- os.write_string(2, &self.belong_to_id)?;
- }
- if !self.name.is_empty() {
- os.write_string(3, &self.name)?;
- }
- if !self.desc.is_empty() {
- os.write_string(4, &self.desc)?;
- }
- if self.data_type != ViewDataType::TextBlock {
- os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.data_type))?;
- }
- if let Some(ref v) = self.belongings.as_ref() {
- os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
- os.write_raw_varint32(v.get_cached_size())?;
- v.write_to_with_cached_sizes(os)?;
- }
- if let Some(ref v) = self.ext_data.as_ref() {
- os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
- os.write_raw_varint32(v.get_cached_size())?;
- v.write_to_with_cached_sizes(os)?;
- }
- os.write_unknown_fields(self.get_unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn get_cached_size(&self) -> u32 {
- self.cached_size.get()
- }
-
- fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
- &self.unknown_fields
- }
-
- fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
- &mut self.unknown_fields
- }
-
- fn as_any(&self) -> &dyn (::std::any::Any) {
- self as &dyn (::std::any::Any)
- }
- fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
- self as &mut dyn (::std::any::Any)
- }
- fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
- self
- }
-
- fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
- Self::descriptor_static()
- }
-
- fn new() -> ViewInfo {
- ViewInfo::new()
- }
-
- fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- let mut fields = ::std::vec::Vec::new();
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "id",
- |m: &ViewInfo| { &m.id },
- |m: &mut ViewInfo| { &mut m.id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "belong_to_id",
- |m: &ViewInfo| { &m.belong_to_id },
- |m: &mut ViewInfo| { &mut m.belong_to_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &ViewInfo| { &m.name },
- |m: &mut ViewInfo| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "desc",
- |m: &ViewInfo| { &m.desc },
- |m: &mut ViewInfo| { &mut m.desc },
- ));
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ViewDataType>>(
- "data_type",
- |m: &ViewInfo| { &m.data_type },
- |m: &mut ViewInfo| { &mut m.data_type },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RepeatedView>>(
- "belongings",
- |m: &ViewInfo| { &m.belongings },
- |m: &mut ViewInfo| { &mut m.belongings },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ViewExtData>>(
- "ext_data",
- |m: &ViewInfo| { &m.ext_data },
- |m: &mut ViewInfo| { &mut m.ext_data },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewInfo>(
- "ViewInfo",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static ViewInfo {
- static instance: ::protobuf::rt::LazyV2<ViewInfo> = ::protobuf::rt::LazyV2::INIT;
- instance.get(ViewInfo::new)
- }
-}
-
-impl ::protobuf::Clear for ViewInfo {
- fn clear(&mut self) {
- self.id.clear();
- self.belong_to_id.clear();
- self.name.clear();
- self.desc.clear();
- self.data_type = ViewDataType::TextBlock;
- self.belongings.clear();
- self.ext_data.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for ViewInfo {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ViewInfo {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct ViewExtData {
- // message fields
- pub filter: ::protobuf::SingularPtrField<ViewFilter>,
- pub group: ::protobuf::SingularPtrField<ViewGroup>,
- pub sort: ::protobuf::SingularPtrField<ViewSort>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a ViewExtData {
- fn default() -> &'a ViewExtData {
- <ViewExtData as ::protobuf::Message>::default_instance()
- }
-}
-
-impl ViewExtData {
- pub fn new() -> ViewExtData {
- ::std::default::Default::default()
- }
-
- // .ViewFilter filter = 1;
-
-
- pub fn get_filter(&self) -> &ViewFilter {
- self.filter.as_ref().unwrap_or_else(|| <ViewFilter as ::protobuf::Message>::default_instance())
- }
- pub fn clear_filter(&mut self) {
- self.filter.clear();
- }
-
- pub fn has_filter(&self) -> bool {
- self.filter.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_filter(&mut self, v: ViewFilter) {
- self.filter = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_filter(&mut self) -> &mut ViewFilter {
- if self.filter.is_none() {
- self.filter.set_default();
- }
- self.filter.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_filter(&mut self) -> ViewFilter {
- self.filter.take().unwrap_or_else(|| ViewFilter::new())
- }
-
- // .ViewGroup group = 2;
-
-
- pub fn get_group(&self) -> &ViewGroup {
- self.group.as_ref().unwrap_or_else(|| <ViewGroup as ::protobuf::Message>::default_instance())
- }
- pub fn clear_group(&mut self) {
- self.group.clear();
- }
-
- pub fn has_group(&self) -> bool {
- self.group.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_group(&mut self, v: ViewGroup) {
- self.group = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_group(&mut self) -> &mut ViewGroup {
- if self.group.is_none() {
- self.group.set_default();
- }
- self.group.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_group(&mut self) -> ViewGroup {
- self.group.take().unwrap_or_else(|| ViewGroup::new())
- }
-
- // .ViewSort sort = 3;
-
-
- pub fn get_sort(&self) -> &ViewSort {
- self.sort.as_ref().unwrap_or_else(|| <ViewSort as ::protobuf::Message>::default_instance())
- }
- pub fn clear_sort(&mut self) {
- self.sort.clear();
- }
-
- pub fn has_sort(&self) -> bool {
- self.sort.is_some()
- }
-
- // Param is passed by value, moved
- pub fn set_sort(&mut self, v: ViewSort) {
- self.sort = ::protobuf::SingularPtrField::some(v);
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_sort(&mut self) -> &mut ViewSort {
- if self.sort.is_none() {
- self.sort.set_default();
- }
- self.sort.as_mut().unwrap()
- }
-
- // Take field
- pub fn take_sort(&mut self) -> ViewSort {
- self.sort.take().unwrap_or_else(|| ViewSort::new())
- }
-}
-
-impl ::protobuf::Message for ViewExtData {
- fn is_initialized(&self) -> bool {
- for v in &self.filter {
- if !v.is_initialized() {
- return false;
- }
- };
- for v in &self.group {
- if !v.is_initialized() {
- return false;
- }
- };
- for v in &self.sort {
- if !v.is_initialized() {
- return false;
- }
- };
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- while !is.eof()? {
- let (field_number, wire_type) = is.read_tag_unpack()?;
- match field_number {
- 1 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.filter)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.group)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.sort)?;
- },
- _ => {
- ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u32 {
- let mut my_size = 0;
- if let Some(ref v) = self.filter.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if let Some(ref v) = self.group.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if let Some(ref v) = self.sort.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
- self.cached_size.set(my_size);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- if let Some(ref v) = self.filter.as_ref() {
- os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
- os.write_raw_varint32(v.get_cached_size())?;
- v.write_to_with_cached_sizes(os)?;
- }
- if let Some(ref v) = self.group.as_ref() {
- os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
- os.write_raw_varint32(v.get_cached_size())?;
- v.write_to_with_cached_sizes(os)?;
- }
- if let Some(ref v) = self.sort.as_ref() {
- os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
- os.write_raw_varint32(v.get_cached_size())?;
- v.write_to_with_cached_sizes(os)?;
- }
- os.write_unknown_fields(self.get_unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn get_cached_size(&self) -> u32 {
- self.cached_size.get()
- }
-
- fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
- &self.unknown_fields
- }
-
- fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
- &mut self.unknown_fields
- }
-
- fn as_any(&self) -> &dyn (::std::any::Any) {
- self as &dyn (::std::any::Any)
- }
- fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
- self as &mut dyn (::std::any::Any)
- }
- fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
- self
- }
-
- fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
- Self::descriptor_static()
- }
-
- fn new() -> ViewExtData {
- ViewExtData::new()
- }
-
- fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- let mut fields = ::std::vec::Vec::new();
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ViewFilter>>(
- "filter",
- |m: &ViewExtData| { &m.filter },
- |m: &mut ViewExtData| { &mut m.filter },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ViewGroup>>(
- "group",
- |m: &ViewExtData| { &m.group },
- |m: &mut ViewExtData| { &mut m.group },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ViewSort>>(
- "sort",
- |m: &ViewExtData| { &m.sort },
- |m: &mut ViewExtData| { &mut m.sort },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewExtData>(
- "ViewExtData",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static ViewExtData {
- static instance: ::protobuf::rt::LazyV2<ViewExtData> = ::protobuf::rt::LazyV2::INIT;
- instance.get(ViewExtData::new)
- }
-}
-
-impl ::protobuf::Clear for ViewExtData {
- fn clear(&mut self) {
- self.filter.clear();
- self.group.clear();
- self.sort.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for ViewExtData {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ViewExtData {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct ViewFilter {
- // message fields
- pub field_id: ::std::string::String,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a ViewFilter {
- fn default() -> &'a ViewFilter {
- <ViewFilter as ::protobuf::Message>::default_instance()
- }
-}
-
-impl ViewFilter {
- pub fn new() -> ViewFilter {
- ::std::default::Default::default()
- }
-
- // string field_id = 1;
-
-
- pub fn get_field_id(&self) -> &str {
- &self.field_id
- }
- pub fn clear_field_id(&mut self) {
- self.field_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_field_id(&mut self, v: ::std::string::String) {
- self.field_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
- &mut self.field_id
- }
-
- // Take field
- pub fn take_field_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
- }
-}
-
-impl ::protobuf::Message for ViewFilter {
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- while !is.eof()? {
- let (field_number, wire_type) = is.read_tag_unpack()?;
- match field_number {
- 1 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
- },
- _ => {
- ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u32 {
- let mut my_size = 0;
- if !self.field_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.field_id);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
- self.cached_size.set(my_size);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- if !self.field_id.is_empty() {
- os.write_string(1, &self.field_id)?;
- }
- os.write_unknown_fields(self.get_unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn get_cached_size(&self) -> u32 {
- self.cached_size.get()
- }
-
- fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
- &self.unknown_fields
- }
-
- fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
- &mut self.unknown_fields
- }
-
- fn as_any(&self) -> &dyn (::std::any::Any) {
- self as &dyn (::std::any::Any)
- }
- fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
- self as &mut dyn (::std::any::Any)
- }
- fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
- self
- }
-
- fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
- Self::descriptor_static()
- }
-
- fn new() -> ViewFilter {
- ViewFilter::new()
- }
-
- fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- let mut fields = ::std::vec::Vec::new();
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "field_id",
- |m: &ViewFilter| { &m.field_id },
- |m: &mut ViewFilter| { &mut m.field_id },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewFilter>(
- "ViewFilter",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static ViewFilter {
- static instance: ::protobuf::rt::LazyV2<ViewFilter> = ::protobuf::rt::LazyV2::INIT;
- instance.get(ViewFilter::new)
- }
-}
-
-impl ::protobuf::Clear for ViewFilter {
- fn clear(&mut self) {
- self.field_id.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for ViewFilter {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ViewFilter {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct ViewGroup {
- // message fields
- pub group_field_id: ::std::string::String,
- // message oneof groups
- pub one_of_sub_group_field_id: ::std::option::Option<ViewGroup_oneof_one_of_sub_group_field_id>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a ViewGroup {
- fn default() -> &'a ViewGroup {
- <ViewGroup as ::protobuf::Message>::default_instance()
- }
-}
-
-#[derive(Clone,PartialEq,Debug)]
-pub enum ViewGroup_oneof_one_of_sub_group_field_id {
- sub_group_field_id(::std::string::String),
-}
-
-impl ViewGroup {
- pub fn new() -> ViewGroup {
- ::std::default::Default::default()
- }
-
- // string group_field_id = 1;
-
-
- pub fn get_group_field_id(&self) -> &str {
- &self.group_field_id
- }
- pub fn clear_group_field_id(&mut self) {
- self.group_field_id.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_group_field_id(&mut self, v: ::std::string::String) {
- self.group_field_id = v;
- }
-
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_group_field_id(&mut self) -> &mut ::std::string::String {
- &mut self.group_field_id
- }
-
- // Take field
- pub fn take_group_field_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.group_field_id, ::std::string::String::new())
- }
-
- // string sub_group_field_id = 2;
-
-
- pub fn get_sub_group_field_id(&self) -> &str {
- match self.one_of_sub_group_field_id {
- ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(ref v)) => v,
- _ => "",
- }
- }
- pub fn clear_sub_group_field_id(&mut self) {
- self.one_of_sub_group_field_id = ::std::option::Option::None;
- }
-
- pub fn has_sub_group_field_id(&self) -> bool {
- match self.one_of_sub_group_field_id {
- ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(..)) => true,
- _ => false,
- }
- }
-
- // Param is passed by value, moved
- pub fn set_sub_group_field_id(&mut self, v: ::std::string::String) {
- self.one_of_sub_group_field_id = ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(v))
- }
-
- // Mutable pointer to the field.
- pub fn mut_sub_group_field_id(&mut self) -> &mut ::std::string::String {
- if let ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(_)) = self.one_of_sub_group_field_id {
- } else {
- self.one_of_sub_group_field_id = ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(::std::string::String::new()));
- }
- match self.one_of_sub_group_field_id {
- ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(ref mut v)) => v,
- _ => panic!(),
- }
- }
-
- // Take field
- pub fn take_sub_group_field_id(&mut self) -> ::std::string::String {
- if self.has_sub_group_field_id() {
- match self.one_of_sub_group_field_id.take() {
- ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(v)) => v,
- _ => panic!(),
- }
- } else {
- ::std::string::String::new()
- }
- }
-}
-
-impl ::protobuf::Message for ViewGroup {
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- while !is.eof()? {
- let (field_number, wire_type) = is.read_tag_unpack()?;
- match field_number {
- 1 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.group_field_id)?;
- },
- 2 => {
- if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- self.one_of_sub_group_field_id = ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(is.read_string()?));
- },
- _ => {
- ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u32 {
- let mut my_size = 0;
- if !self.group_field_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.group_field_id);
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_sub_group_field_id {
- match v {
- &ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(ref v) => {
- my_size += ::protobuf::rt::string_size(2, &v);
- },
- };
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
- self.cached_size.set(my_size);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- if !self.group_field_id.is_empty() {
- os.write_string(1, &self.group_field_id)?;
- }
- if let ::std::option::Option::Some(ref v) = self.one_of_sub_group_field_id {
- match v {
- &ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(ref v) => {
- os.write_string(2, v)?;
- },
- };
- }
- os.write_unknown_fields(self.get_unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn get_cached_size(&self) -> u32 {
- self.cached_size.get()
- }
-
- fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
- &self.unknown_fields
- }
-
- fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
- &mut self.unknown_fields
- }
-
- fn as_any(&self) -> &dyn (::std::any::Any) {
- self as &dyn (::std::any::Any)
- }
- fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
- self as &mut dyn (::std::any::Any)
- }
- fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
- self
- }
-
- fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
- Self::descriptor_static()
- }
-
- fn new() -> ViewGroup {
- ViewGroup::new()
- }
-
- fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- let mut fields = ::std::vec::Vec::new();
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "group_field_id",
- |m: &ViewGroup| { &m.group_field_id },
- |m: &mut ViewGroup| { &mut m.group_field_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
- "sub_group_field_id",
- ViewGroup::has_sub_group_field_id,
- ViewGroup::get_sub_group_field_id,
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewGroup>(
- "ViewGroup",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static ViewGroup {
- static instance: ::protobuf::rt::LazyV2<ViewGroup> = ::protobuf::rt::LazyV2::INIT;
- instance.get(ViewGroup::new)
- }
-}
-
-impl ::protobuf::Clear for ViewGroup {
- fn clear(&mut self) {
- self.group_field_id.clear();
- self.one_of_sub_group_field_id = ::std::option::Option::None;
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for ViewGroup {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for ViewGroup {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
-#[derive(PartialEq,Clone,Default)]
-pub struct ViewSort {
+pub struct RepeatedView {
// message fields
- pub field_id: ::std::string::String,
+ pub items: ::protobuf::RepeatedField<View>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
-impl<'a> ::std::default::Default for &'a ViewSort {
- fn default() -> &'a ViewSort {
- <ViewSort as ::protobuf::Message>::default_instance()
+impl<'a> ::std::default::Default for &'a RepeatedView {
+ fn default() -> &'a RepeatedView {
+ <RepeatedView as ::protobuf::Message>::default_instance()
}
}
-impl ViewSort {
- pub fn new() -> ViewSort {
+impl RepeatedView {
+ pub fn new() -> RepeatedView {
::std::default::Default::default()
}
- // string field_id = 1;
+ // repeated .View items = 1;
- pub fn get_field_id(&self) -> &str {
- &self.field_id
+ pub fn get_items(&self) -> &[View] {
+ &self.items
}
- pub fn clear_field_id(&mut self) {
- self.field_id.clear();
+ pub fn clear_items(&mut self) {
+ self.items.clear();
}
// Param is passed by value, moved
- pub fn set_field_id(&mut self, v: ::std::string::String) {
- self.field_id = v;
+ pub fn set_items(&mut self, v: ::protobuf::RepeatedField<View>) {
+ self.items = v;
}
// Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
- &mut self.field_id
+ pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<View> {
+ &mut self.items
}
// Take field
- pub fn take_field_id(&mut self) -> ::std::string::String {
- ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
+ pub fn take_items(&mut self) -> ::protobuf::RepeatedField<View> {
+ ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
}
}
-impl ::protobuf::Message for ViewSort {
+impl ::protobuf::Message for RepeatedView {
fn is_initialized(&self) -> bool {
+ for v in &self.items {
+ if !v.is_initialized() {
+ return false;
+ }
+ };
true
}
@@ -1577,7 +463,7 @@ impl ::protobuf::Message for ViewSort {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
- ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
+ ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
@@ -1591,18 +477,21 @@ impl ::protobuf::Message for ViewSort {
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
- if !self.field_id.is_empty() {
- my_size += ::protobuf::rt::string_size(1, &self.field_id);
- }
+ for value in &self.items {
+ let len = value.compute_size();
+ my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
+ };
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- if !self.field_id.is_empty() {
- os.write_string(1, &self.field_id)?;
- }
+ for v in &self.items {
+ os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
+ os.write_raw_varint32(v.get_cached_size())?;
+ v.write_to_with_cached_sizes(os)?;
+ };
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
@@ -1633,76 +522,76 @@ impl ::protobuf::Message for ViewSort {
Self::descriptor_static()
}
- fn new() -> ViewSort {
- ViewSort::new()
+ fn new() -> RepeatedView {
+ RepeatedView::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
- fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "field_id",
- |m: &ViewSort| { &m.field_id },
- |m: &mut ViewSort| { &mut m.field_id },
+ fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<View>>(
+ "items",
+ |m: &RepeatedView| { &m.items },
+ |m: &mut RepeatedView| { &mut m.items },
));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewSort>(
- "ViewSort",
+ ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedView>(
+ "RepeatedView",
fields,
file_descriptor_proto()
)
})
}
- fn default_instance() -> &'static ViewSort {
- static instance: ::protobuf::rt::LazyV2<ViewSort> = ::protobuf::rt::LazyV2::INIT;
- instance.get(ViewSort::new)
+ fn default_instance() -> &'static RepeatedView {
+ static instance: ::protobuf::rt::LazyV2<RepeatedView> = ::protobuf::rt::LazyV2::INIT;
+ instance.get(RepeatedView::new)
}
}
-impl ::protobuf::Clear for ViewSort {
+impl ::protobuf::Clear for RepeatedView {
fn clear(&mut self) {
- self.field_id.clear();
+ self.items.clear();
self.unknown_fields.clear();
}
}
-impl ::std::fmt::Debug for ViewSort {
+impl ::std::fmt::Debug for RepeatedView {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
-impl ::protobuf::reflect::ProtobufValue for ViewSort {
+impl ::protobuf::reflect::ProtobufValue for RepeatedView {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
-pub struct RepeatedView {
+pub struct RepeatedViewId {
// message fields
- pub items: ::protobuf::RepeatedField<View>,
+ pub items: ::protobuf::RepeatedField<::std::string::String>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
-impl<'a> ::std::default::Default for &'a RepeatedView {
- fn default() -> &'a RepeatedView {
- <RepeatedView as ::protobuf::Message>::default_instance()
+impl<'a> ::std::default::Default for &'a RepeatedViewId {
+ fn default() -> &'a RepeatedViewId {
+ <RepeatedViewId as ::protobuf::Message>::default_instance()
}
}
-impl RepeatedView {
- pub fn new() -> RepeatedView {
+impl RepeatedViewId {
+ pub fn new() -> RepeatedViewId {
::std::default::Default::default()
}
- // repeated .View items = 1;
+ // repeated string items = 1;
- pub fn get_items(&self) -> &[View] {
+ pub fn get_items(&self) -> &[::std::string::String] {
&self.items
}
pub fn clear_items(&mut self) {
@@ -1710,28 +599,23 @@ impl RepeatedView {
}
// Param is passed by value, moved
- pub fn set_items(&mut self, v: ::protobuf::RepeatedField<View>) {
+ pub fn set_items(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
self.items = v;
}
// Mutable pointer to the field.
- pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<View> {
+ pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
&mut self.items
}
// Take field
- pub fn take_items(&mut self) -> ::protobuf::RepeatedField<View> {
+ pub fn take_items(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
}
}
-impl ::protobuf::Message for RepeatedView {
+impl ::protobuf::Message for RepeatedViewId {
fn is_initialized(&self) -> bool {
- for v in &self.items {
- if !v.is_initialized() {
- return false;
- }
- };
true
}
@@ -1740,7 +624,7 @@ impl ::protobuf::Message for RepeatedView {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
- ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
+ ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.items)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
@@ -1755,8 +639,7 @@ impl ::protobuf::Message for RepeatedView {
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.items {
- let len = value.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
+ my_size += ::protobuf::rt::string_size(1, &value);
};
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
@@ -1765,9 +648,7 @@ impl ::protobuf::Message for RepeatedView {
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
for v in &self.items {
- os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
- os.write_raw_varint32(v.get_cached_size())?;
- v.write_to_with_cached_sizes(os)?;
+ os.write_string(1, &v)?;
};
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
@@ -1799,47 +680,47 @@ impl ::protobuf::Message for RepeatedView {
Self::descriptor_static()
}
- fn new() -> RepeatedView {
- RepeatedView::new()
+ fn new() -> RepeatedViewId {
+ RepeatedViewId::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<View>>(
+ fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"items",
- |m: &RepeatedView| { &m.items },
- |m: &mut RepeatedView| { &mut m.items },
+ |m: &RepeatedViewId| { &m.items },
+ |m: &mut RepeatedViewId| { &mut m.items },
));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedView>(
- "RepeatedView",
+ ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedViewId>(
+ "RepeatedViewId",
fields,
file_descriptor_proto()
)
})
}
- fn default_instance() -> &'static RepeatedView {
- static instance: ::protobuf::rt::LazyV2<RepeatedView> = ::protobuf::rt::LazyV2::INIT;
- instance.get(RepeatedView::new)
+ fn default_instance() -> &'static RepeatedViewId {
+ static instance: ::protobuf::rt::LazyV2<RepeatedViewId> = ::protobuf::rt::LazyV2::INIT;
+ instance.get(RepeatedViewId::new)
}
}
-impl ::protobuf::Clear for RepeatedView {
+impl ::protobuf::Clear for RepeatedViewId {
fn clear(&mut self) {
self.items.clear();
self.unknown_fields.clear();
}
}
-impl ::std::fmt::Debug for RepeatedView {
+impl ::std::fmt::Debug for RepeatedViewId {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
-impl ::protobuf::reflect::ProtobufValue for RepeatedView {
+impl ::protobuf::reflect::ProtobufValue for RepeatedViewId {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
@@ -2872,164 +1753,6 @@ impl ::protobuf::reflect::ProtobufValue for ViewId {
}
}
-#[derive(PartialEq,Clone,Default)]
-pub struct RepeatedViewId {
- // message fields
- pub items: ::protobuf::RepeatedField<::std::string::String>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
-}
-
-impl<'a> ::std::default::Default for &'a RepeatedViewId {
- fn default() -> &'a RepeatedViewId {
- <RepeatedViewId as ::protobuf::Message>::default_instance()
- }
-}
-
-impl RepeatedViewId {
- pub fn new() -> RepeatedViewId {
- ::std::default::Default::default()
- }
-
- // repeated string items = 1;
-
-
- pub fn get_items(&self) -> &[::std::string::String] {
- &self.items
- }
- pub fn clear_items(&mut self) {
- self.items.clear();
- }
-
- // Param is passed by value, moved
- pub fn set_items(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
- self.items = v;
- }
-
- // Mutable pointer to the field.
- pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
- &mut self.items
- }
-
- // Take field
- pub fn take_items(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
- ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
- }
-}
-
-impl ::protobuf::Message for RepeatedViewId {
- fn is_initialized(&self) -> bool {
- true
- }
-
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- while !is.eof()? {
- let (field_number, wire_type) = is.read_tag_unpack()?;
- match field_number {
- 1 => {
- ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.items)?;
- },
- _ => {
- ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
-
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u32 {
- let mut my_size = 0;
- for value in &self.items {
- my_size += ::protobuf::rt::string_size(1, &value);
- };
- my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
- self.cached_size.set(my_size);
- my_size
- }
-
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- for v in &self.items {
- os.write_string(1, &v)?;
- };
- os.write_unknown_fields(self.get_unknown_fields())?;
- ::std::result::Result::Ok(())
- }
-
- fn get_cached_size(&self) -> u32 {
- self.cached_size.get()
- }
-
- fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
- &self.unknown_fields
- }
-
- fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
- &mut self.unknown_fields
- }
-
- fn as_any(&self) -> &dyn (::std::any::Any) {
- self as &dyn (::std::any::Any)
- }
- fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
- self as &mut dyn (::std::any::Any)
- }
- fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
- self
- }
-
- fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
- Self::descriptor_static()
- }
-
- fn new() -> RepeatedViewId {
- RepeatedViewId::new()
- }
-
- fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
- static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
- descriptor.get(|| {
- let mut fields = ::std::vec::Vec::new();
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "items",
- |m: &RepeatedViewId| { &m.items },
- |m: &mut RepeatedViewId| { &mut m.items },
- ));
- ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedViewId>(
- "RepeatedViewId",
- fields,
- file_descriptor_proto()
- )
- })
- }
-
- fn default_instance() -> &'static RepeatedViewId {
- static instance: ::protobuf::rt::LazyV2<RepeatedViewId> = ::protobuf::rt::LazyV2::INIT;
- instance.get(RepeatedViewId::new)
- }
-}
-
-impl ::protobuf::Clear for RepeatedViewId {
- fn clear(&mut self) {
- self.items.clear();
- self.unknown_fields.clear();
- }
-}
-
-impl ::std::fmt::Debug for RepeatedViewId {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
-}
-
-impl ::protobuf::reflect::ProtobufValue for RepeatedViewId {
- fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
- ::protobuf::reflect::ReflectValueRef::Message(self)
- }
-}
-
#[derive(PartialEq,Clone,Default)]
pub struct UpdateViewPayload {
// message fields
@@ -4202,51 +2925,38 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\n\x04name\x18\x03\x20\x01(\tR\x04name\x12*\n\tdata_type\x18\x04\x20\x01\
(\x0e2\r.ViewDataTypeR\x08dataType\x12#\n\rmodified_time\x18\x05\x20\x01\
(\x03R\x0cmodifiedTime\x12\x1f\n\x0bcreate_time\x18\x06\x20\x01(\x03R\nc\
- reateTime\x12\x1f\n\x0bplugin_type\x18\x07\x20\x01(\x05R\npluginType\"\
- \xe8\x01\n\x08ViewInfo\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x20\
- \n\x0cbelong_to_id\x18\x02\x20\x01(\tR\nbelongToId\x12\x12\n\x04name\x18\
- \x03\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x04\x20\x01(\tR\x04desc\
- \x12*\n\tdata_type\x18\x05\x20\x01(\x0e2\r.ViewDataTypeR\x08dataType\x12\
- -\n\nbelongings\x18\x06\x20\x01(\x0b2\r.RepeatedViewR\nbelongings\x12'\n\
- \x08ext_data\x18\x07\x20\x01(\x0b2\x0c.ViewExtDataR\x07extData\"s\n\x0bV\
- iewExtData\x12#\n\x06filter\x18\x01\x20\x01(\x0b2\x0b.ViewFilterR\x06fil\
- ter\x12\x20\n\x05group\x18\x02\x20\x01(\x0b2\n.ViewGroupR\x05group\x12\
- \x1d\n\x04sort\x18\x03\x20\x01(\x0b2\t.ViewSortR\x04sort\"'\n\nViewFilte\
- r\x12\x19\n\x08field_id\x18\x01\x20\x01(\tR\x07fieldId\"}\n\tViewGroup\
- \x12$\n\x0egroup_field_id\x18\x01\x20\x01(\tR\x0cgroupFieldId\x12-\n\x12\
- sub_group_field_id\x18\x02\x20\x01(\tH\0R\x0fsubGroupFieldIdB\x1b\n\x19o\
- ne_of_sub_group_field_id\"%\n\x08ViewSort\x12\x19\n\x08field_id\x18\x01\
- \x20\x01(\tR\x07fieldId\"+\n\x0cRepeatedView\x12\x1b\n\x05items\x18\x01\
- \x20\x03(\x0b2\x05.ViewR\x05items\"\xf2\x01\n\x11CreateViewPayload\x12\
- \x20\n\x0cbelong_to_id\x18\x01\x20\x01(\tR\nbelongToId\x12\x12\n\x04name\
- \x18\x02\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x03\x20\x01(\tR\x04de\
- sc\x12\x1e\n\tthumbnail\x18\x04\x20\x01(\tH\0R\tthumbnail\x12*\n\tdata_t\
- ype\x18\x05\x20\x01(\x0e2\r.ViewDataTypeR\x08dataType\x12\x1f\n\x0bplugi\
- n_type\x18\x06\x20\x01(\x05R\npluginType\x12\x12\n\x04data\x18\x07\x20\
- \x01(\x0cR\x04dataB\x12\n\x10one_of_thumbnail\"\xf4\x01\n\x10CreateViewP\
- arams\x12\x20\n\x0cbelong_to_id\x18\x01\x20\x01(\tR\nbelongToId\x12\x12\
- \n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x03\x20\x01\
- (\tR\x04desc\x12\x1c\n\tthumbnail\x18\x04\x20\x01(\tR\tthumbnail\x12*\n\
- \tdata_type\x18\x05\x20\x01(\x0e2\r.ViewDataTypeR\x08dataType\x12\x17\n\
- \x07view_id\x18\x06\x20\x01(\tR\x06viewId\x12\x12\n\x04data\x18\x07\x20\
- \x01(\x0cR\x04data\x12\x1f\n\x0bplugin_type\x18\x08\x20\x01(\x05R\nplugi\
- nType\"\x1e\n\x06ViewId\x12\x14\n\x05value\x18\x01\x20\x01(\tR\x05value\
- \"&\n\x0eRepeatedViewId\x12\x14\n\x05items\x18\x01\x20\x03(\tR\x05items\
- \"\xaa\x01\n\x11UpdateViewPayload\x12\x17\n\x07view_id\x18\x01\x20\x01(\
- \tR\x06viewId\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04name\x12\x14\n\
- \x04desc\x18\x03\x20\x01(\tH\x01R\x04desc\x12\x1e\n\tthumbnail\x18\x04\
- \x20\x01(\tH\x02R\tthumbnailB\r\n\x0bone_of_nameB\r\n\x0bone_of_descB\
- \x12\n\x10one_of_thumbnail\"\xa9\x01\n\x10UpdateViewParams\x12\x17\n\x07\
- view_id\x18\x01\x20\x01(\tR\x06viewId\x12\x14\n\x04name\x18\x02\x20\x01(\
- \tH\0R\x04name\x12\x14\n\x04desc\x18\x03\x20\x01(\tH\x01R\x04desc\x12\
- \x1e\n\tthumbnail\x18\x04\x20\x01(\tH\x02R\tthumbnailB\r\n\x0bone_of_nam\
- eB\r\n\x0bone_of_descB\x12\n\x10one_of_thumbnail\"y\n\x15MoveFolderItemP\
- ayload\x12\x17\n\x07item_id\x18\x01\x20\x01(\tR\x06itemId\x12\x12\n\x04f\
- rom\x18\x02\x20\x01(\x05R\x04from\x12\x0e\n\x02to\x18\x03\x20\x01(\x05R\
- \x02to\x12#\n\x02ty\x18\x04\x20\x01(\x0e2\x13.MoveFolderItemTypeR\x02ty*\
- '\n\x0cViewDataType\x12\r\n\tTextBlock\x10\0\x12\x08\n\x04Grid\x10\x01*/\
- \n\x12MoveFolderItemType\x12\x0b\n\x07MoveApp\x10\0\x12\x0c\n\x08MoveVie\
- w\x10\x01b\x06proto3\
+ reateTime\x12\x1f\n\x0bplugin_type\x18\x07\x20\x01(\x05R\npluginType\"+\
+ \n\x0cRepeatedView\x12\x1b\n\x05items\x18\x01\x20\x03(\x0b2\x05.ViewR\
+ \x05items\"&\n\x0eRepeatedViewId\x12\x14\n\x05items\x18\x01\x20\x03(\tR\
+ \x05items\"\xf2\x01\n\x11CreateViewPayload\x12\x20\n\x0cbelong_to_id\x18\
+ \x01\x20\x01(\tR\nbelongToId\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04na\
+ me\x12\x12\n\x04desc\x18\x03\x20\x01(\tR\x04desc\x12\x1e\n\tthumbnail\
+ \x18\x04\x20\x01(\tH\0R\tthumbnail\x12*\n\tdata_type\x18\x05\x20\x01(\
+ \x0e2\r.ViewDataTypeR\x08dataType\x12\x1f\n\x0bplugin_type\x18\x06\x20\
+ \x01(\x05R\npluginType\x12\x12\n\x04data\x18\x07\x20\x01(\x0cR\x04dataB\
+ \x12\n\x10one_of_thumbnail\"\xf4\x01\n\x10CreateViewParams\x12\x20\n\x0c\
+ belong_to_id\x18\x01\x20\x01(\tR\nbelongToId\x12\x12\n\x04name\x18\x02\
+ \x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x03\x20\x01(\tR\x04desc\x12\
+ \x1c\n\tthumbnail\x18\x04\x20\x01(\tR\tthumbnail\x12*\n\tdata_type\x18\
+ \x05\x20\x01(\x0e2\r.ViewDataTypeR\x08dataType\x12\x17\n\x07view_id\x18\
+ \x06\x20\x01(\tR\x06viewId\x12\x12\n\x04data\x18\x07\x20\x01(\x0cR\x04da\
+ ta\x12\x1f\n\x0bplugin_type\x18\x08\x20\x01(\x05R\npluginType\"\x1e\n\
+ \x06ViewId\x12\x14\n\x05value\x18\x01\x20\x01(\tR\x05value\"\xaa\x01\n\
+ \x11UpdateViewPayload\x12\x17\n\x07view_id\x18\x01\x20\x01(\tR\x06viewId\
+ \x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04name\x12\x14\n\x04desc\x18\
+ \x03\x20\x01(\tH\x01R\x04desc\x12\x1e\n\tthumbnail\x18\x04\x20\x01(\tH\
+ \x02R\tthumbnailB\r\n\x0bone_of_nameB\r\n\x0bone_of_descB\x12\n\x10one_o\
+ f_thumbnail\"\xa9\x01\n\x10UpdateViewParams\x12\x17\n\x07view_id\x18\x01\
+ \x20\x01(\tR\x06viewId\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04name\
+ \x12\x14\n\x04desc\x18\x03\x20\x01(\tH\x01R\x04desc\x12\x1e\n\tthumbnail\
+ \x18\x04\x20\x01(\tH\x02R\tthumbnailB\r\n\x0bone_of_nameB\r\n\x0bone_of_\
+ descB\x12\n\x10one_of_thumbnail\"y\n\x15MoveFolderItemPayload\x12\x17\n\
+ \x07item_id\x18\x01\x20\x01(\tR\x06itemId\x12\x12\n\x04from\x18\x02\x20\
+ \x01(\x05R\x04from\x12\x0e\n\x02to\x18\x03\x20\x01(\x05R\x02to\x12#\n\
+ \x02ty\x18\x04\x20\x01(\x0e2\x13.MoveFolderItemTypeR\x02ty*'\n\x0cViewDa\
+ taType\x12\r\n\tTextBlock\x10\0\x12\x08\n\x04Grid\x10\x01*/\n\x12MoveFol\
+ derItemType\x12\x0b\n\x07MoveApp\x10\0\x12\x0c\n\x08MoveView\x10\x01b\
+ \x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/model/view_info.rs b/shared-lib/flowy-folder-data-model/src/protobuf/model/view_info.rs
new file mode 100644
index 0000000000..e6e022ffd2
--- /dev/null
+++ b/shared-lib/flowy-folder-data-model/src/protobuf/model/view_info.rs
@@ -0,0 +1,1331 @@
+// This file is generated by rust-protobuf 2.25.2. Do not edit
+// @generated
+
+// https://github.com/rust-lang/rust-clippy/issues/702
+#![allow(unknown_lints)]
+#![allow(clippy::all)]
+
+#![allow(unused_attributes)]
+#![cfg_attr(rustfmt, rustfmt::skip)]
+
+#![allow(box_pointers)]
+#![allow(dead_code)]
+#![allow(missing_docs)]
+#![allow(non_camel_case_types)]
+#![allow(non_snake_case)]
+#![allow(non_upper_case_globals)]
+#![allow(trivial_casts)]
+#![allow(unused_imports)]
+#![allow(unused_results)]
+//! Generated file from `view_info.proto`
+
+/// Generated files are compatible only with the same version
+/// of protobuf runtime.
+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
+
+#[derive(PartialEq,Clone,Default)]
+pub struct ViewInfo {
+ // message fields
+ pub id: ::std::string::String,
+ pub belong_to_id: ::std::string::String,
+ pub name: ::std::string::String,
+ pub desc: ::std::string::String,
+ pub data_type: super::view::ViewDataType,
+ pub belongings: ::protobuf::SingularPtrField<super::view::RepeatedView>,
+ pub ext_data: ::protobuf::SingularPtrField<ViewExtData>,
+ // special fields
+ pub unknown_fields: ::protobuf::UnknownFields,
+ pub cached_size: ::protobuf::CachedSize,
+}
+
+impl<'a> ::std::default::Default for &'a ViewInfo {
+ fn default() -> &'a ViewInfo {
+ <ViewInfo as ::protobuf::Message>::default_instance()
+ }
+}
+
+impl ViewInfo {
+ pub fn new() -> ViewInfo {
+ ::std::default::Default::default()
+ }
+
+ // string id = 1;
+
+
+ pub fn get_id(&self) -> &str {
+ &self.id
+ }
+ pub fn clear_id(&mut self) {
+ self.id.clear();
+ }
+
+ // Param is passed by value, moved
+ pub fn set_id(&mut self, v: ::std::string::String) {
+ self.id = v;
+ }
+
+ // Mutable pointer to the field.
+ // If field is not initialized, it is initialized with default value first.
+ pub fn mut_id(&mut self) -> &mut ::std::string::String {
+ &mut self.id
+ }
+
+ // Take field
+ pub fn take_id(&mut self) -> ::std::string::String {
+ ::std::mem::replace(&mut self.id, ::std::string::String::new())
+ }
+
+ // string belong_to_id = 2;
+
+
+ pub fn get_belong_to_id(&self) -> &str {
+ &self.belong_to_id
+ }
+ pub fn clear_belong_to_id(&mut self) {
+ self.belong_to_id.clear();
+ }
+
+ // Param is passed by value, moved
+ pub fn set_belong_to_id(&mut self, v: ::std::string::String) {
+ self.belong_to_id = v;
+ }
+
+ // Mutable pointer to the field.
+ // If field is not initialized, it is initialized with default value first.
+ pub fn mut_belong_to_id(&mut self) -> &mut ::std::string::String {
+ &mut self.belong_to_id
+ }
+
+ // Take field
+ pub fn take_belong_to_id(&mut self) -> ::std::string::String {
+ ::std::mem::replace(&mut self.belong_to_id, ::std::string::String::new())
+ }
+
+ // string name = 3;
+
+
+ pub fn get_name(&self) -> &str {
+ &self.name
+ }
+ pub fn clear_name(&mut self) {
+ self.name.clear();
+ }
+
+ // Param is passed by value, moved
+ pub fn set_name(&mut self, v: ::std::string::String) {
+ self.name = v;
+ }
+
+ // Mutable pointer to the field.
+ // If field is not initialized, it is initialized with default value first.
+ pub fn mut_name(&mut self) -> &mut ::std::string::String {
+ &mut self.name
+ }
+
+ // Take field
+ pub fn take_name(&mut self) -> ::std::string::String {
+ ::std::mem::replace(&mut self.name, ::std::string::String::new())
+ }
+
+ // string desc = 4;
+
+
+ pub fn get_desc(&self) -> &str {
+ &self.desc
+ }
+ pub fn clear_desc(&mut self) {
+ self.desc.clear();
+ }
+
+ // Param is passed by value, moved
+ pub fn set_desc(&mut self, v: ::std::string::String) {
+ self.desc = v;
+ }
+
+ // Mutable pointer to the field.
+ // If field is not initialized, it is initialized with default value first.
+ pub fn mut_desc(&mut self) -> &mut ::std::string::String {
+ &mut self.desc
+ }
+
+ // Take field
+ pub fn take_desc(&mut self) -> ::std::string::String {
+ ::std::mem::replace(&mut self.desc, ::std::string::String::new())
+ }
+
+ // .ViewDataType data_type = 5;
+
+
+ pub fn get_data_type(&self) -> super::view::ViewDataType {
+ self.data_type
+ }
+ pub fn clear_data_type(&mut self) {
+ self.data_type = super::view::ViewDataType::TextBlock;
+ }
+
+ // Param is passed by value, moved
+ pub fn set_data_type(&mut self, v: super::view::ViewDataType) {
+ self.data_type = v;
+ }
+
+ // .RepeatedView belongings = 6;
+
+
+ pub fn get_belongings(&self) -> &super::view::RepeatedView {
+ self.belongings.as_ref().unwrap_or_else(|| <super::view::RepeatedView as ::protobuf::Message>::default_instance())
+ }
+ pub fn clear_belongings(&mut self) {
+ self.belongings.clear();
+ }
+
+ pub fn has_belongings(&self) -> bool {
+ self.belongings.is_some()
+ }
+
+ // Param is passed by value, moved
+ pub fn set_belongings(&mut self, v: super::view::RepeatedView) {
+ self.belongings = ::protobuf::SingularPtrField::some(v);
+ }
+
+ // Mutable pointer to the field.
+ // If field is not initialized, it is initialized with default value first.
+ pub fn mut_belongings(&mut self) -> &mut super::view::RepeatedView {
+ if self.belongings.is_none() {
+ self.belongings.set_default();
+ }
+ self.belongings.as_mut().unwrap()
+ }
+
+ // Take field
+ pub fn take_belongings(&mut self) -> super::view::RepeatedView {
+ self.belongings.take().unwrap_or_else(|| super::view::RepeatedView::new())
+ }
+
+ // .ViewExtData ext_data = 7;
+
+
+ pub fn get_ext_data(&self) -> &ViewExtData {
+ self.ext_data.as_ref().unwrap_or_else(|| <ViewExtData as ::protobuf::Message>::default_instance())
+ }
+ pub fn clear_ext_data(&mut self) {
+ self.ext_data.clear();
+ }
+
+ pub fn has_ext_data(&self) -> bool {
+ self.ext_data.is_some()
+ }
+
+ // Param is passed by value, moved
+ pub fn set_ext_data(&mut self, v: ViewExtData) {
+ self.ext_data = ::protobuf::SingularPtrField::some(v);
+ }
+
+ // Mutable pointer to the field.
+ // If field is not initialized, it is initialized with default value first.
+ pub fn mut_ext_data(&mut self) -> &mut ViewExtData {
+ if self.ext_data.is_none() {
+ self.ext_data.set_default();
+ }
+ self.ext_data.as_mut().unwrap()
+ }
+
+ // Take field
+ pub fn take_ext_data(&mut self) -> ViewExtData {
+ self.ext_data.take().unwrap_or_else(|| ViewExtData::new())
+ }
+}
+
+impl ::protobuf::Message for ViewInfo {
+ fn is_initialized(&self) -> bool {
+ for v in &self.belongings {
+ if !v.is_initialized() {
+ return false;
+ }
+ };
+ for v in &self.ext_data {
+ if !v.is_initialized() {
+ return false;
+ }
+ };
+ true
+ }
+
+ fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
+ while !is.eof()? {
+ let (field_number, wire_type) = is.read_tag_unpack()?;
+ match field_number {
+ 1 => {
+ ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
+ },
+ 2 => {
+ ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.belong_to_id)?;
+ },
+ 3 => {
+ ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
+ },
+ 4 => {
+ ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
+ },
+ 5 => {
+ ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.data_type, 5, &mut self.unknown_fields)?
+ },
+ 6 => {
+ ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.belongings)?;
+ },
+ 7 => {
+ ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.ext_data)?;
+ },
+ _ => {
+ ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
+ },
+ };
+ }
+ ::std::result::Result::Ok(())
+ }
+
+ // Compute sizes of nested messages
+ #[allow(unused_variables)]
+ fn compute_size(&self) -> u32 {
+ let mut my_size = 0;
+ if !self.id.is_empty() {
+ my_size += ::protobuf::rt::string_size(1, &self.id);
+ }
+ if !self.belong_to_id.is_empty() {
+ my_size += ::protobuf::rt::string_size(2, &self.belong_to_id);
+ }
+ if !self.name.is_empty() {
+ my_size += ::protobuf::rt::string_size(3, &self.name);
+ }
+ if !self.desc.is_empty() {
+ my_size += ::protobuf::rt::string_size(4, &self.desc);
+ }
+ if self.data_type != super::view::ViewDataType::TextBlock {
+ my_size += ::protobuf::rt::enum_size(5, self.data_type);
+ }
+ if let Some(ref v) = self.belongings.as_ref() {
+ let len = v.compute_size();
+ my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
+ }
+ if let Some(ref v) = self.ext_data.as_ref() {
+ let len = v.compute_size();
+ my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
+ }
+ my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
+ self.cached_size.set(my_size);
+ my_size
+ }
+
+ fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
+ if !self.id.is_empty() {
+ os.write_string(1, &self.id)?;
+ }
+ if !self.belong_to_id.is_empty() {
+ os.write_string(2, &self.belong_to_id)?;
+ }
+ if !self.name.is_empty() {
+ os.write_string(3, &self.name)?;
+ }
+ if !self.desc.is_empty() {
+ os.write_string(4, &self.desc)?;
+ }
+ if self.data_type != super::view::ViewDataType::TextBlock {
+ os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.data_type))?;
+ }
+ if let Some(ref v) = self.belongings.as_ref() {
+ os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
+ os.write_raw_varint32(v.get_cached_size())?;
+ v.write_to_with_cached_sizes(os)?;
+ }
+ if let Some(ref v) = self.ext_data.as_ref() {
+ os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
+ os.write_raw_varint32(v.get_cached_size())?;
+ v.write_to_with_cached_sizes(os)?;
+ }
+ os.write_unknown_fields(self.get_unknown_fields())?;
+ ::std::result::Result::Ok(())
+ }
+
+ fn get_cached_size(&self) -> u32 {
+ self.cached_size.get()
+ }
+
+ fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
+ &self.unknown_fields
+ }
+
+ fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
+ &mut self.unknown_fields
+ }
+
+ fn as_any(&self) -> &dyn (::std::any::Any) {
+ self as &dyn (::std::any::Any)
+ }
+ fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
+ self as &mut dyn (::std::any::Any)
+ }
+ fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
+ self
+ }
+
+ fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
+ Self::descriptor_static()
+ }
+
+ fn new() -> ViewInfo {
+ ViewInfo::new()
+ }
+
+ fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
+ static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
+ descriptor.get(|| {
+ let mut fields = ::std::vec::Vec::new();
+ fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
+ "id",
+ |m: &ViewInfo| { &m.id },
+ |m: &mut ViewInfo| { &mut m.id },
+ ));
+ fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
+ "belong_to_id",
+ |m: &ViewInfo| { &m.belong_to_id },
+ |m: &mut ViewInfo| { &mut m.belong_to_id },
+ ));
+ fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
+ "name",
+ |m: &ViewInfo| { &m.name },
+ |m: &mut ViewInfo| { &mut m.name },
+ ));
+ fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
+ "desc",
+ |m: &ViewInfo| { &m.desc },
+ |m: &mut ViewInfo| { &mut m.desc },
+ ));
+ fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<super::view::ViewDataType>>(
+ "data_type",
+ |m: &ViewInfo| { &m.data_type },
+ |m: &mut ViewInfo| { &mut m.data_type },
+ ));
+ fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::view::RepeatedView>>(
+ "belongings",
+ |m: &ViewInfo| { &m.belongings },
+ |m: &mut ViewInfo| { &mut m.belongings },
+ ));
+ fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ViewExtData>>(
+ "ext_data",
+ |m: &ViewInfo| { &m.ext_data },
+ |m: &mut ViewInfo| { &mut m.ext_data },
+ ));
+ ::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewInfo>(
+ "ViewInfo",
+ fields,
+ file_descriptor_proto()
+ )
+ })
+ }
+
+ fn default_instance() -> &'static ViewInfo {
+ static instance: ::protobuf::rt::LazyV2<ViewInfo> = ::protobuf::rt::LazyV2::INIT;
+ instance.get(ViewInfo::new)
+ }
+}
+
+impl ::protobuf::Clear for ViewInfo {
+ fn clear(&mut self) {
+ self.id.clear();
+ self.belong_to_id.clear();
+ self.name.clear();
+ self.desc.clear();
+ self.data_type = super::view::ViewDataType::TextBlock;
+ self.belongings.clear();
+ self.ext_data.clear();
+ self.unknown_fields.clear();
+ }
+}
+
+impl ::std::fmt::Debug for ViewInfo {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
+ ::protobuf::text_format::fmt(self, f)
+ }
+}
+
+impl ::protobuf::reflect::ProtobufValue for ViewInfo {
+ fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
+ ::protobuf::reflect::ReflectValueRef::Message(self)
+ }
+}
+
+#[derive(PartialEq,Clone,Default)]
+pub struct ViewExtData {
+ // message fields
+ pub filter: ::protobuf::SingularPtrField<ViewFilter>,
+ pub group: ::protobuf::SingularPtrField<ViewGroup>,
+ pub sort: ::protobuf::SingularPtrField<ViewSort>,
+ // special fields
+ pub unknown_fields: ::protobuf::UnknownFields,
+ pub cached_size: ::protobuf::CachedSize,
+}
+
+impl<'a> ::std::default::Default for &'a ViewExtData {
+ fn default() -> &'a ViewExtData {
+ <ViewExtData as ::protobuf::Message>::default_instance()
+ }
+}
+
+impl ViewExtData {
+ pub fn new() -> ViewExtData {
+ ::std::default::Default::default()
+ }
+
+ // .ViewFilter filter = 1;
+
+
+ pub fn get_filter(&self) -> &ViewFilter {
+ self.filter.as_ref().unwrap_or_else(|| <ViewFilter as ::protobuf::Message>::default_instance())
+ }
+ pub fn clear_filter(&mut self) {
+ self.filter.clear();
+ }
+
+ pub fn has_filter(&self) -> bool {
+ self.filter.is_some()
+ }
+
+ // Param is passed by value, moved
+ pub fn set_filter(&mut self, v: ViewFilter) {
+ self.filter = ::protobuf::SingularPtrField::some(v);
+ }
+
+ // Mutable pointer to the field.
+ // If field is not initialized, it is initialized with default value first.
+ pub fn mut_filter(&mut self) -> &mut ViewFilter {
+ if self.filter.is_none() {
+ self.filter.set_default();
+ }
+ self.filter.as_mut().unwrap()
+ }
+
+ // Take field
+ pub fn take_filter(&mut self) -> ViewFilter {
+ self.filter.take().unwrap_or_else(|| ViewFilter::new())
+ }
+
+ // .ViewGroup group = 2;
+
+
+ pub fn get_group(&self) -> &ViewGroup {
+ self.group.as_ref().unwrap_or_else(|| <ViewGroup as ::protobuf::Message>::default_instance())
+ }
+ pub fn clear_group(&mut self) {
+ self.group.clear();
+ }
+
+ pub fn has_group(&self) -> bool {
+ self.group.is_some()
+ }
+
+ // Param is passed by value, moved
+ pub fn set_group(&mut self, v: ViewGroup) {
+ self.group = ::protobuf::SingularPtrField::some(v);
+ }
+
+ // Mutable pointer to the field.
+ // If field is not initialized, it is initialized with default value first.
+ pub fn mut_group(&mut self) -> &mut ViewGroup {
+ if self.group.is_none() {
+ self.group.set_default();
+ }
+ self.group.as_mut().unwrap()
+ }
+
+ // Take field
+ pub fn take_group(&mut self) -> ViewGroup {
+ self.group.take().unwrap_or_else(|| ViewGroup::new())
+ }
+
+ // .ViewSort sort = 3;
+
+
+ pub fn get_sort(&self) -> &ViewSort {
+ self.sort.as_ref().unwrap_or_else(|| <ViewSort as ::protobuf::Message>::default_instance())
+ }
+ pub fn clear_sort(&mut self) {
+ self.sort.clear();
+ }
+
+ pub fn has_sort(&self) -> bool {
+ self.sort.is_some()
+ }
+
+ // Param is passed by value, moved
+ pub fn set_sort(&mut self, v: ViewSort) {
+ self.sort = ::protobuf::SingularPtrField::some(v);
+ }
+
+ // Mutable pointer to the field.
+ // If field is not initialized, it is initialized with default value first.
+ pub fn mut_sort(&mut self) -> &mut ViewSort {
+ if self.sort.is_none() {
+ self.sort.set_default();
+ }
+ self.sort.as_mut().unwrap()
+ }
+
+ // Take field
+ pub fn take_sort(&mut self) -> ViewSort {
+ self.sort.take().unwrap_or_else(|| ViewSort::new())
+ }
+}
+
+impl ::protobuf::Message for ViewExtData {
+ fn is_initialized(&self) -> bool {
+ for v in &self.filter {
+ if !v.is_initialized() {
+ return false;
+ }
+ };
+ for v in &self.group {
+ if !v.is_initialized() {
+ return false;
+ }
+ };
+ for v in &self.sort {
+ if !v.is_initialized() {
+ return false;
+ }
+ };
+ true
+ }
+
+ fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
+ while !is.eof()? {
+ let (field_number, wire_type) = is.read_tag_unpack()?;
+ match field_number {
+ 1 => {
+ ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.filter)?;
+ },
+ 2 => {
+ ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.group)?;
+ },
+ 3 => {
+ ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.sort)?;
+ },
+ _ => {
+ ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
+ },
+ };
+ }
+ ::std::result::Result::Ok(())
+ }
+
+ // Compute sizes of nested messages
+ #[allow(unused_variables)]
+ fn compute_size(&self) -> u32 {
+ let mut my_size = 0;
+ if let Some(ref v) = self.filter.as_ref() {
+ let len = v.compute_size();
+ my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
+ }
+ if let Some(ref v) = self.group.as_ref() {
+ let len = v.compute_size();
+ my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
+ }
+ if let Some(ref v) = self.sort.as_ref() {
+ let len = v.compute_size();
+ my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
+ }
+ my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
+ self.cached_size.set(my_size);
+ my_size
+ }
+
+ fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
+ if let Some(ref v) = self.filter.as_ref() {
+ os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
+ os.write_raw_varint32(v.get_cached_size())?;
+ v.write_to_with_cached_sizes(os)?;
+ }
+ if let Some(ref v) = self.group.as_ref() {
+ os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
+ os.write_raw_varint32(v.get_cached_size())?;
+ v.write_to_with_cached_sizes(os)?;
+ }
+ if let Some(ref v) = self.sort.as_ref() {
+ os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
+ os.write_raw_varint32(v.get_cached_size())?;
+ v.write_to_with_cached_sizes(os)?;
+ }
+ os.write_unknown_fields(self.get_unknown_fields())?;
+ ::std::result::Result::Ok(())
+ }
+
+ fn get_cached_size(&self) -> u32 {
+ self.cached_size.get()
+ }
+
+ fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
+ &self.unknown_fields
+ }
+
+ fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
+ &mut self.unknown_fields
+ }
+
+ fn as_any(&self) -> &dyn (::std::any::Any) {
+ self as &dyn (::std::any::Any)
+ }
+ fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
+ self as &mut dyn (::std::any::Any)
+ }
+ fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
+ self
+ }
+
+ fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
+ Self::descriptor_static()
+ }
+
+ fn new() -> ViewExtData {
+ ViewExtData::new()
+ }
+
+ fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
+ static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
+ descriptor.get(|| {
+ let mut fields = ::std::vec::Vec::new();
+ fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ViewFilter>>(
+ "filter",
+ |m: &ViewExtData| { &m.filter },
+ |m: &mut ViewExtData| { &mut m.filter },
+ ));
+ fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ViewGroup>>(
+ "group",
+ |m: &ViewExtData| { &m.group },
+ |m: &mut ViewExtData| { &mut m.group },
+ ));
+ fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ViewSort>>(
+ "sort",
+ |m: &ViewExtData| { &m.sort },
+ |m: &mut ViewExtData| { &mut m.sort },
+ ));
+ ::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewExtData>(
+ "ViewExtData",
+ fields,
+ file_descriptor_proto()
+ )
+ })
+ }
+
+ fn default_instance() -> &'static ViewExtData {
+ static instance: ::protobuf::rt::LazyV2<ViewExtData> = ::protobuf::rt::LazyV2::INIT;
+ instance.get(ViewExtData::new)
+ }
+}
+
+impl ::protobuf::Clear for ViewExtData {
+ fn clear(&mut self) {
+ self.filter.clear();
+ self.group.clear();
+ self.sort.clear();
+ self.unknown_fields.clear();
+ }
+}
+
+impl ::std::fmt::Debug for ViewExtData {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
+ ::protobuf::text_format::fmt(self, f)
+ }
+}
+
+impl ::protobuf::reflect::ProtobufValue for ViewExtData {
+ fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
+ ::protobuf::reflect::ReflectValueRef::Message(self)
+ }
+}
+
+#[derive(PartialEq,Clone,Default)]
+pub struct ViewFilter {
+ // message fields
+ pub field_id: ::std::string::String,
+ // special fields
+ pub unknown_fields: ::protobuf::UnknownFields,
+ pub cached_size: ::protobuf::CachedSize,
+}
+
+impl<'a> ::std::default::Default for &'a ViewFilter {
+ fn default() -> &'a ViewFilter {
+ <ViewFilter as ::protobuf::Message>::default_instance()
+ }
+}
+
+impl ViewFilter {
+ pub fn new() -> ViewFilter {
+ ::std::default::Default::default()
+ }
+
+ // string field_id = 1;
+
+
+ pub fn get_field_id(&self) -> &str {
+ &self.field_id
+ }
+ pub fn clear_field_id(&mut self) {
+ self.field_id.clear();
+ }
+
+ // Param is passed by value, moved
+ pub fn set_field_id(&mut self, v: ::std::string::String) {
+ self.field_id = v;
+ }
+
+ // Mutable pointer to the field.
+ // If field is not initialized, it is initialized with default value first.
+ pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
+ &mut self.field_id
+ }
+
+ // Take field
+ pub fn take_field_id(&mut self) -> ::std::string::String {
+ ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
+ }
+}
+
+impl ::protobuf::Message for ViewFilter {
+ fn is_initialized(&self) -> bool {
+ true
+ }
+
+ fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
+ while !is.eof()? {
+ let (field_number, wire_type) = is.read_tag_unpack()?;
+ match field_number {
+ 1 => {
+ ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
+ },
+ _ => {
+ ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
+ },
+ };
+ }
+ ::std::result::Result::Ok(())
+ }
+
+ // Compute sizes of nested messages
+ #[allow(unused_variables)]
+ fn compute_size(&self) -> u32 {
+ let mut my_size = 0;
+ if !self.field_id.is_empty() {
+ my_size += ::protobuf::rt::string_size(1, &self.field_id);
+ }
+ my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
+ self.cached_size.set(my_size);
+ my_size
+ }
+
+ fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
+ if !self.field_id.is_empty() {
+ os.write_string(1, &self.field_id)?;
+ }
+ os.write_unknown_fields(self.get_unknown_fields())?;
+ ::std::result::Result::Ok(())
+ }
+
+ fn get_cached_size(&self) -> u32 {
+ self.cached_size.get()
+ }
+
+ fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
+ &self.unknown_fields
+ }
+
+ fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
+ &mut self.unknown_fields
+ }
+
+ fn as_any(&self) -> &dyn (::std::any::Any) {
+ self as &dyn (::std::any::Any)
+ }
+ fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
+ self as &mut dyn (::std::any::Any)
+ }
+ fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
+ self
+ }
+
+ fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
+ Self::descriptor_static()
+ }
+
+ fn new() -> ViewFilter {
+ ViewFilter::new()
+ }
+
+ fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
+ static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
+ descriptor.get(|| {
+ let mut fields = ::std::vec::Vec::new();
+ fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
+ "field_id",
+ |m: &ViewFilter| { &m.field_id },
+ |m: &mut ViewFilter| { &mut m.field_id },
+ ));
+ ::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewFilter>(
+ "ViewFilter",
+ fields,
+ file_descriptor_proto()
+ )
+ })
+ }
+
+ fn default_instance() -> &'static ViewFilter {
+ static instance: ::protobuf::rt::LazyV2<ViewFilter> = ::protobuf::rt::LazyV2::INIT;
+ instance.get(ViewFilter::new)
+ }
+}
+
+impl ::protobuf::Clear for ViewFilter {
+ fn clear(&mut self) {
+ self.field_id.clear();
+ self.unknown_fields.clear();
+ }
+}
+
+impl ::std::fmt::Debug for ViewFilter {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
+ ::protobuf::text_format::fmt(self, f)
+ }
+}
+
+impl ::protobuf::reflect::ProtobufValue for ViewFilter {
+ fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
+ ::protobuf::reflect::ReflectValueRef::Message(self)
+ }
+}
+
+#[derive(PartialEq,Clone,Default)]
+pub struct ViewGroup {
+ // message fields
+ pub group_field_id: ::std::string::String,
+ // message oneof groups
+ pub one_of_sub_group_field_id: ::std::option::Option<ViewGroup_oneof_one_of_sub_group_field_id>,
+ // special fields
+ pub unknown_fields: ::protobuf::UnknownFields,
+ pub cached_size: ::protobuf::CachedSize,
+}
+
+impl<'a> ::std::default::Default for &'a ViewGroup {
+ fn default() -> &'a ViewGroup {
+ <ViewGroup as ::protobuf::Message>::default_instance()
+ }
+}
+
+#[derive(Clone,PartialEq,Debug)]
+pub enum ViewGroup_oneof_one_of_sub_group_field_id {
+ sub_group_field_id(::std::string::String),
+}
+
+impl ViewGroup {
+ pub fn new() -> ViewGroup {
+ ::std::default::Default::default()
+ }
+
+ // string group_field_id = 1;
+
+
+ pub fn get_group_field_id(&self) -> &str {
+ &self.group_field_id
+ }
+ pub fn clear_group_field_id(&mut self) {
+ self.group_field_id.clear();
+ }
+
+ // Param is passed by value, moved
+ pub fn set_group_field_id(&mut self, v: ::std::string::String) {
+ self.group_field_id = v;
+ }
+
+ // Mutable pointer to the field.
+ // If field is not initialized, it is initialized with default value first.
+ pub fn mut_group_field_id(&mut self) -> &mut ::std::string::String {
+ &mut self.group_field_id
+ }
+
+ // Take field
+ pub fn take_group_field_id(&mut self) -> ::std::string::String {
+ ::std::mem::replace(&mut self.group_field_id, ::std::string::String::new())
+ }
+
+ // string sub_group_field_id = 2;
+
+
+ pub fn get_sub_group_field_id(&self) -> &str {
+ match self.one_of_sub_group_field_id {
+ ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(ref v)) => v,
+ _ => "",
+ }
+ }
+ pub fn clear_sub_group_field_id(&mut self) {
+ self.one_of_sub_group_field_id = ::std::option::Option::None;
+ }
+
+ pub fn has_sub_group_field_id(&self) -> bool {
+ match self.one_of_sub_group_field_id {
+ ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(..)) => true,
+ _ => false,
+ }
+ }
+
+ // Param is passed by value, moved
+ pub fn set_sub_group_field_id(&mut self, v: ::std::string::String) {
+ self.one_of_sub_group_field_id = ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(v))
+ }
+
+ // Mutable pointer to the field.
+ pub fn mut_sub_group_field_id(&mut self) -> &mut ::std::string::String {
+ if let ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(_)) = self.one_of_sub_group_field_id {
+ } else {
+ self.one_of_sub_group_field_id = ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(::std::string::String::new()));
+ }
+ match self.one_of_sub_group_field_id {
+ ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(ref mut v)) => v,
+ _ => panic!(),
+ }
+ }
+
+ // Take field
+ pub fn take_sub_group_field_id(&mut self) -> ::std::string::String {
+ if self.has_sub_group_field_id() {
+ match self.one_of_sub_group_field_id.take() {
+ ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(v)) => v,
+ _ => panic!(),
+ }
+ } else {
+ ::std::string::String::new()
+ }
+ }
+}
+
+impl ::protobuf::Message for ViewGroup {
+ fn is_initialized(&self) -> bool {
+ true
+ }
+
+ fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
+ while !is.eof()? {
+ let (field_number, wire_type) = is.read_tag_unpack()?;
+ match field_number {
+ 1 => {
+ ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.group_field_id)?;
+ },
+ 2 => {
+ if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
+ return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
+ }
+ self.one_of_sub_group_field_id = ::std::option::Option::Some(ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(is.read_string()?));
+ },
+ _ => {
+ ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
+ },
+ };
+ }
+ ::std::result::Result::Ok(())
+ }
+
+ // Compute sizes of nested messages
+ #[allow(unused_variables)]
+ fn compute_size(&self) -> u32 {
+ let mut my_size = 0;
+ if !self.group_field_id.is_empty() {
+ my_size += ::protobuf::rt::string_size(1, &self.group_field_id);
+ }
+ if let ::std::option::Option::Some(ref v) = self.one_of_sub_group_field_id {
+ match v {
+ &ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(ref v) => {
+ my_size += ::protobuf::rt::string_size(2, &v);
+ },
+ };
+ }
+ my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
+ self.cached_size.set(my_size);
+ my_size
+ }
+
+ fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
+ if !self.group_field_id.is_empty() {
+ os.write_string(1, &self.group_field_id)?;
+ }
+ if let ::std::option::Option::Some(ref v) = self.one_of_sub_group_field_id {
+ match v {
+ &ViewGroup_oneof_one_of_sub_group_field_id::sub_group_field_id(ref v) => {
+ os.write_string(2, v)?;
+ },
+ };
+ }
+ os.write_unknown_fields(self.get_unknown_fields())?;
+ ::std::result::Result::Ok(())
+ }
+
+ fn get_cached_size(&self) -> u32 {
+ self.cached_size.get()
+ }
+
+ fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
+ &self.unknown_fields
+ }
+
+ fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
+ &mut self.unknown_fields
+ }
+
+ fn as_any(&self) -> &dyn (::std::any::Any) {
+ self as &dyn (::std::any::Any)
+ }
+ fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
+ self as &mut dyn (::std::any::Any)
+ }
+ fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
+ self
+ }
+
+ fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
+ Self::descriptor_static()
+ }
+
+ fn new() -> ViewGroup {
+ ViewGroup::new()
+ }
+
+ fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
+ static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
+ descriptor.get(|| {
+ let mut fields = ::std::vec::Vec::new();
+ fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
+ "group_field_id",
+ |m: &ViewGroup| { &m.group_field_id },
+ |m: &mut ViewGroup| { &mut m.group_field_id },
+ ));
+ fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
+ "sub_group_field_id",
+ ViewGroup::has_sub_group_field_id,
+ ViewGroup::get_sub_group_field_id,
+ ));
+ ::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewGroup>(
+ "ViewGroup",
+ fields,
+ file_descriptor_proto()
+ )
+ })
+ }
+
+ fn default_instance() -> &'static ViewGroup {
+ static instance: ::protobuf::rt::LazyV2<ViewGroup> = ::protobuf::rt::LazyV2::INIT;
+ instance.get(ViewGroup::new)
+ }
+}
+
+impl ::protobuf::Clear for ViewGroup {
+ fn clear(&mut self) {
+ self.group_field_id.clear();
+ self.one_of_sub_group_field_id = ::std::option::Option::None;
+ self.unknown_fields.clear();
+ }
+}
+
+impl ::std::fmt::Debug for ViewGroup {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
+ ::protobuf::text_format::fmt(self, f)
+ }
+}
+
+impl ::protobuf::reflect::ProtobufValue for ViewGroup {
+ fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
+ ::protobuf::reflect::ReflectValueRef::Message(self)
+ }
+}
+
+#[derive(PartialEq,Clone,Default)]
+pub struct ViewSort {
+ // message fields
+ pub field_id: ::std::string::String,
+ // special fields
+ pub unknown_fields: ::protobuf::UnknownFields,
+ pub cached_size: ::protobuf::CachedSize,
+}
+
+impl<'a> ::std::default::Default for &'a ViewSort {
+ fn default() -> &'a ViewSort {
+ <ViewSort as ::protobuf::Message>::default_instance()
+ }
+}
+
+impl ViewSort {
+ pub fn new() -> ViewSort {
+ ::std::default::Default::default()
+ }
+
+ // string field_id = 1;
+
+
+ pub fn get_field_id(&self) -> &str {
+ &self.field_id
+ }
+ pub fn clear_field_id(&mut self) {
+ self.field_id.clear();
+ }
+
+ // Param is passed by value, moved
+ pub fn set_field_id(&mut self, v: ::std::string::String) {
+ self.field_id = v;
+ }
+
+ // Mutable pointer to the field.
+ // If field is not initialized, it is initialized with default value first.
+ pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
+ &mut self.field_id
+ }
+
+ // Take field
+ pub fn take_field_id(&mut self) -> ::std::string::String {
+ ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
+ }
+}
+
+impl ::protobuf::Message for ViewSort {
+ fn is_initialized(&self) -> bool {
+ true
+ }
+
+ fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
+ while !is.eof()? {
+ let (field_number, wire_type) = is.read_tag_unpack()?;
+ match field_number {
+ 1 => {
+ ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
+ },
+ _ => {
+ ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
+ },
+ };
+ }
+ ::std::result::Result::Ok(())
+ }
+
+ // Compute sizes of nested messages
+ #[allow(unused_variables)]
+ fn compute_size(&self) -> u32 {
+ let mut my_size = 0;
+ if !self.field_id.is_empty() {
+ my_size += ::protobuf::rt::string_size(1, &self.field_id);
+ }
+ my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
+ self.cached_size.set(my_size);
+ my_size
+ }
+
+ fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
+ if !self.field_id.is_empty() {
+ os.write_string(1, &self.field_id)?;
+ }
+ os.write_unknown_fields(self.get_unknown_fields())?;
+ ::std::result::Result::Ok(())
+ }
+
+ fn get_cached_size(&self) -> u32 {
+ self.cached_size.get()
+ }
+
+ fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
+ &self.unknown_fields
+ }
+
+ fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
+ &mut self.unknown_fields
+ }
+
+ fn as_any(&self) -> &dyn (::std::any::Any) {
+ self as &dyn (::std::any::Any)
+ }
+ fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
+ self as &mut dyn (::std::any::Any)
+ }
+ fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
+ self
+ }
+
+ fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
+ Self::descriptor_static()
+ }
+
+ fn new() -> ViewSort {
+ ViewSort::new()
+ }
+
+ fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
+ static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
+ descriptor.get(|| {
+ let mut fields = ::std::vec::Vec::new();
+ fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
+ "field_id",
+ |m: &ViewSort| { &m.field_id },
+ |m: &mut ViewSort| { &mut m.field_id },
+ ));
+ ::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewSort>(
+ "ViewSort",
+ fields,
+ file_descriptor_proto()
+ )
+ })
+ }
+
+ fn default_instance() -> &'static ViewSort {
+ static instance: ::protobuf::rt::LazyV2<ViewSort> = ::protobuf::rt::LazyV2::INIT;
+ instance.get(ViewSort::new)
+ }
+}
+
+impl ::protobuf::Clear for ViewSort {
+ fn clear(&mut self) {
+ self.field_id.clear();
+ self.unknown_fields.clear();
+ }
+}
+
+impl ::std::fmt::Debug for ViewSort {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
+ ::protobuf::text_format::fmt(self, f)
+ }
+}
+
+impl ::protobuf::reflect::ProtobufValue for ViewSort {
+ fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
+ ::protobuf::reflect::ReflectValueRef::Message(self)
+ }
+}
+
+static file_descriptor_proto_data: &'static [u8] = b"\
+ \n\x0fview_info.proto\x1a\nview.proto\"\xe8\x01\n\x08ViewInfo\x12\x0e\n\
+ \x02id\x18\x01\x20\x01(\tR\x02id\x12\x20\n\x0cbelong_to_id\x18\x02\x20\
+ \x01(\tR\nbelongToId\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\x12\
+ \x12\n\x04desc\x18\x04\x20\x01(\tR\x04desc\x12*\n\tdata_type\x18\x05\x20\
+ \x01(\x0e2\r.ViewDataTypeR\x08dataType\x12-\n\nbelongings\x18\x06\x20\
+ \x01(\x0b2\r.RepeatedViewR\nbelongings\x12'\n\x08ext_data\x18\x07\x20\
+ \x01(\x0b2\x0c.ViewExtDataR\x07extData\"s\n\x0bViewExtData\x12#\n\x06fil\
+ ter\x18\x01\x20\x01(\x0b2\x0b.ViewFilterR\x06filter\x12\x20\n\x05group\
+ \x18\x02\x20\x01(\x0b2\n.ViewGroupR\x05group\x12\x1d\n\x04sort\x18\x03\
+ \x20\x01(\x0b2\t.ViewSortR\x04sort\"'\n\nViewFilter\x12\x19\n\x08field_i\
+ d\x18\x01\x20\x01(\tR\x07fieldId\"}\n\tViewGroup\x12$\n\x0egroup_field_i\
+ d\x18\x01\x20\x01(\tR\x0cgroupFieldId\x12-\n\x12sub_group_field_id\x18\
+ \x02\x20\x01(\tH\0R\x0fsubGroupFieldIdB\x1b\n\x19one_of_sub_group_field_\
+ id\"%\n\x08ViewSort\x12\x19\n\x08field_id\x18\x01\x20\x01(\tR\x07fieldId\
+ b\x06proto3\
+";
+
+static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
+
+fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
+ ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
+}
+
+pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
+ file_descriptor_proto_lazy.get(|| {
+ parse_descriptor_proto()
+ })
+}
diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/proto/view.proto b/shared-lib/flowy-folder-data-model/src/protobuf/proto/view.proto
index 6009fb407c..1c0ec3cfdd 100644
--- a/shared-lib/flowy-folder-data-model/src/protobuf/proto/view.proto
+++ b/shared-lib/flowy-folder-data-model/src/protobuf/proto/view.proto
@@ -9,33 +9,12 @@ message View {
int64 create_time = 6;
int32 plugin_type = 7;
}
-message ViewInfo {
- string id = 1;
- string belong_to_id = 2;
- string name = 3;
- string desc = 4;
- ViewDataType data_type = 5;
- RepeatedView belongings = 6;
- ViewExtData ext_data = 7;
-}
-message ViewExtData {
- ViewFilter filter = 1;
- ViewGroup group = 2;
- ViewSort sort = 3;
-}
-message ViewFilter {
- string field_id = 1;
-}
-message ViewGroup {
- string group_field_id = 1;
- oneof one_of_sub_group_field_id { string sub_group_field_id = 2; };
-}
-message ViewSort {
- string field_id = 1;
-}
message RepeatedView {
repeated View items = 1;
}
+message RepeatedViewId {
+ repeated string items = 1;
+}
message CreateViewPayload {
string belong_to_id = 1;
string name = 2;
@@ -58,9 +37,6 @@ message CreateViewParams {
message ViewId {
string value = 1;
}
-message RepeatedViewId {
- repeated string items = 1;
-}
message UpdateViewPayload {
string view_id = 1;
oneof one_of_name { string name = 2; };
diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/proto/view_info.proto b/shared-lib/flowy-folder-data-model/src/protobuf/proto/view_info.proto
new file mode 100644
index 0000000000..2f85dd1b7c
--- /dev/null
+++ b/shared-lib/flowy-folder-data-model/src/protobuf/proto/view_info.proto
@@ -0,0 +1,27 @@
+syntax = "proto3";
+import "view.proto";
+
+message ViewInfo {
+ string id = 1;
+ string belong_to_id = 2;
+ string name = 3;
+ string desc = 4;
+ ViewDataType data_type = 5;
+ RepeatedView belongings = 6;
+ ViewExtData ext_data = 7;
+}
+message ViewExtData {
+ ViewFilter filter = 1;
+ ViewGroup group = 2;
+ ViewSort sort = 3;
+}
+message ViewFilter {
+ string field_id = 1;
+}
+message ViewGroup {
+ string group_field_id = 1;
+ oneof one_of_sub_group_field_id { string sub_group_field_id = 2; };
+}
+message ViewSort {
+ string field_id = 1;
+}